1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
|
# i3bar-mango
This is a port of `i3bar` for [mangowm](https://github.com/mangowm/mango), with support for other wlroots-based window managers ([river](https://codeberg.org/river/river), [hyprland](https://github.com/hyprwm/Hyprland) and [niri](https://github.com/YaLTeR/niri)) available as compile-time features.
## i3bar compatibility
I've tested [`i3status-rs`](https://github.com/greshake/i3status-rust), [`bumblebee-status`](https://github.com/tobi-wan-kenobi/bumblebee-status) and [`py3status`](https://github.com/ultrabug/py3status) and everything seems usable.
A list of things that are missing (for now):
- `border[_top|_right|_bottom|_left]`
- Click events lack some info (IDK if anyone actually relies on `x`, `y`, `width`, etc.)
## Features
- `mango` support (obviously)
- `short_text` switching is "progressive" (see https://github.com/i3/i3/issues/4113)
- Support for rounded corners
- Show/hide with `pkill -SIGUSR1 i3bar-mango`
## Installation
[](https://repology.org/project/i3bar-mango/versions)
### From Source
External dependencies: `libpango1.0-dev`.
```
cargo install --locked i3bar-mango
```
## Configuration
Add `i3bar-mango` to your mangowm autostart.
`i3bar-mango` detaches from the terminal and continues in the background by default. Use `i3bar-mango --foreground` when running it under a service manager or while debugging.
The active configuration is reloaded whenever the config file is saved, including atomic saves performed by editors.
The configuration file should be stored in `$XDG_CONFIG_HOME/i3bar-mango/config.toml` or `~/.config/i3bar-mango/config.toml`.
The default configuration (every parameter is optional):
```toml
# The status generator command.
# Optional: with no status generator the bar will display only tags and layout name.
# command = "your command here"
# Colors
background = "#282828ff"
color = "#ffffffff"
separator = "#9a8a62ff"
tag_fg = "#d79921ff"
tag_bg = "#282828ff"
tag_focused_fg = "#1d2021ff"
tag_focused_bg = "#689d68ff"
tag_urgent_fg = "#282828ff"
tag_urgent_bg = "#cc241dff"
tag_inactive_fg = "#d79921ff"
tag_inactive_bg = "#282828ff"
# The font and various sizes
font = "monospace 10"
height = 24
margin_top = 0
margin_bottom = 0
margin_left = 0
margin_right = 0
separator_width = 2.0
tags_r = 0.0
tags_padding = 25.0
tags_margin = 0.0
blocks_r = 0.0
blocks_overlap = 0.0
# Misc
position = "top" # either "top" or "bottom"
layer = "top" # one of "top", "overlay", "bottom" or "background"
hide_inactive_tags = true
invert_touchpad_scrolling = true
show_tags = true
show_layout_name = true
blend = true # whether tags/blocks colors should blend with bar's background
show_mode = true
start_hidden = false # whether the bar is initially in the 'hidden' state
# System tray (StatusNotifierItem)
[tray]
enabled = true # host SNI tray icons (the bar acts as the StatusNotifierWatcher)
expanded = false # start collapsed; the ▸/▾ button toggles the tray
show_icon = true # show the item icon
show_name = true # show the item title
show_description = false # append the item's tooltip description after the title
hidden = [] # item ids or titles to never show, matched case-insensitively
# (left click: Activate, middle click: SecondaryActivate, right click: ContextMenu)
# Focused window display (next to the tags)
[focused_window]
enabled = true
show_icon = true # show the client's icon (looked up by app_id)
show_app_id = true # show the client's app_id
show_title = true # show the window title
# WM-specific options
[wm.river]
max_tag = 9 # Show only the first nine tags
# Per output overrides
# [output.your-output-name]
# right now only "enable" option is available
# enable = false
#
# You can have any number of overrides
# [output.eDP-1]
# enable = false
```
## How progressive short mode and rounded corners work
Some status bar generators (such as `i3status-rs`) use more than one "json block" per logical block
to implement, for example, buttons.
_Short text management and corner rounding are performed on per-logical-block basis._
`i3bar-mango` defines a logical block as a continuous series of "json blocks" with the same `name`.
Also, only the last "json block" is allowed to have a non zero (or absent) `separator_block_width`,
all the other "json blocks" should explicitly set it to zero. If you think this definition is not
the best one, feel free to open a new github issue.
## `blocks_overlap` option
Sometimes `pango` lives a gap between "powerline separators" and the blocks (see https://github.com/greshake/i3status-rust/issues/246#issuecomment-1086753440). In this case, you can set `blocks_overlap` option to number of pixels you want your blocks to overlap. Usually, `1` is a good choice.
## Showcase (with i3status-rs)
### Native separators

`i3bar-mango`
```toml
font = "JetBrainsMono Nerd Font 10"
height = 20
command = "i3status-rs"
```
`i3status-rs`
```toml
[theme]
theme = "native"
[theme.overrides]
idle_fg = "#ebdbb2"
info_fg = "#458588"
good_fg = "#8ec07c"
warning_fg = "#fabd2f"
critical_fg = "#fb4934"
```
### Powerline separators

`i3bar-mango`
```toml
font = "JetBrainsMono Nerd Font 10"
height = 20
command = "i3status-rs"
```
`i3status-rs`
```toml
[theme]
theme = "slick"
```
### Rounded corners

`i3bar-mango`
```toml
font = "JetBrainsMono Nerd Font 10"
height = 20
separator_width = 0
tags_r = 6
blocks_r = 6
command = "i3status-rs"
```
`i3status-rs`
```toml
[theme]
theme = "slick"
[theme.overrides]
separator = "native"
alternating_tint_bg = "none"
alternating_tint_fg = "none"
```
|