Add MPD current position bar, and compact sysmon

The sysmon (CPU, memory, temperature) turned out ugly, this is
definitely going to change!
This commit is contained in:
M1dgard 2018-04-18 05:23:49 +02:00
parent ef5fce8e32
commit f8a8ced6ee
Signed by untrusted user who does not match committer: midgard
GPG key ID: 511C112F1331BBB4
2 changed files with 79 additions and 48 deletions

View file

@ -8,12 +8,15 @@
;===================================================== ;=====================================================
[colors] [colors]
background = #000 background = #000
background-alt = #444 background-alt = #222
foreground = #dfdfdf background-selected = #444
foreground-alt = #777 background-alert = #bd2c40
alert-fg = #ff4e4e
alert-bg = #bd2c40 foreground = #dfdfdf
foreground-alt = #777
foreground-caution = #bd2c40
foreground-alert = #ff4e4e
[bar/midbard] [bar/midbard]
;enable-ipc = true ;enable-ipc = true
@ -34,13 +37,20 @@ padding-right = 3
module-margin-left = 6 module-margin-left = 6
module-margin-right = 6 module-margin-right = 6
font-0 = "Fira Sans:size=10;1" font-0 = "Fira Sans:size=10;1"
font-1 = fixed:pixelsize=10;1 font-1 = fixed:pixelsize=10;1
font-2 = "Material Icons:pixelsize=14;3" font-2 = "Material Icons:pixelsize=14;3"
font-3 = "Fira Sans:size=12;1" font-3 = "Fira Sans:size=12;1"
font-4 = "Fira Mono:size=10;1" ; MPD song name
font-5 = "Weather Icons:size=10;1" font-4 = "Fira Mono:size=7;0"
font-6 = "Material Wifi Signal strength:pixelsize=14;2" font-5 = "Weather Icons:size=10;1"
font-6 = "Material Wifi Signal strength:pixelsize=14;2"
; MPD song position
font-7 = "Fira Mono:size=7;-1"
; CPU graph
font-8 = "Fira Mono:size=8;6"
; RAM and temperature
font-9 = "Fira Mono:size=7;-7"
modules-left = i3 volume mpd-local mpd-online-1 mpd-online-2 modules-left = i3 volume mpd-local mpd-online-1 mpd-online-2
modules-center = date modules-center = date
@ -84,14 +94,14 @@ label-unmounted-foreground = ${colors.foreground-alt}
type = internal/bspwm type = internal/bspwm
label-focused = %index% label-focused = %index%
label-focused-background = ${colors.background-alt} label-focused-background = ${colors.background-selected}
label-focused-padding = 2 label-focused-padding = 2
label-occupied = %index% label-occupied = %index%
label-occupied-padding = 2 label-occupied-padding = 2
label-urgent = %index%! label-urgent = %index%!
label-urgent-background = ${colors.alert-bg} label-urgent-background = ${colors.background-alert}
label-urgent-padding = 2 label-urgent-padding = 2
label-empty = %index% label-empty = %index%
@ -132,7 +142,9 @@ label-urgent-padding = ${module/bspwm.label-urgent-padding}
[mpd-shared] [mpd-shared]
type = internal/mpd type = internal/mpd
format-online = <toggle> <icon-prev> <label-song> <icon-next>
format-online = <toggle> <icon-prev> %{T8}<bar-progress>%{T-}%{O-126}%{T5}<label-song>%{T-} <icon-next>
small-format-online = <toggle> <icon-prev> %{T8}<bar-progress>%{T-}%{O-51}%{T5}<label-song>%{T-} <icon-next>
icon-prev = icon-prev =
icon-prev-foreground = ${colors.foreground-alt} icon-prev-foreground = ${colors.foreground-alt}
@ -180,8 +192,10 @@ host = ${env:MPD_ONLINE_2_HOST}
port = ${env:MPD_ONLINE_2_PORT} port = ${env:MPD_ONLINE_2_PORT}
password = ${env:MPD_ONLINE_2_PASS} password = ${env:MPD_ONLINE_2_PASS}
label-song-maxlen = ${mpd-shared.small-label-song-maxlen} format-online = ${mpd-shared.small-format-online}
label-song-foreground = ${colors.foreground-alt}
label-song-maxlen = ${mpd-shared.small-label-song-maxlen}
label-song-foreground = ${colors.foreground-alt}
bar-progress-width = ${mpd-shared.small-bar-progress-width} bar-progress-width = ${mpd-shared.small-bar-progress-width}
@ -211,8 +225,8 @@ card = intel_backlight
type = internal/cpu type = internal/cpu
interval = 2 interval = 2
;format-prefix = " " ;format-prefix = " "
format = <ramp-coreload>%{O-80} format = %{T9}%{F#222}▔%{O-1}▔%{O-1}▔%{O-1}▔%{O-1}▔%{O-1}▔%{O-1}▔%{O-43}▁%{O-1}▁%{O-1}▁%{O-1}▁%{O-1}▁%{O-1}▁%{O-1}▁%{T-}%{F}%{O-40}<ramp-coreload>%{O-76}
format-foreground = #555 format-foreground = ${colors.foreground-alt}
format-prefix-foreground = ${colors.foreground-alt} format-prefix-foreground = ${colors.foreground-alt}
@ -222,21 +236,56 @@ format-prefix-foreground = ${colors.foreground-alt}
; %percentage-core[1-9]% - load percentage for specific core ; %percentage-core[1-9]% - load percentage for specific core
label = %percentage%% label = %percentage%%
ramp-coreload-0 = ramp-coreload-0 = " "
ramp-coreload-1 = ramp-coreload-1 =
ramp-coreload-2 = ramp-coreload-2 =
ramp-coreload-3 = ramp-coreload-3 =
ramp-coreload-4 = ramp-coreload-4 =
ramp-coreload-5 = ramp-coreload-5 =
ramp-coreload-6 = ramp-coreload-6 =
ramp-coreload-7 = ramp-coreload-7 =
ramp-coreload-7-foreground = ${colors.foreground-caution}
ramp-coreload-8 =
ramp-coreload-8-foreground = ${colors.foreground-alert}
ramp-coreload-font = 9
[module/memory] [module/memory]
type = internal/memory type = internal/memory
interval = 2 interval = 2
format = "%{T5}<label>%{T-}%{O-15}" ;format = "%{T10}<label>%{T-}%{O-31}"
label = "%percentage_used:3%%" label = "%percentage_used:3%%"
format = "<bar-used>%{O-33}"
bar-used-width = 7
bar-used-indicator =
bar-used-fill =
bar-used-fill-font = 10
bar-used-foreground-0 = ${colors.foreground-alt}
bar-used-foreground-1 = ${colors.foreground-alt}
bar-used-foreground-2 = ${colors.foreground-caution}
bar-used-foreground-3 = ${colors.foreground-alert}
bar-used-empty =
bar-used-empty-font = 10
bar-used-empty-foreground = #222
[module/temperature]
type = internal/temperature
thermal-zone = 0
warn-temperature = 80
;format = <ramp> <label>
format = %{T10}<label>%{T-}
format-warn = "%{T10}<label-warn>%{T-}"
format-warn-foreground = ${colors.foreground-alert}
label = %temperature:2:2%
label-warn = ${self.label}
ramp-0 =
ramp-1 =
ramp-2 =
ramp-foreground = ${colors.foreground-alt}
[module/wlan] [module/wlan]
type = internal/network type = internal/network
interface = wlp5s0 interface = wlp5s0
@ -345,24 +394,6 @@ animation-charging-2 = 
animation-charging-foreground = ${colors.foreground-alt} animation-charging-foreground = ${colors.foreground-alt}
animation-charging-framerate = 750 animation-charging-framerate = 750
[module/temperature]
type = internal/temperature
thermal-zone = 0
warn-temperature = 80
;format = <ramp> <label>
format = %{T6}<label>%{T-}
format-warn = "%{T4} %{T6}<label-warn>%{T-}"
format-warn-foreground = ${colors.alert-fg}
label = %temperature%
label-warn = ${self.label}
ramp-0 =
ramp-1 =
ramp-2 =
ramp-foreground = ${colors.foreground-alt}
[module/powermenu] [module/powermenu]
type = custom/menu type = custom/menu

View file

@ -13,7 +13,7 @@ while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
source "$(dirname "$0")"/secrets.sh source "$(dirname "$0")"/secrets.sh
set +o allexport set +o allexport
polybar --config="$HOME/.config/polybar/config.ini" midbard & polybar --config="$HOME/.config/polybar/config.ini" midbard
) )
echo "Polybar launched." echo "Polybar launched."