/ de-omarchy / bin / omarchy-hyprland-monitor-focused-apple
swadhinbiswas Initial de-omarchy: Omarchy UI layer for Arch-based distros · 8/22/2026
9f393b2
13 lines · 409 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/bash

# omarchy:summary=Return success if the focused or named Hyprland monitor is an Apple display.
# omarchy:args=[monitor]

monitor="${1:-}"

hyprctl monitors -j | jq -e --arg monitor "$monitor" '
  .[]
  | select(if $monitor == "" then .focused == true else .name == $monitor end)
  | select(.make == "Apple Computer Inc" and (.model | test("StudioDisplay|ProDisplayXDR|Studio XDR")))
' >/dev/null