Fix: betterlockscreen in its own file
This commit is contained in:
parent
7a1225d3ef
commit
e2177beef1
2 changed files with 22 additions and 18 deletions
21
hm/common/betterlockscreen.nix
Normal file
21
hm/common/betterlockscreen.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
{ pkgs, ... }:{
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
xidlehook
|
||||||
|
betterlockscreen
|
||||||
|
];
|
||||||
|
|
||||||
|
systemd.user.services.xidlehook = {
|
||||||
|
Unit.Description = "Idle: lock at 5min, suspend at ~8min";
|
||||||
|
Service = {
|
||||||
|
ExecStart = ''
|
||||||
|
${pkgs.xidlehook}/bin/xidlehook \
|
||||||
|
--detect-sleep \
|
||||||
|
--not-when-fullscreen \
|
||||||
|
--timer 300 "${pkgs.betterlockscreen}/bin/betterlockscreen -l dim" "" \
|
||||||
|
--timer 500 "systemctl suspend" ""
|
||||||
|
'';
|
||||||
|
Restart = "always";
|
||||||
|
};
|
||||||
|
Install.WantedBy = ["graphical-session.target"];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -6,6 +6,7 @@
|
||||||
}: {
|
}: {
|
||||||
imports = [
|
imports = [
|
||||||
../common/picom.nix
|
../common/picom.nix
|
||||||
|
../common/betterlockscreen.nix
|
||||||
];
|
];
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
bspwm
|
bspwm
|
||||||
|
|
@ -16,9 +17,6 @@
|
||||||
rofi
|
rofi
|
||||||
feh
|
feh
|
||||||
font-awesome
|
font-awesome
|
||||||
xorg.xset
|
|
||||||
xidlehook
|
|
||||||
betterlockscreen
|
|
||||||
pywal16
|
pywal16
|
||||||
imagemagick
|
imagemagick
|
||||||
pulsemixer
|
pulsemixer
|
||||||
|
|
@ -130,21 +128,6 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.user.services.xidlehook = {
|
|
||||||
Unit.Description = "Idle: lock at 5min, suspend at ~8min";
|
|
||||||
Service = {
|
|
||||||
ExecStart = ''
|
|
||||||
${pkgs.xidlehook}/bin/xidlehook \
|
|
||||||
--detect-sleep \
|
|
||||||
--not-when-fullscreen \
|
|
||||||
--timer 300 "${pkgs.betterlockscreen}/bin/betterlockscreen -l dim" "" \
|
|
||||||
--timer 500 "systemctl suspend" ""
|
|
||||||
'';
|
|
||||||
Restart = "always";
|
|
||||||
};
|
|
||||||
Install.WantedBy = ["graphical-session.target"];
|
|
||||||
};
|
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
alacritty = {
|
alacritty = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue