-
Notifications
You must be signed in to change notification settings - Fork 0
/
polybar
294 lines (226 loc) · 6.26 KB
/
polybar
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
[colors]
background = #cc1a3300
background-alt = #cc1a5500
foreground = #ffffff
foreground-alt = #8f8f8f
connected = #00ff00
disconnected = #ff0000
alert = #e68a00
[bar/left]
monitor = ${env:MONITOR:DVI-D-2}
monitor-fallback = ${env:MONITOR:eDP-1}
monitor-strict = false
width = 100%
height = 27
;offset-x = 1%
;offset-y = 1%
radius = 0.0
fixed-center = false
separator = |
background = ${colors.background}
foreground = ${colors.foreground}
line-size = 3
line-color = #f00
border-size = 0
border-color = #00000000
padding-left = 0
padding-right = 2
module-margin-left = 1
module-margin-right = 2
font-0 = "FontAwesome:size=11"
font-1 = "Noto Sans:size=11"
modules-left = i3
modules-center = title
modules-right = spotify_song backlight-acpi wlan eth no_internet battery volume load_average temperature time date powermenu
tray-position = right
tray-padding = 2
cursor-click = pointer
cursor-scroll = ns-resize
[bar/right]
inherit = bar/left
monitor = ${env:MONITOR:DVI-D-1}
monitor-fallback = ${env:MONITOR:HDMI-1}
[module/title]
type = internal/xwindow
format = <label>
label = %title%
label-maxlen = 100
[module/load_average]
type = custom/script
exec = uptime | python -c "print(input().split(' ')[-3][:-1])"
interval = 5.0
label = %output%
[module/spotify_song]
type = custom/script
exec = getSpotifySong | cut -c -40
[module/i3]
type = internal/i3
format = <label-state>
index-sort = true
; Only show workspaces on the same output as the bar
pin-workspaces = true
strip-wsnumbers = true
; focused = Active workspace on focused monitor
label-focused = %name%
label-focused-background = ${colors.background-alt}
label-focused-underline =
label-focused-padding = 2
; unfocused = Inactive workspace on any monitor
label-unfocused = %name%
label-unfocused-foreground = ${colors.foreground-alt}
label-unfocused-padding = 2
; visible = Active workspace on unfocused monitor
label-visible = %name%
label-visible-background = ${colors.background}
label-visible-underline = ${self.label-focused-underline}
label-visible-padding = ${self.label-focused-padding}
; urgent = Workspace with urgency hint set
label-urgent = %name%
label-urgent-background = ${colors.alert}
label-urgent-padding = 2
[module/xbacklight]
type = internal/xbacklight
format = <label> <bar>
label =
bar-width = 10
bar-indicator = |
bar-indicator-foreground = #ff
bar-indicator-font = 2
bar-fill = =
bar-fill-font = 2
bar-fill-foreground = ${colors.foreground}
bar-empty = =
bar-empty-font = 2
bar-empty-foreground = ${colors.foreground-alt}
[module/backlight-acpi]
inherit = module/xbacklight
type = internal/backlight
card = intel_backlight
[module/wlan]
type = internal/network
interface = wlp2s0
interval = 10.0
format-connected = <ramp-signal> <label-connected>
label-connected = %local_ip% (%signal%% %essid%)
label-connected-foreground = ${colors.connected}
format-disconnected = <label-disconnected>
label-disconnected = %ifname%
label-disconnected-foreground = ${colors.disconnected}
;format-disconnected = <label-disconnected>
;format-disconnected-underline = ${self.format-connected-underline}
;label-disconnected = %ifname% disconnected
;label-disconnected-foreground = ${colors.foreground-alt}
ramp-signal-0 =
ramp-signal-foreground = ${colors.connected}
[module/eth]
type = internal/network
interface = enp0s31f6
interval = 10.0
format-connected = <label-connected>
label-connected = %local_ip%
label-connected-foreground = ${colors.connected}
format-disconnected = <label-disconnected>
label-disconnected = %ifname%
label-disconnected-foreground = ${colors.disconnected}
[module/no_internet]
type = custom/script
exec = ping -q -w1 -c1 8.8.8.8 >/dev/null 2>/dev/null && echo "" || echo "Offline"
format-foreground = ${colors.disconnected}
interval = 10
[module/date]
type = internal/date
interval = 1
date = %{A1:gsimplecal:}%d.%m.%Y%{A}
label = %date%
[module/time]
type = internal/date
interval = 1
time = %H:%M:%S
label = %time%
[module/volume]
type = internal/volume
format-volume = <ramp-volume> <label-volume>
label-volume = %percentage%%
label-volume-foreground = ${root.foreground}
label-muted = 🔇
label-muted-foreground = ${colors.disconnected}
ramp-volume-0 =
ramp-volume-1 =
ramp-volume-2 =
[module/battery]
type = internal/battery
battery = BAT0
adapter = ADP1
full-at = 92
format-charging = <animation-charging> <label-charging>
format-charging-underline =
format-charging-prefix = " "
label-charging = %percentage%% (%time%)
format-discharging = <ramp-capacity> <label-discharging>
format-discharging-underline = ${self.format-charging-underline}
label-discharging = %percentage%% (%time%)
format-full-prefix = " "
format-full-prefix-foreground = ${colors.connected}
format-full-underline = ${self.format-charging-underline}
ramp-capacity-0 =
ramp-capacity-1 =
ramp-capacity-2 =
ramp-capacity-3 =
ramp-capacity-4 =
ramp-capacity-foreground = ${colors.foreground}
animation-charging-0 =
animation-charging-1 =
animation-charging-2 =
animation-charging-3 =
animation-charging-4 =
animation-charging-foreground = ${colors.foreground}
animation-charging-framerate = 750
[module/temperature]
type = internal/temperature
thermal-zone = 0
warn-temperature = 50
format = <ramp> <label>
format-underline =
format-warn = <ramp> <label-warn>
format-warn-underline = #f50a4d
label = %temperature-c%
label-warn = %temperature-c%
label-warn-foreground = ${colors.alert}
ramp-0 =
ramp-1 =
ramp-2 =
ramp-3 =
ramp-4 =
ramp-foreground = ${colors.foreground}
[module/powermenu]
type = custom/menu
expand-right = true
format-spacing = 1
label-open =
label-open-foreground = ${colors.foreground}
label-close =
label-close-foreground = ${colors.foreground}
label-separator = |
label-separator-foreground = ${colors.foreground-alt}
menu-0-0 = reboot
menu-0-0-exec = menu-open-1
menu-0-1 = power off
menu-0-1-exec = menu-open-2
menu-1-0 = cancel
menu-1-0-exec = menu-open-0
menu-1-1 = reboot
menu-1-1-exec = sudo reboot
menu-2-0 = power off
menu-2-0-exec = sudo shutdown -h now
menu-2-1 = cancel
menu-2-1-exec = menu-open-0
[settings]
screenchange-reload = true
;compositing-background = xor
;compositing-background = screen
;compositing-foreground = source
;compositing-border = over
[global/wm]
margin-top = 5
margin-bottom = 5
; vim:ft=dosini