2024-08-15 03:41:41 +01:00
|
|
|
#!/bin/sh -e
|
|
|
|
|
2024-08-21 08:18:34 +01:00
|
|
|
. ./utility_functions.sh
|
2024-08-05 20:24:05 +01:00
|
|
|
|
2024-09-12 21:14:50 +01:00
|
|
|
. ../../common-script.sh
|
|
|
|
|
2024-08-05 20:24:05 +01:00
|
|
|
# Function to duplicate displays
|
|
|
|
duplicate_displays() {
|
2024-09-12 21:14:50 +01:00
|
|
|
primary=$(detect_connected_monitors | head -n 1)
|
|
|
|
for monitor in $(detect_connected_monitors | tail -n +2); do
|
|
|
|
if confirm_action "Duplicate $monitor to $primary?"; then
|
|
|
|
printf "%b\n" "${GREEN}Duplicating $monitor to $primary${RC}"
|
|
|
|
execute_command "xrandr --output $monitor --same-as $primary"
|
|
|
|
fi
|
|
|
|
done
|
2024-08-05 20:24:05 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
duplicate_displays
|