2019-08-26 17:08:06 +00:00
waybar-sway-workspaces(5)
# NAME
waybar - sway workspaces module
# DESCRIPTION
The *workspaces* module displays the currently used workspaces in Sway.
# CONFIGURATION
Addressed by *sway/workspaces*
*all-outputs*: ++
2023-07-30 15:33:02 +00:00
typeof: bool ++
default: false ++
If set to false, workspaces will only be shown on the output they are on. If set to true all workspaces will be shown on every output.
2019-08-26 17:08:06 +00:00
*format*: ++
2023-07-30 15:33:02 +00:00
typeof: string ++
default: {value} ++
The format, how information should be displayed.
2019-08-26 17:08:06 +00:00
*format-icons*: ++
2023-07-30 15:33:02 +00:00
typeof: array ++
Based on the workspace name and state, the corresponding icon gets selected. See *icons*.
2019-08-26 17:08:06 +00:00
*disable-scroll*: ++
2023-07-30 15:33:02 +00:00
typeof: bool ++
default: false ++
If set to false, you can scroll to cycle through workspaces. If set to true this behaviour is disabled.
2019-08-26 17:08:06 +00:00
2020-08-12 10:38:48 +00:00
*disable-click*: ++
2023-07-30 15:33:02 +00:00
typeof: bool ++
default: false ++
If set to false, you can click to change workspace. If set to true this behaviour is disabled.
2020-08-12 10:38:48 +00:00
2019-08-26 17:08:06 +00:00
*smooth-scrolling-threshold*: ++
2023-07-30 15:33:02 +00:00
typeof: double ++
Threshold to be used when scrolling.
2019-08-26 17:08:06 +00:00
*disable-scroll-wraparound*: ++
2023-07-30 15:33:02 +00:00
typeof: bool ++
default: false ++
If set to false, scrolling on the workspace indicator will wrap around to the first workspace when reading the end, and vice versa. If set to true this behavior is disabled.
2019-08-26 17:08:06 +00:00
*enable-bar-scroll*: ++
2023-07-30 15:33:02 +00:00
typeof: bool ++
default: false ++
If set to false, you can't scroll to cycle throughout workspaces from the entire bar. If set to true this behaviour is enabled.
2019-08-26 17:08:06 +00:00
*disable-markup*: ++
2023-07-30 15:33:02 +00:00
typeof: bool ++
default: false ++
If set to true, button label will escape pango markup.
2019-08-26 17:08:06 +00:00
*current-only*: ++
2023-07-30 15:33:02 +00:00
typeof: bool ++
default: false ++
If set to true. Only focused workspaces will be shown.
2019-08-26 17:08:06 +00:00
2023-09-05 18:12:39 +00:00
*persistent-workspaces*: ++
2023-07-30 15:33:02 +00:00
typeof: json (see below) ++
default: empty ++
2023-10-21 15:45:25 +00:00
Lists workspaces that should always be shown, even when non-existent
2019-08-26 17:08:06 +00:00
2020-04-12 16:35:41 +00:00
*on-update*: ++
2023-07-30 15:33:02 +00:00
typeof: string ++
Command to execute when the module is updated.
2020-04-12 16:35:41 +00:00
2021-02-02 20:58:26 +00:00
*disable-auto-back-and-forth*: ++
2023-07-30 15:33:02 +00:00
typeof: bool ++
Whether to disable *workspace_auto_back_and_forth* when clicking on workspaces. If this is set to *true*, clicking on a workspace you are already on won't do anything, even if *workspace_auto_back_and_forth* is enabled in the Sway configuration.
2020-05-05 07:08:05 +00:00
2023-01-02 22:03:28 +00:00
*alphabetical_sort*: ++
2023-07-30 15:33:02 +00:00
typeof: bool ++
Whether to sort workspaces alphabetically. Please note this can make "swaymsg workspace prev/next" move to workspaces inconsistent with the ordering shown in Waybar.
2023-01-02 22:03:28 +00:00
2023-06-07 13:25:59 +00:00
warp-on-scroll: ++
2023-07-30 15:33:02 +00:00
typeof: bool ++
default: true ++
If set to false, you can scroll to cycle through workspaces without mouse warping being enabled. If set to true this behaviour is disabled.
2023-06-07 13:25:59 +00:00
2019-08-26 17:08:06 +00:00
# FORMAT REPLACEMENTS
2020-04-06 10:42:04 +00:00
*{value}*: Name of the workspace, as defined by sway.
*{name}*: Number stripped from workspace value.
2019-08-26 17:08:06 +00:00
*{icon}*: Icon, as defined in *format-icons*.
*{index}*: Index of the workspace.
2023-06-26 09:01:50 +00:00
*{output}*: Output where the workspace is located.
2019-08-26 17:08:06 +00:00
# ICONS
Additional to workspace name matching, the following *format-icons* can be set.
2023-10-21 15:45:25 +00:00
- *default*: Will be shown, when no string matches are found.
2019-08-26 17:08:06 +00:00
- *urgent*: Will be shown, when workspace is flagged as urgent
- *focused*: Will be shown, when workspace is focused
2023-10-21 15:45:25 +00:00
- *persistent*: Will be shown, when workspace is persistent.
- *high-priority-named*: Icons by names will be shown always for those workspaces, independent by state.
2019-08-26 17:08:06 +00:00
2019-08-31 17:57:44 +00:00
# PERSISTENT WORKSPACES
2019-08-26 17:08:06 +00:00
2019-08-31 17:57:44 +00:00
Each entry of *persistent_workspace* names a workspace that should always be shown.
2019-08-26 17:08:06 +00:00
Associated with that value is a list of outputs indicating *where* the workspace should be shown,
an empty list denoting all outputs.
```
"sway/workspaces": {
2023-09-05 18:12:39 +00:00
"persistent-workspaces": {
2023-10-21 15:45:25 +00:00
"3": [], // Always show a workspace with name '3', on all outputs if it does not exist
"4": ["eDP-1"], // Always show a workspace with name '4', on output 'eDP-1' if it does not exist
"5": ["eDP-1", "DP-2"] // Always show a workspace with name '5', on outputs 'eDP-1' and 'DP-2' if it does not exist
2023-07-30 15:33:02 +00:00
}
2019-08-26 17:08:06 +00:00
}
```
n.b.: the list of outputs can be obtained from command line using *swaymsg -t get_outputs*
# EXAMPLES
```
"sway/workspaces": {
2023-07-30 15:33:02 +00:00
"disable-scroll": true,
"all-outputs": true,
"format": "{name}: {icon}",
"format-icons": {
"1": "",
"2": "",
"3": "",
"4": "",
"5": "",
2023-07-20 19:56:15 +00:00
"high-priority-named": [ "1", "2" ],
2023-07-30 15:33:02 +00:00
"urgent": "",
"focused": "",
"default": ""
}
2019-08-26 17:08:06 +00:00
}
```
# Style
- *#workspaces button*
- *#workspaces button.visible*
- *#workspaces button.focused*
- *#workspaces button.urgent*
2019-08-31 17:57:44 +00:00
- *#workspaces button.persistent*
2020-05-04 14:16:09 +00:00
- *#workspaces button.current_output*
2020-08-13 19:11:55 +00:00
- *#workspaces button#sway-workspace-${name}*