diff --git a/hypr/scripts/toggle_monitor.sh b/hypr/scripts/toggle_monitor.sh index 3b6f7b6..92e0048 100755 --- a/hypr/scripts/toggle_monitor.sh +++ b/hypr/scripts/toggle_monitor.sh @@ -1,9 +1,12 @@ #!/bin/bash MONITOR_NAME="DVI-I-1" +WIDTH=1920 +HEIGHT=120 +WIDHT_FIXED=$((WIDTH+10)) -hyprctl keyword monitor "$MONITOR_NAME, 1600x900@60, 0x-2000, 1" && eww reload -notify-send -t 1500 "$MONITOR_NAME: Game Mode" "Monitor moved to 0x-2000" +hyprctl keyword monitor "$MONITOR_NAME, 1600x900@60, ${WIDHT_FIXED}x${HEIGHT}, 1" && eww reload +notify-send -t 1500 "$MONITOR_NAME: Game Mode" "Monitor moved to ${WIDHT_FIXED}x${HEIGHT}" if [[ "$1" == *"="* ]]; then VAR=$1 @@ -13,5 +16,5 @@ else "$@" fi -hyprctl -- keyword monitor "$MONITOR_NAME, 1600x900@60, -1600x0, 1" && eww reload -notify-send -t 1500 "$MONITOR_NAME: Desktop Mode" "Monitor returned to -1600x0" \ No newline at end of file +hyprctl -- keyword monitor "$MONITOR_NAME, 1600x900@60, ${WIDTH}x${HEIGHT}, 1" && eww reload +notify-send -t 1500 "$MONITOR_NAME: Desktop Mode" "Monitor returned to ${WIDTH}x${HEIGHT}"