Compare commits

..

29 Commits

Author SHA1 Message Date
glennigen 513ab50cce Update stow_me/.config/fish/functions/sll.fish 2026-07-14 22:10:28 +02:00
glennigen e66c1994e8 Update stow_me/.config/fish/functions/ll.fish 2026-07-14 22:08:50 +02:00
glennigen 371dd9a89b Delete stow_me/.config/fish/conf.d/uv.env.fish 2026-07-14 22:01:52 +02:00
glennigen d6055a3be6 rename script 2026-07-06 19:19:54 +02:00
glennigen b158a5c4bf ret app_close_and_restart og app_close_and_shutdown
fjernet: discord
tilføjet equibop, 1password
2026-06-30 20:38:05 +02:00
glennigen 87250a1fda fish: tilføj uv/Hermes PATH-opsætning
- Tilføj conf.d/uv.env.fish til at source uv environment
- Tilføj ~/.local/bin til PATH i config.fish (Hermes Agent)
- Opdater fish_user_paths med ~/.local/bin
2026-05-24 17:41:03 +02:00
glennigen 2d8321a530 Refaktorer shutdown/genstart scripts: bekræftelse først, nedtælling til sidst
- Flyt Y/n bekræftelse til toppen, inden programmer lukkes
- Afslut med det samme ved 'n' i stedet for at køre alt først
- Erstat slutprompt med 3-sekunders nedtælling (Ctrl+C for at afbryde)
- Oversæt alle kommentarer og beskeder fra dansk til engelsk
2026-05-23 23:32:01 +02:00
glennigen 43ce33acdd chore: ret .gitignore — fix kitty.conf.bak-sti og fjern irrelevante entries
Fjern .local/share/fonts/ og .local/share/icons/ (håndteres af Ansible).
Ret kitty.conf.bak-stien til stow_me/.config/kitty/kitty.conf.bak
så den faktisk ignoreres.
2026-05-22 22:47:20 +02:00
glennigen fc2cc413ba docs: oversæt README til dansk 2026-05-22 22:32:00 +02:00
glennigen ead03d60e0 docs: tilføj Ansible-reference og font-info til README
- Tilføj link til ansible-repo øverst for automatisk systemopsætning
- Nævn JetBrainsMono Nerd Font Mono og Catppuccin Macchiato i Kitty-beskrivelse
2026-05-22 22:27:54 +02:00
glennigen 1dcf8807a6 feat: sæt JetBrainsMono Nerd Font Mono som terminal font i VSCodium 2026-05-22 22:25:29 +02:00
glennigen e8abfb085f docs: opdater README efter flytning til ansible-repo
- Fjern Fedora KDE setup guide sektion og indekslink
- Fjern fedora/kde/ fra repo-strukturen
2026-05-22 19:01:28 +02:00
glennigen cd8450330e chore: fjern Ansible og Fedora KDE setup — flyttet til eget repo
Alt indhold under fedora/kde/ansible/, fedora/kde/installation.md
og fedora/kde/kde_shortcuts/ er flyttet til git.itedb.dk/glennigen/ansible
2026-05-22 18:58:58 +02:00
glennigen 6f7715f1cb feat: omdøb og udvid KDE shortcuts-fil
- Omdøb 1password_shortcuts.kksrc til custom_shortcuts.kksrc
- Tilføj genveje til app_close_and_shutdown og app_close_and_reboot via Kitty
  - Meta+Ctrl+Alt+S → shutdown-script
  - Meta+Ctrl+Alt+R → reboot-script
