summaryrefslogtreecommitdiffstats
path: root/.local/bin/setscreens.sh
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-11-10 07:47:52 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-11-10 07:47:52 +0100
commit96f8fc5fcd6b55e857628a0367ae6481471161d0 (patch)
tree067abccc4fe858c856d5aef147684267d6bb30fe /.local/bin/setscreens.sh
parentScript update (diff)
downloaddotfiles-bsd-96f8fc5fcd6b55e857628a0367ae6481471161d0.tar.gz
dotfiles-bsd-96f8fc5fcd6b55e857628a0367ae6481471161d0.tar.bz2
dotfiles-bsd-96f8fc5fcd6b55e857628a0367ae6481471161d0.tar.xz
dotfiles-bsd-96f8fc5fcd6b55e857628a0367ae6481471161d0.tar.zst
dotfiles-bsd-96f8fc5fcd6b55e857628a0367ae6481471161d0.zip
new screens script
Diffstat (limited to '')
-rwxr-xr-x.local/bin/setscreens.sh32
1 files changed, 32 insertions, 0 deletions
diff --git a/.local/bin/setscreens.sh b/.local/bin/setscreens.sh
new file mode 100755
index 0000000..5b091c6
--- /dev/null
+++ b/.local/bin/setscreens.sh
@@ -0,0 +1,32 @@
+#!/usr/local/bin/dash
+
+if xrandr | grep 'HDMI-1 connected'; then
+ if xrandr | grep 'VGA-1 connected'; then
+ xrandr --output LVDS-1 --off
+ xrandr --output HDMI-1 --primary --mode 1920x1080 --pos 0x0 --rotate normal
+ xrandr --output DP-1 --off
+ xrandr --output VGA-1 --mode 1440x900 --pos 1920x90 --rotate normal
+ xrandr --output HDMI-2 --off
+ xrandr --output HDMI-3 --off
+ xrandr --output DP-2 --off
+ xrandr --output DP-3 --off
+ else
+ xrandr --output VGA-1 --off
+ xrandr --output HDMI-1 --primary --mode 1920x1080 --pos 0x0 --rotate normal
+ xrandr --output DP-1 --off
+ xrandr --output LVDS-1 --mode 1366x768 --pos 1920x312 --rotate normal
+ xrandr --output HDMI-2 --off
+ xrandr --output HDMI-3 --off
+ xrandr --output DP-2 --off
+ xrandr --output DP-3 --off
+ fi
+else
+ xrandr --output LVDS-1 --primary --mode 1366x768 --pos 0x0 --rotate normal
+ xrandr --output VGA-1 --off
+ xrandr --output HDMI-1 --off
+ xrandr --output DP-1 --off
+ xrandr --output HDMI-2 --off
+ xrandr --output HDMI-3 --off
+ xrandr --output DP-2 --off
+ xrandr --output DP-3 --off
+fi