From 6dd686080290582e0a0f676cb5c3483973ea996c Mon Sep 17 00:00:00 2001 From: Salt Date: Sun, 6 May 2018 01:45:35 -0500 Subject: [PATCH] bspwm, Polybar: Re-enstate Polybar --- .config/bspwm/bspwmrc | 2 +- .config/polybar/config | 332 ++++++++++++++++++++++++++++------------- 2 files changed, 230 insertions(+), 104 deletions(-) diff --git a/.config/bspwm/bspwmrc b/.config/bspwm/bspwmrc index 8d06b47c..6b535c00 100755 --- a/.config/bspwm/bspwmrc +++ b/.config/bspwm/bspwmrc @@ -88,7 +88,7 @@ feh --randomize --bg-fill ~/Pictures/Wallpapers/.active & if [[ $(pgrep polybar) ]]; then killall polybar fi -#$HOME/.config/polybar/start.sh & +$HOME/.config/polybar/start.sh & if [[ $(pgrep compton) ]]; then killall compton fi diff --git a/.config/polybar/config b/.config/polybar/config index c58e9dd7..f2f0968a 100644 --- a/.config/polybar/config +++ b/.config/polybar/config @@ -8,20 +8,33 @@ # RESOURCES #======================================== [res/colors] -primary = ${xrdb:color12} +primary = ${xrdb:color4} +secondary = ${xrdb:color12} alert = ${xrdb:color3} +icon-battery = ${xrdb:color7} +icon-cpu = ${xrdb:color4} +icon-date = ${xrdb:color7} +icon-fs = ${xrdb:color2} +icon-memory = ${xrdb:color5} +icon-volume = ${xrdb:color7} +icon-wlan = ${xrdb:color6} +icon-wm = ${xrdb:color7} +icon-xbacklight = ${xrdb:color7} + background = ${xrdb:background} -background-alt = ${xrdb:color0} +background-alt = ${xrdb:color10} foreground = ${xrdb:color15} -foreground-alt = ${xrdb:color10} [res/config] -padding = 3 +padding = 2 [res/fonts] -font-0 = "Helvetica CE:size=10;2" -font-1 = "Material Design Icons:size=13;3" +font-0 = "xos4 Terminus:size=9;2" +font-1 = "Wuncon Siji:size=9;2" +font-2 = "FontAwesome:size=10;2" +font-3 = "Material Design Icons:size=11;3" +font-4 = #======================================== # BARS @@ -32,51 +45,47 @@ font-1 = "Material Design Icons:size=13;3" [template/bar] # Rendering of the bar -width = 40% -height = 32 -offset-y = 10 +width = 100% +height = 30 wm-restack = ${env:PB_WM_RESTACK:bspwm} -bottom = true # Module padding and spacing -padding = ${res/config.padding} -module-margin = 2 +module-margin = 1 -# Colors and Borders -background = ${res/colors.background} +# Mild ricing +background = #00000000 foreground = ${res/colors.foreground} -radius=4 + +# Invisible border on three sides; it cooperates well with i3 +border-top-size = 10 +border-left-size = ${self.border-top-size} +border-right-size = ${self.border-top-size} +border-color = #00000000 # Module fonts font-0 = ${res/fonts.font-0} font-1 = ${res/fonts.font-1} +font-2 = ${res/fonts.font-2} +font-3 = ${res/fonts.font-3} +font-4 = ${res/fonts.font-4} # BARS #==================== -[bar/primary-left] +[bar/primary-top] +monitor = ${env:PB_MONITOR} +inherit = template/bar + +modules-left = i3 bspwm cpu memory fs-home update-arch +modules-center = +modules-right = wlan xbacklight volume battery date + +[bar/secondary-top] monitor = ${env:PB_MONITOR} inherit = template/bar -offset-x = 5% modules-left = i3 bspwm -modules-right = update-arch cpu memory fs-home - -[bar/primary-right] -monitor = ${env:PB_MONITOR} -inherit = template/bar -offset-x = 55% - -modules-left = wlan -modules-right = xbacklight volume battery date - -[bar/secondary] -monitor = ${env:PB_MONITOR} -inherit = template/bar -width = 90% -offset-x = 5% - -modules-left = i3 bspwm -modules-right = xwindow +modules-center = xwindow +modules-right = #======================================== # MODULES @@ -87,89 +96,155 @@ modules-right = xwindow [module/|] type = custom/text content = " " +content-foreground = ${res/colors.background-alt} # OTHER #==================== -[module/bspwm] -type = internal/bspwm -format = -format-prefix = " " +[module/i3] +type = internal/i3 +format = +format-prefix = i3 +format-prefix-padding = ${res/config.padding} +format-prefix-foreground = ${res/colors.background} +format-prefix-background = ${res/colors.icon-wm} enable-scroll = false +index-sort = true pin-workspaces = true +label-mode-padding = ${res/config.padding} +label-mode-foreground = ${res/colors.background} +label-mode-background = ${res/colors.icon-wm} + label-focused = %name% label-focused-padding = ${res/config.padding} +label-focused-foreground = ${self.label-mode-foreground} +label-focused-background = ${res/colors.secondary} + +label-visible = ${self.label-focused} +label-visible-padding = ${res/config.padding} +label-visible-background = ${res/colors.background-alt} + +label-unfocused = ${self.label-focused} +label-unfocused-padding = ${res/config.padding} +label-unfocused-background = ${res/colors.background} + +label-urgent = ${self.label-focused} +label-urgent-padding = ${res/config.padding} +label-urgent-background = ${res/colors.alert} + +[module/bspwm] +type = internal/bspwm +format = +format-prefix = b +format-prefix-padding = 2 +format-prefix-foreground = ${res/colors.background} +format-prefix-background = ${res/colors.icon-wm} +enable-scroll = false +pin-workspaces = true + +ws-icon-0 = 1; +ws-icon-1 = 2; +ws-icon-2 = 3; +ws-icon-3 = 4; +ws-icon-4 = 5; +ws-icon-5 = 6; +ws-icon-6 = 7; +ws-icon-7 = 8; +ws-icon-default =  + +label-monocle =  +label-monocle-padding = ${res/config.padding} +label-monocle-background = ${res/colors.icon-wm} +label-monocle-foreground = ${res/colors.background} +label-tiled =  +label-tiled-padding = ${res/config.padding} +label-tiled-background = ${res/colors.icon-wm} +label-tiled-foreground = ${res/colors.background} +label-fullscreen =  +label-fullscreen-padding = ${res/config.padding} +label-fullscreen-background = ${res/colors.icon-wm} +label-fullscreen-foreground = ${res/colors.background} +label-floating =  +label-floating-padding = ${res/config.padding} +label-floating-background = ${res/colors.icon-wm} +label-floating-foreground = ${res/colors.background} +label-pseudotiled =  +label-pseudotiled-padding = ${res/config.padding} +label-pseudotiled-background = ${res/colors.icon-wm} +label-pseudotiled-foreground = ${res/colors.background} +label-locked =  +label-locked-padding = ${res/config.padding} +label-locked-background = ${res/colors.icon-wm} +label-locked-foreground = ${res/colors.background} +label-sticky =  +label-sticky-padding = ${res/config.padding} +label-sticky-background = ${res/colors.icon-wm} +label-sticky-foreground = ${res/colors.background} +label-private =  +label-private-padding = ${res/config.padding} +label-private-background = ${res/colors.icon-wm} +label-private-foreground = ${res/colors.background} + +label-focused = %icon% +label-focused-padding = ${res/config.padding} label-focused-foreground = ${res/colors.background} -label-focused-background = ${res/colors.primary} +label-focused-background = ${res/colors.secondary} label-dimmed = ${self.label-focused} label-dimmed-padding = ${res/config.padding} label-dimmed-foreground = ${self.label-focused-foreground} label-dimmed-background = ${res/colors.background-alt} +label-occupied = ${self.label-focused} +label-occupied-padding = ${res/config.padding} +label-occupied-foreground = ${res/colors.foreground} +label-occupied-background = ${res/colors.background} + label-urgent = ${self.label-focused} label-urgent-padding = ${res/config.padding} label-urgent-foreground = ${res/colors.alert} - -label-occupied = ${self.label-focused} -label-occupied-padding = ${res/config.padding} +label-urgent-background = ${res/colors.background} label-empty = ${self.label-focused} label-empty-padding = ${res/config.padding} -label-empty-foreground = ${res/colors.foreground-alt} +label-empty-foreground = ${res/colors.background-alt} +label-empty-background = ${res/colors.background} -[module/xworkspaces] -type = internal/xworkspaces -format = -format-prefix = " " -enable-scroll = false -pin-workspaces = true - -label-active = %name% -label-active-padding = ${res/config.padding} -label-active-foreground = ${res/colors.background} -label-active-background = ${res/colors.primary} - -label-dimmed = ${self.label-active} -label-dimmed-padding = ${res/config.padding} -label-dimmed-foreground = ${self.label-active-foreground} -label-dimmed-background = ${res/colors.foreground-alt} - -label-urgent = ${self.label-active} -label-urgent-padding = ${res/config.padding} -label-urgent-foreground = ${res/colors.alert} - -label-occupied = ${self.label-active} -label-occupied-padding = ${res/config.padding} - -label-empty = ${self.label-active} -label-empty-padding = ${res/config.padding} -label-empty-foreground = ${res/colors.foreground-alt} [module/battery] type = internal/battery -format-charging = -format-charging-foreground = ${res/colors.foreground-alt} -format-discharging = +format-charging = +format-charging-background = ${res/colors.background-alt} +format-discharging = +format-discharging-background = ${res/colors.icon-battery} format-full = time-format = %H:%M -full-at = 95 +full-at = 98 interval = 15 label-charging = %percentage%% +label-charging-padding = ${res/config.padding} +label-charging-foreground = ${res/colors.background-alt} +label-charging-background = ${res/colors.background} label-discharging = %percentage%% -label-full =  +label-discharging-padding = ${self.label-charging-padding} +label-discharging-background = ${res/colors.background} +label-full =  +label-full-padding = ${res/config.padding} +label-full-foreground = ${res/colors.background} +label-full-background = ${res/colors.alert} -ramp-capacity-0=  -ramp-capacity-1=  -ramp-capacity-2=  -ramp-capacity-3=  -ramp-capacity-4=  -ramp-capacity-5=  -ramp-capacity-6=  -ramp-capacity-7=  -ramp-capacity-8=  -ramp-capacity-9=  +ramp-capacity-0=  +ramp-capacity-1=  +ramp-capacity-2=  +ramp-capacity-3=  +ramp-capacity-4=  +ramp-capacity-5=  +ramp-capacity-6=  +ramp-capacity-7=  +ramp-capacity-8=  +ramp-capacity-padding = ${res/config.padding} +ramp-capacity-foreground = ${res/colors.background} animation-charging-0 = ${self.ramp-capacity-0} animation-charging-1 = ${self.ramp-capacity-1} @@ -180,84 +255,135 @@ animation-charging-5 = ${self.ramp-capacity-5} animation-charging-6 = ${self.ramp-capacity-6} animation-charging-7 = ${self.ramp-capacity-7} animation-charging-8 = ${self.ramp-capacity-8} -animation-charging-9 = ${self.ramp-capacity-9} +animation-charging-padding = ${self.ramp-capacity-padding} +animation-charging-foreground = ${res/colors.background} +animation-charging-background = ${res/colors.background-alt} animation-charging-framerate = 500 [module/cpu] type = internal/cpu format =