-
Notifications
You must be signed in to change notification settings - Fork 12
/
polybar-config
286 lines (263 loc) · 7.56 KB
/
polybar-config
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
;------------------
;POLYBAR2
;------------------
;;---------------------------------------
; COLORS
;---------------------------------------
[colors]
black = #263238
white = #D8DEE9
red = #BF616A
red1 = #BF3B48
green = #94AD7D
green1 = #70AD37
blue = #5E81AC
blue1 = #3C6EAC
cyan = #7AACBA
cyan1 = #56A4BA
violet = #B48EAD
violet1 = #B46AA6
orange = #D08770
orange1 = #D06847
yellow = #CFB074
yellow1 = #CF9B36
focus = #8C8C8C
focus1 = #757575
unfocus = #1A2328
unfocus1 = #101010
;---------------------------------------
; GLOBAL
;---------------------------------------
[bar/nord]
width = 100%
height = 24
bottom = true
border-size = 0
background = ${colors.black}
foreground = ${colors.white}
fixed-center = true
line-size = 4
line-color = #f00
padding-left = 0
padding-right = 0
module-margin-left = 0
module-margin-right = 1
monitor = ${env:MONITOR}
;---------------------------------------
; FONTS
;---------------------------------------
;---------------------------------------
; MODULES LAYOUT
;---------------------------------------
modules-left = i3
modules-right = lan cpu memory pipewire storage battery date
modules-center = xwindow
;---------------------------------------
; LAN
;---------------------------------------
[module/lan]
type = internal/network
interface = @interface@
accumulate-stats = true
format-connected = <ramp-signal> <label-connected>
label-connected = %downspeed% %local_ip%
label-connected-padding = 1
format-connected-foreground = ${colors.black}
format-connected-background = ${colors.violet}
format-connected-underline = ${colors.violet1}
label-disconnected = disconnected
label-disconnected-padding = 1
format-disconnected-foreground = ${colors.black}
format-disconnected-background = ${colors.red}
format-disconnected-underline = ${colors.red1}
ramp-signal-0 = F
ramp-signal-1 = D
ramp-signal-2 = C
ramp-signal-3 = B
ramp-signal-4 = A
ramp-signal-5 = A+
;---------------------------------------
; STORAGE
;---------------------------------------
[module/storage]
type = internal/fs
mount-0 = /
interval = 20
format-mounted = <label-mounted>
label-mounted = " %free% "
format-mounted-foreground = ${colors.black}
format-mounted-background = ${colors.orange}
format-mounted-underline = ${colors.orange1}
;---------------------------------------
; MEMORY
;---------------------------------------
[module/memory]
type = internal/memory
; Seconds to sleep between updates
; Default: 1
interval = 3
format = <label>
label = " %gb_used% "
format-foreground = ${colors.black}
format-background = ${colors.green}
format-underline = ${colors.green1}
;---------------------------------------
; CPU
;---------------------------------------
[module/cpu]
type = internal/cpu
interval = 2
format = <label>
label = "%percentage:2%%"
format-foreground = ${colors.black}
format-background = ${colors.cyan}
format-padding = 1
format-underline = ${colors.cyan1}
;---------------------------------------
; MPD
;---------------------------------------
[module/mpd]
type = internal/mpd
host = 127.0.0.1
port = 6600
format-online = <toggle> <label-song>
;alt icons =
format-online-background = ${colors.blue}
format-online-foreground = ${colors.black}
format-online-padding = 1
icon-play =
;icon-prev =
;icon-next =
icon-pause =
label-song = "%{A1:mpc next && mpdfy:}%title:0:40:...%%{A}"
label-song-ellipsis = true
;bar-progress-width = 13
;bar-progress-indicator = ⊙
;bar-progress-fill = ━
;bar-progress-empty = ─
label-offline = mpd is offline
format-online-underline = ${colors.blue1}
format-offline-underline = ${colors.white}
;---------------------------------------
; WORKSPACE
;---------------------------------------
[module/i3]
type = internal/i3
format = <label-state> <label-mode>
index-sort = true
wrapping-scroll = false
pin-workspaces = true
label-mode-padding = 2
label-mode-foreground = #000
label-mode-background = ${colors.focus}
; focused = Active workspace on focused monitor
label-focused = %index%
label-focused-background = ${colors.focus}
label-focused-foreground = ${colors.black}
label-focused-underline= ${colors.focus1}
label-focused-padding = 2
; unfocused = Inactive workspace on any monitor
label-unfocused = %index%
label-unfocused-padding = 2
label-unfocused-background = ${colors.unfocus}
label-unfocused-underline= ${colors.unfocus1}
; visible = Active workspace on unfocused monitor
label-visible = %index%
label-visible-background = ${self.label-focused-background}
label-visible-underline = ${self.label-focused-underline}
label-visible-padding = ${self.label-focused-padding}
; urgent = Workspace with urgency hint set
label-urgent = %index%
label-urgent-background = #5f5f5f
label-urgent-padding = 2
;---------------------------------------
; XWINDOW
;---------------------------------------
[module/xwindow]
type = internal/xwindow
format-foreground = ${colors.white}
format-background = ${colors.black}
format-padding = 5
label = %title:0:50:...%
;---------------------------------------
; XBACKLIGHT
;---------------------------------------
[module/xbacklight]
type = internal/xbacklight
format = <label>
format-foreground = ${colors.black}
format-background = ${colors.orange}
label = " 盛 %percentage%% "
format-underline = ${colors.orange1}
;---------------------------------------
; DATE
;---------------------------------------
[module/date]
type = internal/date
interval = 1
date = %Y-%m-%d
time = %H:%M
label = "%{A1:gsimplecal:} %date% %time% %{A}"
format-foreground = ${colors.white}
format-background = ${colors.black}
format-underline = ${colors.black}
;---------------------------------------
; VOLUME
;---------------------------------------
[module/pipewire]
type = custom/script
label = "%output%"
label-font = 2
interval = 1.0
exec = ~/.config/polybar/pipewire.sh
click-right = exec pavucontrol &
click-left = ~/.config/polybar/pipewire.sh mute &
scroll-up = ~/.config/polybar/pipewire.sh up &
scroll-down = ~/.config/polybar/pipewire.sh down &
format-volume = <ramp-volume><label-volume>
format-volume-foreground = ${colors.black}
format-volume-background = ${colors.yellow}
label-volume = "%percentage% "
label-volume-foreground = ${colors.black}
label-volume-background = ${colors.yellow}
label-muted = " muted "
label-muted-foreground = ${colors.black}
label-muted-background = ${colors.yellow}
label-muted-underline = ${colors.yellow1}
ramp-volume-0 = " "
ramp-volume-0-foreground = ${colors.black}
ramp-volume-0-background = ${colors.yellow}
ramp-volume-1 = " "
ramp-volume-1-foreground = ${colors.black}
ramp-volume-1-background = ${colors.yellow}
ramp-volume-2 = " "
ramp-volume-2-foreground = ${colors.black}
ramp-volume-2-background = ${colors.yellow}
ramp-volume-3 = " "
ramp-volume-3-foreground = ${colors.black}
ramp-volume-3-background = ${colors.yellow}
format-volume-underline = ${colors.yellow1}
;---------------------------------------
; BATTERY
;---------------------------------------
[module/battery]
type = internal/battery
battery = BAT0
adapter = ADP1
full-at = 99
format-charging = <label-charging>
format-charging-foreground = ${colors.black}
format-charging-background = ${colors.red}
format-full = <label-full>
format-full-foreground = ${colors.black}
format-full-background = ${colors.red}
format-discharging = <label-discharging>
format-discharging-foreground = ${colors.black}
format-discharging-background = ${colors.red}
label-charging = " %percentage%% "
label-discharging =" %percentage%% "
label-discharging-foreground = ${colors.black}
label-full = " %percentage%% "
format-charging-underline = ${colors.red1}
format-discharging-underline = ${colors.red1}
format-full-underline = ${colors.red1}