Skip to content

Instantly share code, notes, and snippets.

@mxdevmanuel
Created July 30, 2021 18:45
Show Gist options
  • Save mxdevmanuel/a2229d427b39a9e40f2198979caa40c1 to your computer and use it in GitHub Desktop.
Save mxdevmanuel/a2229d427b39a9e40f2198979caa40c1 to your computer and use it in GitHub Desktop.
Sway power menu
#!/usr/bin/env bash
op=$( echo -e " Poweroff\n Reboot\n Suspend\n Lock\n Logout" | wofi -i --dmenu | awk '{print tolower($2)}' )
case $op in
poweroff)
;&
reboot)
;&
suspend)
systemctl $op
;;
lock)
swaylock
;;
logout)
swaymsg exit
;;
esac
@adamwojt
Copy link

Thanks!

@daisonth
Copy link

thanks

@zapling
Copy link

zapling commented Jul 25, 2023

thank you!

@sephid86
Copy link

sephid86 commented Apr 4, 2024

thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment