update niri config

This commit is contained in:
Leonardo Eugênio 2026-03-04 00:39:51 -03:00
parent d834ba70a0
commit 3207922b68
15 changed files with 495 additions and 58 deletions

View file

@ -66,7 +66,7 @@ in
Restart = "on-failure";
};
Install = {
WantedBy = [ "sway-session.target" ];
WantedBy = [ "graphical-session.target" ];
};
};
};

View file

@ -7,6 +7,7 @@
let
asScript = filename: text: toString (pkgs.writeShellScript filename text);
isNiri = (config.my.desktop or "") == "niri";
cfg = config.my.swayidle;
in
{
@ -19,6 +20,8 @@ in
timeout = 360;
command = "${pkgs.swaylock}/bin/swaylock -f";
}
]
++ lib.optionals (!isNiri) [
{
timeout = 1800;
command = asScript "swayidle-suspend-monitors" ''
@ -37,7 +40,7 @@ in
{
event = "after-resume";
command = asScript "after-resume" ''
${pkgs.sway}/bin/swaymsg "output * dpms on"
${lib.optionalString (!isNiri) "${pkgs.sway}/bin/swaymsg \"output * dpms on\""}
${pkgs.systemd}/bin/systemctl --user restart \
kdeconnect.service kdeconnect-indicator.service
'';