Polybar: Add spotify status script, adjust default bar size

Thanks Jvanrhijn for the script
This commit is contained in:
2018-08-04 22:06:32 -05:00
parent a7d14dc5e2
commit 3b56f906cc
2 changed files with 80 additions and 2 deletions

View File

@@ -19,6 +19,7 @@ icon-date = ${res/colors.primary}
icon-dropbox = ${res/colors.primary}
icon-fs = ${xrdb:color11}
icon-memory = ${xrdb:color13}
icon-spotify = ${xrdb:color2}
icon-tor = ${xrdb:color13}
icon-volume = ${res/colors.primary}
icon-network = ${xrdb:color14}
@@ -35,7 +36,7 @@ bar-empty = ${self.border}
[res/config]
padding = 4
bar-width = ${env:PB_MODULE_BAR_WIDTH:50}
bar-width = ${env:PB_MODULE_BAR_WIDTH:45}
bar-indicator =
bar-fill = |
@@ -96,7 +97,7 @@ tray-position = center
modules-left = ${env:PB_BAR_PRIMARY_MODULES_LEFT:battery cpu memory}
modules-center = ${env:PB_BAR_PRIMARY_MODULES_CENTER: }
modules-right = ${env:PB_BAR_PRIMARY_MODULES_RIGHT:xbacklight volume | dropbox date}
modules-right = ${env:PB_BAR_PRIMARY_MODULES_RIGHT:xbacklight volume | spotify dropbox date}
[bar/primary-2]
monitor = ${env:PB_MONITOR:eDP-1}
@@ -305,6 +306,16 @@ type = custom/text
content = ${env:PB_MONITOR:eDP-1}
content-foreground = ${res/colors.background-alt}
[module/spotify]
type = custom/script
format = <label>
format-prefix = "Spotify: "
format-prefix-foreground = ${res/colors.icon-spotify}
interval = 3
exec = python $HOME/.config/polybar/scripts/spotify.py
exec-if = pgrep spotify
[module/swap]
type = internal/memory
format = <label>