From 5b89a10f3ad4172695fc9ca69e346b36a799d32c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Hallenbarter?= Date: Mon, 26 Jan 2026 10:00:05 +0000 Subject: [PATCH] added wlogout and wofi manager --- i3/config | 2 +- i3/overlay-menu.sh | 18 ++++++++---------- packages.txt | 4 +++- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/i3/config b/i3/config index 21fbede..e4b7dbc 100644 --- a/i3/config +++ b/i3/config @@ -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 diff --git a/i3/overlay-menu.sh b/i3/overlay-menu.sh index 69127e0..c4bb616 100755 --- a/i3/overlay-menu.sh +++ b/i3/overlay-menu.sh @@ -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 \ No newline at end of file diff --git a/packages.txt b/packages.txt index cb432f5..05811c4 100644 --- a/packages.txt +++ b/packages.txt @@ -9,7 +9,7 @@ xorg-xsetroot xorg-xkb-utils # Application launcher -rofi +wofi # Terminal emulator kitty @@ -42,3 +42,5 @@ noto-fonts firefox gnome-calculator nautilus + +wlogout \ No newline at end of file