A plugin to replace Omarchy's default Workspaces bar widget
Cloned from omarchy.workspaces and tweaked with the help of Gemini to respect Hyprland workspace-to-monitor mapping. It also allows you to configure always-visible workspaces and customize the styling of the focused workspace.
Multi monitor
If you use multiple monitors and map them to workspaces in your hyprland.lua
-- Workspaces 1-5 to HDMI-A-1
for i = 1, 5 do
hl.workspace_rule({
workspace = tostring(i),
monitor = "HDMI-A-1",
default = (i == 1) -- Workspace 1 is default
})
end
-- Workspaces 6-10 to DP-1
for i = 6, 10 do
hl.workspace_rule({
workspace = tostring(i),
monitor = "DP-1",
default = (i == 6) -- Workspace 6 is default
})
end
Or dynamically, based on odd/even parity:
-- Bind workspaces 1 through 10 dynamically based on odd/even parity
for i = 1, 20 do
local target_monitor = (i % 2 ~= 0) and "HDMI-A-1" or "DP-1"
hl.workspace_rule({
workspace = tostring(i),
monitor = target_monitor,
-- Set workspace 1 as default for left monitor, and workspace 2 as default for right monitor
default = (i == 1 or i == 2)
})
end
The widget magically detects this configuration and displays only the workspaces relevant to each specific monitor.
Always visible workspaces
By default, after enabling the plugin, it will look like this in your ~/.config/omarchy/shell.json:
{
"id": "opoii.workspaces"
}
You can pass always-visible (persistent) workspaces per monitor like this:
{
"id": "opoii.workspaces",
"persistent": {
"HDMI-A-1": [1, 2, 3, 4, 5],
"DP-1": "6, 7 8,9 10"
}
}
The persistent.<monitor> property accepts either an array or a string of numbers separated by any non-digit character.
With this configuration, the widgets will look like this (first and second monitors):
<img width="151" height="35" alt="image" src="https://github.com/user-attachments/assets/3fc2fb06-4e02-4621-ba59-7bf240e5dbbb" />
<img width="115" height="28" alt="image" src="https://github.com/user-attachments/assets/42eec216-257e-4358-a3fb-feb8af90fdf7" />
Active workspace styling
If you prefer the original Omarchy icon, you can bring it back using the focusedStyle attribute:
{
"id": "opoii.workspaces",
"persistent": {
"HDMI-A-1": "1 2 3 4 5",
"DP-1": "6 7 8 9 10"
},
"focusedStyle": "icon"
}
<img width="147" height="35" alt="image" src="https://github.com/user-attachments/assets/9be99e5f-bde5-430a-a3db-b986dc2ad865" />
Available style options:
- "[]" — Used by default
- "icon" — Omarchy's default
- "plain" — No shape styling (won't be visually distinct without further tweaks)
- "()"
- "<>"
- "{}"
- "heavy []" — 【1】
For advanced customization, focusedStyle can also be defined as an object:
"focusedStyle": {
"style": "icon",
"color": "#ffdc5e",
"bold": true
}
style accepts the same values as the string version of focusedStyle.
color must be a valid hex code.
bold is barely noticeable.
All attributes are optional. Default values:
style="[]"color=""isBold=false
For example, if you prefer a clean colored number instead of [1] or the default Omarchy icon :
"focusedStyle": {
"style": "plain",
"color": "#d40035"
}
Installation
Add Plugin in the Omarchy menu, or
follow Omarchy manual
Removal
Remove Pluginin the Omarchy menu oromarchy plugin remove opoii.workspacesin terminal- Clean up
~/.config/omarchy/shell.jsonif you tweaked it, because Omarchy will leave"persistent"and"focusedStyle", only replacing theopoii.workspaceswithomarchy.workspaces
Requirements
- Omarchy 4 (Quattro) and later
Licence
MIT