mirror of
https://github.com/Cametendo/MyI3Config-fork.git
synced 2026-03-18 03:40:20 +01:00
added wlogout and wofi manager
This commit is contained in:
@@ -13,7 +13,7 @@ bindsym $mod+b exec ~/.config/MyI3Config/settings/browser.sh
|
||||
bindsym $mod+e exec ~/.config/MyI3Config/settings/filemanager.sh
|
||||
bindsym $mod+Ctrl+c exec ~/.config/MyI3Config/settings/calculator.sh
|
||||
|
||||
bindsym $mod+Ctrl+Return exec rofi -show drun -i
|
||||
bindsym $mod+Ctrl+Return exec wofi -show drun
|
||||
|
||||
# ----------------------------------------
|
||||
# Window management
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
#!/bin/sh
|
||||
# Fullscreen overlay menu
|
||||
OPTIONS="Reboot\nShutdown\nLock Screen\nCancel"
|
||||
CHOICE=$(echo -e $OPTIONS | rofi -dmenu -fullscreen -p "Action" -lines 4 -bw 2 -kb-accept-entry 'Return' -kb-cancel 'Escape')
|
||||
# Get screen resolution
|
||||
res_w=$(xdpyinfo | awk '/dimensions/{print $2}' | cut -d'x' -f1)
|
||||
res_h=$(xdpyinfo | awk '/dimensions/{print $2}' | cut -d'x' -f2)
|
||||
|
||||
case "$CHOICE" in
|
||||
"Reboot") systemctl reboot ;;
|
||||
"Shutdown") systemctl poweroff ;;
|
||||
"Lock Screen") i3lock ;;
|
||||
"Cancel"|"") exit 0 ;;
|
||||
esac
|
||||
# Compute margins if needed
|
||||
w_margin=$((res_w / 4))
|
||||
h_margin=$((res_h / 4))
|
||||
|
||||
# Launch wlogout with margins
|
||||
wlogout -T $h_margin -B $h_margin
|
||||
Reference in New Issue
Block a user