feat: finally adds unfuck script for when things go wrong

This commit is contained in:
Ahwx 2025-05-09 00:46:59 +02:00
parent 6c43318f71
commit 354115b7a3
2 changed files with 70 additions and 8 deletions

View file

@ -0,0 +1,54 @@
#!/usr/bin/env bash
# unfuck system when shit goes wrong
usage() {
echo "usage: unfuck [OPTION]"
echo "example: unfuck everything"
}
unfuck_wallpaper() {
pkill swww-daemon
setsid swww-daemon &
}
unfuck_bar() {
pkill waybar
setsid waybar &
}
unfuck_networkmanager() {
sudo systemctl restart NetworkManager
}
unfuck_spotify() {
if pgrep ncspot; then
pkill ncspot
ncspot
elif pgrep spotify; then
pkill spotify
spotify
fi
}
unfuck_screenlock() {
hyprctl --instance 0 'keyword misc:allow_session_lock_restore 1'
hyprctl --instance 0 'dispatch exec lockscreen'
}
case $1 in
"")
echo "what is fucked?"
;;
-h | --help)
usage
;;
everything)
unfuck_screenlock
unfuck_bar
unfuck_spotify
unfuck_wallpaper
;;
*)
eval "unfuck_$1"
;;
esac