chore: update polybar 06249600
Steve · 2026-08-30 14:01 2 file(s) · +64 −29
polybar/config.ini +50 −25
25 25
alert = #e78a53
26 26
disabled = #888888
27 27
28 -
[bar/main]
29 -
width = 100%
28 +
; Two independent bars with a real gap between them: each is its own window,
29 +
; so the middle of the screen is actually empty and clicks land on whatever
30 +
; is underneath. Shared settings live in [bar/base], which is never launched
31 +
; directly -- launch.sh starts "left" and "right".
32 +
33 +
[bar/base]
30 34
height = 24pt
31 -
radius = 6
35 +
radius = 8
36 +
offset-y = 6pt
32 37
33 38
; dpi = 96
34 39
37 42
38 43
line-size = 3pt
39 44
40 -
border-size = 4pt
41 -
border-color = #00000000
42 -
43 -
padding-left = 0
44 -
padding-right = 1
45 -
45 +
; Islands have visible edges now, so pad both sides evenly. A bare number
46 +
; here is character cells (10.40px at this font/size), not pixels -- use an
47 +
; explicit "px" suffix if you want pixel-exact. Raising this needs a matching
48 +
; bump to each bar's width, since a bar cannot grow to fit its content.
49 +
padding = 2
46 50
module-margin = 1
47 51
48 52
separator = |
49 53
separator-foreground = ${colors.disabled}
50 54
51 -
font-0 = BerkeleyMono Nerd Font:size=10;2
52 -
53 -
modules-left = xworkspaces xwindow
54 -
modules-right = filesystem pulseaudio memory cpu wlan eth systray date
55 +
font-0 = BerkeleyMono Nerd Font:size=13;2
55 56
56 57
cursor-click = pointer
57 58
cursor-scroll = ns-resize
58 59
59 60
enable-ipc = true
60 61
62 +
; Widths are measured, not guessed: this font advances 10.40px per cell at
63 +
; size 13 / 96dpi, and the rendered content is 110px (left) and 379px (right).
64 +
; Polybar cannot fit a bar to its content, so each width is content + padding
65 +
; + a little slack. Every extra workspace costs ~31px on the left.
66 +
[bar/left]
67 +
inherit = bar/base
68 +
width = 150px
69 +
offset-x = 32px
70 +
71 +
modules-left = xworkspaces
72 +
73 +
; Slack here covers percentages reaching 3 digits (~42px) and a tray icon
74 +
; or two (~40px each). offset-x keeps the right edge 32px from the screen.
75 +
[bar/right]
76 +
inherit = bar/base
77 +
width = 420px
78 +
offset-x = 2748px
79 +
80 +
; Only one bar may own the tray; this is it.
81 +
modules-right = filesystem pulseaudio memory cpu systray date
82 +
61 83
; wm-restack = generic
62 84
; wm-restack = bspwm
63 85
; wm-restack = i3
107 129
108 130
mount-0 = /
109 131
110 -
label-mounted = %{F#fbcb97}%mountpoint%%{F-} %percentage_used%%
132 +
label-mounted = %{F#fbcb97}󰋊%{F-} %percentage_used%%
111 133
112 -
label-unmounted = %mountpoint% not mounted
134 +
label-unmounted = 󰋊 %mountpoint% not mounted
113 135
label-unmounted-foreground = ${colors.disabled}
114 136
115 137
[module/pulseaudio]
116 138
type = internal/pulseaudio
117 139
118 -
format-volume-prefix = "VOL "
140 +
format-volume-prefix = "󰕾 "
119 141
format-volume-prefix-foreground = ${colors.primary}
120 142
format-volume = <label-volume>
121 143
122 144
label-volume = %percentage%%
123 145
124 -
label-muted = muted
146 +
label-muted = 󰝟 muted
125 147
label-muted-foreground = ${colors.disabled}
126 148
127 149
[module/xkeyboard]
128 150
type = internal/xkeyboard
129 151
blacklist-0 = num lock
130 152
131 -
label-layout = %layout%
153 +
label-layout = 󰌌 %layout%
132 154
label-layout-foreground = ${colors.primary}
133 155
134 156
label-indicator-padding = 2
139 161
[module/memory]
140 162
type = internal/memory
141 163
interval = 2
142 -
format-prefix = "RAM "
164 +
format-prefix = "󰍛 "
143 165
format-prefix-foreground = ${colors.primary}
144 166
label = %percentage_used:2%%
145 167
146 168
[module/cpu]
147 169
type = internal/cpu
148 170
interval = 2
149 -
format-prefix = "CPU "
171 +
format-prefix = "󰘚 "
150 172
format-prefix-foreground = ${colors.primary}
151 173
label = %percentage:2%%
152 174
155 177
interval = 5
156 178
format-connected = <label-connected>
157 179
format-disconnected = <label-disconnected>
158 -
label-disconnected = %{F#fbcb97}%ifname%%{F#888888} disconnected
180 +
label-disconnected = %{F#888888}󰌙 %ifname%%{F-}
159 181
160 182
[module/wlan]
161 183
inherit = network-base
162 184
interface-type = wireless
163 -
label-connected = %{F#fbcb97}%ifname%%{F-} %essid% %local_ip%
185 +
label-connected = %{F#fbcb97}󰖩%{F-} %essid%
164 186
165 187
[module/eth]
166 188
inherit = network-base
167 189
interface-type = wired
168 -
label-connected = %{F#fbcb97}%ifname%%{F-} %local_ip%
190 +
label-connected = %{F#fbcb97}󰈀%{F-} %local_ip%
169 191
170 192
[module/date]
171 193
type = internal/date
174 196
date = %H:%M
175 197
date-alt = %Y-%m-%d %H:%M:%S
176 198
199 +
format = <label>
200 +
format-prefix = "󰅐 "
201 +
format-prefix-foreground = ${colors.primary}
202 +
177 203
label = %date%
178 -
label-foreground = ${colors.primary}
179 204
180 205
[settings]
181 206
screenchange-reload = true
182 -
pseudo-transparency = true
207 +
pseudo-transparency = false
183 208
184 209
; vim:ft=dosini
polybar/launch.sh +14 −4
1 1
#!/bin/sh
2 -
# Start the polybar bar defined in ./config.ini (installed at
3 -
# ~/.config/polybar/config.ini), replacing any bar already running.
2 +
# Start the polybar bars defined in ./config.ini (installed at
3 +
# ~/.config/polybar/config.ini), replacing any bars already running.
4 +
#
5 +
# The layout is two islands -- "left" and "right" -- as separate bar windows
6 +
# with a real gap between them, so add any new bar to BARS below.
4 7
#
5 8
# Meant to be run as the XFCE session client that used to be xfce4-panel —
6 9
# see ../xfce/polybar-panel.sh, which does that swap.
16 19
    i=$((i + 1))
17 20
done
18 21
19 -
# exec so the session manager tracks polybar itself, not this wrapper.
20 -
exec polybar main
22 +
BARS="left right"
23 +
24 +
for bar in $BARS; do
25 +
    polybar "$bar" &
26 +
done
27 +
28 +
# Stay alive as the session client for as long as the bars are up. polybar
29 +
# re-execs in place on `polybar-msg cmd restart`, so these PIDs survive it.
30 +
wait