1[colors]
  2background = ${xrdb:background}
  3background-alt = ${xrdb:color8}
  4foreground = ${xrdb:foreground}
  5foreground-alt = ${xrdb:color0}
  6primary = ${xrdb:color1}
  7secondary = ${xrdb:color11}
  8alert = ${xrdb:color11}
  9
 10[bar/top]
 11width = 100%
 12height = 27
 13fixed-center = true
 14
 15background = ${colors.background}
 16foreground = ${colors.foreground}
 17
 18line-size = 0
 19
 20padding-top = 100
 21padding-left = 0
 22padding-right = 2
 23
 24module-margin-left = 1
 25module-margin-right = 3
 26
 27font-0 = "{{ .font }}:pixelsize=11;1"
 28font-1 = "JetBrainsMono NF:style=Regular:size=12;2"
 29
 30modules-left = i3
 31modules-center = xwindow
 32{{- if ne .chezmoi.hostname "glade" }}
 33modules-right = updates caffeine notifications mic pulseaudio cpu memory date time {{ if eq .chezmoi.hostname "sidhe" }}battery{{ end }}
 34{{- else }}
 35modules-right = wlan pulseaudio cpu memory date battery
 36{{- end }}
 37
 38cursor-click = pointer
 39cursor-scroll = ns-resize
 40
 41[bar/bottom]
 42width = 100%
 43height = 27
 44fixed-center = true
 45bottom = true
 46
 47background = ${colors.background}
 48foreground = ${colors.foreground}
 49
 50line-size = 0
 51
 52padding-top = 100
 53padding-left = 0
 54padding-right = 2
 55
 56module-margin-left = 1
 57module-margin-right = 3
 58
 59font-0 = "{{ .font }}:pixelsize=11;1"
 60font-1 = "JetBrainsMono Nerd Font:style=Regular"
 61
 62modules-left = {{- if eq .chezmoi.hostname "glade" }} updates {{- end }}
 63modules-center = {{- if ne .chezmoi.hostname "glade" }} mpd {{- end }}
 64modules-right =
 65
 66tray-position = right
 67tray-padding = 2
 68
 69cursor-click = pointer
 70cursor-scroll = ns-resize
 71
 72[module/xwindow]
 73type = internal/xwindow
 74label = %title:0:30:...%
 75
 76[module/i3]
 77type = internal/i3
 78format = <label-state> <label-mode>
 79index-sort = true
 80wrapping-scroll = false
 81
 82; Only show workspaces on the same output as the bar
 83pin-workspaces = true
 84
 85label-mode-padding = 1
 86label-mode-foreground = ${colors.background}
 87
 88; focused = Active workspace on focused monitor
 89label-focused = %index%
 90label-focused-background = ${colors.background-alt}
 91label-focused-underline= ${colors.background-alt}
 92label-focused-padding = 1
 93
 94; unfocused = Inactive workspace on any monitor
 95label-unfocused = %index%
 96label-unfocused-padding = 1
 97
 98; visible = Active workspace on unfocused monitor
 99label-visible = %index%
100label-visible-background = ${self.label-focused-background}
101label-visible-underline = ${self.label-focused-underline}
102label-visible-padding = ${self.label-focused-padding}
103
104; urgent = Workspace with urgency hint set
105label-urgent = %index%
106label-urgent-background = ${colors.alert}
107label-urgent-foreground = ${colors.background}
108label-urgent-underline = ${colors.alert}
109label-urgent-padding = 1
110
111[module/mail]
112type = custom/script
113exec = ~/.config/polybar/mail.sh
114interval = 5
115
116[module/mpd]
117type = internal/mpd
118format-online = <label-song>
119
120label-song-maxlen = 50
121label-song-ellipsis = true
122
123[module/cpu]
124type = internal/cpu
125interval = 2
126format-prefix = " "
127format-prefix-foreground = ${colors.foreground}
128label = %percentage:2%%
129
130[module/memory]
131type = internal/memory
132interval = 2
133format-prefix = " "
134format-prefix-foreground = ${colors.foreground}
135label = %percentage_used:2%%
136
137[module/wlan]
138type = internal/network
139interface = wlp2s0
140interval = 3.0
141
142format-connected = <label-connected>
143format-connected-underline = #9f78e1
144label-connected = ""
145
146format-disconnected = ""
147
148[module/date]
149type = internal/date
150interval = 5
151{{- if eq .chezmoi.hostname "glade" }}
152time = " %H:%M"
153date-alt = " %Y-%m-%d"
154label = %time%%date%
155{{- end }}
156{{- if ne .chezmoi.hostname "glade" }}
157date = " %Y-%m-%d"
158label = %date%
159
160[module/time]
161type = internal/date
162interval = 5
163time =  %H:%M
164label = %time%
165{{- end }}
166{{ if ne .chezmoi.hostname "angmar" }}
167[module/battery]
168type = internal/battery
169{{- if eq .chezmoi.hostname "glade"}}
170battery = BAT0
171adapter = AC
172{{- end }}
173{{- if eq .chezmoi.hostname "sidhe"}}
174battery = BAT1
175adapter = ACAD
176{{- end }}
177
178format-full = <ramp-capacity> <label-full>
179label-full = %percentage%%
180
181format-charging = <animation-charging> <label-charging>
182label-charging = %percentage%%
183animation-charging-0 = 
184animation-charging-1 = 
185animation-charging-2 = 
186animation-charging-3 = 
187animation-charging-4 = 
188animation-charging-5 = 
189animation-charging-6 = 
190
191format-discharging = <ramp-capacity> <label-discharging>
192label-discharging = %percentage%%
193ramp-capacity-0 = 
194ramp-capacity-1 = 
195ramp-capacity-2 = 
196ramp-capacity-3 = 
197ramp-capacity-4 = 
198ramp-capacity-5 = 
199ramp-capacity-6 = 
200ramp-capacity-7 = 
201ramp-capacity-8 = 
202ramp-capacity-9 = 
203{{- end }}
204
205[module/pulseaudio]
206type = internal/pulseaudio
207
208format-volume = <ramp-volume> <label-volume>
209label-volume =  %percentage%%
210label-volume-foreground = ${root.foreground}
211
212label-muted = "  "
213label-muted-foreground = ${colors.background}
214label-muted-background = ${colors.primary}
215
216ramp-volume-0 = ""
217ramp-volume-1 = ""
218ramp-volume-2 = ""
219
220[module/updates]
221type = custom/script
222exec = ~/.local/bin/pending-updates
223interval = 1800
224click-left = elacritty -e zsh -c 'yay'
225format-prefix = " "
226
227[global/wm]
228margin-top = 5
229margin-bottom = 5
230
231[module/caffeine]
232type = custom/script
233trail = false
234exec = ~/.local/bin/caffeine status
235click-left = ~/.local/bin/caffeine toggle
236format = <label>
237
238[module/mic]
239type = custom/script
240exec = ~/.config/polybar/mic-toggle.sh
241click-left = ~/.config/polybar/mic-toggle.sh toggle
242interval = 1
243
244env-color_background = ${colors.background}
245env-color_primary = ${colors.primary}
246env-color_foreground = ${colors.foreground}
247
248[module/notifications]
249type = custom/script
250exec = ~/.config/polybar/notification-toggle.sh
251click-left = ~/.config/polybar/notification-toggle.sh toggle
252interval = 1
253
254env-color_background = ${colors.background}
255env-color_primary = ${colors.primary}
256env-color_foreground = ${colors.foreground}
257
258; vim:ft=dosini