12 lines
391 B
Bash
Executable file
12 lines
391 B
Bash
Executable file
#!/bin/sh
|
|
LIST="$(xrandr | sed '/disconnected/d;/connected/!d;s/ .*$//g')"
|
|
MONITORS="$(printf '%s' "$LIST" | tr '\n' ' ')"
|
|
|
|
CMD="$(printf 'xrandr' ; for MONITOR in $MONITORS ; do
|
|
SELECT="$(printf '%s' "$LIST" | menu "Next monitor (to right):")"
|
|
[ -z "$SELECT" ] && exit 0
|
|
[ -n "$LAST" ] && printf ' --output %s --right-of %s' "$SELECT" "$LAST"
|
|
LAST="$SELECT"
|
|
done)"
|
|
|
|
$($CMD)
|