Skip to content

feat: choose which dock floating workspaces get (Omarchy 4.5) - #72

Merged
thepathless merged 2 commits into
thepathless:experimentalfrom
priard:feat/floating-dock-mode
Oct 20, 2026
Merged

thepathless merged 2 commits into
thepathless:experimentalfrom
priard:feat/floating-dock-mode

Conversation

@priard

@priard priard commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

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/dock exists (feature detection, so Omarchy 4.0 sees no change):

Choice Omarchy's dock OmaDock on floating workspaces
Hide Omarchy dock (default) omarchy plugin disable omarchy.dock shown as everywhere else
Hide OmaDock omarchy plugin enable omarchy.dock hidden: no reveal strip, no exclusive zone
Show both left alone shown

Config key floatingDock ("hide-omarchy" / "hide-omadock" / "both"), documented in the README, with a note under Removal on bringing Omarchy's dock back.

How

  • Mode detection reads what omarchy-hyprland-workspace-layout-current reads: ~/.local/state/omarchy/workspace-layouts/<id>.lua, else default.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, so CappedFileView gains a missing() signal (first commit). A read that reload() stops also exits 2, so that exit is marked superseded and does not report the file as gone.
  • A file watch set up before its directory exists never fires, so the directory is created (mkdir -p, as the toggle does) before the paths are set. Reads after a path change are deferred with Qt.callLater, because the read's command binding may not have picked up the new path yet.
  • Omarchy's dock state is brought in line by the primary dock at start and when the choice changes, and only when shell.json's disabledPlugins says it differs, because setPluginEnabled rewrites shell.json every time. The start waits 1.5 s so a saved choice wins over the default before anything runs.
  • omarchy.dock is not reachable through firstPartyServiceFor (bar plugins get a fixed list), which is why its mode cache could not be reused.
  • Pure logic in DockFloating.js (tests/unit/floating.test.mjs); wiring in components/FloatingDockWatch.qml. Dock.qml stays at its 2382-line ceiling: one property added, one duplicate blank line removed.

Tested

  • Omarchy 4.5.0rc1, Hyprland 0.56.2, one monitor.
  • Default choice: omarchy.dock lands in disabledPlugins about 1 s after the shell starts. Switching to "Hide OmaDock" enables it again.
  • With "Hide OmaDock": a workspace file set to floating hides OmaDock and drops its reserved space (bottom 71 → 0); scrolling, deleting the file, and a floating default.lua and its removal each bring it back or hide it as expected.
  • node --test, structure-check.py, security-grep.py, smoke-test.sh.
  • Not yet tested by hand: a real Super+L cycle, switching between workspaces in different modes, multi-monitor.

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.
priard added a commit to priard/omadock that referenced this pull request Oct 20, 2026
The Omarchy 4.5 floating-workspace dock choice is open upstream as thepathless#72
and runs in priard.
thepathless pushed a commit that referenced this pull request Oct 20, 2026
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.
@thepathless
thepathless merged commit d94388f into thepathless:experimental Oct 20, 2026
5 checks passed
@thepathless

Copy link
Copy Markdown
Owner

Merged into experimental as of da2def4 — thank you, Lukasz! 🎉

A few details from the review that I particularly appreciated:

  • The CappedFileView.missing() signal is exactly the right seam: the superseded-exit tracking (a stopped read's trap exit 2 is not the file going missing) is the subtle half of the problem, and you caught it. That distinction is now the shared behaviour of every watched file in the dock.
  • The mkdir-before-watch ordering and the Qt.callLater deferred reads after a path change close two failure modes that would have been silent on a fresh install.

The floating-workspace conflict with omarchy.dock was real on 4.5.0rc1 and this resolves it without touching 4.0 behaviour — good feature detection all the way through.

Verified on experimental against 268 Node + 116 Python unit tests (floating.test.mjs included), qmllint 0 errors, structure/security/manifest gates, smoke-test.sh PASSED, and the live probe suites (presets, label-metrics, tasks, teardown) all green with the owner's desktop untouched.

Shipped in v4.8.0.

@thepathless thepathless left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

priard added a commit to priard/omadock that referenced this pull request Oct 20, 2026
Upstream v4.8.0 ships the floating-dock choice, the app grid and the
translations; the fork keeps its own version suffix on top.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants