Gen 426: Shell script nix files work properly now
This commit is contained in:
20
glasshouse-desktop/home/scripts/shutdown-script.nix
Normal file
20
glasshouse-desktop/home/scripts/shutdown-script.nix
Normal file
@@ -0,0 +1,20 @@
|
||||
{ self, pkgs }:
|
||||
|
||||
|
||||
pkgs.writeShellScriptBin "shutdown-script" (''
|
||||
#!/usr/bin/env zsh
|
||||
|
||||
respond="$(echo " Shutdown\n Restart\n Cancel" | rofi -dmenu)"
|
||||
|
||||
if [ $respond = ' Shutdown' ]
|
||||
then
|
||||
echo "shutdown"
|
||||
shutdown now
|
||||
elif [ $respond = ' Restart' ]
|
||||
then
|
||||
echo "restart"
|
||||
reboot
|
||||
else
|
||||
notify-send "cancel shutdown"
|
||||
fi
|
||||
'')
|
||||
Reference in New Issue
Block a user