Skip to content

Instantly share code, notes, and snippets.

@felipedavi
Created March 25, 2021 17:43
Show Gist options
  • Save felipedavi/0bd257b8352870215fc481f9cb224291 to your computer and use it in GitHub Desktop.
Save felipedavi/0bd257b8352870215fc481f9cb224291 to your computer and use it in GitHub Desktop.
shutdown menu i3blocks
#!/usr/bin/env bash
# shutdown menu i3blocks
MENU="$(rofi -sep "|" -dmenu -i -p 'System' -width 12 -hide-scrollbar -line-padding 4 -padding 20 -lines 4 -font "Misc Termsyn 12" <<< "Lock|Logout|Reboot|Shutdown")"
case "$MENU" in
*Lock) i3lock ;;
*Logout) i3-msg exit;;
*Reboot) sudo shutdown -r now ;;
*Shutdown) sudo shutdown -P now
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment