Declared hyprland scripts
This commit is contained in:
35
hyprland/scripts/powermenu.nix
Normal file
35
hyprland/scripts/powermenu.nix
Normal file
@@ -0,0 +1,35 @@
|
||||
{ lib, config, ... }:
|
||||
|
||||
{
|
||||
home.file.".config/hypr/hyprland/scripts/powermenu.sh".text = ''
|
||||
#!/bin/bash
|
||||
|
||||
INPUT="echo -e Lock\nLogout\nReboot\nShutdown\nSuspend"
|
||||
|
||||
# Execute the input command and get the selected choice
|
||||
SELECTED=$($INPUT | fuzzel -d)
|
||||
|
||||
case "$SELECTED" in
|
||||
"Lock")
|
||||
hyprlock
|
||||
;;
|
||||
"Logout")
|
||||
hyprctl dispatch exit
|
||||
;;
|
||||
"Reboot")
|
||||
reboot
|
||||
;;
|
||||
"Shutdown")
|
||||
shutdown now
|
||||
;;
|
||||
"Suspend")
|
||||
systemctl suspend
|
||||
;;
|
||||
*)
|
||||
echo "Invalid selection"
|
||||
;;
|
||||
esac
|
||||
'';
|
||||
|
||||
home.file.".config/hypr/hyprland/scripts/powermenu.sh".force = true;
|
||||
}
|
||||
Reference in New Issue
Block a user