Last active
October 24, 2019 02:29
-
-
Save imvaskii/2c317b8270dc2cc34f659464f9c56317 to your computer and use it in GitHub Desktop.
Bash scrip to executes xrandr layout for hdmi monitors.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| xrandr=$(xrandr) | |
| con_monitors=$(echo $xrandr | grep -c " connected ") | |
| if [[ $con_monitors -gt 1 ]]; then | |
| # All the layouts are saved in "screenlayout" folder. | |
| # eg. xrandr --output HDMI-1 --mode 2560x1440 --pos 0x0 --rotate normal --output DP-1 --off --output eDP-1 --primary --mode 1920x1080 --pos 283x1440 --rotate normal --output DP-2 --off | |
| for layout in ~/.screenlayout/*.sh; do | |
| ./layout | |
| done | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment