summaryrefslogtreecommitdiff
path: root/config/polybar/config
blob: 0fd3ec868d88fb685aa373829dc8b1ef37908209 (plain)
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
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
[pos]
offsetx = 24
offsety = 24

[color]
bg = #191919
bga = #191919
fg1= #f58d44
fg2 = #5f819d


[bar/base]
monitor = ${env:MONITOR}

enable-ipc                = true
font-0                    = mononoki:style=Regular:pixelsize=11;3
font-1                    = mononoki:style=Regular:pixelsize=15;4
font-2                    = mononoki:style=Regular:pixelsize=19;5
font-3                    = mononoki:style=Regular:pixelsize=11;3
font-4                    = MesloLGM Nerd Font Mono:style=Regular:pixelsize=14;2
font-5                   = Noto Sans Mono CJK TC:style=Medium,Regular;pixelsize=10;2

height                    = 25
background                = ${color.bga}

module-margin		  = 1
wm-restack                = bspwm
radius                    = 0
foreground                = ${color.fg1}

padding-right		  = 1

[bar/wsonly]
inherit			  = bar/base
width			  = 100%
modules-left	          = workspaces
modules-right		  = time

[bar/ws]
inherit                   = bar/base
width                     = 100%
offset-x                  = 0 
modules-left              = workspaces xwindow
modules-right		  = mpd temperature memory wlan battery pulseaudio microphone time
tray-position		  = right
background		  = ${color.bga}
border-size		  = 0
fg			  = ${color.fg1}


[module/wsnumber]
type                      = custom/script
exec                      = bspc query -D -d focused --names
tail                      = true
interval                  = 0
format                    = "<label>"
format-foreground         = ${color.background}
format-background         = ${color.colorlb}
format-padding            = 0

[module/xwindow]
type                      = internal/xwindow
label                     = %title:0:40:%

[module/workspaces]
type = internal/xworkspaces

pin-workspaces = true

enable-click = true
enable-scroll = true

format = <label-state>
format-padding = 0
label-monitor = %name%
label-active             = %{T2}雷%{T-}
label-active-padding     = 1
label-occupied            = %{T2}ﲭ%{T-}
label-occupied-padding    = 1
label-empty               = %{T2}ﱤ%{T-}
label-empty-padding       = 1


[module/time]
type                      = internal/date
interval                  = 10
time                      = "%H:%M"
date                      = "%d %b"
label                     = %{T2}◷%{T-} %time%
label-padding             = 0

[module/mpd]
type                      = internal/mpd
host                      = 127.0.0.1
port                      = 6600

format-online 		  = <label-song> <icon-prev> <toggle> <icon-next> <bar-progress> 
label-song 		  = %title%

bar-progress-width = 12 
bar-progress-indicator = |
bar-progress-fill = ─
bar-progress-empty = ─

format-online-padding     = 0

format-offline-padding    = 0

label-song-maxlen         = 40
label-song-ellipsis       = true

icon-play		  =  
bar-empty = ─
icon-pause 		  = 
icon-prev		  = 
icon-next		  = 


[module/pulseaudio]
type                      = internal/pulseaudio

format-volume             = %{T3}<ramp-volume>%{T-} <label-volume>
label-volume              = %percentage:3:3%%
use-ui-max                = false
interval                  = 3

ramp-volume-0             = ""
ramp-volume-1             = ""
ramp-volume-2             = ""

label-muted               = "%{T3} %{T-}--%"

[module/microphone]
type = custom/script
exec = pactl list sources | grep -qi 'Mute: yes' && echo "" || echo ""
interval = 1
click-left =  pactl list sources | grep -qi 'Mute: yes' && pactl set-source-mute 2 false || pactl set-source-mute 2 true

[module/vpn]
type = custom/script
exec = echo vpn
exec-if = pgrep -x openvpn
interval = 5
format-underline = #268bd2
format-prefix = "🖧 "
format-prefix-foreground = #5b

[module/temperature]
type = custom/script
exec = sensors | awk '/^Tctl:/ { print substr($2, 2) }'
format-prefix = " "
interval = 1

[module/memory]
type = custom/script
exec = free -h | awk '/^Mem:/ {print $3 "/" $2}'
interval = 1
format-prefix = "力 "

[module/battery]
type = internal/battery
full-at = 99
battery = BAT0
adapter = ADP1

poll-interval = 5
; see "man date" for details on how to format the time string
; NOTE: if you want to use syntax tags here you need to use %%{...}
; Default: %H:%M:%S
time-format = %H:%M

