From 7085ad2c59ec2355e9efb190c2f141a1ec5bc0f3 Mon Sep 17 00:00:00 2001 From: sefidel Date: Thu, 3 Feb 2022 23:38:30 +0900 Subject: home/base: add swayidle --- home/profiles/base/default.nix | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'home/profiles/base') diff --git a/home/profiles/base/default.nix b/home/profiles/base/default.nix index ab84648..0761fb8 100644 --- a/home/profiles/base/default.nix +++ b/home/profiles/base/default.nix @@ -68,7 +68,6 @@ in # Sway pkgs.autotiling pkgs.swaylock-effects - pkgs.swayidle pkgs.swaybg pkgs.wayland-utils pkgs.wl-clipboard @@ -236,6 +235,23 @@ 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"; } + { event = "lock"; command = "${pkgs.swaylock-effects}/bin/swaylock -fFc ${neotheme.colors.background} --indicator"; } + ]; + timeouts = [ + { timeout = 230; command = "${pkgs.libnotify}/bin/notify-send -t 30000 'Locking screen in 30 seconds'"; } + { timeout = 300; command = "${pkgs.swaylock-effects}/bin/swaylock -fFc ${neotheme.colors.background} --indicator"; } + { + timeout = 600; + command = "${pkgs.sway}/bin/swaymsg 'output * dpms off'"; + resumeCommand = "${pkgs.sway}/bin/swaymsg 'output * dpms on'"; + } + ]; + }; + wlsunset = { enable = true; latitude = "36.5"; -- cgit 1.4.1