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

NAME

6       waybar - sway window module
7

DESCRIPTION

9       The window module displays the title of the currently focused window in
10       Sway
11

CONFIGURATION

13       Addressed by sway/window
14
15       format:
16            typeof: string
17            default: {title}
18            The format, how information should be displayed.
19
20       rotate:
21            typeof: integer
22            Positive value to rotate the text label.
23
24       max-length:
25            typeof: integer
26            The maximum length in character the module should display.
27
28       min-length:
29            typeof: integer
30            The minimum length in characters the module should accept.
31
32       align:
33            typeof: float
34            The alignment of the text, where 0 is left-aligned and 1 is right-
35       aligned. If the module is rotated, it will follow the flow of the text.
36
37       on-click:
38            typeof: string
39            Command to execute when clicked on the module.
40
41       on-click-middle:
42            typeof: string
43            Command to execute when middle-clicked on the module using mouse‐
44       wheel.
45
46       on-click-right:
47            typeof: string
48            Command to execute when you right-click on the module.
49
50       on-update:
51            typeof: string
52            Command to execute when the module is updated.
53
54       on-scroll-up:
55            typeof: string
56            Command to execute when scrolling up on the module.
57
58       on-scroll-down:
59            typeof: string
60            Command to execute when scrolling down on the module.
61
62       smooth-scrolling-threshold:
63            typeof: double
64            Threshold to be used when scrolling.
65
66       tooltip:
67            typeof: bool
68            default: true
69            Option to disable tooltip on hover.
70
71       all-outputs:
72            typeof: bool
73            default: false
74            Option to show the focused window along with its workspace styles
75       on all outputs.
76
77       offscreen-css:
78            typeof: bool
79            default: false
80            Only effective when all-outputs is true. Adds style according to
81       present windows on unfocused outputs instead of showing the focused
82       window and style.
83
84       offscreen-css-text:
85            typeof: string
86            Only effective when both all-outputs and offscreen-style are true.
87       On screens currently not focused, show the given text along with that
88       workspace styles.
89
90       show-focused-workspace-name:
91            typeof: bool
92            default: false
93            If the workspace itself is focused and the workspace contains
94       nodes or floating_nodes, show the workspace name. If not set, text re‐
95       mains empty but styles according to nodes in the workspace are still
96       applied.
97
98       rewrite:
99            typeof: object
100            Rules to rewrite the module format output. See rewrite rules.
101
102       icon:
103            typeof: bool
104            default: false
105            Option to hide the application icon.
106
107       icon-size:
108            typeof: integer
109            default: 24
110            Option to change the size of the application icon.
111

FORMAT REPLACEMENTS

113       {title}: The title of the focused window.
114
115       {app_id}: The app_id of the focused window.
116
117       {shell}: The shell of the focused window. It's 'xwayland' when the win‐
118       dow is running through xwayland, otherwise, it's 'xdg-shell'.
119

REWRITE RULES

121       rewrite is an object where keys are regular expressions and values are
122       rewrite rules if the expression matches. Rules may contain references
123       to captures of the expression.
124
125       Regular expression and replacement follow ECMA-script rules.
126
127       If no expression matches, the format output is left unchanged.
128
129       Invalid expressions (e.g., mismatched parentheses) are skipped.
130

EXAMPLES

132           "sway/window": {
133                "format": "{}",
134                "max-length": 50,
135                "rewrite": {
136                     "(.*) - Mozilla Firefox": "🌎 $1",
137                     "(.*) - zsh": "> [$1]"
138                }
139           }
140

STYLE

142#window
143
144
145       The following classes are applied to the entire Waybar rather than just
146       the window widget:
147
148window#waybar.empty When no windows are in the workspace, or screen
149           is not focused and offscreen-css option is not set
150window#waybar.solo When one tiled window is in the workspace
151window#waybar.floating When there are only floating windows in the
152           workspace
153window#waybar.stacked When there is more than one window in the
154           workspace and the workspace layout is stacked
155window#waybar.tabbed When there is more than one window in the
156           workspace and the workspace layout is tabbed
157window#waybar.tiled When there is more than one window in the
158           workspace and the workspace layout is splith or splitv
159window#waybar.<app_id> Where app_id is the app_id or instance name
160           like (chromium) of the only window in the workspace
161
162
163
164                                  2023-11-05             waybar-sway-window(5)
Impressum