Files
omarchycn/bin/omarchy-hyprland-monitor-internal-toggle
T

17 lines
475 B
Bash
Executable File

#!/bin/bash
# Toggle the internal laptop display on/off.
if omarchy-hyprland-toggle-disabled internal-monitor-disable; then
ACTIVE_COUNT=$(hyprctl monitors -j | jq 'length')
if [[ $ACTIVE_COUNT -le 1 ]]; then
notify-send -u low "󰍹 Can't disable the only active display"
exit 1
fi
fi
omarchy-hyprland-toggle \
--enabled-notification "󰍹 Internal display off" \
--disabled-notification "󰍹 Internal display on" \
internal-monitor-disable