Skip to main content

Polybar Modules

ยท 3 min read
Mahmoud Mohammed
Team Leader, Core Dev, Release Manager, Package Maintainer
Free Palestine ๐Ÿ‡ต๐Ÿ‡ธ

weather Modules

  • create an account on OpenWeatherMap
  • go to API page
  • generate an API Key
  • copy the API Key
  • edit ~/.config/bspwm/exodia.conf
  • set weather-API
  • go to OpenWeatherMap
  • search for your city
  • press on the result
  • copy city ID
  • edit ~/.config/bspwm/exodia.conf
  • set weather-city-ID
  • save file and restart polybar (open terminal bspbar)

github-notifications Modules

  • select the classic

  • in Note set the name as you like (e.gPolybar-Notification), in Expiration set to No expiration

  • select notifications

  • copy access tokens

nvim ~/.config/bspwm/exodia.conf
  • set github-username to your username

  • set github-access-token to your accessTokens

Launching Multi Bars (polybar)โ€‹

setup polybar for dual monitor

  • edit ~/.config/bspwm/exodia.conf
  • set multi-bar-monitors to true
  • save file and restart bspwm (ctrl + shift + r)

For older versionโ€‹

I'm gonna apply the steps on Tokyo Theme (same on all themes).

  • run xrandr | grep " connected " | awk '{ print$1 }' to connected monitors

  • edit nvim ~/.config/bspwm/polybar/tokyo/config

  • create new bar [bar/sec]

  • copy everything under [bar/main] (from line No. 41 to line No. 79) as shown down.

  • and set monitor to the second monitor (e.g HDMI-1-0 as it's my second monitor) as shown down.

  • now add the models (e.g as shown down)
modules-left   = xdomenu space LD bspwm RD space LD updates-pacman notification-github netDownSpeed RD space xkeyboard space themes
modules-center = LD mpd RD
modules-right = volume space battery network LD cpu cpuTemp date LD2 info-cava RD2 bna RD space sysmenu
  • now we finished the second bar config

  • to Launch the bar
polybar -q sec -c  ~/.config/bspwm/polybar/tokyo/config &
  • to Launch the bar always

  • edit nvim ~/.config/bspwm/bin/bspbar

  • Add these lines above else(between line No. 100 and 102)
elif [[ "$Bar" == "tokyo" ]]; then

pkill polybar
polybar -q main -c "$DIR"/"$Bar"/config &
polybar -q sec -c "$DIR"/"$Bar"/config &

  • as shown down

  • finally