Compare commits
19 Commits
2e57d9defb
..
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 513ab50cce | |||
| e66c1994e8 | |||
| 371dd9a89b | |||
| d6055a3be6 | |||
| b158a5c4bf | |||
| 87250a1fda | |||
| 2d8321a530 | |||
| 43ce33acdd | |||
| fc2cc413ba | |||
| ead03d60e0 | |||
| 1dcf8807a6 | |||
| e8abfb085f | |||
| cd8450330e | |||
| 6f7715f1cb | |||
| a0d45f6d31 | |||
| e80d978510 | |||
| 7d1de3ad8e | |||
| a147ff681e | |||
| 9c5d01e242 |
@@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
"editor.selectionClipboard": false
|
|
||||||
}
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
function ll --wraps='lsd -Alh --group-dirs first' --description 'alias ll lsd -Alh --group-dirs first'
|
|
||||||
lsd -Alh --group-dirs first $argv
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
function sll --wraps='sudo lsd -Alh --group-dirs first' --description 'alias sll sudo lsd -Alh --group-dirs first'
|
|
||||||
sudo lsd -Alh --group-dirs first $argv
|
|
||||||
|
|
||||||
end
|
|
||||||
+1
-3
@@ -1,3 +1 @@
|
|||||||
.local/share/fonts/
|
stow_me/.config/kitty/kitty.conf.bak
|
||||||
.local/share/icons/
|
|
||||||
.config/kitty/kitty.conf.bak
|
|
||||||
|
|||||||
@@ -1,21 +1,121 @@
|
|||||||
## Installation (stow on Linux)
|
# .dotfiles
|
||||||
|
|
||||||
Assuming the repository is already present locally (e.g., at ~/.dotfiles):
|
Personlige dotfiles til Fedora KDE, styret med GNU Stow.
|
||||||
- `git clone https://codeberg.org/GlennIgen/.dotfiles.git`
|
|
||||||
|
> For automatisk opsætning af hele systemet inkl. pakker, fonte og ikon-tema — se [ansible-repo'et](https://git.itedb.dk/glennigen/ansible).
|
||||||
|
|
||||||
|
## Indeks
|
||||||
|
|
||||||
|
1. [Repo-struktur](#repo-struktur)
|
||||||
|
2. [Installation](#installation)
|
||||||
|
- [Klon & stow](#klon--stow)
|
||||||
|
- [Sæt fish som login-shell](#sæt-fish-som-login-shell)
|
||||||
|
3. [Indhold](#indhold)
|
||||||
|
- [Fish shell](#fish-shell)
|
||||||
|
- [Kitty terminal](#kitty-terminal)
|
||||||
|
- [PipeWire](#pipewire)
|
||||||
|
- [VSCodium](#vscodium)
|
||||||
|
- [OBS Studio](#obs-studio)
|
||||||
|
- [Scripts](#scripts)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Repo-struktur
|
||||||
|
|
||||||
1. From the repo root, run:
|
|
||||||
```
|
```
|
||||||
|
.dotfiles/
|
||||||
|
└── stow_me/ ← GNU Stow-pakke (symlinket til ~)
|
||||||
|
├── .config/
|
||||||
|
│ ├── fish/ ← Fish shell-config, funktioner & completions
|
||||||
|
│ ├── kitty/ ← Kitty terminal-config (Catppuccin Macchiato)
|
||||||
|
│ ├── pipewire/ ← PipeWire audio (sinks loopback)
|
||||||
|
│ └── VSCodium/ ← VSCodium brugerindstillinger
|
||||||
|
├── obs-settings/ ← OBS Studio profil- og sceneindstillinger
|
||||||
|
└── scripts/ ← Shell-scripts (app_close_and_restart, shutdown)
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
### Klon & stow
|
||||||
|
|
||||||
|
```fish
|
||||||
|
git clone https://git.itedb.dk/glennigen/.dotfiles.git ~/.dotfiles
|
||||||
cd ~/.dotfiles
|
cd ~/.dotfiles
|
||||||
stow .
|
stow -d stow_me/ -t ~ .
|
||||||
```
|
|
||||||
- Running `stow .` from the repo root is sufficient; no `--target` is needed.
|
|
||||||
- Preview changes with `stow -n .` before applying.
|
|
||||||
|
|
||||||
2. Optional — set fish as your login shell:
|
|
||||||
```
|
|
||||||
chsh -s "$(which fish)" "$USER"
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Notes:
|
- `-d stow_me/` sætter stow-mappen, `-t ~` sætter målet — intet uden for `stow_me/` røres.
|
||||||
- Resolve any file conflicts before running `stow` (move or remove existing files).
|
- Forhåndsvis ændringer med `stow -n -d stow_me/ -t ~ .` inden du kører.
|
||||||
- This repository is private; manage updates using your preferred method.
|
- Løs eventuelle konflikter inden stow køres (flyt eller slet de eksisterende filer).
|
||||||
|
|
||||||
|
### Sæt fish som login-shell
|
||||||
|
|
||||||
|
```fish
|
||||||
|
chsh -s (which fish) $USER
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Indhold
|
||||||
|
|
||||||
|
### Fish shell
|
||||||
|
|
||||||
|
`stow_me/.config/fish/`
|
||||||
|
|
||||||
|
| Fil/mappe | Formål |
|
||||||
|
|---|---|
|
||||||
|
| `config.fish` | Kører `fastfetch` ved interaktive sessioner |
|
||||||
|
| `fish_variables` | Fish universelle variabler |
|
||||||
|
| `conf.d/fish_frozen_key_bindings.fish` | Tastaturgenvej-overrides |
|
||||||
|
| `conf.d/fish_frozen_theme.fish` | Tema-config |
|
||||||
|
| `completions/jotta-cli.fish` | Tab-completions til jotta-cli |
|
||||||
|
|
||||||
|
**Funktioner:**
|
||||||
|
|
||||||
|
| Funktion | Beskrivelse |
|
||||||
|
|---|---|
|
||||||
|
| `ll` | `lsd -Alh --group-dirs first` |
|
||||||
|
| `sll` | `sudo lsd -Alh --group-dirs first` |
|
||||||
|
| `dup` | `sudo dnf upgrade` |
|
||||||
|
| `sudo!!` | Kør forrige kommando med sudo |
|
||||||
|
| `zup` | `sudo zypper ref && sudo zypper dup` (openSUSE) |
|
||||||
|
|
||||||
|
### Kitty terminal
|
||||||
|
|
||||||
|
`stow_me/.config/kitty/`
|
||||||
|
|
||||||
|
- `kitty.conf` — hovedkonfig (font: JetBrainsMono Nerd Font Mono, tema: Catppuccin Macchiato)
|
||||||
|
- `Catppuccin-Macchiato.conf` — farvetema
|
||||||
|
- `current-theme.conf` — aktivt tema (symlink/include)
|
||||||
|
|
||||||
|
### PipeWire
|
||||||
|
|
||||||
|
`stow_me/.config/pipewire/pipewire.conf.d/sinks-loopback.conf`
|
||||||
|
|
||||||
|
Brugerdefineret loopback sink-konfiguration.
|
||||||
|
|
||||||
|
### VSCodium
|
||||||
|
|
||||||
|
`stow_me/.config/VSCodium/User/settings.json`
|
||||||
|
|
||||||
|
Brugerindstillinger til VSCodium inkl. terminal-font.
|
||||||
|
|
||||||
|
### OBS Studio
|
||||||
|
|
||||||
|
`stow_me/obs-settings/`
|
||||||
|
|
||||||
|
OBS-indstillinger er opdelt i to mapper der spejler OBS's config-layout:
|
||||||
|
|
||||||
|
- `Profile-files/GlennIgen/` — encoder- og optagelsesindstillinger
|
||||||
|
- `Settings-files/` — globale indstillinger, scener, plugin-configs (websocket, rtmp-services, plugin manager)
|
||||||
|
|
||||||
|
### Scripts
|
||||||
|
|
||||||
|
`stow_me/scripts/`
|
||||||
|
|
||||||
|
| Script | Beskrivelse |
|
||||||
|
|---|---|
|
||||||
|
| `app_close_and_restart.sh` | Luk en app og genstart den |
|
||||||
|
| `app_close_and_shutdown.sh` | Luk en app og sluk systemet |
|
||||||
|
|||||||
@@ -1,185 +0,0 @@
|
|||||||
# Installations for new Fedora KDE instance
|
|
||||||
|
|
||||||
## Index
|
|
||||||
1. [RPM Fusion Tweaks](#rpm-fusion-tweaks)
|
|
||||||
|
|
||||||
1. [Configurations](#configurations)
|
|
||||||
|
|
||||||
2. [Multimedia](#multimedia)
|
|
||||||
|
|
||||||
1. [Intel (Recent CPU)](#intel-recent-cpu)
|
|
||||||
|
|
||||||
|
|
||||||
3. [DVD stuff](#dvd-stuff)
|
|
||||||
|
|
||||||
4. [Firmware stuff](#firmware-stuff)
|
|
||||||
|
|
||||||
|
|
||||||
2. [Packages](#packages)
|
|
||||||
|
|
||||||
1. [Import keys & repos](#import-keys--repos)
|
|
||||||
|
|
||||||
1. [1Password](#1password)
|
|
||||||
|
|
||||||
2. [Jottacloud](#jottacloud)
|
|
||||||
|
|
||||||
3. [VSCodium](#vscodium)
|
|
||||||
|
|
||||||
4. [Cider](#cider)
|
|
||||||
|
|
||||||
|
|
||||||
2. [Install packages](#install-packages)
|
|
||||||
|
|
||||||
1. [DNF](#dnf)
|
|
||||||
|
|
||||||
2. [Flatpak](#flatpak)
|
|
||||||
|
|
||||||
|
|
||||||
3. [Configs](#configs)
|
|
||||||
|
|
||||||
1. [Jottacloud](#jottacloud-1)
|
|
||||||
|
|
||||||
2. [Firefox about:config](#firefox-aboutconfig)
|
|
||||||
|
|
||||||
|
|
||||||
3. [System Settings](#system-settings)
|
|
||||||
|
|
||||||
1. [NetworkManager & systemd-resolved](#fix-common-issues-with-networkmanager--systemd-resolved)
|
|
||||||
|
|
||||||
|
|
||||||
## RPM Fusion Tweaks
|
|
||||||
[Index](#index)
|
|
||||||
|
|
||||||
> [RPM Fusion (External)](https://rpmfusion.org/)\
|
|
||||||
> [RPM Fusion Configurations (External)](https://rpmfusion.org/Configuration)
|
|
||||||
|
|
||||||
### Configurations
|
|
||||||
```
|
|
||||||
sudo dnf install https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
|
|
||||||
sudo dnf config-manager setopt fedora-cisco-openh264.enabled=1
|
|
||||||
sudo dnf update @core
|
|
||||||
sudo dnf install rpmfusion-\*-appstream-data
|
|
||||||
```
|
|
||||||
|
|
||||||
### Multimedia
|
|
||||||
> [RPM Fusion Multimedia (External)](https://rpmfusion.org/Howto/Multimedia)
|
|
||||||
```
|
|
||||||
sudo dnf swap ffmpeg-free ffmpeg --allowerasing
|
|
||||||
sudo dnf update @multimedia --setopt="install_weak_deps=False" --exclude=PackageKit-gstreamer-plugin
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Intel (Recent CPU)
|
|
||||||
```
|
|
||||||
sudo dnf install intel-media-driver
|
|
||||||
```
|
|
||||||
|
|
||||||
### DVD stuff
|
|
||||||
```
|
|
||||||
sudo dnf install rpmfusion-free-release-tainted
|
|
||||||
sudo dnf install libdvdcss
|
|
||||||
```
|
|
||||||
|
|
||||||
### Firmware stuff
|
|
||||||
```
|
|
||||||
sudo dnf install rpmfusion-nonfree-release-tainted
|
|
||||||
sudo dnf --repo=rpmfusion-nonfree-tainted install "*-firmware"
|
|
||||||
```
|
|
||||||
|
|
||||||
## Packages
|
|
||||||
[Index](#index)
|
|
||||||
|
|
||||||
|
|
||||||
### Import keys & repos
|
|
||||||
|
|
||||||
#### 1Password
|
|
||||||
```
|
|
||||||
sudo rpm --import https://downloads.1password.com/linux/keys/1password.asc
|
|
||||||
sudo sh -c 'echo -e "[1password]\nname=1Password Stable Channel\nbaseurl=https://downloads.1password.com/linux/rpm/stable/\$basearch\nenabled=1\ngpgcheck=1\nrepo_gpgcheck=1\ngpgkey=\"https://downloads.1password.com/linux/keys/1password.asc\"" > /etc/yum.repos.d/1password.repo'
|
|
||||||
sudo rpm -v --import https://download.sublimetext.com/sublimehq-rpm-pub.gpg
|
|
||||||
sudo dnf config-manager addrepo --from-repofile=https://download.sublimetext.com/rpm/stable/x86_64/sublime-text.repo
|
|
||||||
sudo dnf config-manager addrepo --from-repofile=https://repo.librewolf.net/librewolf.repo
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Jottacloud
|
|
||||||
```
|
|
||||||
sudo tee /etc/yum.repos.d/JottaCLI.repo > /dev/null << 'EOF'
|
|
||||||
[jotta-cli]
|
|
||||||
name=Jottacloud CLI
|
|
||||||
baseurl=https://repo.jotta.cloud/redhat
|
|
||||||
gpgcheck=1
|
|
||||||
gpgkey=https://repo.jotta.cloud/public.gpg
|
|
||||||
EOF
|
|
||||||
```
|
|
||||||
|
|
||||||
#### VSCodium
|
|
||||||
```
|
|
||||||
sudo tee -a /etc/yum.repos.d/vscodium.repo << 'EOF'
|
|
||||||
[gitlab.com_paulcarroty_vscodium_repo]
|
|
||||||
name=gitlab.com_paulcarroty_vscodium_repo
|
|
||||||
baseurl=https://paulcarroty.gitlab.io/vscodium-deb-rpm-repo/rpms/
|
|
||||||
enabled=1
|
|
||||||
gpgcheck=1
|
|
||||||
repo_gpgcheck=1
|
|
||||||
gpgkey=https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/raw/master/pub.gpg
|
|
||||||
metadata_expire=1h
|
|
||||||
EOF
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Cider
|
|
||||||
```
|
|
||||||
sudo rpm --import https://repo.cider.sh/RPM-GPG-KEY
|
|
||||||
sudo tee /etc/yum.repos.d/cider.repo << 'EOF'
|
|
||||||
[cidercollective]
|
|
||||||
name=Cider Collective Repository
|
|
||||||
baseurl=https://repo.cider.sh/rpm/RPMS
|
|
||||||
enabled=1
|
|
||||||
gpgcheck=1
|
|
||||||
gpgkey=https://repo.cider.sh/RPM-GPG-KEY
|
|
||||||
EOF
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
#### Install packages
|
|
||||||
|
|
||||||
##### DNF
|
|
||||||
```
|
|
||||||
sudo dnf install fastfetch stow fish steam git gh nvim tldr btop 1password sublime-text mangojuice gamemode gamescope obs-studio jotta-cli codium rpmconf Cider
|
|
||||||
```
|
|
||||||
|
|
||||||
##### Flatpak
|
|
||||||
```
|
|
||||||
flatpak install -y com.discordapp.Discord io.github.Faugus.faugus-launcher com.adamcake.Bolt com.notesnook.Notesnook com.saivert.pwvucontrol com.github.tchx84.Flatseal org.kde.kdenlive it.mijorus.gearlever com.github.Matoking.protontricks com.vysp3r.ProtonPlus org.musicbrainz.Picard io.github.lullabyX.sone
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
#### Configs
|
|
||||||
|
|
||||||
##### Jottacloud
|
|
||||||
```
|
|
||||||
run_jottad
|
|
||||||
jotta-cli help
|
|
||||||
```
|
|
||||||
|
|
||||||
##### Firefox about:config
|
|
||||||
```
|
|
||||||
accessibility.typeaheadfind.enablesound = false
|
|
||||||
media.hardwaremediakeys.enabled = false
|
|
||||||
clipboard.autocopy = false
|
|
||||||
middlemouse.paste = false
|
|
||||||
widget.gtk.native-emoji-dialog = false
|
|
||||||
```
|
|
||||||
|
|
||||||
## System Settings
|
|
||||||
|
|
||||||
### Fix common issues with NetworkManager + systemd-resolved
|
|
||||||
```
|
|
||||||
sudo ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
|
|
||||||
```
|
|
||||||
|
|
||||||
### KDE Shortcuts
|
|
||||||
|
|
||||||
#### 1Password
|
|
||||||
> Import in KDE Settings menu
|
|
||||||
|
|
||||||
|
|
||||||
[TOP](#installations-for-new-fedora-kde-instance)
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
[Custom Commands][net.local.1password-2.desktop]
|
|
||||||
Exec=1password --quick-access
|
|
||||||
Name=1password qa
|
|
||||||
|
|
||||||
[Custom Commands][net.local.1password.desktop]
|
|
||||||
Exec=1password --toggle
|
|
||||||
Name=1password
|
|
||||||
|
|
||||||
[net.local.1password-2.desktop][Global Shortcuts]
|
|
||||||
_launch=Meta+Ctrl+.
|
|
||||||
|
|
||||||
[net.local.1password.desktop][Global Shortcuts]
|
|
||||||
_launch=Meta+Ctrl+,
|
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"editor.selectionClipboard": false,
|
||||||
|
"claudeCode.preferredLocation": "panel",
|
||||||
|
"terminal.integrated.fontFamily": "JetBrainsMono Nerd Font Mono"
|
||||||
|
}
|
||||||
@@ -2,3 +2,6 @@ if status is-interactive
|
|||||||
# Commands to run in interactive sessions can go here
|
# Commands to run in interactive sessions can go here
|
||||||
fastfetch
|
fastfetch
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Hermes Agent — ensure ~/.local/bin is on PATH
|
||||||
|
fish_add_path "$HOME/.local/bin"
|
||||||
@@ -2,4 +2,4 @@
|
|||||||
# VERSION: 3.0
|
# VERSION: 3.0
|
||||||
SETUVAR __fish_initialized:4300
|
SETUVAR __fish_initialized:4300
|
||||||
SETUVAR fish_greeting:
|
SETUVAR fish_greeting:
|
||||||
SETUVAR fish_user_paths:/home/glennigen/\x2enpm\x2dglobal/bin
|
SETUVAR fish_user_paths:/home/glennigen/\x2elocal/bin\x1e/home/glennigen/\x2enpm\x2dglobal/bin
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
function ll --wraps='ls -l' --wraps='lsd -Alh --group-dirs first' --description 'alias ll=lsd -Alh --group-dirs first'
|
||||||
|
lsd -Alh --group-dirs first $argv
|
||||||
|
end
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
function sll --wraps ='sudo ls -l' --wraps='sudo lsd -Alh --group-dirs first' --description 'alias sll sudo lsd -Alh --group-dirs first'
|
||||||
|
sudo lsd -Alh --group-dirs first $argv
|
||||||
|
|
||||||
|
end
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Funktion til Flatpak apps
|
# Function for Flatpak apps
|
||||||
close_flatpak() {
|
close_flatpak() {
|
||||||
local app="$1"
|
local app="$1"
|
||||||
flatpak kill "$app"
|
flatpak kill "$app"
|
||||||
@@ -14,10 +14,10 @@ close_flatpak() {
|
|||||||
done
|
done
|
||||||
echo "$app force closing (KILL)..."
|
echo "$app force closing (KILL)..."
|
||||||
pkill -KILL -f "$app"
|
pkill -KILL -f "$app"
|
||||||
pkill -KILL -f bwrap 2>/dev/null # dræb sandbox container
|
pkill -KILL -f bwrap 2>/dev/null # kill sandbox container
|
||||||
}
|
}
|
||||||
|
|
||||||
# Funktion til native apps
|
# Function for native apps
|
||||||
close_app() {
|
close_app() {
|
||||||
local app="$1"
|
local app="$1"
|
||||||
pkill -TERM -f "$app"
|
pkill -TERM -f "$app"
|
||||||
@@ -34,13 +34,22 @@ close_app() {
|
|||||||
pkill -KILL -f "$app"
|
pkill -KILL -f "$app"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Luk apps
|
# Prompt
|
||||||
close_flatpak "com.discordapp.Discord"
|
read -r -p "Close all programs and reboot? [Y/n]: " response
|
||||||
|
response="${response:-Y}"
|
||||||
|
if [[ ! "$response" =~ ^[Yy]$ ]]; then
|
||||||
|
echo "Cancelled."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Close apps
|
||||||
close_flatpak "io.github.lullabyX.sone"
|
close_flatpak "io.github.lullabyX.sone"
|
||||||
close_flatpak "rocks.shy.VacuumTube"
|
close_flatpak "rocks.shy.VacuumTube"
|
||||||
close_app "firefox"
|
close_app "firefox"
|
||||||
|
close_app "equibop"
|
||||||
|
close_app "1password"
|
||||||
|
|
||||||
# Steam
|
# Close Steam
|
||||||
if pgrep -f steam > /dev/null; then
|
if pgrep -f steam > /dev/null; then
|
||||||
steam -shutdown
|
steam -shutdown
|
||||||
for i in $(seq 1 5); do
|
for i in $(seq 1 5); do
|
||||||
@@ -56,14 +65,12 @@ else
|
|||||||
echo "Steam not running, skipping..."
|
echo "Steam not running, skipping..."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Prompt
|
# Countdown – Ctrl+C to cancel
|
||||||
read -r -p "All programs closed. Reboot? [Y/n]: " response
|
echo "All programs closed. Rebooting in:"
|
||||||
response="${response:-Y}" # Y er default ved enter
|
for i in 3 2 1; do
|
||||||
|
echo " $i..."
|
||||||
if [[ "$response" =~ ^[Yy]$ ]]; then
|
sleep 1
|
||||||
sudo shutdown -r now
|
done
|
||||||
else
|
sudo shutdown -r now
|
||||||
echo "Reboot cancelled."
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Funktion til Flatpak apps
|
# Function for Flatpak apps
|
||||||
close_flatpak() {
|
close_flatpak() {
|
||||||
local app="$1"
|
local app="$1"
|
||||||
flatpak kill "$app"
|
flatpak kill "$app"
|
||||||
@@ -14,10 +14,10 @@ close_flatpak() {
|
|||||||
done
|
done
|
||||||
echo "$app force closing (KILL)..."
|
echo "$app force closing (KILL)..."
|
||||||
pkill -KILL -f "$app"
|
pkill -KILL -f "$app"
|
||||||
pkill -KILL -f bwrap 2>/dev/null # dræb sandbox container
|
pkill -KILL -f bwrap 2>/dev/null # kill sandbox container
|
||||||
}
|
}
|
||||||
|
|
||||||
# Funktion til native apps
|
# Function for native apps
|
||||||
close_app() {
|
close_app() {
|
||||||
local app="$1"
|
local app="$1"
|
||||||
pkill -TERM -f "$app"
|
pkill -TERM -f "$app"
|
||||||
@@ -34,13 +34,22 @@ close_app() {
|
|||||||
pkill -KILL -f "$app"
|
pkill -KILL -f "$app"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Luk apps
|
# Prompt
|
||||||
close_flatpak "com.discordapp.Discord"
|
read -r -p "Close all programs and shut down? [Y/n]: " response
|
||||||
|
response="${response:-Y}"
|
||||||
|
if [[ ! "$response" =~ ^[Yy]$ ]]; then
|
||||||
|
echo "Cancelled."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Close apps
|
||||||
close_flatpak "io.github.lullabyX.sone"
|
close_flatpak "io.github.lullabyX.sone"
|
||||||
close_flatpak "rocks.shy.VacuumTube"
|
close_flatpak "rocks.shy.VacuumTube"
|
||||||
close_app "firefox"
|
close_app "firefox"
|
||||||
|
close_app "equibop"
|
||||||
|
close_app "1password"
|
||||||
|
|
||||||
# Steam
|
# Close Steam
|
||||||
if pgrep -f steam > /dev/null; then
|
if pgrep -f steam > /dev/null; then
|
||||||
steam -shutdown
|
steam -shutdown
|
||||||
for i in $(seq 1 5); do
|
for i in $(seq 1 5); do
|
||||||
@@ -56,13 +65,11 @@ else
|
|||||||
echo "Steam not running, skipping..."
|
echo "Steam not running, skipping..."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Prompt
|
# Countdown – Ctrl+C to cancel
|
||||||
read -r -p "All programs closed. Shut down? [Y/n]: " response
|
echo "All programs closed. Shutting down in:"
|
||||||
response="${response:-Y}" # Y er default ved enter
|
for i in 3 2 1; do
|
||||||
|
echo " $i..."
|
||||||
if [[ "$response" =~ ^[Yy]$ ]]; then
|
sleep 1
|
||||||
sudo shutdown -h now
|
done
|
||||||
else
|
sudo shutdown -h now
|
||||||
echo "Shutdown cancelled."
|
|
||||||
fi
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user