Skip to content

Instantly share code, notes, and snippets.

@mekb-turtle
Last active September 8, 2023 02:45
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mekb-turtle/909737b9bff3a8df4da04b7b1319968b to your computer and use it in GitHub Desktop.
Save mekb-turtle/909737b9bff3a8df4da04b7b1319968b to your computer and use it in GitHub Desktop.
rofi power menu script
#!/bin/bash
RES="$(rofi -dmenu -p "Power" <<< $'Shutdown\nRestart\nLog Out\nLock')"
if [[ "$RES" == "Shutdown" ]]; then /usr/local/sbin/do shutdown & disown; fi
if [[ "$RES" == "Restart" ]]; then /usr/local/sbin/do restart & disown; fi
if [[ "$RES" == "Log Out" ]]; then hyprctl dispatch exit; fi
if [[ "$RES" == "Lock" ]]; then swaylock; fi
#if [[ "$RES" == "Suspend" ]]; then swaylock & /usr/local/sbin/do suspend1 & disown; fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment