Replaced oblogout with new wk-exit script

* Dropped oblogout due to Python2 dependencies
This commit is contained in:
2Shirt 2020-01-16 18:57:27 -07:00
parent 92cfe54f98
commit 7f9cb9917d
Signed by: 2Shirt
GPG key ID: 152FAC923B0E132C
4 changed files with 33 additions and 23 deletions

31
scripts/wk-exit Executable file
View file

@ -0,0 +1,31 @@
#!/bin/bash
#
## WizardKit: GUI exit script
# Inspired by: https://github.com/cramermarius/rofi-menus/blob/master/scripts/powermenu.sh
actions="Restart\nPoweroff\nLogout"
temp_file="$(mktemp --suffix=.png)"
# Show blurred background
import -window root "${temp_file}"
convert "${temp_file}" -blur 0x4 "${temp_file}"
feh -F "${temp_file}" &
feh_pid="$!"
# Show menu
selection="$(echo -e "$actions" | rofi -i -lines 3 -dmenu -p "Power Menu")"
# Done
kill "${feh_pid}"
case $selection in
Logout)
wk-power-command logout
;;
Poweroff)
wk-power-command poweroff
;;
Restart)
wk-power-command reboot
;;
esac

View file

@ -1,20 +0,0 @@
[settings]
usehal = false
[looks]
opacity = 70
bgcolor = black
buttontheme = foom
#buttons = cancel, logout, restart, shutdown, suspend, hibernate, lock
buttons = restart, shutdown, logout
[shortcuts]
cancel = Escape
shutdown = S
restart = R
logout = L
[commands]
shutdown = /usr/local/bin/wk-power-command poweroff
restart = /usr/local/bin/wk-power-command reboot
logout = /usr/local/bin/wk-power-command logout

View file

@ -344,7 +344,7 @@
</keybind>
<keybind key="C-A-x">
<action name="Execute">
<command>oblogout</command>
<command>wk-exit</command>
</action>
</keybind>
<keybind key="W-d">
@ -394,7 +394,7 @@
</keybind>
<keybind key="W-x">
<action name="Execute">
<command>oblogout</command>
<command>wk-exit</command>
</action>
</keybind>
<keybind key="XF86AudioRaiseVolume">

View file

@ -24,7 +24,6 @@ mpv
network-manager-applet
noto-fonts
noto-fonts-cjk
oblogout
openbox-patched
otf-font-awesome-4
papirus-icon-theme