trying to get swayidle/lock working properly

This commit is contained in:
Matt Nish-Lapidus 2025-07-03 11:43:56 -04:00
parent 727c106bdc
commit 0a990d8308
7 changed files with 71 additions and 36 deletions

View file

@ -1,4 +1,4 @@
{ pkgs, nix-config, inputs, lib, ... }:
{ pkgs, nix-config, lib, ... }:
{

View file

@ -97,6 +97,8 @@
"em" = "emacsclient -n -r";
"fg" = "job unfreeze";
"emm" = "emacsclient -nw";
"gt" = "gtrash";
"gtp" = "gtreash prune";
"gtr" = "gtrash restore";
"rmr" = "gtrash restore";
"rm" = "gtrash put";

View file

@ -7,12 +7,12 @@
events = [
{
event = "lock";
command = "/home/emenel/.local/bin/session-lock";
}
{
event = "before-sleep";
command = "/home/emenel/.local/bin/session-lock";
command = "/run/current-system/sw/bin/pidof swaylock || ${pkgs.swaylock}/bin/swaylock";
}
# {
# event = "before-sleep";
# command = "/home/emenel/.local/bin/session-lock";
# }
{
event = "after-resume";
command = "/home/emenel/.local/bin/on-unlock";
@ -33,11 +33,11 @@
}
{
timeout = 120;
command = "${pkgs.systemd}/bin/systemd-ac-power || /home/emenel/.local/bin/lock-power-off-monitors";
command = "${pkgs.systemd}/bin/systemd-ac-power || ${pkgs.niri-unstable}/bin/niri msg action power-off-monitors";
}
{
timeout = 180;
command = "${pkgs.systemd}/bin/systemd-ac-power || /home/emenel/.local/bin/lock-suspend";
command = "${pkgs.systemd}/bin/systemd-ac-power || ${pkgs.systemd}/bin/systemctl suspend";
}
# ac power timers
@ -48,12 +48,12 @@
{
timeout = 240;
command = "${pkgs.systemd}/bin/systemd-ac-power || /home/emenel/.local/bin/lock-power-off-monitors";
command = "${pkgs.systemd}/bin/systemd-ac-power && ${pkgs.niri-unstable}/bin/niri msg action power-off-monitors";
}
{
timeout = 600;
command = "${pkgs.systemd}/bin/systemd-ac-power && /home/emenel/.local/bin/lock-suspend";
command = "${pkgs.systemd}/bin/systemd-ac-power && ${pkgs.systemd}/bin/systemctl suspend";
}
];