diff options
author | sefidel <contact@sefidel.net> | 2023-08-26 12:02:44 +0900 |
---|---|---|
committer | sefidel <contact@sefidel.net> | 2023-08-26 12:02:44 +0900 |
commit | f32008b048d2480c3e1ca7543e9cff2005ccf8e2 (patch) | |
tree | c4d0c268b9d0a81ae9b826707d6d6a6fe3c7c947 /home/profiles | |
parent | 372d9afc251494b5205cd0e92c54906d3f915058 (diff) | |
download | nixrc-f32008b048d2480c3e1ca7543e9cff2005ccf8e2.tar.gz nixrc-f32008b048d2480c3e1ca7543e9cff2005ccf8e2.zip |
feat(home/gui): use blur effect on swaylock
Diffstat (limited to 'home/profiles')
-rw-r--r-- | home/profiles/gui/default.nix | 52 |
1 files changed, 28 insertions, 24 deletions
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; |