Repository navigation
feat: choose which dock floating workspaces get (Omarchy 4.5) - #72
Conversation
A reader that watches a file whose removal means something (a workspace layout mode: the toggle deletes the file when it cycles back onto the default) could not tell a deleted file from no change, because a failed read leaves state untouched. missing() fires on the gate's exit 2. A read stopped by reload() also exits 2 (its TERM trap) before the next one starts, so that exit is marked superseded and does not report the file as gone.
Omarchy 4.5 adds a floating workspace layout (Super+L) and its own dock, omarchy.dock, which shows only there, drawn over OmaDock. A new Behavior setting, shown only when omarchy.dock exists, picks one: - Hide Omarchy dock (default): omarchy plugin disable omarchy.dock. - Hide OmaDock: omarchy plugin enable omarchy.dock, and each dock hides (no reveal strip, no exclusive zone) while its monitor's workspace is floating. - Show both: omarchy.dock is left alone. The mode is read the way omarchy-hyprland-workspace-layout-current reads it, from the workspace's file under workspace-layouts/, else default.lua, watched rather than polled, so no process runs per workspace switch beyond the capped read. The directory is created first because a watch set up before it exists never fires. The primary dock brings omarchy.dock in line at start and when the choice changes, only when shell.json says it differs, since setPluginEnabled rewrites shell.json. The start waits 1.5 s for omadock.json so the saved choice wins over the default.
The Omarchy 4.5 floating-workspace dock choice is open upstream as thepathless#72 and runs in priard.
Omarchy 4.5 adds a shell-wide display language (omarchy language) and Commons.Translations for plugins: flat catalogs in i18n/, the language followed live. This prepares the dock for it and ships Polish. components/strings/Tr.qml is a singleton that creates Commons.Translations by name, as a shell from before 4.5 has no such type and naming it outright would stop the dock loading there. Without it every call returns the English text it carries, so 4.0 is unchanged. Settings rows translate their own texts from their search key (setting.<key>.label / .hint / .option.<value>) and SectionLabel its heading (section.<slug>), so the pages only touch rows whose text changes at run time. The settings search matches the translated label as well as the English one and shows the hit in the dock's language. Menus, tooltips, popups, notifications and new group and preset names go through Tr.t / Tr.tn. JS modules take the translator as an argument (DockTasks.chipLabel). Dock.qml gains no line: notifyAppMissing takes a reason and the logic module words it. i18n/en.json holds every key; tests/unit/i18n.test.mjs checks that each Tr.t call has its English entry with the same text, and that every catalog uses only en.json's keys with the same placeholders. The Polish catalog also covers the Floating workspaces (#72) and Omarchy button opens (#73) rows.
|
Merged into A few details from the review that I particularly appreciated:
The floating-workspace conflict with Verified on Shipped in v4.8.0. |
thepathless
left a comment
There was a problem hiding this comment.
Late protocol approval: verified on experimental against 268 Node + 116 Python unit tests, qmllint 0 errors, all static gates, smoke (incl. --restart) PASSED, and the live probe suites green. The Floating workspaces row and its three options were additionally confirmed rendering on the live settings panel (OCR of a captured frame).
Upstream v4.8.0 ships the floating-dock choice, the app grid and the translations; the fork keeps its own version suffix on top.
Why
Omarchy 4.5 adds a floating workspace layout (Super+L cycles tiling, scrolling, floating) and its own dock,
omarchy.dock, which shows only on floating workspaces. With OmaDock running, both docks are drawn on top of each other there.What
A new Settings → Behavior → Floating workspaces choice, shown only when
$OMARCHY_PATH/shell/plugins/dockexists (feature detection, so Omarchy 4.0 sees no change):omarchy plugin disable omarchy.dockomarchy plugin enable omarchy.dockConfig key
floatingDock("hide-omarchy"/"hide-omadock"/"both"), documented in the README, with a note under Removal on bringing Omarchy's dock back.How
omarchy-hyprland-workspace-layout-currentreads:~/.local/state/omarchy/workspace-layouts/<id>.lua, elsedefault.lua. The files are watched, not polled, and only while "Hide OmaDock" is picked. The toggle deletes a workspace's file when it cycles onto the default mode, soCappedFileViewgains amissing()signal (first commit). A read thatreload()stops also exits 2, so that exit is marked superseded and does not report the file as gone.mkdir -p, as the toggle does) before the paths are set. Reads after a path change are deferred withQt.callLater, because the read's command binding may not have picked up the new path yet.shell.json'sdisabledPluginssays it differs, becausesetPluginEnabledrewritesshell.jsonevery time. The start waits 1.5 s so a saved choice wins over the default before anything runs.omarchy.dockis not reachable throughfirstPartyServiceFor(bar plugins get a fixed list), which is why its mode cache could not be reused.DockFloating.js(tests/unit/floating.test.mjs); wiring incomponents/FloatingDockWatch.qml.Dock.qmlstays at its 2382-line ceiling: one property added, one duplicate blank line removed.Tested
omarchy.docklands indisabledPluginsabout 1 s after the shell starts. Switching to "Hide OmaDock" enables it again.default.luaand its removal each bring it back or hide it as expected.node --test,structure-check.py,security-grep.py,smoke-test.sh.