Files
dotfiles-hypr/hypr/scripts/toggle_monitor.sh
T
2026-04-30 17:27:04 +04:00

21 lines
545 B
Bash
Executable File

#!/bin/bash
MONITOR_NAME="DVI-I-1"
WIDTH=1920
HEIGHT=120
WIDHT_FIXED=$((WIDTH+10))
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
shift
env "$VAR" "$@"
else
"$@"
fi
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}"