diff options
author | Arnold Sommerfeld <sommerfeld@strisemarx.com> | 2023-05-17 18:44:48 +0100 |
---|---|---|
committer | Arnold Sommerfeld <sommerfeld@strisemarx.com> | 2023-10-18 11:16:43 +0100 |
commit | b487984ecc61c6229cf92550030745c192fd3d0b (patch) | |
tree | 937e598c941fc1172467aeeed8ef51cbfceaca62 /home/.local/bin/display-setup | |
download | dotfiles-b487984ecc61c6229cf92550030745c192fd3d0b.tar.gz dotfiles-b487984ecc61c6229cf92550030745c192fd3d0b.tar.bz2 dotfiles-b487984ecc61c6229cf92550030745c192fd3d0b.zip |
first commit
Diffstat (limited to 'home/.local/bin/display-setup')
-rwxr-xr-x | home/.local/bin/display-setup | 22 |
1 files changed, 22 insertions, 0 deletions
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 |