From b9ee61bc0c6d37787b5f44eec07db0d1b75f79e4 Mon Sep 17 00:00:00 2001 From: Zynh Ludwig Date: Fri, 16 Aug 2024 23:46:33 -0700 Subject: [PATCH] pkgs: writeXrandrScriptBin --- hosts/snowhawk/home.nix | 23 ++++++++++++----------- pkgs/default.nix | 3 ++- pkgs/writeXrandrScriptBin.nix | 12 ++++++++++++ 3 files changed, 26 insertions(+), 12 deletions(-) create mode 100644 pkgs/writeXrandrScriptBin.nix diff --git a/hosts/snowhawk/home.nix b/hosts/snowhawk/home.nix index 4ee0033..9e72bca 100644 --- a/hosts/snowhawk/home.nix +++ b/hosts/snowhawk/home.nix @@ -65,17 +65,18 @@ in systemctl suspend '') - (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 - '') + # (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 + # '') + writeXrandrScriptBin feh imagemagick diff --git a/pkgs/default.nix b/pkgs/default.nix index 75ff0fe..4b67669 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -1,4 +1,5 @@ final: prev: { - wrapWine = prev.callPackage ./wrapWine.nix { }; + wrapWine = callDefaultPackage ./wrapWine.nix; + writeXrandrScriptBin = callDefaultPackage ./writeXrandrScriptBin.nix; } diff --git a/pkgs/writeXrandrScriptBin.nix b/pkgs/writeXrandrScriptBin.nix new file mode 100644 index 0000000..91dcd41 --- /dev/null +++ b/pkgs/writeXrandrScriptBin.nix @@ -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 +''