diff options
author | makefu <github@syntax-fehler.de> | 2021-08-05 21:20:17 +0200 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2021-08-05 21:20:17 +0200 |
commit | c177a49ca38b8c1022638deaff2dc4eefda655f3 (patch) | |
tree | 201c4245203da92228c99f0940871a996e2efee7 /tv/5pkgs/simple | |
parent | a072b9a49b6ee50bfdd57f62a3f60087e98c7c02 (diff) | |
parent | ba6a5456e8d76b9c1eae7cd81dca3f2b16359ba2 (diff) |
Merge remote-tracking branch 'lass/master'
Diffstat (limited to 'tv/5pkgs/simple')
-rw-r--r-- | tv/5pkgs/simple/xtoggledpms.nix | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tv/5pkgs/simple/xtoggledpms.nix b/tv/5pkgs/simple/xtoggledpms.nix new file mode 100644 index 000000000..d164ad712 --- /dev/null +++ b/tv/5pkgs/simple/xtoggledpms.nix @@ -0,0 +1,16 @@ +{ pkgs }: + +let + grep = "${pkgs.gnugrep}/bin/grep"; + xset = "${pkgs.xorg.xset}/bin/xset"; +in + +pkgs.writeDashBin "xtoggledpms" '' + # usage: xtoggledpms + set -efu + if ${xset} q | ${grep} -qF 'DPMS is Disabled'; then + ${xset} dpms force off + else + ${xset} s off -dpms + fi +'' |