From f32008b048d2480c3e1ca7543e9cff2005ccf8e2 Mon Sep 17 00:00:00 2001 From: sefidel Date: Sat, 26 Aug 2023 12:02:44 +0900 Subject: feat(home/gui): use blur effect on swaylock --- home/profiles/gui/default.nix | 52 +++++++++++++++++++++++-------------------- 1 file changed, 28 insertions(+), 24 deletions(-) (limited to 'home/profiles') diff --git a/home/profiles/gui/default.nix b/home/profiles/gui/default.nix index 139307a..4f579e8 100644 --- a/home/profiles/gui/default.nix +++ b/home/profiles/gui/default.nix @@ -121,30 +121,34 @@ in settings = import ./config/dunst.nix { inherit neotheme; }; }; - swayidle = { - enable = true; - events = [ - { event = "before-sleep"; command = "${pkgs.swaylock-effects}/bin/swaylock -fFc ${neotheme.colors.background} --indicator --grace 2 --fade-in 0.2"; } - { event = "lock"; command = "${pkgs.swaylock-effects}/bin/swaylock -fFc ${neotheme.colors.background} --indicator --grace 2 --fade-in 0.2"; } - ]; - timeouts = [ - # 4m30s - { timeout = 270; command = "${pkgs.libnotify}/bin/notify-send -t 30000 'Locking screen in 30 seconds'"; } - # 5m - { timeout = 300; command = "${pkgs.swaylock-effects}/bin/swaylock -fFc ${neotheme.colors.background} --indicator --grace 2 --fade-in 0.2"; } - # 10m - { - timeout = 600; - command = "${pkgs.sway}/bin/swaymsg 'output * dpms off'"; - resumeCommand = "${pkgs.sway}/bin/swaymsg 'output * dpms on'"; - } - # 15m - { - timeout = 900; - command = "${pkgs.systemd}/bin/systemctl suspend"; - } - ]; - }; + swayidle = + let + lockCommand = ''${pkgs.swaylock-effects}/bin/swaylock --screenshots --clock --indicator --effect-blur 7x5 --effect-vignette 0.5:0.5 --grace 5 --fade-in 0.2''; + in + { + enable = true; + events = [ + { event = "before-sleep"; command = lockCommand; } + { event = "lock"; command = lockCommand; } + ]; + timeouts = [ + # 4m30s + { timeout = 270; command = "${pkgs.libnotify}/bin/notify-send -t 30000 'Locking screen in 30 seconds'"; } + # 5m + { timeout = 300; command = lockCommand; } + # 10m + { + timeout = 600; + command = "${pkgs.sway}/bin/swaymsg 'output * dpms off'"; + resumeCommand = "${pkgs.sway}/bin/swaymsg 'output * dpms on'"; + } + # 15m + { + timeout = 900; + command = "${pkgs.systemd}/bin/systemctl suspend"; + } + ]; + }; wlsunset = { enable = true; -- cgit 1.4.1