system

the Chamesle handbook, init, live ISO and install helpers
git clone https://github.com/tortr-rs/system
Log | Files | Refs | README | LICENSE

exit (394B)


      1 #!/bin/sh
      2 a=$(xmessage -center -title Slate -buttons "Log Out,Restart,Shut Down,Cancel" -default Cancel -print "
      3    Log out of Slate, restart or shut down the computer?   
      4 ")
      5 power() { loginctl "$1" 2>/dev/null || doas -n "$1" || xmessage -center "$1 needs root: doas $1"; }
      6 case $a in
      7 "Log Out") pkill -TERM -u "$(id -u)" -x wmaker;;
      8 Restart) power reboot;;
      9 "Shut Down") power poweroff;;
     10 esac