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