fixing hypridle

This commit is contained in:
Matt Nish-Lapidus 2025-02-17 16:34:19 -05:00
parent e185f30421
commit 6d9644501b
9 changed files with 47 additions and 43 deletions

42
flake.lock generated
View file

@ -69,11 +69,11 @@
"nixpkgs-stable": "nixpkgs-stable" "nixpkgs-stable": "nixpkgs-stable"
}, },
"locked": { "locked": {
"lastModified": 1739811682, "lastModified": 1739814150,
"narHash": "sha256-uKHJ7eUG6fLnFYPd9i7xOXbk2oiFE4RGvrh0Y0mhHZA=", "narHash": "sha256-xvG8k1Gfmm+2wpvzNikGj53BTg+Ay03aM5M68Y0caI8=",
"owner": "nix-community", "owner": "nix-community",
"repo": "emacs-overlay", "repo": "emacs-overlay",
"rev": "f46d961b45787fd1bd9b46226d094ef7dbc5a2ac", "rev": "b51c3cceb739735185e06878bb05c2a0a3c16b9b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -323,11 +323,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1739802995, "lastModified": 1739823458,
"narHash": "sha256-kZv0upOigS/4sUEgZuZd6/uO6s8X8oYOLk9/sGMsl+c=", "narHash": "sha256-uHjpcdlWKrZEJxsGdlMRTe4jlMYAnNsjRxPSTrNMFvo=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "9d0d48f4c3d2fb1a8c8607da143bb567a741d914", "rev": "6c93eea85daddd0dc8d4a3a687473461f3122961",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -612,11 +612,11 @@
"uv2nix": "uv2nix" "uv2nix": "uv2nix"
}, },
"locked": { "locked": {
"lastModified": 1739810027, "lastModified": 1739813929,
"narHash": "sha256-sp/xGtMWHOHUvlID7hasOf6fxVzURW5MfJAsd2e4cjY=", "narHash": "sha256-MgSMknm/6L9NIhN78NoO+8y5iGEERLSUyx71f3mXF88=",
"owner": "isd-project", "owner": "isd-project",
"repo": "isd", "repo": "isd",
"rev": "ec2453952c246ac2d1fcfc0626118e3ff1c8d7dd", "rev": "8021a51ddb46f068dbbeb341734892242300dc50",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -712,11 +712,11 @@
"xwayland-satellite-unstable": "xwayland-satellite-unstable" "xwayland-satellite-unstable": "xwayland-satellite-unstable"
}, },
"locked": { "locked": {
"lastModified": 1739802387, "lastModified": 1739824279,
"narHash": "sha256-j1/mukC09zeq0mdOiL9ouE1k7ZC7f3SJCKFq5ttoqIs=", "narHash": "sha256-373u7+WYbKZDZ6gerTcXjdcqR0bR33nRfOU5XcY/MBY=",
"owner": "sodiboo", "owner": "sodiboo",
"repo": "niri-flake", "repo": "niri-flake",
"rev": "59ed19d431324af3fcebbf623c081eae2e67ab97", "rev": "fad7cbe279fb9a550896de1179982ce2d4734e5c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -745,11 +745,11 @@
"niri-unstable": { "niri-unstable": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1739787518, "lastModified": 1739820990,
"narHash": "sha256-F9zVBxjj8H11TjXhbMNC/nXJVAvksrrasouxTxPbju4=", "narHash": "sha256-v+MmVqFyjzL9xzyRzfX+1qMIGgoHcW73P9b8RrM922k=",
"owner": "YaLTeR", "owner": "YaLTeR",
"repo": "niri", "repo": "niri",
"rev": "078383ea8208337d3c9ea89118aa615d7fbbab17", "rev": "44c9797844ca7ce8a708d5034f1259ce3fc6bd2a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -928,11 +928,11 @@
}, },
"nixpkgs-stable_2": { "nixpkgs-stable_2": {
"locked": { "locked": {
"lastModified": 1739624908, "lastModified": 1739758141,
"narHash": "sha256-f84lBmLl4tkDp1ZU5LBTSFzlxXP4926DVW3KnXrke10=", "narHash": "sha256-uq6A2L7o1/tR6VfmYhZWoVAwb3gTy7j4Jx30MIrH0rE=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "a60651b217d2e529729cbc7d989c19f3941b9250", "rev": "c618e28f70257593de75a7044438efc1c1fc0791",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -960,11 +960,11 @@
}, },
"nixpkgs-stable_4": { "nixpkgs-stable_4": {
"locked": { "locked": {
"lastModified": 1739624908, "lastModified": 1739758141,
"narHash": "sha256-f84lBmLl4tkDp1ZU5LBTSFzlxXP4926DVW3KnXrke10=", "narHash": "sha256-uq6A2L7o1/tR6VfmYhZWoVAwb3gTy7j4Jx30MIrH0rE=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "a60651b217d2e529729cbc7d989c19f3941b9250", "rev": "c618e28f70257593de75a7044438efc1c1fc0791",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -1,5 +0,0 @@
#!/usr/bin/env fish
function dim-all-monitors
brillo -e -O && brillo -e -u 150000 -S 15
end

View file

@ -1,5 +0,0 @@
#!/usr/bin/env fish
function lock-power-off-monitors
loginctl lock-session && niri msg action power-off-monitors
end

View file

@ -1,5 +0,0 @@
#!/usr/bin/env fish
function lock-suspend
loginctl lock-session && systemctl suspend
end

View file

@ -0,0 +1,2 @@
#!/bin/sh
brillo -e -O && brillo -e -u 150000 -S 15

View file

@ -0,0 +1,2 @@
#!/bin/sh
niri msg action power-off-monitors

View file

@ -0,0 +1,2 @@
#!/bin/sh
systemctl suspend

View file

@ -0,0 +1,2 @@
#!/bin/sh
shikanectl reload && brillo -e -u 150000 -I

View file

@ -6,8 +6,8 @@
settings = { settings = {
general = { general = {
lock_cmd = "pidof hyprlock || hyprlock"; lock_cmd = "pidof hyprlock || hyprlock";
before_sleep_cmd = "loginctl lock-session"; before_sleep_cmd = "loginctl lock-session && brillo -e -O";
after_sleep_cmd = "shikanectl reload && brillo -e -u 150000 -I"; after_sleep_cmd = "/home/emenel/.local/bin/on-unlock";
ignore_dbus_inhibit = false; ignore_dbus_inhibit = false;
ignore_systemd_inhibit = false; ignore_systemd_inhibit = false;
}; };
@ -15,33 +15,44 @@
listener = [ listener = [
{ {
timeout = "60"; timeout = "60";
on-timeout = "dim-all-monitors"; on-timeout = "/home/emenel/.local/bin/dim-all-monitors";
on-resume = "/home/emenel/.local/bin/on-unlock";
} }
# battery timers # battery timers
{
timeout = "90";
on-timeout = "systemd-ac-power || loginctl lock-session";
on-resume = "/home/emenel/.local/bin/on-unlock";
}
{ {
timeout = "120"; timeout = "120";
on-timeout = "systemd-ac-power || lock-power-off-monitors"; on-timeout = "systemd-ac-power || /home/emenel/.local/bin/lock-power-off-monitors";
on-resume = "/home/emenel/.local/bin/on-unlock";
} }
{ {
timeout = "180"; timeout = "180";
on-timeout = "systemd-ac-power || lock-suspend"; on-timeout = "systemd-ac-power || /home/emenel/.local/bin/lock-suspend";
on-resume = "/home/emenel/.local/bin/on-unlock";
} }
# ac power timers # ac power timers
{ {
timeout = "180"; timeout = "180";
on-timeout = "systemd-ac-power && loginctl lock-session"; on-timeout = "systemd-ac-power && loginctl lock-session";
on-resume = "/home/emenel/.local/bin/on-unlock";
} }
{ {
timeout = "240"; timeout = "240";
on-timeout = "systemd-ac-power && lock-power-off-monitors"; on-timeout = "systemd-ac-power && /home/emenel/.local/bin/lock-power-off-monitors";
on-resume = "/home/emenel/.local/bin/on-unlock";
} }
{ {
timeout = "600"; timeout = "600";
on-timeout = "systemd-ac-power && lock-suspend"; on-timeout = "systemd-ac-power && /home/emenel/.local/bin/lock-suspend";
on-resume = "/home/emenel/.local/bin/on-unlock";
} }
]; ];