From 65f401e67fe8b74e9c2a5f8dc85688730dcc299762fb72a516f2bea01a701890 Mon Sep 17 00:00:00 2001 From: Mikkel Harboe Arp Henriksen Date: Mon, 23 Jun 2025 19:29:05 +0200 Subject: [PATCH] =?UTF-8?q?Tilf=C3=B8jet=20lock=20screen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- local.yml | 2 ++ templates/hyprland.conf.j2 | 10 +++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/local.yml b/local.yml index 168c7a2..e593ccf 100644 --- a/local.yml +++ b/local.yml @@ -90,6 +90,8 @@ - wireplumber - alsa-utils - neofetch + - swayidle + - swaylock-effects - ufw # Firewall state: present diff --git a/templates/hyprland.conf.j2 b/templates/hyprland.conf.j2 index be13494..752642a 100644 --- a/templates/hyprland.conf.j2 +++ b/templates/hyprland.conf.j2 @@ -7,6 +7,11 @@ exec-once = waybar & exec-once = hyprpaper & exec-once = /usr/lib/polkit-kde-authentication-agent-1 & +exec-once = swayidle -w \ + timeout 300 'hyprctl dispatch dpms off' \ + resume 'hyprctl dispatch dpms on' \ + timeout 600 'systemctl suspend' \ + before-sleep 'swaylock-effects -f' # --------------------------------------------------- @@ -159,4 +164,7 @@ bind = , XF86MonBrightnessUp, exec, brightnessctl set +5% bind = , XF86MonBrightnessDown, exec, brightnessctl set 5%- # Microphone mute -bind = , XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle \ No newline at end of file +bind = , XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle + +# Lock Screen +bind = $mainMod, L, exec, swaylock-effects -f --screenshots --clock --indicator --effect-blur 7x5 --effect-vignette 0.5:0.5 --ring-color 89b4fa --key-hl-color 00aaff --text-color ffffff \ No newline at end of file