[download]
config/polybar/config
1 [colors]
2 bg = ${xrdb:Polybar.background}
3 ba = ${xrdb:Polybar.background_argb}
4 fg = ${xrdb:Polybar.foreground}
5 ug = ${xrdb:Polybar.yellow1}
6
7 [settings]
8 width = 30%
9 height = 20
10 offset-x = 70%
11
12 enable-ipc = true
13 pseudo-transparency = true
14
15 locale = ru_RU.UTF-8
16 font-0 = Terminus-9;1
17 font-1 = Nerdfont-8;1
18 font-2 = Ubuntu-8:antialias=false;0
19 font-3 = Emoji:scale=12;0
20
21 background = ${colors.ba}
22 foreground = ${colors.fg}
23
24 module-margin-left = 1
25 module-margin-right = 1
26
27 modules-left =
28 modules-center =
29 modules-right = music days torrents weather mail neticon network volicon volume lang date
30
31 tray-padding = 4
32 tray-position = right
33
34
35
36 [bar/dwm]
37 inherit = settings
38 height = 14
39 background = ${colors.bg}
40 override-redirect = true
41
42 [bar/awesome]
43 inherit = settings
44
45 [bar/xfwm4]
46 inherit = settings
47
48 [bar/openbox]
49 inherit = settings
50
51 [bar/i3]
52 inherit = settings
53 width = 100%
54 offset-x = 0
55 modules-left = i3
56 modules-center = title
57
58
59
60 [module/i3]
61 type = internal/i3
62
63 label-focused = %index%
64 label-focused-padding = 2
65 label-focused-background = ${colors.fg}
66 label-focused-foreground = ${colors.bg}
67
68 label-unfocused = %index%
69 label-unfocused-padding = 2
70
71 label-urgent = %index%
72 label-urgent-padding = 2
73 label-urgent-background = ${colors.ug}
74 label-urgent-foreground = ${colors.bg}
75
76
77
78 [module/title]
79 type = internal/xwindow
80
81
82
83 [module/lang]
84 type = internal/xkeyboard
85 format = <label-layout>
86 label-layout = " %name:0:2% "
87
88
89
90 [module/date]
91 type = internal/date
92 format = %{A1:datetoggle: A3:notify days:}<label>%{A A}
93
94 date = "%R "
95 date-alt = "%a, %d %B %T "
96
97
98
99 [module/mail]
100 type = custom/script
101 exec = icon inbox
102 interval = 2
103
104 click-left = term mutt
105 click-right = notify inbox
106
107
108
109 [module/news]
110 type = custom/script
111 exec = n=$(news | wc -l); echo $(icon news)${n#0}
112 interval = 2
113
114 click-left = term newsboat
115 click-right = notify news
116
117
118
119 [module/days]
120 type = custom/script
121 exec = days | grep -q 🎂 && icon days
122 interval = 5
123
124 click-left = notify days
125 click-right = notify days
126
127
128
129 [module/music]
130 type = custom/script
131 exec = MUSIC_FORMAT='$icon -$tl\n' music
132 interval = 1
133
134 click-left = term mocp
135 click-middle = music pause
136 click-right = music-notify
137
138
139
140 [module/torrents]
141 type = custom/script
142 exec = echo "$(torrents | awk '{ print $2 }' | xargs -I % icon torrents-% | LANG= uniq -c | awk '{ print $2 }')"
143 interval = 5
144
145 click-left = term 'tremc || aria2p'
146 click-right = notify torrents
147
148
149
150 [module/weather]
151 type = custom/script
152 exec = cut -d ' ' -f 1 ~/.cache/weather
153 interval = 2
154
155 click-left = term curl wttr.in/spb?lang=ru\; read
156 click-middle = notify moonday
157 click-right = notify weather
158
159
160
161 [module/neticon]
162 type = custom/script
163 exec = icon network; ip r g 1 | awk '{ print $5 }' > ~/.cache/netdev
164
165 click-left = pkill nm-applet || nm-applet &
166 click-right = notify network
167
168
169
170 [module/network]
171 type = internal/network
172
173 interface = ${file:~/.cache/netdev:lo}
174 accumulate-stats = true
175
176 label-connected = %downspeed% %upspeed%
177 label-disconnected = -- KB/s -- KB/s
178
179 format-connected = %{A1:pkill nm-applet || nm-applet &: A3:notify network:}<label-connected>%{A A A}
180 format-disconnected = %{A1:pkill nm-applet || nm-applet &: A3:notify nmcli d:}<label-disconnected>%{A A A}
181
182
183
184 [module/volicon]
185 type = custom/script
186 exec = icon mixer
187
188 click-left = pavucontrol &
189 click-right = volume
190 scroll-up = volume +5%
191 scroll-down = volume -5%
192
193
194
195 [module/volume]
196
197 type = internal/pulseaudio
198
199 format-volume = %{A1:pavucontrol &: A2:volume mute: A3:volume: A4:volume +5%: A5:volume -5%:}<bar-volume>%{A A A A A}
200 format-muted = ${self.format-volume}
201 format-muted-foreground = ${xrdb:Polybar.black2}
202
203 bar-volume-width = 20
204 bar-volume-fill = •
205 bar-volume-empty = •
206 bar-volume-indicator = |
207 bar-volume-empty-foreground = ${xrdb:Polybar.black2}
208
209 format-volume-font = 3
210 format-muted-font = 3
211
212
|