Add current hummelberg-new state
This commit is contained in:
parent
dd204c8ba6
commit
51f5e7eab9
30 changed files with 1486 additions and 0 deletions
|
@ -0,0 +1,33 @@
|
|||
{ pkgs, ... }: {
|
||||
home-manager.users.fhauser.systemd.user.services.swayidle = let
|
||||
lock =
|
||||
"${pkgs.swaylock}/bin/swaylock --hide-keyboard-layout --ignore-empty-password --daemonize --show-failed-attempts --color=000000";
|
||||
logTimeCmd = "${pkgs.coreutils}/bin/date --rfc-3339=seconds >> ~/locklog";
|
||||
idleCmd = (action:
|
||||
''${pkgs.sway}/bin/swaymsg "output * dpms ${action}" && ${logTimeCmd}'');
|
||||
timeout-screens-off = 600;
|
||||
timeout-lock = 630;
|
||||
timeout-suspend = 1800;
|
||||
in {
|
||||
Unit = {
|
||||
Description = "Idle Manager for Wayland";
|
||||
Documentation = [ "man:swayidle(1)" ];
|
||||
PartOf = [ "graphical-session.target" ];
|
||||
};
|
||||
Service = {
|
||||
Environment = "PATH=${pkgs.bash}/bin";
|
||||
ExecStart = ''
|
||||
${pkgs.swayidle}/bin/swayidle -w -d \
|
||||
timeout ${toString timeout-lock} '${lock}' \
|
||||
timeout ${toString timeout-screens-off} '${idleCmd "off"}' \
|
||||
resume '${idleCmd "on"}' \
|
||||
timeout ${
|
||||
toString timeout-suspend
|
||||
} '${pkgs.systemd}/bin/systemctl suspend' \
|
||||
lock '${lock}' \
|
||||
before-sleep '${lock}';
|
||||
''; # TODO: Make this configurable and add home-manager module. (Requires sway with systemd-target support)
|
||||
};
|
||||
Install = { WantedBy = [ "sway-session.target" ]; };
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue