From b487984ecc61c6229cf92550030745c192fd3d0b Mon Sep 17 00:00:00 2001 From: Arnold Sommerfeld Date: Wed, 17 May 2023 18:44:48 +0100 Subject: first commit --- home/.local/bin/display-setup | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 home/.local/bin/display-setup (limited to 'home/.local/bin/display-setup') diff --git a/home/.local/bin/display-setup b/home/.local/bin/display-setup new file mode 100755 index 0000000..94d5703 --- /dev/null +++ b/home/.local/bin/display-setup @@ -0,0 +1,22 @@ +#!/usr/bin/env sh + +if [ "$(uname -n)" = "hercules" ]; then + xrandr --setprovideroutputsource modesetting NVIDIA-G0 + nvidia-settings --load-config-only & + nvidia-settings -a '[gpu:0]/GPUPowerMizerMode=1' & +fi +xrandr --auto + +if [ "$(uname -n)" = "hercules" ] && xrandr --query | grep "HDMI-1 connected"; then + xrandr --output eDP-1 --off + xrandr --output HDMI-1 --primary --mode 1920x1080 --rate 144 + # xrandr --output HDMI-1 --primary --mode 1920x1080 + # xrandr --output HDMI-1 --primary --mode 2560x1080 --rate 75 + # xrandr --output HDMI-1 --primary --mode 3840x2160 + # xrandr --output HDMI-1 --mode 1920x1080 --sameas eDP-1 +elif [ "$(uname -n)" = "halley" ] && xrandr --query | grep "HDMI-1 connected"; then + xrandr --output HDMI-1 --mode 1920x1080 --same-as eDP-1 +fi + +bspc wm -r +launch-polybar -- cgit v1.2.3-70-g09d2