2024-08-15 03:41:41 +01:00
|
|
|
#!/bin/sh -e
|
|
|
|
|
2024-08-16 07:18:21 +01:00
|
|
|
. ./utils/monitor-control/utility_functions.sh
|
2024-08-05 20:24:05 +01:00
|
|
|
|
|
|
|
# Function to reset scaling back to 1 (native resolution) for all monitors
|
|
|
|
reset_scaling() {
|
|
|
|
echo -e "${BLUE}=========================================${RESET}"
|
|
|
|
echo -e "${BLUE} Reset Monitor Scaling to Native Resolution${RESET}"
|
|
|
|
echo -e "${BLUE}=========================================${RESET}"
|
|
|
|
|
|
|
|
monitor_list=$(detect_connected_monitors)
|
2024-08-16 07:46:31 +01:00
|
|
|
IFS=$'\n' read -r -a monitor_array <<<"$monitor_list"
|
2024-08-05 20:24:05 +01:00
|
|
|
|
|
|
|
for monitor in "${monitor_array[@]}"; do
|
|
|
|
echo -e "${CYAN}Resetting scaling for $monitor to 1x1 (native resolution)${RESET}"
|
|
|
|
execute_command "xrandr --output $monitor --scale 1x1"
|
|
|
|
done
|
|
|
|
|
|
|
|
echo -e "${GREEN}All monitor scalings have been reset to 1x1.${RESET}"
|
|
|
|
}
|
|
|
|
|
|
|
|
# Call the reset_scaling function
|
|
|
|
reset_scaling
|