Files
dotfiles/desktop/script/hyprland-toggle-monitor

8 lines
241 B
Bash
Executable File

#!/bin/sh
monitor=$1
state=$(hyprctl monitors all -j | jq -r ".[] | select(.name == \"$monitor\") | .disabled")
if [ $state == "true" ]; then
hyprctl keyword monitor $monitor,preferred
else
hyprctl keyword monitor $monitor,disable
fi