Give services their own place

This commit is contained in:
David Heinemeier Hansson
2026-05-20 14:03:56 +02:00
parent 41425481db
commit 4f1ef8d95f
8 changed files with 27 additions and 13 deletions
+3 -1
View File
@@ -1,4 +1,4 @@
echo "Rename app launcher shell plugin to launcher"
echo "Rename shell plugins"
config_files=(
"$HOME/.config/hypr/bindings/utilities.lua"
@@ -12,7 +12,9 @@ for config_file in "${config_files[@]}"; do
if [[ -f $config_file ]]; then
sed -i \
-e 's/omarchy\.app-launcher/omarchy.launcher/g' \
-e 's/omarchy\.battery-monitor/omarchy.battery/g' \
-e 's/omarchy-app-launcher/omarchy-launcher/g' \
-e 's/omarchy-battery-monitor/omarchy-battery/g' \
-e 's/\[app-launcher\]/[launcher]/g' \
-e 's/app-launcher\./launcher./g' \
"$config_file"
+3
View File
@@ -33,6 +33,9 @@ shell/
image-picker/
menu/
notifications/
services/
battery/
idle/
osd/
polkit/
```
+2 -2
View File
@@ -19,8 +19,8 @@ User-installed plugins live alongside these conceptually but on disk under
| 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` |
| Battery mon. | `omarchy.battery-monitor` | `service` | `battery-monitor/Service.qml` |
| Idle monitor | `omarchy.idle` | `service` | `idle/Service.qml` |
| Battery | `omarchy.battery` | `service` | `services/battery/Service.qml` |
| Idle | `omarchy.idle` | `service` | `services/idle/Service.qml` |
| Lock screen | `omarchy.lock` | `service` | `lock/Service.qml` |
| OSD | `omarchy.osd` | `panel` | `osd/Osd.qml` |
| Polkit agent | `omarchy.polkit` | `service` | `polkit/PolkitAgent.qml` |
@@ -13,7 +13,7 @@ Item {
PersistentProperties {
id: persisted
reloadableId: "omarchy-battery-monitor"
reloadableId: "omarchy-battery"
property bool notifiedLowBattery: false
}
@@ -1,7 +1,7 @@
{
"schemaVersion": 1,
"id": "omarchy.battery-monitor",
"name": "Battery Monitor",
"id": "omarchy.battery",
"name": "Battery",
"version": "1.0.0",
"author": "Omarchy",
"description": "Low battery warning service",
@@ -1,7 +1,7 @@
{
"schemaVersion": 1,
"id": "omarchy.idle",
"name": "Idle Monitor",
"name": "Idle",
"version": "1.0.0",
"author": "Omarchy",
"description": "Quickshell-based idle detection for screensaver, lock, and display wake.",
+15 -6
View File
@@ -264,18 +264,27 @@ QtObject {
if (scanning) return
scanning = true
// $0 = first-party dir, $1 = third-party dir. Some bash versions need the explicit -- separator.
// First-party plugins may be grouped one level deeper, e.g. services/battery.
// Third-party plugins stay at the top level of ~/.config/omarchy/plugins.
var script = ""
+ "scan() { local dir=\"$1\"; local kind=\"$2\"; "
+ "emit_manifest() { local kind=\"$1\"; local manifest=\"$2\"; local sub=\"${manifest%/manifest.json}\"; "
+ " printf '===%s::%s===\\n' \"$kind\" \"$sub\"; "
+ " cat \"$manifest\"; "
+ " printf '\\n=== EOM ===\\n'; "
+ "}; "
+ "scan_firstparty() { local dir=\"$1\"; "
+ " [[ -d \"$dir\" ]] || return 0; "
+ " while IFS= read -r manifest; do emit_manifest firstparty \"$manifest\"; done < <(find \"$dir\" -mindepth 2 -maxdepth 3 -name manifest.json -type f | sort); "
+ "}; "
+ "scan_thirdparty() { local dir=\"$1\"; "
+ " [[ -d \"$dir\" ]] || return 0; "
+ " for sub in \"$dir\"/*/; do "
+ " [[ -f \"$sub/manifest.json\" ]] || continue; "
+ " printf '===%s::%s===\\n' \"$kind\" \"$sub\"; "
+ " cat \"$sub/manifest.json\"; "
+ " printf '\\n=== EOM ===\\n'; "
+ " emit_manifest thirdparty \"$sub/manifest.json\"; "
+ " done; "
+ "}; "
+ "scan \"$0\" firstparty; "
+ "scan \"$1\" thirdparty"
+ "scan_firstparty \"$0\"; "
+ "scan_thirdparty \"$1\""
scanProcess.command = ["bash", "-c", script, registry.firstPartyDir, registry.pluginsDir]
scanProcess.running = true
}