diff --git a/scripts/wk-exit b/scripts/wk-exit new file mode 100755 index 00000000..3c100bc9 --- /dev/null +++ b/scripts/wk-exit @@ -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 + diff --git a/setup/linux/include_x/airootfs/etc/oblogout.conf b/setup/linux/include_x/airootfs/etc/oblogout.conf deleted file mode 100644 index ea5606ef..00000000 --- a/setup/linux/include_x/airootfs/etc/oblogout.conf +++ /dev/null @@ -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 diff --git a/setup/linux/include_x/airootfs/etc/skel/.config/openbox/rc.xml b/setup/linux/include_x/airootfs/etc/skel/.config/openbox/rc.xml index a61daa47..08222f27 100644 --- a/setup/linux/include_x/airootfs/etc/skel/.config/openbox/rc.xml +++ b/setup/linux/include_x/airootfs/etc/skel/.config/openbox/rc.xml @@ -344,7 +344,7 @@ - oblogout + wk-exit @@ -394,7 +394,7 @@ - oblogout + wk-exit diff --git a/setup/linux/packages/live_add_x b/setup/linux/packages/live_add_x index ab7d23b3..02ade591 100644 --- a/setup/linux/packages/live_add_x +++ b/setup/linux/packages/live_add_x @@ -24,7 +24,6 @@ mpv network-manager-applet noto-fonts noto-fonts-cjk -oblogout openbox-patched otf-font-awesome-4 papirus-icon-theme