mirror of
https://github.com/ChrisTitusTech/linutil.git
synced 2024-12-25 21:09:45 +00:00
24 lines
790 B
Bash
Executable File
24 lines
790 B
Bash
Executable File
#!/bin/sh -e
|
|
|
|
. ./utility_functions.sh
|
|
|
|
# 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)
|
|
IFS=$'\n' read -r -a monitor_array <<<"$monitor_list"
|
|
|
|
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
|