qtile-desktop: set dpms after start and on restart
This commit is contained in:
parent
72c342c840
commit
7603dbcf2b
1 changed files with 32 additions and 5 deletions
|
@ -35,18 +35,44 @@ let
|
||||||
terminalCommand = "${pkgs.alacritty}/bin/alacritty";
|
terminalCommand = "${pkgs.alacritty}/bin/alacritty";
|
||||||
# terminalCommand = "${pkgs.roxterm}/bin/roxterm";
|
# terminalCommand = "${pkgs.roxterm}/bin/roxterm";
|
||||||
|
|
||||||
|
dpmsScript = pkgs.writeScript "dpmsScript" ''
|
||||||
|
#!${pkgs.bash}/bin/bash
|
||||||
|
export PATH=${with pkgs; lib.makeBinPath [
|
||||||
|
xlibs.xset
|
||||||
|
]}:$PATH
|
||||||
|
|
||||||
|
set -xe
|
||||||
|
|
||||||
|
case $1 in
|
||||||
|
default)
|
||||||
|
xset dpms 0 0 0
|
||||||
|
xset s off
|
||||||
|
xset s noblank
|
||||||
|
xset s 0 0
|
||||||
|
xset -dpms
|
||||||
|
;;
|
||||||
|
standby)
|
||||||
|
xset dpms 5 5 5
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo Unknown command: $1
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
'';
|
||||||
|
|
||||||
screenLockCommand = pkgs.writeScript "screenLock" ''
|
screenLockCommand = pkgs.writeScript "screenLock" ''
|
||||||
#!${pkgs.bash}/bin/bash
|
#!${pkgs.bash}/bin/bash
|
||||||
export PATH=${with pkgs; lib.makeBinPath [
|
export PATH=${with pkgs; lib.makeBinPath [
|
||||||
xlibs.xset i3lock
|
i3lock
|
||||||
]}:$PATH
|
]}:$PATH
|
||||||
|
|
||||||
revert() {
|
revert() {
|
||||||
xset dpms 0 0 0
|
${dpmsScript} default
|
||||||
}
|
}
|
||||||
|
|
||||||
trap revert HUP INT TERM
|
trap revert HUP INT TERM
|
||||||
xset +dpms dpms 5 5 5
|
${dpmsScript} standby
|
||||||
i3lock -n -c 000000 -e -f
|
i3lock -n -c 000000 -e -f
|
||||||
|
|
||||||
revert
|
revert
|
||||||
|
@ -126,7 +152,7 @@ keys = [
|
||||||
Key([key_alt, key_super], "s", lazy.spawn("${pkgs.systemd}/bin/systemctl suspend")),
|
Key([key_alt, key_super], "s", lazy.spawn("${pkgs.systemd}/bin/systemctl suspend")),
|
||||||
|
|
||||||
# Key([key_super, key_control], "r", lazy.restart()),
|
# Key([key_super, key_control], "r", lazy.restart()),
|
||||||
Key([key_super, key_control], "r", lazy.spawn("${pkgs.autorandr}/bin/autorandr -c"), lazy.restart()),
|
Key([key_super, key_control], "r", lazy.spawn("${pkgs.autorandr}/bin/autorandr -c && ${dpmsScript} default"), lazy.restart()),
|
||||||
Key([key_super, key_control], "q", lazy.shutdown()),
|
Key([key_super, key_control], "q", lazy.shutdown()),
|
||||||
|
|
||||||
# Toggle between different layouts as defined below
|
# Toggle between different layouts as defined below
|
||||||
|
@ -299,9 +325,10 @@ in {
|
||||||
enable = true;
|
enable = true;
|
||||||
windowManager.command = "${pkgs.qtile}/bin/qtile -c ${qtileConfig}";
|
windowManager.command = "${pkgs.qtile}/bin/qtile -c ${qtileConfig}";
|
||||||
initExtra = ''
|
initExtra = ''
|
||||||
${pkgs.xorg.xinput}/bin/xinput set-prop "ErgoDox EZ ErgoDox EZ Mouse" "libinput Natural Scrolling Enabled"
|
# ${pkgs.xorg.xinput}/bin/xinput set-prop "ErgoDox EZ ErgoDox EZ Mouse" "libinput Natural Scrolling Enabled"
|
||||||
${pkgs.autorandr}/bin/autorandr -c
|
${pkgs.autorandr}/bin/autorandr -c
|
||||||
${pkgs.feh}/bin/feh --bg-scale ${pkgs.nixos-artwork.wallpapers.simple-blue}/share/artwork/gnome/nix-wallpaper-simple-blue.png
|
${pkgs.feh}/bin/feh --bg-scale ${pkgs.nixos-artwork.wallpapers.simple-blue}/share/artwork/gnome/nix-wallpaper-simple-blue.png
|
||||||
|
${dpmsScript} default
|
||||||
'';
|
'';
|
||||||
|
|
||||||
pointerCursor = {
|
pointerCursor = {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue