tv xtoggledpms: init
This commit is contained in:
parent
6c1f1c26e7
commit
1fe0a94192
16
tv/5pkgs/simple/xtoggledpms.nix
Normal file
16
tv/5pkgs/simple/xtoggledpms.nix
Normal file
@ -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
|
||||
''
|
Loading…
Reference in New Issue
Block a user