Support for both displayports for home.
This commit is contained in:
parent
979bbad959
commit
52cf8a7385
1 changed files with 4 additions and 3 deletions
|
@ -27,7 +27,7 @@ twoscreen() {
|
||||||
}
|
}
|
||||||
|
|
||||||
home() {
|
home() {
|
||||||
xrandr --output "DisplayPort-0" --mode 2560x1440 $(echo "$allposs" | grep -v "\bDisplayPort-0" | awk '{print "--output", $1, "--off"}' | paste -sd ' ' -)
|
xrandr --output "DisplayPort-${1}" --mode 2560x1440 $(echo "$allposs" | grep -v "\bDisplayPort-${1}" | awk '{print "--output", $1, "--off"}' | paste -sd ' ' -)
|
||||||
}
|
}
|
||||||
|
|
||||||
onescreen() {
|
onescreen() {
|
||||||
|
@ -50,9 +50,10 @@ screens=$(echo "$allposs" | awk '/ connected/ {print $1}')
|
||||||
{ onescreen "$screens"; postrun; exit ;}
|
{ onescreen "$screens"; postrun; exit ;}
|
||||||
|
|
||||||
# Get user choice including both and manual selection:
|
# Get user choice including both and manual selection:
|
||||||
chosen=$(printf -- "home\\n----\\n%s\\n----\\nmulti" "$screens" | rofi -dmenu -i -p "Select display arangement") &&
|
chosen=$(printf -- "home-1\\nhome-2\\n----\\n%s\\n----\\nmulti" "$screens" | rofi -dmenu -i -p "Select display arangement") &&
|
||||||
case "$chosen" in
|
case "$chosen" in
|
||||||
"home") home ;;
|
"home-1") home 0 ;;
|
||||||
|
"home-2") home 1 ;;
|
||||||
"multi") twoscreen ;;
|
"multi") twoscreen ;;
|
||||||
"----") exit ;;
|
"----") exit ;;
|
||||||
*) onescreen "$chosen" ;;
|
*) onescreen "$chosen" ;;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue