1waybar-sway-workspaces(5)     File Formats Manual    waybar-sway-workspaces(5)
2
3
4

NAME

6       waybar - sway workspaces module
7

DESCRIPTION

9       The workspaces module displays the currently used workspaces in Sway.
10

CONFIGURATION

12       Addressed by sway/workspaces
13
14       all-outputs:
15           typeof: bool
16           default: false
17           If set to false, workspaces will only be shown on the output they
18       are on. If set to true all workspaces will be shown on every output.
19
20       format:
21           typeof: string
22           default: {value}
23           The format, how information should be displayed.
24
25       format-icons:
26           typeof: array
27           Based on the workspace name and state, the corresponding icon gets
28       selected. See icons.
29
30       disable-scroll:
31           typeof: bool
32           default: false
33           If set to false, you can scroll to cycle through workspaces. If set
34       to true this behaviour is disabled.
35
36       disable-click:
37           typeof: bool
38           default: false
39           If set to false, you can click to change workspace. If set to true
40       this behaviour is disabled.
41
42       smooth-scrolling-threshold:
43           typeof: double
44           Threshold to be used when scrolling.
45
46       disable-scroll-wraparound:
47           typeof: bool
48           default: false
49           If set to false, scrolling on the workspace indicator will wrap
50       around to the first workspace when reading the end, and vice versa. If
51       set to true this behavior is disabled.
52
53       enable-bar-scroll:
54           typeof: bool
55           default: false
56           If set to false, you can't scroll to cycle throughout workspaces
57       from the entire bar. If set to true this behaviour is enabled.
58
59       disable-markup:
60           typeof: bool
61           default: false
62           If set to true, button label will escape pango markup.
63
64       current-only:
65           typeof: bool
66           default: false
67           If set to true. Only focused workspaces will be shown.
68
69       persistent_workspaces:
70           typeof: json (see below)
71           default: empty
72           Lists workspaces that should always be shown, even when non exis‐
73       tent
74
75       on-update:
76            typeof: string
77            Command to execute when the module is updated.
78
79       numeric-first:
80            typeof: bool
81            Whether to put workspaces starting with numbers before workspaces
82       that do not start with a number.
83

FORMAT REPLACEMENTS

85       {value}: Name of the workspace, as defined by sway.
86
87       {name}: Number stripped from workspace value.
88
89       {icon}: Icon, as defined in format-icons.
90
91       {index}: Index of the workspace.
92

ICONS

94       Additional to workspace name matching, the following format-icons can
95       be set.
96
97       ·   default: Will be shown, when no string matches is found.
98       ·   urgent: Will be shown, when workspace is flagged as urgent
99       ·   focused: Will be shown, when workspace is focused
100       ·   persistent: Will be shown, when workspace is persistent one.
101
102

PERSISTENT WORKSPACES

104       Each entry of persistent_workspace names a workspace that should always
105       be shown. Associated with that value is a list of outputs indicating
106       where the workspace should be shown, an empty list denoting all out‐
107       puts.
108
109           "sway/workspaces": {
110               "persistent_workspaces": {
111                   "3": [], // Always show a workspace with name '3', on all outputs if it does not exists
112                   "4": ["eDP-1"], // Always show a workspace with name '4', on output 'eDP-1' if it does not exists
113                   "5": ["eDP-1", "DP-2"] // Always show a workspace with name '5', on outputs 'eDP-1' and 'DP-2' if it does not exists
114               }
115           }
116
117       n.b.: the list of outputs can be obtained from command line using
118       swaymsg -t get_outputs
119

EXAMPLES

121           "sway/workspaces": {
122               "disable-scroll": true,
123               "all-outputs": true,
124               "numeric-first": false,
125               "format": "{name}: {icon}",
126               "format-icons": {
127                   "1": "",
128                   "2": "",
129                   "3": "",
130                   "4": "",
131                   "5": "",
132                   "urgent": "",
133                   "focused": "",
134                   "default": ""
135               }
136           }
137

Style

139       ·   #workspaces button
140       ·   #workspaces button.visible
141       ·   #workspaces button.focused
142       ·   #workspaces button.urgent
143       ·   #workspaces button.persistent
144       ·   #workspaces button.current_output
145       ·   #workspaces button#sway-workspace-${name}
146
147
148
149                                  2021-02-10         waybar-sway-workspaces(5)
Impressum