Winston Hoy 已修改 2 years ago. 還原成這個修訂版本
2 files changed, 40 insertions
displays.sh(檔案已創建)
| @@ -0,0 +1,37 @@ | |||
| 1 | + | #! /usr/bin/env bash | |
| 2 | + | ||
| 3 | + | # displays.sh single | |
| 4 | + | # displays.sh stack | |
| 5 | + | # displays.sh split | |
| 6 | + | # displays.sh triple | |
| 7 | + | ||
| 8 | + | case $1 in | |
| 9 | + | single) | |
| 10 | + | xrandr \ | |
| 11 | + | --output DP-4 --auto --primary \ | |
| 12 | + | --output HDMI-0 --off \ | |
| 13 | + | --output DP-2 --off | |
| 14 | + | ;; | |
| 15 | + | stack | dual | dual-stack) | |
| 16 | + | xrandr \ | |
| 17 | + | --output DP-4 --auto --pos 0x2160 --primary \ | |
| 18 | + | --output HDMI-0 --auto --pos 720x0 \ | |
| 19 | + | --output DP-2 --off | |
| 20 | + | ;; | |
| 21 | + | split | dual-split) | |
| 22 | + | xrandr \ | |
| 23 | + | --output DP-4 --auto --pos 0x0 --primary \ | |
| 24 | + | --output HDMI-0 --off \ | |
| 25 | + | --output DP-2 --auto --pos 2560x0 | |
| 26 | + | ;; | |
| 27 | + | triple) | |
| 28 | + | xrandr \ | |
| 29 | + | --output DP-4 --auto --pos 0x2160 --primary \ | |
| 30 | + | --output HDMI-0 --auto --pos 720x0 \ | |
| 31 | + | --output DP-2 --auto --pos 2560x2160 | |
| 32 | + | ;; | |
| 33 | + | *) | |
| 34 | + | echo 'please specify a configuration, one of: single, stack, split, triple' | |
| 35 | + | exit 1 | |
| 36 | + | esac | |
| 37 | + | exit 0 | |
install.sh(檔案已創建)
| @@ -0,0 +1,3 @@ | |||
| 1 | + | #! /usr/bin/env bash | |
| 2 | + | ||
| 3 | + | vi ~/.local/bin/displays.sh | |
上一頁
下一頁