Polybar theme + bspwm movement + xidlehook + lockscreen

This commit is contained in:
Filippo Berto 2021-06-16 09:22:28 +02:00
parent 739be5f9ae
commit 2c7a0f3ed3
4 changed files with 76 additions and 29 deletions

29
modules/xidelhook.nix Normal file
View file

@ -0,0 +1,29 @@
{ pkgs, lib, ... }:
with lib;
let
program = "${pkgs.xidlehook}/bin/xidlehook";
lockCmd = escapeShellArg '' ${pkgs.i3lock-color}/bin/i3lock-color -B 10 --greeter-text="Welcome back $USER" --greeter-color="#ffffff" --date-color="#ffffff" --time-color="#ffffff" '';
script = concatStringsSep " " [
''${program}''
''--not-when-fullscreen''
''--not-when-audio''
''--timer 300 ${lockCmd} ""''
];
in
{
systemd.user.services.xidlehook = {
Unit = {
Description = "xidlehook service";
PartOf = [ "graphical-session.target" ];
After = [ "graphical-session.target" ];
ConditionEnvironment = [ "DISPLAY" ];
};
Service = {
Type = "simple";
ExecStart = "${script}";
};
Install.WantedBy = [ "graphical-session.target" ];
};
}