From 3a423138021325a6d97ab0538625305795a6b1c1 Mon Sep 17 00:00:00 2001 From: Don Williams Date: Thu, 8 Jan 2026 21:22:30 -0500 Subject: Fixing the next three scripts - `Tak0-Per-Window-Switch.sh` now records the listener PID in ``~/.cache/kb_layout_per_window.listener.pid`` - reuses it if still running, preventing multiple background listeners - reports missing Hyprland sockets without exiting the main script. - `WaybarScripts.sh` adds a `launch_files()` helper that checks `$files` before execution; - if unset, it shows a notification instead of running an empty command. - `sddm_wallpaper.sh` validates `~/.config/rofi/wallust/colors-rofi.rasi` before use - extracts colors via a helper, and aborts with a notification if any required colors are missing. On branch development Your branch is up to date with 'origin/development'. Changes to be committed: modified: CHANGELOG.md modified: config/hypr/scripts/Tak0-Per-Window-Switch.sh modified: config/hypr/scripts/WaybarScripts.sh modified: config/hypr/scripts/sddm_wallpaper.sh --- config/hypr/scripts/WaybarScripts.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'config/hypr/scripts/WaybarScripts.sh') diff --git a/config/hypr/scripts/WaybarScripts.sh b/config/hypr/scripts/WaybarScripts.sh index d2205c42..54f7a4b4 100755 --- a/config/hypr/scripts/WaybarScripts.sh +++ b/config/hypr/scripts/WaybarScripts.sh @@ -24,6 +24,14 @@ if [[ -z "$term" ]]; then fi # Execute accordingly based on the passed argument +launch_files() { + if [[ -z "$files" ]]; then + notify-send -u low -i "$HOME/.config/swaync/images/error.png" "Waybar: files" "Set \$files in 01-UserDefaults.conf or install a default file manager." + return 1 + fi + eval "$files &" +} + if [[ "$1" == "--btop" ]]; then $term --title btop sh -c 'btop' elif [[ "$1" == "--nvtop" ]]; then @@ -33,7 +41,7 @@ elif [[ "$1" == "--nmtui" ]]; then elif [[ "$1" == "--term" ]]; then $term & elif [[ "$1" == "--files" ]]; then - $files & + launch_files else echo "Usage: $0 [--btop | --nvtop | --nmtui | --term]" echo "--btop : Open btop in a new term" -- cgit v1.2.3