mirror of
https://github.com/eoli3n/dotfiles
synced 2024-05-17 21:16:08 +02:00
powermenu void
This commit is contained in:
parent
ef93c0ccd7
commit
6c53fd0df8
|
@ -0,0 +1,32 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
action=$(echo -e "suspend\nlock\nlogout\nshutdown\nreboot" | wofi -d -p "power:" -L 5)
|
||||
|
||||
if [[ "$action" == "lock" ]]
|
||||
then
|
||||
swaylock-fancy
|
||||
fi
|
||||
|
||||
if [[ "$action" == "suspend" ]]
|
||||
then
|
||||
{% if ansible_distribution_release == "void" %}
|
||||
sudo zzz
|
||||
{% else %}
|
||||
swaylock-fancy && systemctl suspend && echo '*/reconnect' >~/.weechat/weechat_fifo
|
||||
{% endif %}
|
||||
fi
|
||||
|
||||
if [[ "$action" == "logout" ]]
|
||||
then
|
||||
swaymsg exit
|
||||
fi
|
||||
|
||||
if [[ "$action" == "shutdown" ]]
|
||||
then
|
||||
shutdown now
|
||||
fi
|
||||
|
||||
if [[ "$action" == "reboot" ]]
|
||||
then
|
||||
reboot
|
||||
fi
|
Loading…
Reference in New Issue