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"
},
"locked": {
"lastModified": 1739811682,
"narHash": "sha256-uKHJ7eUG6fLnFYPd9i7xOXbk2oiFE4RGvrh0Y0mhHZA=",
"lastModified": 1739814150,
"narHash": "sha256-xvG8k1Gfmm+2wpvzNikGj53BTg+Ay03aM5M68Y0caI8=",
"owner": "nix-community",
"repo": "emacs-overlay",
"rev": "f46d961b45787fd1bd9b46226d094ef7dbc5a2ac",
"rev": "b51c3cceb739735185e06878bb05c2a0a3c16b9b",
"type": "github"
},
"original": {
@ -323,11 +323,11 @@
]
},
"locked": {
"lastModified": 1739802995,
"narHash": "sha256-kZv0upOigS/4sUEgZuZd6/uO6s8X8oYOLk9/sGMsl+c=",
"lastModified": 1739823458,
"narHash": "sha256-uHjpcdlWKrZEJxsGdlMRTe4jlMYAnNsjRxPSTrNMFvo=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "9d0d48f4c3d2fb1a8c8607da143bb567a741d914",
"rev": "6c93eea85daddd0dc8d4a3a687473461f3122961",
"type": "github"
},
"original": {
@ -612,11 +612,11 @@
"uv2nix": "uv2nix"
},
"locked": {
"lastModified": 1739810027,
"narHash": "sha256-sp/xGtMWHOHUvlID7hasOf6fxVzURW5MfJAsd2e4cjY=",
"lastModified": 1739813929,
"narHash": "sha256-MgSMknm/6L9NIhN78NoO+8y5iGEERLSUyx71f3mXF88=",
"owner": "isd-project",
"repo": "isd",
"rev": "ec2453952c246ac2d1fcfc0626118e3ff1c8d7dd",
"rev": "8021a51ddb46f068dbbeb341734892242300dc50",
"type": "github"
},
"original": {
@ -712,11 +712,11 @@
"xwayland-satellite-unstable": "xwayland-satellite-unstable"
},
"locked": {
"lastModified": 1739802387,
"narHash": "sha256-j1/mukC09zeq0mdOiL9ouE1k7ZC7f3SJCKFq5ttoqIs=",
"lastModified": 1739824279,
"narHash": "sha256-373u7+WYbKZDZ6gerTcXjdcqR0bR33nRfOU5XcY/MBY=",
"owner": "sodiboo",
"repo": "niri-flake",
"rev": "59ed19d431324af3fcebbf623c081eae2e67ab97",
"rev": "fad7cbe279fb9a550896de1179982ce2d4734e5c",
"type": "github"
},
"original": {
@ -745,11 +745,11 @@
"niri-unstable": {
"flake": false,
"locked": {
"lastModified": 1739787518,
"narHash": "sha256-F9zVBxjj8H11TjXhbMNC/nXJVAvksrrasouxTxPbju4=",
"lastModified": 1739820990,
"narHash": "sha256-v+MmVqFyjzL9xzyRzfX+1qMIGgoHcW73P9b8RrM922k=",
"owner": "YaLTeR",
"repo": "niri",
"rev": "078383ea8208337d3c9ea89118aa615d7fbbab17",
"rev": "44c9797844ca7ce8a708d5034f1259ce3fc6bd2a",
"type": "github"
},
"original": {
@ -928,11 +928,11 @@
},
"nixpkgs-stable_2": {
"locked": {
"lastModified": 1739624908,
"narHash": "sha256-f84lBmLl4tkDp1ZU5LBTSFzlxXP4926DVW3KnXrke10=",
"lastModified": 1739758141,
"narHash": "sha256-uq6A2L7o1/tR6VfmYhZWoVAwb3gTy7j4Jx30MIrH0rE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "a60651b217d2e529729cbc7d989c19f3941b9250",
"rev": "c618e28f70257593de75a7044438efc1c1fc0791",
"type": "github"
},
"original": {
@ -960,11 +960,11 @@
},
"nixpkgs-stable_4": {
"locked": {
"lastModified": 1739624908,
"narHash": "sha256-f84lBmLl4tkDp1ZU5LBTSFzlxXP4926DVW3KnXrke10=",
"lastModified": 1739758141,
"narHash": "sha256-uq6A2L7o1/tR6VfmYhZWoVAwb3gTy7j4Jx30MIrH0rE=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "a60651b217d2e529729cbc7d989c19f3941b9250",
"rev": "c618e28f70257593de75a7044438efc1c1fc0791",
"type": "github"
},
"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 = {
general = {
lock_cmd = "pidof hyprlock || hyprlock";
before_sleep_cmd = "loginctl lock-session";
after_sleep_cmd = "shikanectl reload && brillo -e -u 150000 -I";
before_sleep_cmd = "loginctl lock-session && brillo -e -O";
after_sleep_cmd = "/home/emenel/.local/bin/on-unlock";
ignore_dbus_inhibit = false;
ignore_systemd_inhibit = false;
};
@ -15,33 +15,44 @@
listener = [
{
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
{
timeout = "90";
on-timeout = "systemd-ac-power || loginctl lock-session";
on-resume = "/home/emenel/.local/bin/on-unlock";
}
{
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";
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
{
timeout = "180";
on-timeout = "systemd-ac-power && loginctl lock-session";
on-resume = "/home/emenel/.local/bin/on-unlock";
}
{
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";
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";
}
];