-
In i3 I can use #!/bin/sh
if (ps -a | grep tofi >/dev/null); then
killall -q tofi
else
case $(printf "%s\n" " Power Off" " Restart" " Suspend" " Hibernate" " Lock" " Log Out" | tofi --config ~/.config/tofi/config_powermenu $@) in
" Power Off")
systemctl poweroff
;;
" Restart")
systemctl reboot
;;
" Suspend")
systemctl suspend
;;
" Hibernate")
systemctl hibernate
;;
" Lock")
swaylock
;;
" Log Out")
# Command for logout
;;
esac
fi |
Beta Was this translation helpful? Give feedback.
Answered by
vaxerski
Nov 12, 2022
Replies: 1 comment 2 replies
-
|
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
gmr458
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
hyprctl dispatch exit 1