pkgs: writeXrandrScriptBin

This commit is contained in:
Zynh Ludwig 2024-08-16 23:46:33 -07:00
parent 353dc4fac3
commit b9ee61bc0c
3 changed files with 26 additions and 12 deletions

View file

@ -65,17 +65,18 @@ in
systemctl suspend systemctl suspend
'') '')
(writeShellScriptBin "tv-on" '' # (writeShellScriptBin "tv-on" ''
xrandr \ # xrandr \
--output DP-0 --primary --mode 1920x1080 --pos 1920x1080 --rotate normal \ # --output DP-0 --primary --mode 1920x1080 --pos 1920x1080 --rotate normal \
--output HDMI-0 --mode 1920x1080 --pos 0x1080 --rotate normal \ # --output HDMI-0 --mode 1920x1080 --pos 0x1080 --rotate normal \
--output HDMI-1 --mode 1920x1080 --pos 1920x0 --rotate normal \ # --output HDMI-1 --mode 1920x1080 --pos 1920x0 --rotate normal \
--output DP-1 --off \ # --output DP-1 --off \
--output DP-2 --off \ # --output DP-2 --off \
--output DP-3 --off \ # --output DP-3 --off \
--output DP-4 --off \ # --output DP-4 --off \
--output DP-5 --off # --output DP-5 --off
'') # '')
writeXrandrScriptBin
feh feh
imagemagick imagemagick

View file

@ -1,4 +1,5 @@
final: prev: final: prev:
{ {
wrapWine = prev.callPackage ./wrapWine.nix { }; wrapWine = callDefaultPackage ./wrapWine.nix;
writeXrandrScriptBin = callDefaultPackage ./writeXrandrScriptBin.nix;
} }

View file

@ -0,0 +1,12 @@
{ writeShellScriptBin }:
writeShellScriptBin "tv-on" ''
xrandr \
--output DP-0 --primary --mode 1920x1080 --pos 1920x1080 --rotate normal \
--output HDMI-0 --mode 1920x1080 --pos 0x1080 --rotate normal \
--output HDMI-1 --mode 1920x1080 --pos 1920x0 --rotate normal \
--output DP-1 --off \
--output DP-2 --off \
--output DP-3 --off \
--output DP-4 --off \
--output DP-5 --off
''