Remove dead code
This commit is contained in:
+14
-13
@@ -1,24 +1,25 @@
|
||||
# First-party plugins
|
||||
|
||||
These plugins ship with Omarchy and are loaded by the shell at startup.
|
||||
These plugins ship with Omarchy and are discovered by the shell at startup.
|
||||
They use the same `manifest.json` contract as third-party plugins; the
|
||||
only difference is that the shell flags them with `__isFirstParty: true`
|
||||
so they cannot be disabled.
|
||||
so they are always enabled. Services and keep-loaded panels are mounted at
|
||||
startup; other panels, overlays, and menus are loaded on demand.
|
||||
|
||||
User-installed plugins live alongside these conceptually but on disk under
|
||||
`~/.config/omarchy/plugins/<plugin-id>/` rather than in this directory.
|
||||
|
||||
| Plugin | id | kinds | activation | entry point |
|
||||
|---------------|-------------------------|-----------|------------|-------------------------------------|
|
||||
| Bar | `omarchy.bar` | `bar` | persistent | `bar/Bar.qml` |
|
||||
| Bar settings | `omarchy.settings` | `panel` | on-demand | `settings/SettingsPanel.qml` |
|
||||
| Image picker | `omarchy.image-picker` | `overlay` | on-demand | `image-picker/ImagePicker.qml` |
|
||||
| Emoji picker | `omarchy.emoji-picker` | `overlay` | on-demand | `emoji-picker/EmojiPicker.qml` |
|
||||
| Clipboard mgr | `omarchy.clipboard-picker`| `overlay` | on-demand | `clipboard-picker/ClipboardPicker.qml`|
|
||||
| Omarchy menu | `omarchy.menu` | `menu` | on-demand | `menu/Menu.qml` |
|
||||
| Notifications | `omarchy.notifications` | `service` | persistent | `notifications/Service.qml` |
|
||||
| OSD | `omarchy.osd` | `panel` | persistent | `osd/Osd.qml` |
|
||||
| Polkit agent | `omarchy.polkit` | `service` | persistent | `polkit/PolkitAgent.qml` |
|
||||
| Plugin | id | kinds | entry point |
|
||||
|---------------|---------------------------|-----------|---------------------------------------|
|
||||
| Bar | `omarchy.bar` | `bar` | `bar/Bar.qml` |
|
||||
| Bar settings | `omarchy.settings` | `panel` | `settings/SettingsPanel.qml` |
|
||||
| Image picker | `omarchy.image-picker` | `overlay` | `image-picker/ImagePicker.qml` |
|
||||
| Emoji picker | `omarchy.emoji-picker` | `overlay` | `emoji-picker/EmojiPicker.qml` |
|
||||
| Clipboard mgr | `omarchy.clipboard-picker`| `overlay` | `clipboard-picker/ClipboardPicker.qml`|
|
||||
| Omarchy menu | `omarchy.menu` | `menu` | `menu/Menu.qml` |
|
||||
| Notifications | `omarchy.notifications` | `service` | `notifications/Service.qml` |
|
||||
| OSD | `omarchy.osd` | `panel` | `osd/Osd.qml` |
|
||||
| Polkit agent | `omarchy.polkit` | `service` | `polkit/PolkitAgent.qml` |
|
||||
|
||||
## Bar
|
||||
|
||||
|
||||
@@ -9,10 +9,6 @@ import qs.Commons as NoctaliaCommons
|
||||
Item {
|
||||
id: root
|
||||
|
||||
property string omarchyPath: ""
|
||||
property var shell: null
|
||||
property var manifest: null
|
||||
|
||||
readonly property string home: Quickshell.env("HOME")
|
||||
readonly property string currentBackgroundLink: home + "/.config/omarchy/current/background"
|
||||
|
||||
|
||||
@@ -5,7 +5,10 @@
|
||||
"version": "1.0.0",
|
||||
"author": "Omarchy",
|
||||
"description": "Desktop background renderer with click handling and transitions",
|
||||
"kinds": ["service"],
|
||||
"activation": "startup",
|
||||
"entryPoints": { "service": "Background.qml" }
|
||||
"kinds": [
|
||||
"service"
|
||||
],
|
||||
"entryPoints": {
|
||||
"service": "Background.qml"
|
||||
}
|
||||
}
|
||||
|
||||
+10
-13
@@ -222,6 +222,14 @@ Item {
|
||||
return index === -1 ? [] : entries.slice(index + 1)
|
||||
}
|
||||
|
||||
function canonicalWidgetId(name) {
|
||||
switch (String(name)) {
|
||||
case "idle": return "idleInhibitor"
|
||||
case "weatherFlyout": return "weather"
|
||||
default: return String(name)
|
||||
}
|
||||
}
|
||||
|
||||
function builtinModuleComponent(name) {
|
||||
switch (String(name)) {
|
||||
case "omarchy": return omarchyModuleComponent
|
||||
@@ -459,18 +467,6 @@ Item {
|
||||
return ids
|
||||
}
|
||||
|
||||
function activeTrayItemCount() {
|
||||
var count = 0
|
||||
var values = SystemTray.items.values
|
||||
|
||||
for (var i = 0; i < values.length; i++) {
|
||||
if (values[i].status !== Status.Passive)
|
||||
count++
|
||||
}
|
||||
|
||||
return count
|
||||
}
|
||||
|
||||
function trayIconSource(icon) {
|
||||
var value = String(icon || "")
|
||||
var marker = "?path="
|
||||
@@ -939,7 +935,8 @@ Item {
|
||||
readonly property var registryComponent: {
|
||||
var w = root.barWidgetRegistry.widgets
|
||||
if (customType || builtinComponent) return null
|
||||
return w[moduleName] ? w[moduleName].component : null
|
||||
var registryName = root.canonicalWidgetId(moduleName)
|
||||
return w[registryName] ? w[registryName].component : null
|
||||
}
|
||||
readonly property bool qmlCustom: customType === "qml"
|
||||
readonly property bool commandCustom: customType === "command"
|
||||
|
||||
@@ -5,10 +5,9 @@ shipped as a first-party plugin of [`omarchy-shell`](../../README.md), the
|
||||
long-running shell host. The bar is mounted at startup and lives inside
|
||||
the shell for its whole session.
|
||||
|
||||
- `manifest.json` declares the plugin (`id: omarchy.bar`, `kind: bar`, `activation: persistent`) and points at `Bar.qml` as the entry point.
|
||||
- `manifest.json` declares the plugin (`id: omarchy.bar`, `kind: bar`) and points at `Bar.qml` as the entry point.
|
||||
- `Bar.qml` is Omarchy-owned bar engine code, loaded by the omarchy-shell host. Users should not edit it directly.
|
||||
- `widgets/` holds first-party widgets — modular, interactive components shipped with Omarchy.
|
||||
- `common/` holds shared QML helpers (buttons, sliders, popup cards).
|
||||
- The bar receives its config from the host shell as a `barConfig` property; the host loads it from `~/.config/omarchy/shell.json` (or `shell-defaults.json` when the user has no file).
|
||||
- `omarchy-style-bar-position` updates only the user shell.json file.
|
||||
|
||||
|
||||
@@ -5,7 +5,10 @@
|
||||
"version": "1.0.0",
|
||||
"author": "Omarchy",
|
||||
"description": "Status bar with widgets",
|
||||
"kinds": ["bar"],
|
||||
"activation": "persistent",
|
||||
"entryPoints": { "bar": "Bar.qml" }
|
||||
"kinds": [
|
||||
"bar"
|
||||
],
|
||||
"entryPoints": {
|
||||
"bar": "Bar.qml"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -123,7 +123,7 @@ Item {
|
||||
var d = displays[selectedIndex]
|
||||
if (d) toggleDisplay(d.name, d.enabled)
|
||||
}
|
||||
// brightness: no semantic activation; the slider value is the action.
|
||||
// brightness: no separate action; the slider value is the action.
|
||||
}
|
||||
|
||||
function clampCursor() {
|
||||
@@ -222,18 +222,6 @@ Item {
|
||||
brightnessDebounce.restart()
|
||||
}
|
||||
|
||||
function toggleMirror() {
|
||||
if (!internalMonitor || !externalMonitor) return
|
||||
actionProc.command = ["bash", "-lc", "if hyprctl monitors -j | jq -e --arg i '" + internalMonitor + "' --arg e '" + externalMonitor + "' '.[] | select(.name == $i and .mirrorOf == $e)' >/dev/null; then hyprctl keyword monitor '" + internalMonitor + ",preferred,auto,auto'; else hyprctl keyword monitor '" + internalMonitor + ",preferred,auto,auto,mirror," + externalMonitor + "'; fi"]
|
||||
if (!actionProc.running) actionProc.running = true
|
||||
}
|
||||
|
||||
function toggleInternal() {
|
||||
if (!internalMonitor || !externalMonitor) return
|
||||
actionProc.command = ["bash", "-lc", "if hyprctl monitors -j | jq -e --arg i '" + internalMonitor + "' '.[] | select(.name == $i)' >/dev/null; then hyprctl keyword monitor '" + internalMonitor + ",disable'; else hyprctl keyword monitor '" + internalMonitor + ",preferred,auto,auto'; fi"]
|
||||
if (!actionProc.running) actionProc.running = true
|
||||
}
|
||||
|
||||
function normalizeScale(scale) {
|
||||
var n = parseFloat(String(scale || ""))
|
||||
if (!isFinite(n)) return ""
|
||||
|
||||
@@ -196,16 +196,6 @@ iwctl known-networks list 2>/dev/null \\
|
||||
Quickshell.execDetached(["bash", "-lc", "printf %s " + root.bar.shellQuote(value) + " | wl-copy"])
|
||||
}
|
||||
|
||||
function networkTooltip() {
|
||||
if (kind === "wifi") {
|
||||
var f = parseFloat(frequency)
|
||||
var ftext = f > 0 ? " (" + (f / 1000).toFixed(1) + " GHz)" : ""
|
||||
return (label || "Wi-Fi") + ftext
|
||||
}
|
||||
if (kind === "ethernet") return "Connected"
|
||||
return "Disconnected"
|
||||
}
|
||||
|
||||
function networkCommand() {
|
||||
return [
|
||||
"device=$(ip route get 1.1.1.1 2>/dev/null | awk '{ for (i = 1; i <= NF; i++) if ($i == \"dev\") { print $(i + 1); exit } }')",
|
||||
|
||||
@@ -14,16 +14,21 @@ Item {
|
||||
property bool popupOpen: false
|
||||
function closePopout() { popupOpen = false }
|
||||
|
||||
function showPopup() {
|
||||
root.popupOpen = !root.popupOpen
|
||||
if (root.popupOpen) root.refresh()
|
||||
}
|
||||
|
||||
IpcHandler {
|
||||
target: "weather"
|
||||
function show(): void {
|
||||
root.popupOpen = !root.popupOpen
|
||||
if (root.popupOpen) root.refresh()
|
||||
}
|
||||
function show(): void { root.showPopup() }
|
||||
function toggle(): void { root.showPopup() }
|
||||
}
|
||||
|
||||
function toggle(): void {
|
||||
show()
|
||||
}
|
||||
IpcHandler {
|
||||
target: "weatherFlyout"
|
||||
function show(): void { root.showPopup() }
|
||||
function toggle(): void { root.showPopup() }
|
||||
}
|
||||
|
||||
// Parsed wttr.in j1 response. Kept on failure so stale data stays visible.
|
||||
@@ -58,8 +63,6 @@ Item {
|
||||
readonly property int refreshMinutes: Math.max(1, parseInt(setting("refreshMinutes", 15), 10) || 15)
|
||||
|
||||
readonly property string reportLocation: wttrLocation || (areaInfo && areaInfo.areaName && areaInfo.areaName[0] ? areaInfo.areaName[0].value : "")
|
||||
readonly property string reportCondition: current && current.weatherDesc && current.weatherDesc[0] ? current.weatherDesc[0].value : ""
|
||||
readonly property string reportTemp: current ? formatTemp(useImperial ? current.temp_F : current.temp_C) : ""
|
||||
readonly property string reportTempNum: current ? String(useImperial ? current.temp_F : current.temp_C) : ""
|
||||
readonly property string tempUnit: "°" + (useImperial ? "F" : "C")
|
||||
readonly property string reportFeels: current ? formatTemp(useImperial ? current.FeelsLikeF : current.FeelsLikeC) : ""
|
||||
@@ -164,16 +167,6 @@ Item {
|
||||
return Qt.formatDate(d, "dddd")
|
||||
}
|
||||
|
||||
function maxTempForDay(day) {
|
||||
if (!day) return ""
|
||||
return formatTemp(useImperial ? day.maxtempF : day.maxtempC)
|
||||
}
|
||||
|
||||
function minTempForDay(day) {
|
||||
if (!day) return ""
|
||||
return formatTemp(useImperial ? day.mintempF : day.mintempC)
|
||||
}
|
||||
|
||||
// Bare degree value (no unit letter), used in the forecast row.
|
||||
function bareTempForDay(day, kind) {
|
||||
if (!day) return ""
|
||||
|
||||
@@ -7,11 +7,6 @@ import qs.Commons
|
||||
Item {
|
||||
id: root
|
||||
|
||||
property string omarchyPath: Quickshell.env("OMARCHY_PATH") || (Quickshell.env("HOME") + "/.local/share/omarchy")
|
||||
property var shell: null
|
||||
property var manifest: null
|
||||
property var pluginRegistry: null
|
||||
|
||||
property bool opened: false
|
||||
property string filterText: ""
|
||||
property int selectedIndex: 0
|
||||
@@ -153,14 +148,6 @@ Item {
|
||||
root.rebuildDisplay()
|
||||
}
|
||||
}
|
||||
|
||||
IpcHandler {
|
||||
target: "clipboard-picker"
|
||||
function summon(): string { root.open("{}"); return "ok" }
|
||||
function hide(): string { root.close(); return "ok" }
|
||||
function toggle(): string { root.toggle(); return "ok" }
|
||||
function ping(): string { return "ok" }
|
||||
}
|
||||
PanelWindow {
|
||||
id: panel
|
||||
visible: root.opened
|
||||
|
||||
@@ -5,8 +5,9 @@
|
||||
"version": "1.0.0",
|
||||
"author": "Omarchy",
|
||||
"description": "A clipboard manager to view and paste history",
|
||||
"kinds": ["overlay"],
|
||||
"activation": "on-demand",
|
||||
"kinds": [
|
||||
"overlay"
|
||||
],
|
||||
"keepLoaded": true,
|
||||
"entryPoints": {
|
||||
"overlay": "ClipboardPicker.qml"
|
||||
|
||||
@@ -63,10 +63,7 @@ Item {
|
||||
}
|
||||
|
||||
// ---- host injections ----------------------------------------------------
|
||||
property var barWidgetRegistry: null
|
||||
property var pluginRegistry: null
|
||||
property var shell: null
|
||||
property var manifest: null
|
||||
|
||||
// ---- theme --------------------------------------------------------------
|
||||
readonly property color foreground: Color.foreground
|
||||
@@ -104,7 +101,7 @@ Item {
|
||||
property string focusSection: "cursor-surface"
|
||||
property int selectedIndex: 0
|
||||
|
||||
// Demo state mutated by activation.
|
||||
// Demo state mutated by interaction.
|
||||
property string choiceDemoValue: "top"
|
||||
property bool toggleDemoOn: true
|
||||
property bool toggleSquareOn: false
|
||||
|
||||
@@ -5,7 +5,10 @@
|
||||
"version": "1.0.0",
|
||||
"author": "Omarchy",
|
||||
"description": "Visual reference for omarchy-shell common UI components. Summon with: omarchy-shell shell summon omarchy.dev-gallery '{}' (or run: omarchy dev ui-preview).",
|
||||
"kinds": ["panel"],
|
||||
"activation": "on-demand",
|
||||
"entryPoints": { "panel": "GalleryPanel.qml" }
|
||||
"kinds": [
|
||||
"panel"
|
||||
],
|
||||
"entryPoints": {
|
||||
"panel": "GalleryPanel.qml"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,6 @@ Item {
|
||||
property string omarchyPath: Quickshell.env("OMARCHY_PATH") || (Quickshell.env("HOME") + "/.local/share/omarchy")
|
||||
property var shell: null
|
||||
property var manifest: null
|
||||
property var pluginRegistry: null
|
||||
|
||||
property bool opened: false
|
||||
property string filterText: ""
|
||||
@@ -163,14 +162,6 @@ Item {
|
||||
}
|
||||
ListModel { id: displayModel }
|
||||
|
||||
IpcHandler {
|
||||
target: "emoji-picker"
|
||||
function summon(): string { root.open("{}"); return "ok" }
|
||||
function hide(): string { root.close(); return "ok" }
|
||||
function toggle(): string { root.toggle(); return "ok" }
|
||||
function ping(): string { return "ok" }
|
||||
}
|
||||
|
||||
FileView {
|
||||
path: root.omarchyPath + "/shell/plugins/emoji-picker/emojis.json"
|
||||
onLoaded: root.loadEmojis(text())
|
||||
|
||||
@@ -5,8 +5,9 @@
|
||||
"version": "1.0.0",
|
||||
"author": "Omarchy",
|
||||
"description": "An emoji picker to copy or type emojis",
|
||||
"kinds": ["overlay"],
|
||||
"activation": "on-demand",
|
||||
"kinds": [
|
||||
"overlay"
|
||||
],
|
||||
"keepLoaded": true,
|
||||
"entryPoints": {
|
||||
"overlay": "EmojiPicker.qml"
|
||||
|
||||
@@ -9,16 +9,9 @@ import qs.Commons
|
||||
Item {
|
||||
id: root
|
||||
|
||||
// Injected by omarchy-shell. Optional here — the picker doesn't need
|
||||
// omarchyPath itself, but every plugin gets it so user-installed scripts
|
||||
// referenced by other plugins can stay path-portable.
|
||||
// Injected by omarchy-shell so helper scripts resolve without relying on
|
||||
// OMARCHY_PATH being set in the environment.
|
||||
property string omarchyPath: ""
|
||||
// Set by omarchy-shell when summoning the overlay; not currently consumed but
|
||||
// declared so the host's onLoaded injection doesn't trip a missing-property
|
||||
// warning.
|
||||
property var shell: null
|
||||
property var manifest: null
|
||||
|
||||
property string imageDirs: Quickshell.env("OMARCHY_IMAGE_SELECTOR_DIRS") || Quickshell.env("OMARCHY_IMAGE_SELECTOR_DIR") || Quickshell.env("OMARCHY_STOCK_BACKGROUNDS_DIR") || (Quickshell.env("HOME") + "/.config/omarchy/current/theme/backgrounds")
|
||||
property string imageRows: ""
|
||||
property string loadedImageRows: ""
|
||||
@@ -120,17 +113,6 @@ Item {
|
||||
return nameForPath(path).toLowerCase().indexOf(needle) !== -1 || labelForPath(path).toLowerCase().indexOf(needle) !== -1
|
||||
}
|
||||
|
||||
function matchingCount() {
|
||||
if (!filterText) return imageArray.length
|
||||
|
||||
var count = 0
|
||||
for (var i = 0; i < imageArray.length; i++) {
|
||||
if (itemMatches(i)) count++
|
||||
}
|
||||
|
||||
return count
|
||||
}
|
||||
|
||||
function firstMatchingIndex() {
|
||||
for (var i = 0; i < imageArray.length; i++) {
|
||||
if (itemMatches(i)) return i
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
"version": "1.0.0",
|
||||
"author": "Omarchy",
|
||||
"description": "Image-grid selector overlay used for wallpapers, themes, and any other directory of images",
|
||||
"kinds": ["overlay"],
|
||||
"activation": "on-demand",
|
||||
"kinds": [
|
||||
"overlay"
|
||||
],
|
||||
"keepLoaded": true,
|
||||
"entryPoints": { "overlay": "ImagePicker.qml" },
|
||||
"ipc": {
|
||||
"summon": "image-picker"
|
||||
"entryPoints": {
|
||||
"overlay": "ImagePicker.qml"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,9 +9,6 @@ Item {
|
||||
|
||||
// Injected by omarchy-shell when this plugin is summoned.
|
||||
property string omarchyPath: Quickshell.env("OMARCHY_PATH") || (Quickshell.env("HOME") + "/.local/share/omarchy")
|
||||
property var shell: null
|
||||
property var manifest: null
|
||||
property var pluginRegistry: null
|
||||
|
||||
// Plugin lifecycle hooks. The host calls open(payloadJson) after
|
||||
// `omarchy-shell shell summon omarchy.menu ...` and close() when hidden.
|
||||
@@ -71,14 +68,6 @@ Item {
|
||||
property int visibleRowsHeight: rowListHeight(layoutSerial, displayModel.count, filterText, searchDivider)
|
||||
property int cardHeight: Math.min(Math.max(Style.space(220), contentMargin * 2 + headerHeight + contentSpacing + visibleRowsHeight), panel.height - Style.gapsOut * 2)
|
||||
|
||||
function shellQuote(value) {
|
||||
return "'" + String(value).replace(/'/g, "'\\''") + "'"
|
||||
}
|
||||
|
||||
function decodeField(value) {
|
||||
return String(value || "").replace(/\v/g, "\n").replace(/\f/g, "\t")
|
||||
}
|
||||
|
||||
function withAlpha(color, alpha) {
|
||||
return Qt.rgba(color.r, color.g, color.b, alpha)
|
||||
}
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
"version": "1.0.0",
|
||||
"author": "Omarchy",
|
||||
"description": "Quickshell-powered Omarchy command menu",
|
||||
"kinds": ["menu"],
|
||||
"activation": "on-demand",
|
||||
"kinds": [
|
||||
"menu"
|
||||
],
|
||||
"keepLoaded": true,
|
||||
"entryPoints": { "menu": "Menu.qml" },
|
||||
"ipc": {
|
||||
"summon": "menu"
|
||||
"entryPoints": {
|
||||
"menu": "Menu.qml"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,9 +17,7 @@ Item {
|
||||
id: service
|
||||
|
||||
// Injected by omarchy-shell (the first-party service loader).
|
||||
property string omarchyPath: ""
|
||||
property var shell: null
|
||||
property var manifest: null
|
||||
|
||||
readonly property string home: Quickshell.env("HOME")
|
||||
// History + DND live under XDG_STATE_HOME: they're persistent user state
|
||||
|
||||
@@ -34,28 +34,6 @@ Rectangle {
|
||||
|
||||
signal closeRequested()
|
||||
signal cardClicked()
|
||||
signal imageClicked()
|
||||
|
||||
// Media mode = the notification carries a real screenshot or screen
|
||||
// recording preview. Quickshell normalizes file paths from `-i` and the
|
||||
// `image-path` hint into `image://icon//<absolute path>` (double slash
|
||||
// marks an absolute filesystem path vs a themed icon name like
|
||||
// `image://icon/firefox`).
|
||||
function _imageFilePath(s) {
|
||||
if (!s) return ""
|
||||
if (s.indexOf("image://icon//") === 0) return s.substring("image://icon/".length)
|
||||
if (s.indexOf("file://") === 0) return decodeURIComponent(s.substring(7))
|
||||
return ""
|
||||
}
|
||||
function _isMediaFile(path) {
|
||||
if (!path) return false
|
||||
var lower = path.toLowerCase()
|
||||
return lower.endsWith(".png") || lower.endsWith(".jpg") ||
|
||||
lower.endsWith(".jpeg") || lower.endsWith(".webp") ||
|
||||
lower.endsWith(".gif")
|
||||
}
|
||||
readonly property string mediaImageSource: ""
|
||||
readonly property bool mediaMode: false
|
||||
// Use only what the notification explicitly carries — no themed-icon
|
||||
// theme-lookup fallback because Quickshell's icon image provider returns
|
||||
// a placeholder for missing names (rather than erroring), which means
|
||||
@@ -64,7 +42,7 @@ Rectangle {
|
||||
// `appIcon` (-i flag) still get one.
|
||||
readonly property string smallIconSource: image.length > 0 ? image : appIcon
|
||||
readonly property bool hasGlyph: glyph.length > 0
|
||||
readonly property bool hasSmallIcon: !mediaMode && (smallIconSource.length > 0 || hasGlyph)
|
||||
readonly property bool hasSmallIcon: smallIconSource.length > 0 || hasGlyph
|
||||
readonly property bool chromiumDerived: {
|
||||
var source = (app + "\n" + appIcon).toLowerCase()
|
||||
return source.indexOf("chrom") >= 0 || source.indexOf("brave") >= 0 ||
|
||||
@@ -75,7 +53,6 @@ Rectangle {
|
||||
|
||||
readonly property color dimColor: Qt.darker(Color.notifications.text, 1.4)
|
||||
readonly property color bodyColor: Qt.darker(Color.notifications.text, 1.15)
|
||||
readonly property color hoverColor: Qt.rgba(Color.notifications.text.r, Color.notifications.text.g, Color.notifications.text.b, 0.14)
|
||||
readonly property color accentColor: urgency === 2 ? Color.urgent : (urgency === 0 ? dimColor : Color.notifications.countdown)
|
||||
|
||||
function sanitizeBody(s) {
|
||||
@@ -111,9 +88,8 @@ Rectangle {
|
||||
|
||||
ColumnLayout {
|
||||
id: mainColumn
|
||||
// Inset by the card border so the hero image (and the text row) don't
|
||||
// paint over the card's outer border. Without this the left/right/top
|
||||
// border is invisible under the image.
|
||||
// Inset by the card border so the content doesn't paint over the card's
|
||||
// outer border.
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
@@ -122,46 +98,7 @@ Rectangle {
|
||||
anchors.rightMargin: root.border.width
|
||||
spacing: 0
|
||||
|
||||
// Hero image strip (media notifications only). PreserveAspectCrop so
|
||||
// the preview looks like a clean banner without dark letterboxing.
|
||||
Item {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: Style.space(140)
|
||||
visible: root.mediaMode
|
||||
clip: true
|
||||
|
||||
Image {
|
||||
anchors.fill: parent
|
||||
source: root.mediaImageSource
|
||||
fillMode: Image.PreserveAspectCrop
|
||||
sourceSize.width: width > 0 ? width * Screen.devicePixelRatio : 0
|
||||
sourceSize.height: height > 0 ? height * Screen.devicePixelRatio : 0
|
||||
asynchronous: true
|
||||
smooth: true
|
||||
cache: false
|
||||
}
|
||||
|
||||
// Bottom divider matching the card border so the screenshot is
|
||||
// visually framed on every side (card border wraps top/left/right;
|
||||
// this line completes the bottom).
|
||||
Rectangle {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
height: root.border.width
|
||||
color: root.urgency === 2 ? Color.urgent : Color.notifications.border
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: root.imageClicked()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Text content. Always rendered — for media notifications this carries
|
||||
// the summary/body ("Screenshot saved" etc) under the hero image.
|
||||
// Text content.
|
||||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
Layout.leftMargin: Style.space(12)
|
||||
|
||||
@@ -5,8 +5,9 @@
|
||||
"version": "1.0.0",
|
||||
"author": "Omarchy",
|
||||
"description": "Notification daemon, popups, and history",
|
||||
"kinds": ["service"],
|
||||
"activation": "persistent",
|
||||
"kinds": [
|
||||
"service"
|
||||
],
|
||||
"keepLoaded": true,
|
||||
"entryPoints": {
|
||||
"service": "Service.qml"
|
||||
|
||||
@@ -7,10 +7,6 @@ import qs.Commons
|
||||
Item {
|
||||
id: root
|
||||
|
||||
property string omarchyPath: ""
|
||||
property var shell: null
|
||||
property var manifest: null
|
||||
|
||||
property bool opened: false
|
||||
property string icon: ""
|
||||
property string message: ""
|
||||
|
||||
@@ -4,8 +4,11 @@
|
||||
"name": "On-screen display",
|
||||
"version": "1.0.0",
|
||||
"description": "Quickshell volume, brightness, and status overlays.",
|
||||
"kinds": ["panel"],
|
||||
"activation": "persistent",
|
||||
"kinds": [
|
||||
"panel"
|
||||
],
|
||||
"keepLoaded": true,
|
||||
"entryPoints": { "panel": "Osd.qml" }
|
||||
"entryPoints": {
|
||||
"panel": "Osd.qml"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,10 +8,6 @@ import qs.Commons
|
||||
Item {
|
||||
id: root
|
||||
|
||||
property string omarchyPath: ""
|
||||
property var shell: null
|
||||
property var manifest: null
|
||||
|
||||
property string fontFamily: Quickshell.env("OMARCHY_MENU_FONT") || "monospace"
|
||||
property color accent: Color.accent
|
||||
property color background: Color.menu.background
|
||||
@@ -19,7 +15,6 @@ Item {
|
||||
property color border: foreground
|
||||
readonly property int cornerRadius: Style.cornerRadius
|
||||
property int contentMargin: Style.spacing.panelPadding
|
||||
property int contentSpacing: Style.spacing.rowPaddingX
|
||||
property int fieldHeight: Math.max(Style.space(42), Style.spacing.controlHeight)
|
||||
|
||||
property bool closing: false
|
||||
@@ -42,10 +37,6 @@ Item {
|
||||
function withAlpha(color, alpha) {
|
||||
return Qt.rgba(color.r, color.g, color.b, alpha)
|
||||
}
|
||||
function messageText() {
|
||||
return "Authentication is needed..."
|
||||
}
|
||||
|
||||
function promptLooksFingerprint(text) {
|
||||
var s = String(text || "").toLowerCase()
|
||||
return s.indexOf("finger") !== -1 || s.indexOf("fprint") !== -1 || s.indexOf("swipe") !== -1
|
||||
|
||||
@@ -5,8 +5,9 @@
|
||||
"version": "1.0.0",
|
||||
"author": "Omarchy",
|
||||
"description": "Theme-aware authentication dialog for privileged actions.",
|
||||
"kinds": ["service"],
|
||||
"activation": "persistent",
|
||||
"kinds": [
|
||||
"service"
|
||||
],
|
||||
"keepLoaded": true,
|
||||
"entryPoints": {
|
||||
"service": "PolkitAgent.qml"
|
||||
|
||||
@@ -153,7 +153,7 @@ Item {
|
||||
]
|
||||
}
|
||||
},
|
||||
plugins: [{ id: "omarchy.osd" }]
|
||||
plugins: []
|
||||
})
|
||||
|
||||
property var defaultConfig: builtinShellConfig
|
||||
@@ -355,11 +355,20 @@ Item {
|
||||
function onChanged() { root.catalogRevision++ }
|
||||
}
|
||||
|
||||
function canonicalWidgetId(id) {
|
||||
switch (String(id || "")) {
|
||||
case "idle": return "idleInhibitor"
|
||||
case "weatherFlyout": return "weather"
|
||||
default: return String(id || "")
|
||||
}
|
||||
}
|
||||
|
||||
function widgetMetadata(id) {
|
||||
var key = String(id || "")
|
||||
if (root.barWidgetRegistry && root.barWidgetRegistry.has(key))
|
||||
return root.barWidgetRegistry.metadataFor(key) || {}
|
||||
if (builtinWidgetMeta[key]) return builtinWidgetMeta[key]
|
||||
var canonicalKey = canonicalWidgetId(key)
|
||||
if (root.barWidgetRegistry && root.barWidgetRegistry.has(canonicalKey))
|
||||
return root.barWidgetRegistry.metadataFor(canonicalKey) || {}
|
||||
if (builtinWidgetMeta[canonicalKey]) return builtinWidgetMeta[canonicalKey]
|
||||
|
||||
var manifest = root.pluginRegistry ? root.pluginRegistry.installedPlugins[key] : null
|
||||
if (manifest) {
|
||||
|
||||
@@ -5,7 +5,10 @@
|
||||
"version": "1.0.0",
|
||||
"author": "Omarchy",
|
||||
"description": "Customize the Omarchy bar position and widgets",
|
||||
"kinds": ["panel"],
|
||||
"activation": "on-demand",
|
||||
"entryPoints": { "panel": "SettingsPanel.qml" }
|
||||
"kinds": [
|
||||
"panel"
|
||||
],
|
||||
"entryPoints": {
|
||||
"panel": "SettingsPanel.qml"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user