diff --git a/.config/hypr/hypridle.conf b/.config/hypr/hypridle.conf index bb6ecccd2..a77bbb242 100644 --- a/.config/hypr/hypridle.conf +++ b/.config/hypr/hypridle.conf @@ -1,5 +1,5 @@ -# $lock_cmd = hyprctl dispatch global quickshell:lock & pidof qs quickshell hyprlock || hyprlock -$lock_cmd = pidof hyprlock || hyprlock +$lock_cmd = hyprctl dispatch global quickshell:lock & pidof qs quickshell hyprlock || hyprlock +# $lock_cmd = pidof hyprlock || hyprlock $suspend_cmd = systemctl suspend || loginctl suspend general { diff --git a/.config/quickshell/ii/modules/lock/Lock.qml b/.config/quickshell/ii/modules/lock/Lock.qml index 89d39778a..2024c19b2 100644 --- a/.config/quickshell/ii/modules/lock/Lock.qml +++ b/.config/quickshell/ii/modules/lock/Lock.qml @@ -19,6 +19,9 @@ Scope { // Unlock the screen before exiting, or the compositor will display a // fallback lock you can't interact with. GlobalStates.screenLocked = false; + + // Refocus last focused window on unlock (hack) + Quickshell.execDetached(["bash", "-c", `sleep 0.2; hyprctl --batch "dispatch togglespecialworkspace; dispatch togglespecialworkspace"`]) } }