13 lines
403 B
Bash
Executable File
13 lines
403 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# blob:summary=Return success if the focused or named Hyprland monitor is an Apple display.
|
|
# blob: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
|