2023-07-30 07:55:11 +00:00
waybar-hyprland-workspaces(5)
2023-06-30 23:13:36 +00:00
# NAME
waybar - hyprland workspaces module
# DESCRIPTION
The *workspaces* module displays the currently used workspaces in hyprland compositor.
# CONFIGURATION
Addressed by *hyprland/workspaces*
*format*: ++
typeof: string ++
default: {id} ++
The format, how information should be displayed.
*format-icons*: ++
typeof: array ++
2023-10-21 15:45:25 +00:00
Based on the workspace ID and state, the corresponding icon gets selected. See *icons*.
2023-06-30 23:13:36 +00:00
2023-09-22 23:41:38 +00:00
*window-rewrite*: ++
typeof: object ++
Regex rules to map window class to an icon or preferred method of representation for a workspace's window.
2023-12-31 02:07:40 +00:00
Keys are the rules, while the values are the methods of representation. Values may use the placeholders {class} and {title} to use the window's original class and/or title respectively.
2023-10-21 15:45:25 +00:00
Rules may specify `class<...>`, `title<...>`, or both in order to fine-tune the matching.
2023-09-22 23:41:38 +00:00
*window-rewrite-default*:
typeof: string ++
default: "?" ++
The default method of representation for a workspace's window. This will be used for windows whose classes do not match any of the rules in *window-rewrite*.
*format-window-separator*: ++
typeof: string ++
default: " " ++
The separator to be used between windows in a workspace.
2023-07-16 01:02:39 +00:00
*show-special*: ++
typeof: bool ++
default: false ++
2023-08-10 17:40:14 +00:00
If set to true, special workspaces will be shown.
2023-07-16 01:02:39 +00:00
2024-05-28 14:57:47 +00:00
*special-visible-only*: ++
typeof: bool ++
default: false ++
If this and show-special are to true, special workspaces will be shown only if visible.
2023-07-16 01:02:39 +00:00
*all-outputs*: ++
typeof: bool ++
default: false ++
2023-10-21 15:45:25 +00:00
If set to false workspaces group will be shown only in assigned output. Otherwise, all workspace groups are shown.
2023-07-16 01:02:39 +00:00
2023-08-10 17:40:14 +00:00
*active-only*: ++
typeof: bool ++
default: false ++
If set to true, only the active workspace will be shown.
2024-03-04 12:17:30 +00:00
*move-to-monitor*: ++
typeof: bool ++
default: false ++
If set to true, open the workspace on the current monitor when clicking on a workspace button.
Otherwise, the workspace will open on the monitor where it was previously assigned.
Analog to using `focusworkspaceoncurrentmonitor` dispatcher instead of `workspace` in Hyprland.
2023-10-11 14:03:18 +00:00
*ignore-workspaces*: ++
typeof: array ++
default: [] ++
2023-10-21 15:45:25 +00:00
Regexes to match against workspaces names. If there's a match, the workspace will not be shown. This takes precedence over *show-special*, *all-outputs*, and *active-only*.
2023-10-11 14:03:18 +00:00
2023-09-09 03:24:28 +00:00
*sort-by*: ++
typeof: string ++
default: "default" ++
If set to number, workspaces will sort by number.
If set to name, workspaces will sort by name.
If set to id, workspaces will sort by id.
If none of those, workspaces will sort with default behavior.
2023-06-30 23:13:36 +00:00
# FORMAT REPLACEMENTS
*{id}*: id of workspace assigned by compositor
2023-07-15 18:36:55 +00:00
*{name}*: workspace name assigned by compositor
2023-06-30 23:13:36 +00:00
*{icon}*: Icon, as defined in *format-icons*.
# ICONS
Additional to workspace name matching, the following *format-icons* can be set.
2023-08-10 17:40:14 +00:00
- *default*: Will be shown, when no string match is found and none of the below conditions have defined icons.
2023-06-30 23:13:36 +00:00
- *active*: Will be shown, when workspace is active
2023-08-14 09:17:49 +00:00
- *special*: Will be shown on non-active special workspaces
2023-08-10 17:40:14 +00:00
- *empty*: Will be shown on non-active, non-special empty persistent workspaces
- *visible*: Will be shown on workspaces that are visible but not active. For example: this is useful if you want your visible workspaces on other monitors to have the same look as active.
2023-08-24 20:51:06 +00:00
- *persistent*: Will be shown on non-empty persistent workspaces
2023-06-30 23:13:36 +00:00
# EXAMPLES
```
2023-08-14 09:17:49 +00:00
"hyprland/workspaces": {
2023-06-30 23:13:36 +00:00
"format": "{name}: {icon}",
"format-icons": {
"1": "",
"2": "",
"3": "",
"4": "",
"5": "",
"active": "",
"default": ""
},
2023-09-05 18:10:34 +00:00
"persistent-workspaces": {
2023-08-14 09:17:49 +00:00
"*": 5, // 5 workspaces by default on every monitor
"HDMI-A-1": 3 // but only three on HDMI-A-1
}
2023-06-30 23:13:36 +00:00
}
```
2023-08-29 04:34:28 +00:00
```
"hyprland/workspaces": {
"format": "{name}: {icon}",
"format-icons": {
"1": "",
"2": "",
"3": "",
"4": "",
"5": "",
"active": "",
"default": ""
},
2023-09-05 18:10:34 +00:00
"persistent-workspaces": {
2023-08-29 04:34:28 +00:00
"*": [ 2,3,4,5 ], // 2-5 on every monitor
"HDMI-A-1": [ 1 ] // but only workspace 1 on HDMI-A-1
}
}
```
2023-09-22 23:41:38 +00:00
```
"hyprland/workspaces": {
"format": "{name}\n{windows}",
"format-window-separator": "\n",
"window-rewrite-default": "",
"window-rewrite": {
2023-10-09 17:58:21 +00:00
"title<.*youtube.*>": "", // Windows whose titles contain "youtube"
"class<firefox>": "", // Windows whose classes are "firefox"
"class<firefox> title<.*github.*>": "", // Windows whose class is "firefox" and title contains "github". Note that "class" always comes first.
"foot": "", // Windows that contain "foot" in either class or title. For optimization reasons, it will only match against a title if at least one other window explicitly matches against a title.
2023-09-22 23:41:38 +00:00
"code": "",
}
}
```
2024-02-17 10:33:28 +00:00
```
2023-10-11 14:03:18 +00:00
"hyprland/workspaces": {
// Formatting omitted for brevity
"ignore-workspaces": [
"(special:)?chrome-sharing-indicator"
]
}
```
2023-06-30 23:13:36 +00:00
# Style
- *#workspaces*
- *#workspaces button*
- *#workspaces button.active*
2023-08-24 20:51:06 +00:00
- *#workspaces button.empty*
2023-08-10 17:40:14 +00:00
- *#workspaces button.visible*
2023-08-14 09:17:49 +00:00
- *#workspaces button.persistent*
- *#workspaces button.special*
2023-08-23 17:18:35 +00:00
- *#workspaces button.urgent*
2024-03-16 20:22:01 +00:00
- *#workspaces button.hosting-monitor* (gets applied if workspace-monitor == waybar-monitor)