dotfiles/scripts/uzui/monitor_connect
2025-07-09 04:26:58 -04:00

14 lines
1.0 KiB
Bash
Executable File

#!/bin/sh
if [[ "$1" == "0x0" ]]; then
xrandr --output eDP-1 --mode 1920x1080 --pos 0x0 --rotate normal --output DP-1 --off --output DP-2 --off --output DP-3 --off --output HDMI-1 --off
elif [[ "$1" == "mirror" ]]; then
xrandr --output eDP-1 --mode 1920x1080 --pos 0x0 --rotate normal --output DP-1 --off --output DP-2 --off --output DP-3 --off --output HDMI-1 --mode 1920x1080 --same-as eDP-1
elif [[ "$1" == "mirror-dp" ]]; then
xrandr --output eDP-1 --mode 1920x1080 --pos 0x0 --rotate normal --output DP-1 --mode 1920x1080 --output DP-2 --off --output DP-3 --off --output HDMI-1 --off --same-as eDP-1
elif [[ "$1" == "mirror-all" ]]; then
xrandr --output eDP-1 --mode 1920x1080 --pos 0x0 --rotate normal --output DP-1 --mode 1920x1080 --output DP-2 --off --output DP-3 --off --output HDMI-1 --mode 1920x1080 --same-as eDP-1
else
xrandr --output eDP-1 --mode 1920x1080 --pos 0x0 --rotate normal --output DP-1 --off --output DP-2 --off --output DP-3 --off --output HDMI-1 --mode "$1" --pos 1920x0 --rotate normal
fi