switching to swaylock/idle adding qmk

This commit is contained in:
Matt Nish-Lapidus 2025-06-28 13:00:19 -04:00
parent 16437c9f62
commit 260e597860
11 changed files with 122 additions and 405 deletions

View file

@ -7,8 +7,7 @@
waybar
swaync
mpv
hyprlock
hypridle
sway-idle-lock
sway-launcher-desktop
browsers
];

View file

@ -354,7 +354,7 @@ in
"Mod+Shift+A" = {
hotkey-overlay.title = "Lock Session";
action = spawn "hyprlock";
action = spawn "/home/emenel/.local/bin/session-lock";
allow-when-locked = true;
};

View file

@ -0,0 +1,69 @@
{
services.swayidle = {
enable = true;
events = [
{
event = "lock";
command = "/home/emenel/.local/bin/session-lock";
}
{
event = "after-resume";
command = "/home/emenel/.local/bin/on-unlock";
}
];
timeouts = [
{
timeout = 60;
command = "/home/emenel/.local/bin/dim-all-monitors";
}
# battery timers
{
timeout = 90;
command = "systemd-ac-power || loginctl lock-session";
}
{
timeout = 120;
command = "systemd-ac-power || /home/emenel/.local/bin/lock-power-off-monitors";
}
{
timeout = 180;
command = "systemd-ac-power || /home/emenel/.local/bin/lock-suspend";
}
# ac power timers
{
timeout = 180;
command = "systemd-ac-power && loginctl lock-session";
}
{
timeout = 240;
command = "systemd-ac-power || /home/emenel/.local/bin/lock-power-off-monitors";
}
{
timeout = 600;
command = "systemd-ac-power && /home/emenel/.local/bin/lock-suspend";
}
];
};
programs.swaylock = {
enable = true;
settings = {
color = "808080";
font-size = 24;
indicator-idle-visible = true;
indicator-radius = 100;
line-color = "ffffff";
show-failed-attempts = true;
};
};
}

View file

@ -1,53 +0,0 @@
{ inputs, ... }:
{
services.swayidle = {
enable = true;
events = [
{
event = "lock";
command = "pidof hyprlock || hyprlock";
}
{
event = "after-resume";
command = "shikanectl reload && brillo -e -u 150000 -I";
}
];
timeouts = [
{
timeout = 60;
command = "dim-all-monitors";
}
# battery timers
{
timeout = 120;
command = "systemd-ac-power || lock-power-off-monitors";
}
{
timeout = 180;
command = "systemd-ac-power || lock-suspend";
}
# ac power timers
{
timeout = 180;
command = "systemd-ac-power && loginctl lock-session";
}
{
timeout = 240;
command = "systemd-ac-power && lock-power-off-monitors";
}
{
timeout = 600;
command = "systemd-ac-power && lock-suspend";
}
];
};
}

View file

@ -90,6 +90,8 @@
{ on = "<C-w>"; run ="close"; }
{ on = "<C-A-right>"; run ="tab_switch 1 --relative"; }
{ on = "<C-A-left>"; run ="tab_switch -1 --relative"; }
{ on = "<C-A-h>"; run ="tab_switch 1 --relative"; }
{ on = "<C-A-l>"; run ="tab_switch -1 --relative"; }
{ on = "<C-1>"; run ="tab_switch 0"; }
{ on = "<C-2>"; run ="tab_switch 1"; }
{ on = "<C-3>"; run ="tab_switch 2"; }