; Available tags:
;   <label-charging> (default)
;   <bar-capacity>
;   <ramp-capacity>
;   <animation-charging>
format-charging = <animation-charging> <label-charging>

; Available tags:
;   <label-discharging> (default)
;   <bar-capacity>
;   <ramp-capacity>
;   <animation-discharging>
format-discharging = <ramp-capacity> <label-discharging>

; Available tags:
;   <label-full> (default)
;   <bar-capacity>
;   <ramp-capacity>
;format-full = <ramp-capacity> <label-full>

; Available tokens:
;   %percentage% (default) - is set to 100 if full-at is reached
;   %percentage_raw%
;   %time%
;   %consumption% (shows current charge rate in watts)
label-charging = Charging %percentage%%

; Available tokens:
;   %percentage% (default) - is set to 100 if full-at is reached
;   %percentage_raw%
;   %time%
;   %consumption% (shows current discharge rate in watts)
label-discharging = Discharging %percentage%%

; Available tokens:
;   %percentage% (default) - is set to 100 if full-at is reached
;   %percentage_raw%
label-full = Fully charged

; Only applies if <ramp-capacity> is used
ramp-capacity-0 = 
ramp-capacity-1 = 
ramp-capacity-2 = 
ramp-capacity-3 = 
ramp-capacity-4 = 

; Only applies if <bar-capacity> is used
bar-capacity-width = 10

; Only applies if <animation-charging> is used
animation-charging-0 = 
animation-charging-1 = 
animation-charging-2 = 
animation-charging-3 = 
animation-charging-4 = 
; Framerate in milliseconds
animation-charging-framerate = 750

; Only applies if <animation-discharging> is used
animation-discharging-0 = 
animation-discharging-1 = 
animation-discharging-2 = 
animation-discharging-3 = 
animation-discharging-4 = 
; Framerate in milliseconds
animation-discharging-framerate = 500

[module/network]
type = internal/network
; Name of the network interface to display. You can get the names of the
; interfaces on your machine with `ip link`
; Wireless interfaces often start with `wl` and ethernet interface with `eno` or `eth`
interface = wlan1

; Seconds to sleep between updates
; Default: 1
interval = 3.0

; Test connectivity every Nth update
; A value of 0 disables the feature
; NOTE: Experimental (needs more testing)
; Default: 0
;ping-interval = 3

; @deprecated: Define min width using token specifiers (%downspeed:min% and %upspeed:min%)
; Minimum output width of upload/download rate
; Default: 3
udspeed-minwidth = 5

; Accumulate values from all interfaces
; when querying for up/downspeed rate
; Default: false
accumulate-stats = true

; Consider an `UNKNOWN` interface state as up.
; Some devices like USB network adapters have 
; an unknown state, even when they're running
; Default: false
unknown-as-up = true
; Available tags:
;   <label-connected> (default)
;   <ramp-signal>
format-connected = <ramp-signal> <label-connected>

; Available tags:
;   <label-disconnected> (default)
format-disconnected = <label-disconnected>

; Available tags:
;   <label-connected> (default)
;   <label-packetloss>
;   <animation-packetloss>
format-packetloss = <animation-packetloss> <label-connected>

; All labels support the following tokens:
;   %ifname%    [wireless+wired]
;   %local_ip%  [wireless+wired]
;   %local_ip6% [wireless+wired]
;   %essid%     [wireless]
;   %signal%    [wireless]
;   %upspeed%   [wireless+wired]
;   %downspeed% [wireless+wired]
;   %linkspeed% [wired]

; Default: %ifname% %local_ip%
label-connected = %essid% %downspeed:9%
label-connected-foreground = #eefafafa

; Default: (none)
label-disconnected = not connected
label-disconnected-foreground = #66ffffff

; Default: (none)
;label-packetloss = %essid%
;label-packetloss-foreground = #eefafafa

; Only applies if <ramp-signal> is used
ramp-signal-0 = 😱
ramp-signal-1 = 😠
ramp-signal-2 = 😒
ramp-signal-3 = 😊
ramp-signal-4 = 😃
ramp-signal-5 = 😈

; Only applies if <animation-packetloss> is used
animation-packetloss-0 = ⚠
animation-packetloss-0-foreground = #ffa64c
animation-packetloss-1 = 📶
animation-packetloss-1-foreground = #000000
; Framerate in milliseconds
animation-packetloss-framerate = 500