paul-fixe: switch audio TV

This commit is contained in:
nyanloutre 2021-12-03 20:58:05 +01:00
parent 5d7dbf7c6d
commit 8e98daf0be
Signed by: nyanloutre
GPG Key ID: 194A92D1103ACB2A
1 changed files with 11 additions and 9 deletions

View File

@ -211,9 +211,9 @@
'';
systemd = let
DP0Config = "--mode 3440x1440 --rate 144";
DP2Config = "--auto --left-of DP-0";
HDMIConfig = "--auto --left-of DP-0";
DP0Config = "--output DP-0 --mode 3440x1440 --rate 144";
DP2Config = "--output DP-2 --auto --left-of DP-0";
HDMIConfig = "--output HDMI-0 --auto --left-of DP-0";
in {
services = {
wol = {
@ -233,9 +233,10 @@
"enableTV" = {
description = "Enable TV output";
script = ''
${pkgs.xorg.xrandr}/bin/xrandr --output DP-0 --mode 3440x1440 --rate 144 --primary
${pkgs.xorg.xrandr}/bin/xrandr ${DP0Config} --primary
/run/current-system/sw/bin/nvidia-settings --assign CurrentMetaMode="DP-0: 3440x1440_144 { AllowGSYNCCompatible=On }"
${pkgs.xorg.xrandr}/bin/xrandr --output HDMI-0 ${HDMIConfig}
${pkgs.xorg.xrandr}/bin/xrandr ${HDMIConfig}
${pkgs.pipewire}/bin/pw-cli s 43 Profile '{ index: 1 }'
'';
conflicts = ["CSMode.service"];
serviceConfig.Type = "oneshot";
@ -243,9 +244,10 @@
"primaryTV" = {
description = "Set TV output as primary";
script = ''
${pkgs.xorg.xrandr}/bin/xrandr --output DP-0 --mode 3440x1440 --rate 144
${pkgs.xorg.xrandr}/bin/xrandr ${DP0Config}
/run/current-system/sw/bin/nvidia-settings --assign CurrentMetaMode="DP-0: 3440x1440_144 { AllowGSYNCCompatible=On }"
${pkgs.xorg.xrandr}/bin/xrandr --output HDMI-0 --primary ${HDMIConfig}
${pkgs.xorg.xrandr}/bin/xrandr ${HDMIConfig} --primary
${pkgs.pipewire}/bin/pw-cli s 43 Profile '{ index: 1 }'
'';
conflicts = ["CSMode.service"];
serviceConfig.Type = "oneshot";
@ -253,7 +255,7 @@
"FreeSyncMode" = {
description = "Enable FreeSync screen only";
script = ''
${pkgs.xorg.xrandr}/bin/xrandr --output DP-0 --mode 3440x1440 --rate 144
${pkgs.xorg.xrandr}/bin/xrandr ${DP0Config}
/run/current-system/sw/bin/nvidia-settings --assign CurrentMetaMode="DP-0: 3440x1440_144 { AllowGSYNCCompatible=On }"
${pkgs.xorg.xrandr}/bin/xrandr --output HDMI-0 --off
'';
@ -263,7 +265,7 @@
"CSMode" = {
description = "Enable 4:3 black bars";
script = ''
${pkgs.xorg.xrandr}/bin/xrandr --output DP-0 --mode 3440x1440 --rate 144 --primary
${pkgs.xorg.xrandr}/bin/xrandr ${DP0Config} --primary
/run/current-system/sw/bin/nvidia-settings --assign CurrentMetaMode="DP-0: 3440x1440_144 { ViewPortIn=3440x1440, ViewPortOut=1920x1440+760+0, AllowGSYNCCompatible=On }"
${pkgs.xorg.xrandr}/bin/xrandr --output HDMI-0 --off
'';