*nohtml*

config/polybar/config

   1 [colors]
   2 bg = ${xrdb:background}
   3 ba = ${xrdb:background_argb}
   4 fg = ${xrdb:foreground}
   5 ug = ${xrdb: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 window
  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 window
  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/window]
  99 type = internal/xwindow
 100 label-maxlen = 100
 101 
 102 [module/lang]
 103 type = internal/xkeyboard
 104 
 105 format = <label-layout>
 106 label-layout = "  %name:0:2% "
 107 
 108 [module/date]
 109 type = internal/date
 110 
 111 format = %{A1:datetoggle: A3:notify days:}<label>%{A A}
 112 
 113 date = "%H:%M  "
 114 date-alt = "%a, %d %B %T  "
 115 
 116 # }}}
 117 # Scripts {{{
 118 
 119 [module/mail]
 120 type = custom/script
 121 exec = icon mail
 122 interval = 2
 123 click-left  = term mutt
 124 click-right = notify inbox
 125 
 126 [module/news]
 127 type = custom/script
 128 exec = n=$(news | wc -l); echo $(icon news)${n#0}
 129 interval = 2
 130 click-left  = term newsboat
 131 click-right = notify news
 132 
 133 [module/days]
 134 type = custom/script
 135 exec = [ $(days | grep -c 🎂) -gt 0 ] && icon days
 136 interval = 5
 137 click-left  = notify days
 138 click-right = notify days
 139 
 140 [module/music]
 141 type = custom/script
 142 exec = echo "$(music | tr \\n ' ')"
 143 interval = 2
 144 click-left   = term mocp
 145 click-middle = music pause
 146 click-right  = music-notify
 147 
 148 [module/musicalt]
 149 type = custom/script
 150 exec = echo "$(MUSIC_FORMAT='$icon -$tl' music)"
 151 interval = 2
 152 click-left   = term mocp
 153 click-middle = music pause
 154 click-right  = music-notify
 155 
 156 [module/torrents]
 157 type = custom/script
 158 exec = s=$(torrents | awk '{ print $2 }' | xargs -I % icon torrents-% | LANG= uniq -c | awk '{ print $2, $1 }'); echo ${s:-$(icon torrents)}
 159 interval = 5
 160 click-left  = term transmission-remote-cli
 161 click-right = notify torrents
 162 
 163 [module/weather]
 164 type = custom/script
 165 exec = cut -d ' ' -f 1 ~/.cache/weather
 166 interval = 2
 167 click-left   = term curl wttr.in/spb?lang=ru\; read
 168 click-middle = notify moonday
 169 click-right  = notify weather
 170 
 171 [module/neticon]
 172 type = custom/script
 173 exec = icon network; ip r g 1 | awk '{ print $5 }' > ~/.cache/netdev
 174 
 175 click-left   = pkill nm-applet || nm-applet &
 176 click-right  = notify network
 177 
 178 [module/network]
 179 type = internal/network
 180 
 181 interface = ${file:~/.cache/netdev:lo}
 182 accumulate-stats = true
 183 
 184 label-connected    = %downspeed% %upspeed%
 185 label-disconnected = -- KB/s -- KB/s
 186 
 187 format-connected    = %{A1:pkill nm-applet || nm-applet &: A3:notify network:}<label-connected>%{A A A}
 188 format-disconnected = %{A1:pkill nm-applet || nm-applet &: A3:notify nmcli d:}<label-disconnected>%{A A A}
 189 
 190 [module/volicon]
 191 type = custom/script
 192 exec = icon mixer
 193 
 194 click-left  = pavucontrol &
 195 click-right = volume
 196 scroll-up   = volume +5%
 197 scroll-down = volume -5%
 198 
 199 [module/volume]
 200 # type = internal/alsa
 201 type = internal/pulseaudio
 202 
 203 format-volume = %{A1:pavucontrol &: A2:volmute: A3:volume: A4:volume +5%: A5:volume -5%:}<bar-volume>%{A A A A A}
 204 format-muted  = ${self.format-volume}
 205 format-muted-foreground = ${xrdb:color8}
 206 
 207 bar-volume-width = 20
 208 bar-volume-indicator = |
 209 bar-volume-fill  = •
 210 bar-volume-empty = •
 211 bar-volume-empty-foreground = ${xrdb:color8}
 212 
 213 format-volume-font = 3
 214 format-muted-font  = 3
 215 
 216 # }}}
 217 
 218 # vim: ft=dosini cms=#\ %s