mirror of
https://github.com/ChrisTitusTech/linutil.git
synced 2024-11-06 05:29:42 +00:00
16 lines
516 B
Bash
16 lines
516 B
Bash
|
#!/bin/bash
|
||
|
source ./utils/monitor-control/utility_functions.sh
|
||
|
|
||
|
# Function to extend displays
|
||
|
extend_displays() {
|
||
|
monitors=($(detect_connected_monitors))
|
||
|
for ((i=1; i<${#monitors[@]}; i++)); do
|
||
|
if confirm_action "Extend ${monitors[$i]} to the right of ${monitors[$((i-1))]}?"; then
|
||
|
echo "Extending ${monitors[$i]} to the right of ${monitors[$((i-1))]}"
|
||
|
execute_command "xrandr --output ${monitors[$i]} --right-of ${monitors[$((i-1))]}"
|
||
|
fi
|
||
|
done
|
||
|
}
|
||
|
|
||
|
extend_displays
|