waybar-sway-workspaces(5) File Formats Manual waybar-sway-workspaces(5)
>>> (NAME)
waybar - >>>>> >>>>>> >>>> sway (sway
workspaces module)
>>>>>>> (DESCRIPTION)
>>>>> workspaces >>>>>> >>>> >>
>>> >>>>>>> >>>> >> Sway >>
>>>>> >>>>>>.
>>>>>>>> (CONFIGURATION)
>> >>> sway/workspaces >>>>>>>>
>>>>>>
all-outputs:
>>>: >>>> (bool)
>>>>>>>: false
>> >>>> >>>>> >>> false>
>>>>>> >>>> >>>> >>> >>>>
>>>>> (>>>>>>>>) >> >> >>
>>>> >>>>> >>>>> >>>>
>>>>>>>. >>> >>> true >>>>>
>>>> >>> >>>>>> >>>> >>>
>>>> >>>>>>>> >>>>> >>>>
>>>>>> >>.
format:
>>>: >>>> (string)
>>>>>>>: {value}
>>>> >>>> >>>>> >>>>>>>.
format-icons:
>>>: >>>>> (array)
>> >>>> >>> > >>>>> >>>>
>>>>> >>>>> >>>>>> >>>>>>
>>>>>>. >>> icons >> >>>>>>
>>>>.
disable-scroll:
>>>: >>>> (bool)
>>>>>>>: false
>>> >>> false >>>>> >>>>
>>>>>>>>> >> >>>>>> >>>>
>>> >>>>>> >>>> >>>>>>>
>>>>. >>> >>> true >>>>> >>>
>>> >>>>> >>>>>>> >>>>>>.
reverse-scroll:
>>>: >>>> (bool)
>>>>>>>: false
>>> >>> false >>>>> >>>>
>>>>>> >> >>>> >> >>>> >>>>
>>>> > >>>>>> >> >>>>> >>
>>>> >>>> >>>> >>>>>
>>>>>>. >>> >>> true >>>>>
>>>> >>> >>>>> >>>>> >>>>>
>>.
disable-click:
>>>: >>>> (bool)
>>>>>>>: false
>>> >>> false >>>>> >>>>
>>>>>>>>> >> >>>> >>>>
>>>> >>>> >> >>>>> >>>>.
>>> >>> true >>>>> >>> >>>
>>>>> >>>>>>> >>>>>>.
smooth-scrolling-threshold:
>>>: >>> >>>>>> >>>> (double)
>>>>>> >>>> >>>>>>> >>>>>
>>>>>>.
disable-scroll-wraparound:
>>>: >>>> (bool)
>>>>>>>: false
>>> >>> false >>>>> >>>>
>>>>>> >>> >>>>>> >>>>
>>>> >> >> >>>>> >> >>>>>
>> >>>>> >>>> >>>>
>>>>>>>>> > >>>>>. >>> >>>
true >>>>> >>> >>> >>>>>
>>>>>>> >>>>>>.
enable-bar-scroll:
>>>: >>>> (bool)
>>>>>>>: false
>>> >>> false >>>>> >>>>
>>>>>>>>>> >> >>>>>> >>>
>> >>>> >>>> >>>>>> >>>>
>>>>>>> >>>>. >>> >>> true
>>>>> >>> >>> >>>>> >>>>
>>>>>>.
disable-markup:
>>>: >>>> (bool)
>>>>>>>: false
>>> >>> true >>>>> >>>> >>>>>
>>>> >>>>>>>>>>>>>>> pango >>
>>>>>> >>>>>>> (escape >>>>>>).
current-only:
>>>: >>>> (bool)
>>>>>>>: false
>>> >>> true >>>>> >>>> >>>
>>>>>> >>>> >>>>> >>>>>
(>>>>>) >>>>> >>>> >>>>>>>.
persistent-workspaces:
>>>: json (>>>>> >> >>>>>>)
>>>>>>>: >>>>
>>>>>> >>>> >> >>>>>
>>>>>> >> >>>>> >>>> >>>>>
>>>> >>>>> >>> >>>>> >>
>>>> >>>>>>
on-update:
>>>: >>>> (string)
>>>>>> >> >>>>>
>>>>>>>>>>> >>>>> >>>>
>>>>>>.
disable-auto-back-and-forth:
>>>: >>>> (bool)
>>> >>>>> >>>> >>> >>>>>>
>>>> >>>>>> workspace_auto_back_and_forth
>>>>>>> >>> >> >>>. >>> >>>
>>>>> >>> true >>>>> >>>>
>>>> >>> >>>> >>>> >> >>
>>> >>>> >> >> >>>>> >>>
>>>> >>>>> >>>>>>>> >>>
>>> workspace_auto_back_and_forth >> >>>>>>>>
Sway >>>> >>>>.
alphabetical_sort:
>>>: >>>> (bool)
>>> >>>>>> >>>> >> >>>>>
>>>>>>> >>>> >>>> >> >>>.
>>>>> >>>> >>>>> >>>>> >>
>>> >>>> >>> >>>> >>> >>>>>
"swaymsg workspace prev/next" >> >>>>>>>
>>>>>>>> >> >>>>>> >> >> Waybar
>>>> >>>> >>> >>>> >>>.
warp-on-scroll:
>>>: >>>> (bool)
>>>>>>>: true
>>> >>> false >>>>> >>>>
>>>>>>>>> >>>> >>>> >>>>
>>> >>>>>>>> >>>> (mouse warping) >>
>>>>>> >>> >>>>>> >>>>
>>>>>>> >>>>. >>> >>> true
>>>>> >>> >>> >>>>>
>>>>>>> >>>>>>.
window-rewrite:
>>>: >>> (object)
>>>>> >>>>>> >>>>>>> (Regex)
>>>> >>>>> >>>> >>>>> >> >>
>>>>> >> >>> >>>>>>
>>>>>>>> >>>> >>>>>>>>>
>> >>>> >>>>.
>>>>>> >>>>> >>>>>> >>
>>>> >> >>>>>> >>>>>>>
>>>>>>>> >>>>>>>>. >>>>>
>>>>>>>>> `class<...>`> `title<...>`> >>
>> >> >> >>>> >>>>>
>>>>>>> >>>> >>>>.
>>>>>>>>> >> >>>>> >>>>
>> >> >>>>> >>>>>> >>>>
>> >> >>>>> >>>>>>
>>>>>>>> >> >>>>>> >>>>
>>>> >> >>>>>>> >>>. >>>>
>>>>>>>>> Wayland >>>>> `class` >>
`app_id` >>>>> >>>> >>>>>>> >
>>>> >>>>>>>>> X11 >> >>>>>
`class` >>>>> >>>> >>>>>>.
window-rewrite-default:
>>>: >>>> (string)
>>>>>>>: "?"
>>> >>>>>>> >>>>>>>>
>>>> >>>>> >> >>>> >>>>.
>>> >>>> >>>>>>>>>>
>>>>>>> >>>>>> >> >>>>
>>>>> >> >>>>>>>> >>
>>>>> >> window-rewrite >>>>>>
>>>>>.
format-window-separator:
>>>: >>>> (string)
>>>>>>>: " "
>>>>>>>>>>> >> >>>
>>>>>>>> >> >> >>>> >>>>
>>>>>>> >>>>>>.
expand:
>>>: >>>> (bool)
>>>>>>>: false
>> >>> >>>>> >>>>> >>>>>>
>> >>>> >>>> >>>>>>>>>> >>
>> >>>> >>>> >>>> >>>.
>>>>>>>>>>> >>>> (FORMAT REPLACEMENTS)
{value}: >>> >>>> >>>>>
>>>>>>>> >> >>>> sway >>>>>
>>> >>>.
{name}: >>>>> >>>>>>> >> >>>>>
>>>> >>>>.
{icon}: >>>>>> >>> >>>>> >>
format-icons.
{index}: >>>>>> >>>> >>>>.
{output}: >>>>> >> >>>> >>>> >>
>> >>>> >>>>.
{windows}: >>>>> >>>> >> window-rewrite
>>>>>>>> (ICONS)
>>>>> >> >>>>> >>> >>>>
>>>>> >>>>>> >>> >>>> format-icons
>>>> >>>>> >>>>>.
o default: >>>>> >>>> >>>>
>>>>>> >> >>> >>>>>
>>>>>>> >>>> >>>>.
o urgent: >>>>> >>>> >>>>
>>>>>> >> >>>> >>>> >>
>>>>> >>>>>>>
>>>>>>>>>> >>> >>>>
o focused: >>>>> >>>> >>>>
>>>>>> >> >>>> >>>> >>>>>
>>>>> >>>>
o persistent: >>>>> >>>> >>>>
>>>>>> >> >>>> >>>> >>>>>
>>>>.
o high-priority-named: >>>>>>>>> >>
>>>> >>> >>>>> >>>> >>>
>>>>>> >>>> >>>> >> >>>
>>>>> >>>>> >>>> >>>>
>>>>>> >>.
>>>>>> >>>> >>>>> (PERSISTENT WORKSPACES)
>> >>>>> >> persistent_workspace >>>
>>>> >>>> >> >>>> >>>>>> >>
>>>>> >>>> >>>> >>>> >>>.
>>>>> >> >>> >>>>>> >>>>>>
>> >>>>>>>> >>> >> >>>>
>>>>>> >>>> >>>> >>> >>>>
>>>> >>>> >>>> >>>>> >>>>
>>>>>>>>>> >>>> >>>>>>>>
>>>.
"sway/workspaces": {
"persistent-workspaces": {
"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
}
}
>>>>: >>>>> >>>>>>>>
>>>>>>>> >> >>>> >> >>>>>
>> >>>>>>> >> swaymsg -t get_outputs >>
>>> >>>.
>>>>>>> (EXAMPLES)
"sway/workspaces": {
"disable-scroll": true,
"all-outputs": true,
"format": "{name}: {icon}",
"format-icons": {
"1": ">",
"2": ">",
"3": ">",
"4": ">",
"5": ">",
"high-priority-named": [ "1", "2" ],
"urgent": ">",
"focused": ">",
"default": ">"
}
}
"sway/workspaces": {
"format": "{name} {windows}",
"format-window-separator": " | ",
"window-rewrite-default": "{name}",
"window-rewrite": {
"class": ">",
"class": "k",
"title<.* - (.*) - VSCodium>": "codium $1" // captures part of the window title and formats it into output
}
}
>>>>>> (Style)
o #workspaces button
o #workspaces button.visible
o #workspaces button.focused
o #workspaces button.urgent
o #workspaces button.persistent
o #workspaces button.empty
o #workspaces button.current_output
o #workspaces button#sway-workspace-${name}
2026-08-31 waybar-sway-workspaces(5)