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