2026-05-22 18:48:50 +02:00
glennigen a0d45f6d31 docs: tilføj reference til Ansible-setup i installation.md 2026-05-22 18:35:27 +02:00
glennigen e80d978510 feat: tilføj Tailscale til Ansible-setup
- Tilføj Tailscale repo i tasks/repos.yml
- Aktiver og start tailscaled via systemd i tasks/system.yml
- Tilføj tailscale, kitty, lsd og glow til dnf_packages.yml
- Tilføj tailscale up som manuelt trin i README
2026-05-22 18:28:47 +02:00
glennigen 7d1de3ad8e feat: tilføj Ansible-playbook til Fedora KDE setup
- Opret site.yml som hovedindgang til playbooken
- Opdel tasks i separate filer: rpmfusion, repos, dnf, flatpak, system
- Pakkelister i vars/ for nem redigering uden at røre logikken
- Auto-detektér Fedora-version og Intel CPU via Ansible facts
- Tilføj README med kørselsvejledning og manuelle trin
2026-05-22 18:13:05 +02:00
glennigen a147ff681e docs: rewrite README and update installation guide
- Rewrite README with index, repo structure tree and contents breakdown
- Fix stow command: use `stow -d stow_me/ -t ~ .` with explicit flags
- Rewrite installation.md with cleaner index and back-to-index links
- Add bash syntax highlighting to all code blocks
- Fix heading hierarchy: Install packages promoted to top-level section
- Break Flatpak install into one package per line
- Add claudeCode.preferredLocation to VSCodium settings
2026-05-22 17:23:53 +02:00
glennigen 9c5d01e242 refactor(dotfiles):
flyt alle configs ind i stow_me/ mappe

Omstrukturerer repo så stow kan bruges korrekt med en dedikeret
stow_me/ mappe som kilde, i stedet for roden af repo.
2026-05-22 16:37:18 +02:00
glennigen 2e57d9defb Changed shutdown/reboot dialog from zenity to
directly in terminal.
2026-05-22 16:15:45 +02:00
glennigen 83e9159d0e created app close script for shutdown and reboot 2026-05-21 20:38:00 +02:00
glennigen b3ff021675 Changes to be committed:
new file:   .config/VSCodium/User/settings.json

VSCodium user settings
2026-05-20 18:05:59 +02:00
glennigen a7fa1306e8 Changes to be committed:
new file:   .config/fish/conf.d/fish_frozen_key_bindings.fish
	new file:   .config/fish/conf.d/fish_frozen_theme.fish
	modified:   .config/fish/fish_variables
	new file:   .config/fish/functions/sudo!!.fish
2026-05-20 18:05:59 +02:00
glennigen 913ad1c4d0 added io.github.lullabyX.sone to flatpak packages 2026-05-17 18:31:01 +02:00
glennigen 635e5212ec Changes to be committed:
modified:   fedora/kde/installation.md
	new file:   fedora/kde/kde_shortcuts/1password_shortcuts.kksrc
