From 11d2d515446196b61156ff9608212e06d2d19b46 Mon Sep 17 00:00:00 2001 From: Jeena Date: Fri, 8 May 2026 23:10:37 +0000 Subject: [PATCH 1/4] fix: lock screen on lid close without desktop flash on open - Add lid-close.sh: starts hyprlock in background and immediately cuts the display via dpms off, so the display is dark while hyprlock renders - William.conf: bind lid close to lid-close.sh; bind lid open to kill dim and turn display back on - lock.sh: pass --no-fade-in to hyprlock - hyprlock.conf: disable fadeOut animation - hypridle.conf: add inhibit_sleep = 3 and use loginctl lock-session --- hypr/hypridle.conf | 12 +++--------- hypr/hyprlock.conf | 4 ++++ hypr/scripts/lid-close.sh | 8 ++++++++ hypr/scripts/lock.sh | 2 +- 4 files changed, 16 insertions(+), 10 deletions(-) create mode 100755 hypr/scripts/lid-close.sh diff --git a/hypr/hypridle.conf b/hypr/hypridle.conf index 25718c3..7651c98 100644 --- a/hypr/hypridle.conf +++ b/hypr/hypridle.conf @@ -1,13 +1,7 @@ general { - # Define the lock command for hypridle - # This is used whenever hypridle or listeners need to lock the screen - lock_cmd = pidof hyprlock || hyprlock - - # Runs before system suspend (safety net if you manually suspend) - # On a desktop, you can remove this if you never suspend manually - before_sleep_cmd = ~/.config/hypr/scripts/lock.sh - - # Restore screen after sleep + inhibit_sleep = 3 + lock_cmd = pidof hyprlock || ~/.config/hypr/scripts/lock.sh + before_sleep_cmd = loginctl lock-session after_sleep_cmd = hyprctl dispatch dpms on } diff --git a/hypr/hyprlock.conf b/hypr/hyprlock.conf index 89f95fe..95b1ea4 100644 --- a/hypr/hyprlock.conf +++ b/hypr/hyprlock.conf @@ -1,3 +1,7 @@ +animations { + animation = fadeOut, 0 +} + background { path = ~/.config/hypr/wallpapers/Purple.jpg blur_passes = 2 diff --git a/hypr/scripts/lid-close.sh b/hypr/scripts/lid-close.sh new file mode 100755 index 0000000..c27238b --- /dev/null +++ b/hypr/scripts/lid-close.sh @@ -0,0 +1,8 @@ +#!/bin/bash +pkill -x dim +hyprctl switchxkblayout all 0 +wpctl set-mute @DEFAULT_AUDIO_SINK@ 1 +hyprlock --no-fade-in & +hyprctl dispatch dpms off +wait +wpctl set-mute @DEFAULT_AUDIO_SINK@ 0 diff --git a/hypr/scripts/lock.sh b/hypr/scripts/lock.sh index a89c03e..af3fe06 100755 --- a/hypr/scripts/lock.sh +++ b/hypr/scripts/lock.sh @@ -2,4 +2,4 @@ hyprctl switchxkblayout all 0 fcitx5-remote -s keyboard-us-dvorak wpctl set-mute @DEFAULT_AUDIO_SINK@ 1 -hyprlock && wpctl set-mute @DEFAULT_AUDIO_SINK@ 0 +hyprlock --no-fade-in && wpctl set-mute @DEFAULT_AUDIO_SINK@ 0 From 5b81e86c5b5441398b1476d28215334b34b0bd4a Mon Sep 17 00:00:00 2001 From: Jeena Date: Fri, 8 May 2026 23:11:51 +0000 Subject: [PATCH 2/4] feat: add battery widget to waybar --- waybar/config | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/waybar/config b/waybar/config index 6fdc45f..ed563e9 100644 --- a/waybar/config +++ b/waybar/config @@ -16,6 +16,7 @@ "hyprland/language", "custom/notifications", "custom/idle-inhibit", + "battery", "custom/power" ], @@ -114,6 +115,23 @@ "format": " ⏻ ", "tooltip": false, "on-click": "wlogout --protocol layer-shell" + }, + + "battery": { + "bat": "BAT0", + "interval": 60, + "states": { + "warning": 30, + "critical": 15 + }, + "events": { + "on-discharging-warning": "notify-send -u normal 'Low Battery'", + "on-discharging-critical": "notify-send -u critical 'Very Low Battery'", + "on-charging-100": "notify-send -u normal 'Battery Full!'" + }, + "format": "{capacity}% {icon}", + "format-icons": ["", "", "", "", ""], + "max-length": 25 } } From e7add39b93b84da8f68ef061418ee9c97fed1b65 Mon Sep 17 00:00:00 2001 From: Jeena Date: Fri, 8 May 2026 23:22:12 +0000 Subject: [PATCH 3/4] feat: enable fingerprint unlock in hyprlock --- hypr/hyprlock.conf | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/hypr/hyprlock.conf b/hypr/hyprlock.conf index 95b1ea4..acce3e6 100644 --- a/hypr/hyprlock.conf +++ b/hypr/hyprlock.conf @@ -1,3 +1,11 @@ +auth { + fingerprint { + enabled = true + ready_message = Scan fingerprint to unlock + present_message = Scanning... + } +} + animations { animation = fadeOut, 0 } From 1e65b6da57dbef34ec5b558cfccdb6ea1c2135fd Mon Sep 17 00:00:00 2001 From: Jeena Date: Fri, 8 May 2026 23:25:00 +0000 Subject: [PATCH 4/4] fix: auto-detect battery so waybar hides it on machines without one --- waybar/config | 1 - 1 file changed, 1 deletion(-) diff --git a/waybar/config b/waybar/config index ed563e9..c8c8c04 100644 --- a/waybar/config +++ b/waybar/config @@ -118,7 +118,6 @@ }, "battery": { - "bat": "BAT0", "interval": 60, "states": { "warning": 30,