1
0
mirror of https://github.com/eoli3n/dotfiles synced 2024-11-26 06:08:35 +01:00

powermenu void

This commit is contained in:
eoli3n 2022-10-30 01:24:25 +02:00
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