Compare commits
29 Commits
08df911366
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 513ab50cce | |||
| e66c1994e8 | |||
| 371dd9a89b | |||
| d6055a3be6 | |||
| b158a5c4bf | |||
| 87250a1fda | |||
| 2d8321a530 | |||
| 43ce33acdd | |||
| fc2cc413ba | |||
| ead03d60e0 | |||
| 1dcf8807a6 | |||
| e8abfb085f | |||
| cd8450330e | |||
| 6f7715f1cb | |||
| a0d45f6d31 | |||
| e80d978510 | |||
| 7d1de3ad8e | |||
| a147ff681e | |||
| 9c5d01e242 | |||
| 2e57d9defb | |||
| 83e9159d0e | |||
| b3ff021675 | |||
| a7fa1306e8 | |||
| 913ad1c4d0 | |||
| 635e5212ec | |||
| 22b11f9aad | |||
| d36f027fc5 | |||
| 269ced240d | |||
| 707c3256db |
@@ -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
|
||||
@@ -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/
|
||||
.local/share/icons/
|
||||
.config/kitty/kitty.conf.bak
|
||||
stow_me/.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):
|
||||
- `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 |
|
||||
|
||||
@@ -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"
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -0,0 +1,3 @@
|
||||
function sudo!!
|
||||
eval sudo $history[1]
|
||||
end
|
||||
File diff suppressed because it is too large
Load Diff
Executable
+76
@@ -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
|
||||
|
||||
|
||||
Executable
+75
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user