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
+47
View File
@@ -0,0 +1,47 @@
function text(value) {
return String(value || "").toLowerCase()
}
function itemNamed(item, name) {
if (!item) return false
return text(item.id).indexOf(name) !== -1
|| text(item.title).indexOf(name) !== -1
|| text(item.tooltipTitle).indexOf(name) !== -1
}
function entryId(entry) {
if (typeof entry === "string") return entry
if (entry && typeof entry === "object") {
var id = entry.id
if (id !== undefined && id !== null && String(id) !== "") return String(id)
}
return ""
}
function layoutHasWidget(layout, id) {
var sections = ["left", "center", "right"]
for (var s = 0; s < sections.length; s++) {
var entries = layout && layout[sections[s]]
if (!Array.isArray(entries)) continue
for (var i = 0; i < entries.length; i++) {
if (entryId(entries[i]) === id) return true
}
}
return false
}
// LocalSend's item shows no state, offers only Open and Quit, and its primary
// click is a no-op, so Share > Receive is the whole surface. Hiding it by hand
// doesn't stick either: LocalSend picks a fresh tray id every launch.
function ownedByBlob(item, layout) {
return itemNamed(item, "localsend")
}
if (typeof module !== "undefined") {
module.exports = {
itemNamed: itemNamed,
entryId: entryId,
layoutHasWidget: layoutHasWidget,
ownedByBlob: ownedByBlob
}
}