Renamed hyprland folder in /usr/share to hypr to override default hyprland configs
All checks were successful
bluebuild / Build Custom Image (recipe.yml) (push) Successful in 57s
All checks were successful
bluebuild / Build Custom Image (recipe.yml) (push) Successful in 57s
This commit is contained in:
18
files/system/usr/share/hypr/scripts/hypr_power/hypr_close_clients
Executable file
18
files/system/usr/share/hypr/scripts/hypr_power/hypr_close_clients
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
HYPRCMDS=$(hyprctl -j clients | jq -j '.[] | "dispatch closewindow address:\(.address); "')
|
||||
hyprctl --batch "$HYPRCMDS" >>/tmp/hyprexitwithgrace.log 2>&1
|
||||
|
||||
notify-send "power controls" "Closing Applications..."
|
||||
|
||||
sleep 2
|
||||
|
||||
COUNT=$(hyprctl clients | grep "class:" | wc -l)
|
||||
|
||||
if [ "$COUNT" -eq "0" ]; then
|
||||
notify-send "power controls" "Closed Applications."
|
||||
return
|
||||
else
|
||||
notify-send "power controls" "Some apps didn't close. Not shutting down."
|
||||
exit 1
|
||||
fi
|
5
files/system/usr/share/hypr/scripts/hypr_power/hypr_logout
Executable file
5
files/system/usr/share/hypr/scripts/hypr_power/hypr_logout
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
/usr/share/hypr/scripts/hypr_power/hypr_close_clients
|
||||
|
||||
hyprctl dispatch exit
|
5
files/system/usr/share/hypr/scripts/hypr_power/hypr_reboot
Executable file
5
files/system/usr/share/hypr/scripts/hypr_power/hypr_reboot
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
/usr/share/hypr/scripts/hypr_power/hypr_close_clients
|
||||
|
||||
systemctl reboot
|
5
files/system/usr/share/hypr/scripts/hypr_power/hypr_shutdown
Executable file
5
files/system/usr/share/hypr/scripts/hypr_power/hypr_shutdown
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
/usr/share/hypr/scripts/hypr_power/hypr_close_clients
|
||||
|
||||
systemctl poweroff
|
Reference in New Issue
Block a user