add xidlehook
This commit is contained in:
parent
199862d874
commit
1ff8c90653
4 changed files with 23 additions and 6 deletions
16
lock.sh
Executable file
16
lock.sh
Executable file
|
@ -0,0 +1,16 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
export PRIMARY_DISPLAY="$(xrandr | awk '/ primary/{print $1}')"
|
||||||
|
|
||||||
|
xidlehook \
|
||||||
|
--not-when-fullscreen \
|
||||||
|
--not-when-audio \
|
||||||
|
--timer normal 60 \
|
||||||
|
'xrandr --output "$PRIMARY_DISPLAY" --brightness .1' \
|
||||||
|
'xrandr --output "$PRIMARY_DISPLAY" --brightness 1' \
|
||||||
|
--timer primary 10 \
|
||||||
|
'xrandr --output "$PRIMARY_DISPLAY" --brightness 1; physlock -d' \
|
||||||
|
'' \
|
||||||
|
--timer normal 600 \
|
||||||
|
'systemctl suspend' \
|
||||||
|
''
|
|
@ -13,7 +13,7 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
wirelesstools ranger xpdf apvlv
|
wirelesstools ranger xpdf apvlv unstable.xidlehook
|
||||||
keepass fontconfig nodejs rustup gcc gdb
|
keepass fontconfig nodejs rustup gcc gdb
|
||||||
binutils xclip pkgconfig veracrypt gitAndTools.diff-so-fancy
|
binutils xclip pkgconfig veracrypt gitAndTools.diff-so-fancy
|
||||||
openjdk11 gimp restic glxinfo discord
|
openjdk11 gimp restic glxinfo discord
|
||||||
|
|
|
@ -63,8 +63,8 @@
|
||||||
battery = "BAT0";
|
battery = "BAT0";
|
||||||
adapter = "AC";
|
adapter = "AC";
|
||||||
poll-interval = "5";
|
poll-interval = "5";
|
||||||
format-discharging = "BAT0: <label-discharging>";
|
format-discharging = "<label-discharging>";
|
||||||
label-discharging = "%percentage%%|%time%";
|
label-discharging = "%time%";
|
||||||
};
|
};
|
||||||
|
|
||||||
"module/battery1" = {
|
"module/battery1" = {
|
||||||
|
@ -72,8 +72,8 @@
|
||||||
battery = "BAT1";
|
battery = "BAT1";
|
||||||
adapter = "AC";
|
adapter = "AC";
|
||||||
poll-interval = "5";
|
poll-interval = "5";
|
||||||
format-discharging = "BAT1: <label-discharging>";
|
format-discharging = "<label-discharging>";
|
||||||
label-discharging = "%percentage%%|%time%";
|
label-discharging = "%time%";
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -14,7 +14,8 @@ in
|
||||||
package = pkgs.i3-gaps;
|
package = pkgs.i3-gaps;
|
||||||
config = {
|
config = {
|
||||||
startup = [
|
startup = [
|
||||||
{ command = "exec i3-sensible-terminal"; always = true; notification = false; }
|
{ command = "exec i3-sensible-terminal"; always = false; notification = false; }
|
||||||
|
{ command = "exec $HOME/dev/dotfiles/lock.sh"; always = false; notification = false; }
|
||||||
];
|
];
|
||||||
window = {
|
window = {
|
||||||
hideEdgeBorders = "horizontal";
|
hideEdgeBorders = "horizontal";
|
||||||
|
|
Loading…
Reference in a new issue