scripts reorganize

This commit is contained in:
2026-10-06 22:34:05 +02:00
parent a2a056a68d
commit 0734bee219
60 changed files with 824 additions and 5 deletions

28
scripts/WMScripts/murder.sh Executable file
View File

@@ -0,0 +1,28 @@
#!/usr/bin/env bash
# This script allows the user to select a window
# then nicely asks it to shut down (SIGTERM).
# if the window does not shut down, it is murdered instead (SIGKILL)
case "$XDG_CURRENT_DESKTOP" in
"Hyprland")
id=$(hyprprop | jq '.pid')
;;
"sway")
id=$(wlprop | jq '.pid')
;;
"i3")
id=$(xprop _NET_WM_PID | awk '{print $3}')
;;
*)
dunstify -u low -t 2000 -i ~/.icons/candy-icons/apps/scalable/clamav.svg "This session type is not supported by murder.sh"
exit
esac
[[ ! "$id" =~ [0-9]+ ]] && exit
kill "$id"
sleep 2
if [[ $(ps -p "$id" 2>&1 > /dev/null) -ne 0 ]]; then
kill -s 9 "$id"
fi