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 take up.
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 clicked 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       rewrite:
72            typeof: object
73            Rules to rewrite window title. See rewrite rules.
74
75       icon:
76            typeof: bool
77            default: false
78            Option to hide the application icon.
79
80       icon-size:
81            typeof: integer
82            default: 24
83            Option to change the size of the application icon.
84

FORMAT REPLACEMENTS

86       {title}: The title of the focused window.
87
88       {app_id}: The app_id of the focused window.
89
90       {shell}: The shell of the focused window. It's 'xwayland' when the win‐
91       dow is running through xwayland, otherwise it's 'xdg-shell'.
92

REWRITE RULES

94       rewrite is an object where keys are regular expressions and values are
95       rewrite rules if the expression matches. Rules may contain references
96       to captures of the expression.
97
98       Regular expression and replacement follow ECMA-script rules.
99
100       If no expression matches, the title is left unchanged.
101
102       Invalid expressions (e.g., mismatched parentheses) are skipped.
103

EXAMPLES

105           "sway/window": {
106               "format": "{}",
107               "max-length": 50,
108               "rewrite": {
109                 "(.*) - Mozilla Firefox": "🌎 $1",
110                 "(.*) - zsh": "> [$1]"
111               }
112           }
113

STYLE

115#window
116window#waybar.empty When no windows is in the workspace
117window#waybar.solo When one window is in the workspace
118window#waybar.<app_id> Where app_id is the app_id or instance name
119           like (chromium) of the only window in the workspace
120
121
122
123                                  2023-01-11             waybar-sway-window(5)
Impressum