mirror of
https://github.com/eoli3n/dotfiles
synced 2024-11-22 23:12:32 +01:00
sway powermenu
This commit is contained in:
parent
f2fff1234f
commit
9899c0736e
@ -111,7 +111,7 @@ client.urgent #2f343a #900000 #ffffff #900000 #900000
|
||||
client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c
|
||||
|
||||
#rofi_power menu
|
||||
bindsym $mod+Shift+q exec ~/.config/rofi/powermenu.sh
|
||||
bindsym $mod+Shift+q exec ~/.config/wofi/powermenu.sh
|
||||
|
||||
#grimshot
|
||||
bindsym $mod+Shift+p exec grimshot save area
|
||||
|
38
roles/wofi/files/powermenu.sh
Executable file
38
roles/wofi/files/powermenu.sh
Executable file
@ -0,0 +1,38 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
action=$(echo -e "suspend\nlock\nhibernate\nsuspend-then-hibernate\nlogout\nshutdown\nreboot" | wofi -d -p "power:")
|
||||
|
||||
if [[ "$action" == "lock" ]]
|
||||
then
|
||||
swaylock-fancy
|
||||
fi
|
||||
|
||||
if [[ "$action" == "suspend" ]]
|
||||
then
|
||||
swaylock-fancy && systemctl suspend-then-hibernate && echo '*/reconnect' >~/.weechat/weechat_fifo
|
||||
fi
|
||||
|
||||
if [[ "$action" == "suspend-then-hibernate" ]]
|
||||
then
|
||||
~/.i3/i3lock-fancy-multimonitor/lock && systemctl suspend-then-hibernate && echo '*/reconnect' >~/.weechat/weechat_fifo
|
||||
fi
|
||||
|
||||
if [[ "$action" == "hibernate" ]]
|
||||
then
|
||||
systemctl hibernate
|
||||
fi
|
||||
|
||||
if [[ "$action" == "logout" ]]
|
||||
then
|
||||
swaymsg exit
|
||||
fi
|
||||
|
||||
if [[ "$action" == "shutdown" ]]
|
||||
then
|
||||
shutdown now
|
||||
fi
|
||||
|
||||
if [[ "$action" == "reboot" ]]
|
||||
then
|
||||
reboot
|
||||
fi
|
@ -8,3 +8,8 @@
|
||||
copy:
|
||||
src: styles.css
|
||||
dest: ~/.config/wofi/
|
||||
|
||||
- name: copy wofi powermenu
|
||||
copy:
|
||||
src: powermenu.sh
|
||||
dest: ~/.config/wofi/
|
||||
|
Loading…
Reference in New Issue
Block a user