aboutsummaryrefslogtreecommitdiffstats
path: root/config/hypr/scripts/KillActiveProcess.sh
diff options
context:
space:
mode:
authorDon Williams <don.e.williams@gmail.com>2026-01-08 21:31:11 -0500
committerDon Williams <don.e.williams@gmail.com>2026-01-08 21:31:11 -0500
commitc65f9fe0412dafdadee17ee3dc7c42285dcc3753 (patch)
treeafa14ef290ec9ffeec2b3b0a30b06ce081445f81 /config/hypr/scripts/KillActiveProcess.sh
parent3a423138021325a6d97ab0538625305795a6b1c1 (diff)
Fixing more scripts for Hyprland-Dots
- `WallustSwww.sh` now reads the focused monitor’s cache file (or parses swww query per-monitor) to pick the correct wallpaper path - Eliminating the previous “last line wins” bug on multi-monitor setups. - `PortalHyprland.sh` suppresses harmless killall errors and launches only the first available portal binary in each category (hyprland + general) - Avoiding duplicate processes when both `/usr/lib` and `/usr/libexec` variants exist. - `KillActiveProcess.sh` checks that Hyprland returned a numeric PID before calling kill - Notifies the user when no active window is available instead of throwing kill usage errors. On branch development Your branch is up to date with 'origin/development'. Changes to be committed: modified: CHANGELOG.md modified: config/hypr/scripts/KillActiveProcess.sh modified: config/hypr/scripts/PortalHyprland.sh modified: config/hypr/scripts/WallustSwww.sh
Diffstat (limited to 'config/hypr/scripts/KillActiveProcess.sh')
-rwxr-xr-xconfig/hypr/scripts/KillActiveProcess.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/config/hypr/scripts/KillActiveProcess.sh b/config/hypr/scripts/KillActiveProcess.sh
index 2bc108f2..d9d26bb3 100755
--- a/config/hypr/scripts/KillActiveProcess.sh
+++ b/config/hypr/scripts/KillActiveProcess.sh
@@ -7,5 +7,10 @@
# Get id of an active window
active_pid=$(hyprctl activewindow | grep -o 'pid: [0-9]*' | cut -d' ' -f2)
+if [[ -z "$active_pid" || ! "$active_pid" =~ ^[0-9]+$ ]]; then
+ notify-send -u low -i "$HOME/.config/swaync/images/error.png" "Kill Active Window" "No active window PID found."
+ exit 1
+fi
+
# Close active window
-kill $active_pid \ No newline at end of file
+kill "$active_pid"
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage