summaryrefslogtreecommitdiff
path: root/common/modules/mango/swayidleNdLock.nix
diff options
context:
space:
mode:
authorbrustybee <beebeeb5k@gmail.com>2026-04-13 03:04:59 +0530
committerbrustybee <beebeeb5k@gmail.com>2026-04-13 03:04:59 +0530
commit1bb49481dbec223e68df4f60fa1d425525e16cff (patch)
tree66e87c01c39054b7abb51d04bfc50f63b201aaf4 /common/modules/mango/swayidleNdLock.nix
parentf5b78ff561eff75c803ed1ef6e736a6c991cd135 (diff)
This is like that one dream you don't know how to describe
Diffstat (limited to 'common/modules/mango/swayidleNdLock.nix')
-rw-r--r--common/modules/mango/swayidleNdLock.nix53
1 files changed, 0 insertions, 53 deletions
diff --git a/common/modules/mango/swayidleNdLock.nix b/common/modules/mango/swayidleNdLock.nix
deleted file mode 100644
index 2788db9..0000000
--- a/common/modules/mango/swayidleNdLock.nix
+++ /dev/null
@@ -1,53 +0,0 @@
-{
- config,
- lib,
- pkgs,
- ...
-}:
-let
- cfg = config.beeMods.mango;
- swaylock_cmd = "${pkgs.swaylock}/bin/swaylock -e -f -C ~/.config/swaylock/swaylock-colors";
-in
-{
- config = lib.mkIf cfg.enable {
- home.packages = with pkgs; [
- wlopm
- swaylock
- ];
-
- services.swayidle = {
- enable = true;
- systemdTarget = [ "mango-session.target" ];
-
- events = {
- "before-sleep" = swaylock_cmd;
- "lock" = swaylock_cmd;
- };
-
- timeouts = [
- # dim screen at 4:30
- {
- timeout = 270;
- command = "${pkgs.brightnessctl}/bin/brightnessctl g > /tmp/brightness_prev && ${pkgs.brightnessctl}/bin/brightnessctl set 10%";
- resumeCommand = "${pkgs.brightnessctl}/bin/brightnessctl set $(${pkgs.coreutils}/bin/cat /tmp/brightness_prev 2>/dev/null || echo 100%)";
- }
- # Lock at 5:00
- {
- timeout = 300;
- command = swaylock_cmd;
- }
- # Screen off at 10:00
- {
- timeout = 600;
- command = "${pkgs.wlopm}/bin/wlopm --off '*'";
- resumeCommand = "${pkgs.wlopm}/bin/wlopm --on '*'";
- }
- # suspend at 15:00
- {
- timeout = 900;
- command = "systemctl suspend";
- }
- ];
- };
- };
-}