Polybar: More color refactoring, reorganization, and add fs module

This commit is contained in:
Salt 2018-01-31 19:05:26 -06:00
parent 7dd35cab12
commit 26d40053ba
2 changed files with 31 additions and 15 deletions

View File

@ -14,10 +14,12 @@ alert = ${xrdb:color3}
icon-battery = ${xrdb:color2} icon-battery = ${xrdb:color2}
icon-cpu = ${xrdb:color4} icon-cpu = ${xrdb:color4}
icon-date = ${self.primary} icon-date = ${xrdb:color7}
icon-fs = ${xrdb:color2}
icon-memory = ${xrdb:color5} icon-memory = ${xrdb:color5}
icon-volume = ${self.primary} icon-volume = ${xrdb:color7}
icon-wlan = ${xrdb:color6} icon-wlan = ${xrdb:color6}
icon-wm = ${xrdb:color7}
icon-xbacklight = ${xrdb:color7} icon-xbacklight = ${xrdb:color7}
background = ${xrdb:background} background = ${xrdb:background}
@ -74,9 +76,9 @@ monitor = ${env:PB_MONITOR}
inherit = template/bar inherit = template/bar
tray-position = right tray-position = right
modules-left = i3 bspwm cpu memory update-arch modules-left = i3 bspwm cpu memory fs-home update-arch
modules-center = xwindow modules-center = xwindow
modules-right = xbacklight volume battery wlan date modules-right = wlan battery xbacklight volume date
[bar/secondary-top] [bar/secondary-top]
monitor = ${env:PB_MONITOR} monitor = ${env:PB_MONITOR}
@ -114,14 +116,14 @@ format = <label-state><label-mode>
format-prefix =  format-prefix = 
format-prefix-padding = ${res/config.padding} format-prefix-padding = ${res/config.padding}
format-prefix-foreground = ${res/colors.background} format-prefix-foreground = ${res/colors.background}
format-prefix-background = ${res/colors.primary} format-prefix-background = ${res/colors.icon-wm}
enable-scroll = false enable-scroll = false
index-sort = true index-sort = true
pin-workspaces = true pin-workspaces = true
label-mode-padding = ${res/config.padding} label-mode-padding = ${res/config.padding}
label-mode-foreground = ${res/colors.background} label-mode-foreground = ${res/colors.background}
label-mode-background = ${res/colors.primary} label-mode-background = ${res/colors.icon-wm}
label-focused = %name% label-focused = %name%
label-focused-padding = ${res/config.padding} label-focused-padding = ${res/config.padding}
@ -146,7 +148,7 @@ format = <label-state><label-mode>
format-prefix = b format-prefix = b
format-prefix-padding = 2 format-prefix-padding = 2
format-prefix-foreground = ${res/colors.background} format-prefix-foreground = ${res/colors.background}
format-prefix-background = ${res/colors.primary} format-prefix-background = ${res/colors.icon-wm}
enable-scroll = false enable-scroll = false
pin-workspaces = true pin-workspaces = true
@ -162,35 +164,35 @@ ws-icon-default = 
label-monocle =  label-monocle = 
label-monocle-padding = ${res/config.padding} label-monocle-padding = ${res/config.padding}
label-monocle-background = ${res/colors.primary} label-monocle-background = ${res/colors.icon-wm}
label-monocle-foreground = ${res/colors.background} label-monocle-foreground = ${res/colors.background}
label-tiled =  label-tiled = 
label-tiled-padding = ${res/config.padding} label-tiled-padding = ${res/config.padding}
label-tiled-background = ${res/colors.primary} label-tiled-background = ${res/colors.icon-wm}
label-tiled-foreground = ${res/colors.background} label-tiled-foreground = ${res/colors.background}
label-fullscreen =  label-fullscreen = 
label-fullscreen-padding = ${res/config.padding} label-fullscreen-padding = ${res/config.padding}
label-fullscreen-background = ${res/colors.primary} label-fullscreen-background = ${res/colors.icon-wm}
label-fullscreen-foreground = ${res/colors.background} label-fullscreen-foreground = ${res/colors.background}
label-floating =  label-floating = 
label-floating-padding = ${res/config.padding} label-floating-padding = ${res/config.padding}
label-floating-background = ${res/colors.primary} label-floating-background = ${res/colors.icon-wm}
label-floating-foreground = ${res/colors.background} label-floating-foreground = ${res/colors.background}
label-pseudotiled =  label-pseudotiled = 
label-pseudotiled-padding = ${res/config.padding} label-pseudotiled-padding = ${res/config.padding}
label-pseudotiled-background = ${res/colors.primary} label-pseudotiled-background = ${res/colors.icon-wm}
label-pseudotiled-foreground = ${res/colors.background} label-pseudotiled-foreground = ${res/colors.background}
label-locked =  label-locked = 
label-locked-padding = ${res/config.padding} label-locked-padding = ${res/config.padding}
label-locked-background = ${res/colors.primary} label-locked-background = ${res/colors.icon-wm}
label-locked-foreground = ${res/colors.background} label-locked-foreground = ${res/colors.background}
label-sticky =  label-sticky = 
label-sticky-padding = ${res/config.padding} label-sticky-padding = ${res/config.padding}
label-sticky-background = ${res/colors.primary} label-sticky-background = ${res/colors.icon-wm}
label-sticky-foreground = ${res/colors.background} label-sticky-foreground = ${res/colors.background}
label-private =  label-private = 
label-private-padding = ${res/config.padding} label-private-padding = ${res/config.padding}
label-private-background = ${res/colors.primary} label-private-background = ${res/colors.icon-wm}
label-private-foreground = ${res/colors.background} label-private-foreground = ${res/colors.background}
label-focused = %icon% label-focused = %icon%
@ -296,6 +298,19 @@ label = %date% %time%
label-padding = ${res/config.padding} label-padding = ${res/config.padding}
label-background = ${res/colors.background} label-background = ${res/colors.background}
[module/fs-home]
type = internal/fs
format-mounted = <label-mounted>
format-mounted-prefix = 
format-mounted-prefix-padding = ${res/config.padding}
format-mounted-prefix-foreground = ${res/colors.background}
format-mounted-prefix-background = ${res/colors.icon-fs}
mount-0 = /home
label-mounted = %percentage_used%%
label-mounted-padding = ${res/config.padding}
label-mounted-background = ${res/colors.background}
[module/memory] [module/memory]
type = internal/memory type = internal/memory
format = <label> format = <label>

View File

@ -22,6 +22,7 @@ if [[ $PB_MONITOR == "" ]]; then
fi fi
printf '[INFO] Starting Polybar primary on monitor $PB_MONITOR' printf '[INFO] Starting Polybar primary on monitor $PB_MONITOR'
polybar -r primary-top& polybar -r primary-top&
polybar -r primary-bottom&
# ...and then moving on to secondaries, if we have them # ...and then moving on to secondaries, if we have them
# Alright, now this looks *really* bad, but there's no way in hell you can get # Alright, now this looks *really* bad, but there's no way in hell you can get
# me to attempt to solve this with regex. Fuck regex. It starts more problems # me to attempt to solve this with regex. Fuck regex. It starts more problems