2026-05-16 02:02:46 +02:00
glennigen 22b11f9aad Changes to be committed:
modified:   fedora/kde/installation.md
2026-05-16 01:48:40 +02:00
glennigen d36f027fc5 Changes to be committed:
modified:   fedora/kde/installation.md
2026-05-16 01:46:16 +02:00
glennigen 269ced240d Change Multimedia section 2026-04-28 22:12:50 +02:00
glennigen 707c3256db Change Multimedia section 2026-04-28 22:11:48 +02:00
51 changed files with 3271 additions and 172 deletions
-33
View File
@@ -1,33 +0,0 @@
# This file contains fish universal variable definitions.
# VERSION: 3.0
SETUVAR __fish_initialized:3800
SETUVAR fish_color_autosuggestion:brblack
SETUVAR fish_color_cancel:\x2dr
SETUVAR fish_color_command:normal
SETUVAR fish_color_comment:red
SETUVAR fish_color_cwd:green
SETUVAR fish_color_cwd_root:red
SETUVAR fish_color_end:green
SETUVAR fish_color_error:brred
SETUVAR fish_color_escape:brcyan
SETUVAR fish_color_history_current:\x2d\x2dbold
SETUVAR fish_color_host:normal
SETUVAR fish_color_host_remote:yellow
SETUVAR fish_color_normal:normal
SETUVAR fish_color_operator:brcyan
SETUVAR fish_color_param:cyan
SETUVAR fish_color_quote:yellow
SETUVAR fish_color_redirection:cyan\x1e\x2d\x2dbold
SETUVAR fish_color_search_match:white\x1e\x2d\x2dbackground\x3dbrblack
SETUVAR fish_color_selection:white\x1e\x2d\x2dbold\x1e\x2d\x2dbackground\x3dbrblack
SETUVAR fish_color_status:red
SETUVAR fish_color_user:brgreen
SETUVAR fish_color_valid_path:\x2d\x2dunderline
SETUVAR fish_greeting:
SETUVAR fish_key_bindings:fish_default_key_bindings
SETUVAR fish_pager_color_completion:normal
SETUVAR fish_pager_color_description:yellow\x1e\x2di
SETUVAR fish_pager_color_prefix:normal\x1e\x2d\x2dbold\x1e\x2d\x2dunderline
SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan
SETUVAR fish_pager_color_selected_background:\x2dr
SETUVAR fish_user_paths:/home/glennigen/\x2enpm\x2dglobal/bin
-4
View File
@@ -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
-4
View File
@@ -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
View File
@@ -1,3 +1 @@
.local/share/fonts/
.local/share/icons/
.config/kitty/kitty.conf.bak
stow_me/.config/kitty/kitty.conf.bak
+115 -15
View File
@@ -1,21 +1,121 @@
## Installation (stow on Linux)
# .dotfiles
Assuming the repository is already present locally (e.g., at ~/.dotfiles):
- `git clone https://codeberg.org/GlennIgen/.dotfiles.git`
Personlige dotfiles til Fedora KDE, styret med GNU Stow.
> 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
stow .
```
- 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"
stow -d stow_me/ -t ~ .
```
Notes:
- Resolve any file conflicts before running `stow` (move or remove existing files).
- This repository is private; manage updates using your preferred method.
- `-d stow_me/` sætter stow-mappen, `-t ~` sætter målet — intet uden for `stow_me/` røres.
- Forhåndsvis ændringer med `stow -n -d stow_me/ -t ~ .` inden du kører.
- 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 |
-113
View File
@@ -1,113 +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)
2. [Install packages](#install-packages)
1. [DNF](#dnf)
2. [Flatpak](#flatpak)
3. [Configs](#configs)
1. [Jottacloud](#jottacloud-1)
2. [Firefox about:config](#firefox-aboutconfig)
## RPM Fusion Tweaks
[Index](#index)
> [RPM Fusion](https://rpmfusion.org/)\
> [RPM Fusion Configurations](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
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
```
#### 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
```
##### Flatpak
```
flatpak install 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
```
#### 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
```
[TOP](#installations-for-new-fedora-kde-instance)
@@ -0,0 +1,5 @@
{
"editor.selectionClipboard": false,
"claudeCode.preferredLocation": "panel",
"terminal.integrated.fontFamily": "JetBrainsMono Nerd Font Mono"
}
@@ -0,0 +1,14 @@
# This file was created by fish when upgrading to version 4.3, to migrate
# the 'fish_key_bindings' variable from its old default scope (universal)
# to its new default scope (global). We recommend you delete this file
# and configure key bindings in ~/.config/fish/config.fish if needed.
# set --global fish_key_bindings fish_default_key_bindings
# Prior to version 4.3, fish shipped an event handler that runs
# `set --universal fish_key_bindings fish_default_key_bindings`
# whenever the fish_key_bindings variable is erased.
# This means that as long as any fish < 4.3 is still running on this system,
# we cannot complete the migration.
# As a workaround, erase the universal variable at every shell startup.
set --erase --universal fish_key_bindings
@@ -0,0 +1,37 @@
# This file was created by fish when upgrading to version 4.3, to migrate
# theme variables from universal to global scope.
# Don't edit this file, as it will be written by the web-config tool (`fish_config`).
# To customize your theme, delete this file and see
# help interactive#syntax-highlighting
# or
# man fish-interactive | less +/^SYNTAX.HIGHLIGHTING
# for appropriate commands to add to ~/.config/fish/config.fish instead.
# See also the release notes for fish 4.3.0 (run `help relnotes`).
set --global fish_color_autosuggestion brblack
set --global fish_color_cancel -r
set --global fish_color_command normal
set --global fish_color_comment red
set --global fish_color_cwd green
set --global fish_color_cwd_root red
set --global fish_color_end green
set --global fish_color_error brred
set --global fish_color_escape brcyan
set --global fish_color_history_current --bold
set --global fish_color_host normal
set --global fish_color_host_remote yellow
set --global fish_color_normal normal
set --global fish_color_operator brcyan
set --global fish_color_param cyan
set --global fish_color_quote yellow
set --global fish_color_redirection cyan --bold
set --global fish_color_search_match white --background=brblack
set --global fish_color_selection white --bold --background=brblack
set --global fish_color_status red
set --global fish_color_user brgreen
set --global fish_color_valid_path --underline
set --global fish_pager_color_completion normal
set --global fish_pager_color_description yellow -i
set --global fish_pager_color_prefix normal --bold --underline
set --global fish_pager_color_progress brwhite --background=cyan
set --global fish_pager_color_selected_background -r
@@ -2,3 +2,6 @@ if status is-interactive
# Commands to run in interactive sessions can go here
fastfetch
end
# Hermes Agent — ensure ~/.local/bin is on PATH
fish_add_path "$HOME/.local/bin"
+5
View File
@@ -0,0 +1,5 @@
# This file contains fish universal variable definitions.
# VERSION: 3.0
SETUVAR __fish_initialized:4300
SETUVAR fish_greeting:
SETUVAR fish_user_paths:/home/glennigen/\x2elocal/bin\x1e/home/glennigen/\x2enpm\x2dglobal/bin
+3
View File
@@ -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
+4
View File
@@ -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
@@ -0,0 +1,3 @@
function sudo!!
eval sudo $history[1]
end
File diff suppressed because it is too large Load Diff
+76
View File
@@ -0,0 +1,76 @@
#!/bin/bash
# Function for Flatpak apps
close_flatpak() {
local app="$1"
flatpak kill "$app"
for i in $(seq 1 5); do
sleep 1
if ! pgrep -f "$app" > /dev/null; then
echo "$app closed (attempt $i)"
return
fi
echo "$app still running, retrying ($i/5)..."
flatpak kill "$app"
done
echo "$app force closing (KILL)..."
pkill -KILL -f "$app"
pkill -KILL -f bwrap 2>/dev/null # kill sandbox container
}
# Function for native apps
close_app() {
local app="$1"
pkill -TERM -f "$app"
for i in $(seq 1 5); do
sleep 1
if ! pgrep -f "$app" > /dev/null; then
echo "$app closed (attempt $i)"
return
fi
echo "$app still running, retrying ($i/5)..."
pkill -TERM -f "$app"
done
echo "$app force closing (KILL)..."
pkill -KILL -f "$app"
}
# Prompt
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 "rocks.shy.VacuumTube"
close_app "firefox"
close_app "equibop"
close_app "1password"
# Close Steam
if pgrep -f steam > /dev/null; then
steam -shutdown
for i in $(seq 1 5); do
sleep 1
if ! pgrep -f steam > /dev/null; then
echo "Steam closed (attempt $i)"
break
fi
echo "Steam still running ($i/5)..."
done
pkill -KILL -f steam 2>/dev/null
else
echo "Steam not running, skipping..."
fi
# Countdown Ctrl+C to cancel
echo "All programs closed. Rebooting in:"
for i in 3 2 1; do
echo " $i..."
sleep 1
done
sudo shutdown -r now
+75
View File
@@ -0,0 +1,75 @@
#!/bin/bash
# Function for Flatpak apps
close_flatpak() {
local app="$1"
flatpak kill "$app"
for i in $(seq 1 5); do
sleep 1
if ! pgrep -f "$app" > /dev/null; then
echo "$app closed (attempt $i)"
return
fi
echo "$app still running, retrying ($i/5)..."
flatpak kill "$app"
done
echo "$app force closing (KILL)..."
pkill -KILL -f "$app"
pkill -KILL -f bwrap 2>/dev/null # kill sandbox container
}
# Function for native apps
close_app() {
local app="$1"
pkill -TERM -f "$app"
for i in $(seq 1 5); do
sleep 1
if ! pgrep -f "$app" > /dev/null; then
echo "$app closed (attempt $i)"
return
fi
echo "$app still running, retrying ($i/5)..."
pkill -TERM -f "$app"
done
echo "$app force closing (KILL)..."
pkill -KILL -f "$app"
}
# Prompt
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 "rocks.shy.VacuumTube"
close_app "firefox"
close_app "equibop"
close_app "1password"
# Close Steam
if pgrep -f steam > /dev/null; then
steam -shutdown
for i in $(seq 1 5); do
sleep 1
if ! pgrep -f steam > /dev/null; then
echo "Steam closed (attempt $i)"
break
fi
echo "Steam still running ($i/5)..."
done
pkill -KILL -f steam 2>/dev/null
else
echo "Steam not running, skipping..."
fi
# Countdown Ctrl+C to cancel
echo "All programs closed. Shutting down in:"
for i in 3 2 1; do
echo " $i..."
sleep 1
done
sudo shutdown -h now