This commit is contained in:
Daniel Bauer
2018-11-05 10:58:37 +01:00
parent b16c67b87b
commit 6885e49501
2 changed files with 87 additions and 81 deletions

View File

@@ -1,56 +1,53 @@
=====================================================
;
; To learn more about how to configure Polybar
; go to https://github.com/jaagr/polybar
;
; The README contains alot of information
;
;=====================================================
[colors] [colors]
;background = ${xrdb:color0:#222}
background = #222 background = #222
background-alt = #444 background-alt = #444
;foreground = ${xrdb:color7:#222}
foreground = #dfdfdf foreground = #dfdfdf
foreground-alt = #555 foreground-alt = #555
primary = #ffb52a primary = #ffb52a
secondary = #e60053 secondary = #e60053
alert = #bd2c40 alert = #bd2c40
green = #689d6a
yellow = #fabc2f
red = #cc241d
[bar/example] [bar/base]
width = 900 ;100% width = 900 ;100%
height = 27 height = 35
;offset-x = 1%
;offset-y = 1%
radius = 6.0 radius = 6.0
fixed-center = false fixed-center = false
background = ${colors.background} background = ${colors.background}
foreground = ${colors.foreground} foreground = ${colors.foreground}
line-size = 3 line-size = 3
line-color = #f00 line-color = #f00
border-size = 0 border-size = 0
border-color = #00000000 border-color = #00000000
padding-left = 0 padding-left = 0
padding-right = 2 padding-right = 2
module-margin-left = 1 module-margin-left = 1
module-margin-right = 2 module-margin-right = 3
font-0 = "Noto Sans:size=14:style=Regular;1"
font-1 = unifont:fontformat=truetype:size=14:antialias=false;0
font-2 = FontAwesome:size=14;0
font-0 = FontAwesome:size=11;1
font-1 = Noto Mono:fontformat=truetype:size=11:antialias=true;1
font-2 = unifont:size=11;0
wm-restack = i3 wm-restack = i3
;override-redirect = true ;override-redirect = true
scroll-up = i3wm-wsnext scroll-up = i3wm-wsnext
scroll-down = i3wm-wsprev scroll-down = i3wm-wsprev
[bar/laptop]
monitor = ${env:MONITOR:eDP-1}
inherit = bar/base
tray-position = right
fixed-center = true
tray-padding = 2
modules-left = i3 xwindow
modules-right = spotify volume cpu memory battery1 date
[bar/example_left] [bar/example_left]
inherit = bar/example inherit = bar/base
monitor = ${env:MONITOR:HDMI-0} monitor = ${env:MONITOR:HDMI-0}
modules-left = i3 modules-left = i3
modules-center = xwindow modules-center = xwindow
@@ -62,22 +59,14 @@ tray-padding = 2
[bar/example_right] [bar/example_right]
inherit = bar/example inherit = bar/base
monitor = ${env:MONITOR:DP-4} monitor = ${env:MONITOR:DP-4}
modules-left = i3 modules-left = i3
[bar/example_laptop]
monitor = ${env:MONITOR:eDP-1}
inherit = bar/example
modules-left = i3
tray-position = right
tray-padding = 2
modules-right = spotify volume filesystemroot memory cpu battery1 battery2 date
modules-center = xwindow
[module/xwindow] [module/xwindow]
type = internal/xwindow type = internal/xwindow
label = %title:0:30:...% label = "> %title:0:75:...%"
[module/xkeyboard] [module/xkeyboard]
@@ -140,15 +129,16 @@ label-mode-foreground = #000
label-mode-background = ${colors.primary} label-mode-background = ${colors.primary}
label-focused = %icon% label-focused = %icon%
label-focused-background = ${module/bspwm.label-focused-background} label-focused-background = ${colors.green}
label-focused-underline = ${module/bspwm.label-focused-underline} label-focused-underline = ${colors.green}
label-focused-padding = ${module/bspwm.label-focused-padding} label-focused-padding = ${module/bspwm.label-focused-padding}
label-unfocused = %icon% label-unfocused = %icon%
label-unfocused-padding = ${module/bspwm.label-occupied-padding} label-unfocused-padding = ${module/bspwm.label-occupied-padding}
label-urgent = %icon% label-urgent = %icon%
label-urgent-background = ${module/bspwm.label-urgent-background} label-urgent-background = ${colors.red}
label-urgent-underline = ${colors.red}
label-urgent-padding = ${module/bspwm.label-urgent-padding} label-urgent-padding = ${module/bspwm.label-urgent-padding}
label-visible = %icon% label-visible = %icon%
@@ -202,29 +192,50 @@ card = intel_backlight
[module/cpu] [module/cpu]
type = internal/cpu type = internal/cpu
interval = 2 interval = 0.5
format-prefix-foreground = ${colors.foreground-alt}
format-underline = #f90000
label =  %percentage%%
format = <label> <ramp-coreload> format = <label> <ramp-coreload>
ramp-coreload-0 = - label = CPU
ramp-coreload-1 = 1 ramp-font = 2
ramp-coreload-2 = 2 ramp-coreload-0 =
ramp-coreload-3 = 3 ramp-coreload-font = 3
ramp-coreload-4 = 4 ramp-coreload-0-foreground = ${colors.green}
ramp-coreload-5 = 5 ramp-coreload-1 =
ramp-coreload-6 = 6 ramp-coreload-1-font = 2
ramp-coreload-7 = 7 ramp-coreload-1-foreground = ${colors.green}
ramp-coreload-8 = 8 ramp-coreload-2 =
ramp-coreload-9 = 9 ramp-coreload-2-font = 2
ramp-coreload-2-foreground = ${colors.green}
ramp-coreload-3 = ▄
ramp-coreload-3-font = 2
ramp-coreload-3-foreground = ${colors.green}
ramp-coreload-4 = ▅
ramp-coreload-4-font = 2
ramp-coreload-4-foreground = ${colors.yellow}
ramp-coreload-5 = ▆
ramp-coreload-5-font = 2
ramp-coreload-5-foreground = ${colors.yellow}
ramp-coreload-6 = ▇
ramp-coreload-6-font = 2
ramp-coreload-6-foreground = ${colors.red}
ramp-coreload-7 = █
ramp-coreload-7-font = 2
ramp-coreload-7-foreground = ${colors.red}
[module/memory] [module/memory]
type = internal/memory type = internal/memory
interval = 2 format = <label> <bar-used>
format-prefix-foreground = ${colors.foreground-alt} label = MEM
format-underline = #4bffdc
label =  %percentage_used%%
bar-used-indicator =
bar-used-width = 17
bar-used-foreground-0 = ${colors.green}
bar-used-foreground-1 = ${colors.yellow}
bar-used-foreground-2 = ${colors.red}
bar-used-fill = ▐
bar-used-empty = ▐
bar-used-empty-foreground = #444444
[module/wlan] [module/wlan]
type = internal/network type = internal/network
@@ -268,17 +279,16 @@ format-disconnected =
type = internal/date type = internal/date
interval = 1 interval = 1
date = " %d/%m/%y" date = %a %d %b %Y%%{F-}
date-alt = " %d/%m/%Y" date-alt = %a %d %b %Y%%{F-}
time = %H:%M time = %H:%M
time-alt = %H:%M:%S time-alt = %H:%M:%S
format-prefix-foreground = ${colors.foreground-alt} format-prefix-foreground = ${colors.foreground-alt}
format-underline = #0a6cf5
label = %time% %date% label = %time% %date%
format = <label> format = <label>
[module/volume] [module/volume]
type = internal/alsa type = internal/alsa
@@ -298,11 +308,11 @@ bar-volume-foreground-4 = #55aa55
bar-volume-foreground-5 = #f5a70a bar-volume-foreground-5 = #f5a70a
bar-volume-foreground-6 = #ff5555 bar-volume-foreground-6 = #ff5555
bar-volume-gradient = false bar-volume-gradient = false
bar-volume-indicator = X bar-volume-indicator =
bar-volume-indicator-font = 2 bar-volume-indicator-font = 2
bar-volume-fill = - bar-volume-fill =
bar-volume-fill-font = 2 bar-volume-fill-font = 2
bar-volume-empty = - bar-volume-empty =
bar-volume-empty-font = 2 bar-volume-empty-font = 2
bar-volume-empty-foreground = ${colors.foreground-alt} bar-volume-empty-foreground = ${colors.foreground-alt}
@@ -382,33 +392,29 @@ format =  <label>
[module/battery1] [module/battery1]
type = internal/battery type = internal/battery
full-at = 95
battery = BAT0 battery = BAT0
adapter = ADP1 adapter = ADP1
full-at = 98 time-format = %Hh:%Mm
format-charging = <animation-charging> <label-charging> label-charging = %time% full
format-charging-underline = #ffb52a format-charging = <label-charging>
label-full = Fully charged
format_full = <label-full>
label-discharging = %percentage%% %time% left
format-discharging = <ramp-capacity> <label-discharging> format-discharging = <ramp-capacity> <label-discharging>
format-discharging-underline = ${self.format-charging-underline}
format-full-prefix = " "
format-full-prefix-foreground = ${colors.foreground-alt}
format-full-underline = ${self.format-charging-underline}
ramp-capacity-0 =  ramp-capacity-0 = 
ramp-capacity-0-foreground = ${colors.red}
ramp-capacity-1 =  ramp-capacity-1 = 
ramp-capacity-1-foreground = ${colors.yellow}
ramp-capacity-2 =  ramp-capacity-2 = 
ramp-capacity-2-foreground = ${colors.green}
ramp-capacity-3 =  ramp-capacity-3 = 
ramp-capacity-3-foreground = ${colors.green}
ramp-capacity-4 =  ramp-capacity-4 = 
<!-- ramp-capacity-foreground = ${colors.foreground-alt} --> ramp-capacity-4-foreground = ${colors.green}
animation-charging-0 = animation-discharging-0 =
animation-charging-1 = 
animation-charging-2 = 
animation-charging-foreground = ${colors.foreground-alt}
animation-charging-framerate = 750
[module/battery2]
inherit = module/battery1
battery = BAT1

View File

@@ -8,6 +8,6 @@ while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
# Launch bar1 and bar2 # Launch bar1 and bar2
polybar -c ~/.config/polybar/config example_left & polybar -c ~/.config/polybar/config example_left &
polybar -c ~/.config/polybar/config example_right & polybar -c ~/.config/polybar/config example_right &
polybar -c ~/.config/polybar/config example_laptop & polybar -c ~/.config/polybar/config laptop &
echo "Bars launched..." echo "Bars launched..."