From 37e4da524bba490f3c64a543edd7472648ca70a8 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Mon, 25 May 2026 14:53:21 +0200 Subject: [PATCH] Move shell scripts into plugin directories --- shell/plugins/clipboard/Clipboard.qml | 2 +- .../clipboard-capture.sh => plugins/clipboard/capture.sh} | 0 shell/plugins/image-picker/ImagePicker.qml | 4 ++-- .../image-picker-list.sh => plugins/image-picker/list.sh} | 0 shell/plugins/launcher/Launcher.qml | 2 +- .../launcher/hidden-entries.sh} | 0 shell/plugins/panels/weather/Panel.qml | 2 +- .../{scripts/weather.sh => plugins/panels/weather/status.sh} | 0 8 files changed, 5 insertions(+), 5 deletions(-) rename shell/{scripts/clipboard-capture.sh => plugins/clipboard/capture.sh} (100%) rename shell/{scripts/image-picker-list.sh => plugins/image-picker/list.sh} (100%) rename shell/{scripts/launcher-hidden-entries.sh => plugins/launcher/hidden-entries.sh} (100%) rename shell/{scripts/weather.sh => plugins/panels/weather/status.sh} (100%) diff --git a/shell/plugins/clipboard/Clipboard.qml b/shell/plugins/clipboard/Clipboard.qml index 6a7bc7b9..91d766b5 100644 --- a/shell/plugins/clipboard/Clipboard.qml +++ b/shell/plugins/clipboard/Clipboard.qml @@ -16,7 +16,7 @@ Item { property var history: [] property string historyPath: Quickshell.env("HOME") + "/.local/state/omarchy/clipboard-history.json" - property string captureScript: root.omarchyPath + "/shell/scripts/clipboard-capture.sh" + property string captureScript: root.omarchyPath + "/shell/plugins/clipboard/capture.sh" property string watchCommand: "script=$1\ntrap 'kill $(jobs -p) 2>/dev/null' EXIT\nwl-paste --watch \"$script\" &\nOMARCHY_CLIPBOARD_WATCH_MIME=image/png wl-paste --type image/png --watch \"$script\" 2>/dev/null &\nOMARCHY_CLIPBOARD_WATCH_MIME=image/jpeg wl-paste --type image/jpeg --watch \"$script\" 2>/dev/null &\nOMARCHY_CLIPBOARD_WATCH_MIME=image/webp wl-paste --type image/webp --watch \"$script\" 2>/dev/null &\nOMARCHY_CLIPBOARD_WATCH_MIME=image/gif wl-paste --type image/gif --watch \"$script\" 2>/dev/null &\nOMARCHY_CLIPBOARD_WATCH_MIME=image/bmp wl-paste --type image/bmp --watch \"$script\" 2>/dev/null &\nOMARCHY_CLIPBOARD_WATCH_MIME=image/tiff wl-paste --type image/tiff --watch \"$script\" 2>/dev/null &\nwait" // Shares the [menu] surface tokens — themes that style the menu also // style the clipboard. Selected-row colors composed in the diff --git a/shell/scripts/clipboard-capture.sh b/shell/plugins/clipboard/capture.sh similarity index 100% rename from shell/scripts/clipboard-capture.sh rename to shell/plugins/clipboard/capture.sh diff --git a/shell/plugins/image-picker/ImagePicker.qml b/shell/plugins/image-picker/ImagePicker.qml index bb3c3fe6..be1a73de 100644 --- a/shell/plugins/image-picker/ImagePicker.qml +++ b/shell/plugins/image-picker/ImagePicker.qml @@ -48,7 +48,7 @@ Item { onOpenedChanged: if (!opened) layoutSettled = false function scriptPath(name) { - return omarchyPath + "/shell/scripts/" + name + return omarchyPath + "/shell/plugins/image-picker/" + name } function focusPicker() { @@ -264,7 +264,7 @@ Item { loadImagesProc.activeSerial = serial loadImagesProc.queuedSerial = 0 loadImagesProc.queuedDirs = "" - loadImagesProc.command = [root.scriptPath("image-picker-list.sh"), dirs] + loadImagesProc.command = [root.scriptPath("list.sh"), dirs] loadImagesProc.running = true } diff --git a/shell/scripts/image-picker-list.sh b/shell/plugins/image-picker/list.sh similarity index 100% rename from shell/scripts/image-picker-list.sh rename to shell/plugins/image-picker/list.sh diff --git a/shell/plugins/launcher/Launcher.qml b/shell/plugins/launcher/Launcher.qml index e978ba03..e2f107d6 100644 --- a/shell/plugins/launcher/Launcher.qml +++ b/shell/plugins/launcher/Launcher.qml @@ -143,7 +143,7 @@ Item { function hiddenEntryScanCommand() { var desktop = [Quickshell.env("XDG_CURRENT_DESKTOP"), Quickshell.env("XDG_SESSION_DESKTOP"), Quickshell.env("DESKTOP_SESSION")].filter(function(v) { return String(v || "").length > 0 }).join(":") - var script = root.omarchyPath + "/shell/scripts/launcher-hidden-entries.sh" + var script = root.omarchyPath + "/shell/plugins/launcher/hidden-entries.sh" return Util.shellQuote(script) + " " + Util.shellQuote(desktop) } diff --git a/shell/scripts/launcher-hidden-entries.sh b/shell/plugins/launcher/hidden-entries.sh similarity index 100% rename from shell/scripts/launcher-hidden-entries.sh rename to shell/plugins/launcher/hidden-entries.sh diff --git a/shell/plugins/panels/weather/Panel.qml b/shell/plugins/panels/weather/Panel.qml index 985a0f77..b7abde40 100644 --- a/shell/plugins/panels/weather/Panel.qml +++ b/shell/plugins/panels/weather/Panel.qml @@ -435,7 +435,7 @@ Panel { // Poll the weather pill text/class every minute. Local to this widget. Process { id: weatherProc - command: ["bash", "-lc", root.bar ? Util.shellQuote(root.bar.omarchyPath + "/shell/scripts/weather.sh") : ""] + command: ["bash", "-lc", root.bar ? Util.shellQuote(root.bar.omarchyPath + "/shell/plugins/panels/weather/status.sh") : ""] stdout: StdioCollector { waitForEnd: true onStreamFinished: root.updateWeather(text) diff --git a/shell/scripts/weather.sh b/shell/plugins/panels/weather/status.sh similarity index 100% rename from shell/scripts/weather.sh rename to shell/plugins/panels/weather/status.sh