1yambar-modules-i3(5)          File Formats Manual         yambar-modules-i3(5)
2
3
4

NAME

6       i3 - This module monitors i3 and sway workspaces
7

DESCRIPTION

9       Unlike other modules where the content attribute is just a single par‐
10       ticle, the i3 module's content is an associative array mapping i3/sway
11       workspace names to a particle.
12
13       You can add an empty workspace name, "", as a catch-all workspace par‐
14       ticle. The i3 module will fallback to this entry if it cannot find the
15       workspace name in the content map.
16
17       It also recognizes the special name current, which always represents
18       the currently focused workspace. On Sway, this can be used together
19       with the application and title tags to replace the X11-only xwindow
20       module.
21

TAGS

23       ┌────────────┬────────┬────────────────────────────────────────────────┐
24Name        Type   Description                                    
25       ├────────────┼────────┼────────────────────────────────────────────────┤
26       │name        │ string │ The workspace name                             │
27       ├────────────┼────────┼────────────────────────────────────────────────┤
28       │visible     │ bool   │ True if the workspace is currently visible (on │
29       │            │        │ any output)                                    │
30       ├────────────┼────────┼────────────────────────────────────────────────┤
31       │focused     │ bool   │ True if the workspace is currently focused     │
32       ├────────────┼────────┼────────────────────────────────────────────────┤
33       │urgent      │ bool   │ True if the workspace has the urgent flag set  │
34       ├────────────┼────────┼────────────────────────────────────────────────┤
35       │empty       │ bool   │ True if the workspace is empty (Sway only)     │
36       ├────────────┼────────┼────────────────────────────────────────────────┤
37       │state       │ string │ One of urgent, focused, unfocused or invisible 
38       │            │        │ (note: unfocused is when it is visible, but    │
39       │            │        │ neither focused nor urgent).                   │
40       ├────────────┼────────┼────────────────────────────────────────────────┤
41       │application │ string │ Name of application currently focused on this  │
42       │            │        │ workspace (Sway only - use the xwindow module  │
43       │            │        │ in i3)                                         │
44       ├────────────┼────────┼────────────────────────────────────────────────┤
45       │title       │ string │ This workspace's focused window's title        │
46       ├────────────┼────────┼────────────────────────────────────────────────┤
47       │mode        │ string │ The name of the current mode                   │
48       └────────────┴────────┴────────────────────────────────────────────────┘
49

CONFIGURATION

51       ┌─────────────────┬─────────────────┬─────┬────────────────────────────┐
52Name             Type            Req Description                
53       ├─────────────────┼─────────────────┼─────┼────────────────────────────┤
54       │content          │ associative ar‐ │ yes │ Unlike other modules, con‐
55       │                 │ ray             │     │ tent is an associative ar‐ │
56       │                 │                 │     │ ray mapping workspace      │
57       │                 │                 │     │ names to particles. Use "" 
58       │                 │                 │     │ to specify a default fall‐ │
59       │                 │                 │     │ back particle, or current  
60       │                 │                 │     │ for the currently active   │
61       │                 │                 │     │ workspace.                 │
62       ├─────────────────┼─────────────────┼─────┼────────────────────────────┤
63       │sort             │ enum            │ no  │ How to sort the list of    │
64       │                 │                 │     │ workspaces; one of none,   │
65       │                 │                 │     │ native, ascending or de‐
66       │                 │                 │     │ scending, defaults to      │
67       │                 │                 │     │ none. Use native to sort   │
68       │                 │                 │     │ numbered workspaces only.  │
69       ├─────────────────┼─────────────────┼─────┼────────────────────────────┤
70       │strip-workspace- │ bool            │ no  │ If true, N: prefixes will  │
71       │numbers          │                 │     │ be stripped from workspace │
72       │                 │                 │     │ names. Useful together     │
73       │                 │                 │     │ with sort, to have the     │
74       │                 │                 │     │ workspace order fixed.     │
75       ├─────────────────┼─────────────────┼─────┼────────────────────────────┤
76       │persistent       │ list of strings │ no  │ Persistent workspaces.     │
77       │                 │                 │     │ I.e. workspaces that are   │
78       │                 │                 │     │ never removed, even if     │
79       │                 │                 │     │ empty.                     │
80       ├─────────────────┼─────────────────┼─────┼────────────────────────────┤
81       │left-spacing     │ int             │ no  │ Space, in pixels, on the   │
82       │                 │                 │     │ left-side of each rendered │
83       │                 │                 │     │ workspace particle         │
84       ├─────────────────┼─────────────────┼─────┼────────────────────────────┤
85       │right-spacing    │ int             │ no  │ Space, in pixels, on the   │
86       │                 │                 │     │ right-side of each ren‐    │
87       │                 │                 │     │ dered workspace particle   │
88       ├─────────────────┼─────────────────┼─────┼────────────────────────────┤
89       │spacing          │ int             │ no  │ Short-hand for setting     │
90       │                 │                 │     │ both left-spacing and      │
91       │                 │                 │     │ right-spacing
92       └─────────────────┴─────────────────┴─────┴────────────────────────────┘
93

EXAMPLES

95       This renders all workspace names, with an * indicating the currently
96       focused one. It also renders the currently focused application name and
97       window title.
98
99           bar:
100             left:
101               - i3:
102                   content:
103                     "":
104                       map:
105                         default: {string: {text: "{name}"}}
106                         conditions:
107                           state == focused: {string: {text: "{name}*"}}
108                     current: { string: {text: "{application}: {title}"}}
109

SEE ALSO

111       yambar-modules(5), yambar-particles(5), yambar-tags(5), yambar-decora‐
112       tions(5)
113
114                                  2023-07-14              yambar-modules-i3(5)
Impressum