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: {}
18            The format, how information should be displayed. On {} data gets
19       inserted.
20
21       rotate:
22            typeof: integer
23            Positive value to rotate the text label.
24
25       max-length:
26            typeof: integer
27            The maximum length in character the module should display.
28
29       min-length:
30           typeof: integer
31           The minimum length in characters the module should take up.
32
33       align:
34           typeof: float
35           The alignment of the text, where 0 is left-aligned and 1 is right-
36       aligned. If the module is rotated, it will follow the flow of the text.
37
38       on-click:
39            typeof: string
40            Command to execute when clicked on the module.
41
42       on-click-middle:
43            typeof: string
44            Command to execute when middle-clicked on the module using mouse‐
45       wheel.
46
47       on-click-right:
48            typeof: string
49            Command to execute when you right clicked on the module.
50
51       on-update:
52            typeof: string
53            Command to execute when the module is updated.
54
55       on-scroll-up:
56            typeof: string
57            Command to execute when scrolling up on the module.
58
59       on-scroll-down:
60            typeof: string
61            Command to execute when scrolling down on the module.
62
63       smooth-scrolling-threshold:
64            typeof: double
65            Threshold to be used when scrolling.
66
67       tooltip:
68            typeof: bool
69            default: true
70            Option to disable tooltip on hover.
71
72       rewrite:
73            typeof: object
74            Rules to rewrite window title. See rewrite rules.
75

REWRITE RULES

77       rewrite is an object where keys are regular expressions and values are
78       rewrite rules if the expression matches. Rules may contain references
79       to captures of the expression.
80
81       Regular expression and replacement follow ECMA-script rules.
82
83       If no expression matches, the title is left unchanged.
84
85       Invalid expressions (e.g., mismatched parentheses) are skipped.
86

EXAMPLES

88           "sway/window": {
89               "format": "{}",
90               "max-length": 50,
91               "rewrite": {
92                 "(.*) - Mozilla Firefox": "🌎 $1",
93                 "(.*) - zsh": "> [$1]"
94               }
95           }
96

STYLE

98#window
99window#waybar.empty When no windows is in the workspace
100window#waybar.solo When one window is in the workspace
101window#waybar.<app_id> Where app_id is the app_id or instance name
102           like (chromium) of the only window in the workspace
103
104
105
106                                  2021-11-02             waybar-sway-window(5)
Impressum