Fork the desktop off Omarchy as a self-contained system

This commit is contained in:
2026-09-19 23:50:39 -04:00
parent 16a56f49a1
commit 9501f2bb4d
559 changed files with 43273 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
#!/bin/bash
# blob:summary=Returns true when the compositor holds a session lock
# blob:hidden=true
# Hyprland reports no lock state directly, but an active ext-session-lock is one
# of the reasons a monitor cannot go solitary: LOCK in solitaryBlockedBy. It
# stays set once the lock's client dies, which is the case worth detecting.
#
# Exits 0 locked, 1 unlocked, 2 undetermined. Hyprland stops at the first reason
# on a monitor with no workspace yet, before it ever reaches the lock, so a
# missing LOCK there means nothing was asked. Callers branching only on success
# treat 2 as unlocked.
monitors=$(hyprctl -j monitors 2>/dev/null) || exit 2
state=$(jq '
def blockers: .solitaryBlockedBy // [];
def readable: blockers | index("WORKSPACE") | not;
if any(.[]; blockers | index("LOCK")) then 0
elif any(.[]; readable) then 1
else 2
end
' <<<"$monitors" 2>/dev/null)
case $state in
0 | 1) exit "$state" ;;
*) exit 2 ;;
esac