*nohtml*

config/polybar/config

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