polybar: clean up config

This commit is contained in:
Inhji 2021-08-02 23:25:22 +02:00
parent 968af65124
commit 4b06d57e7c
2 changed files with 79 additions and 113 deletions

View File

@ -18,34 +18,32 @@
[colors]
f_high = #ffffff
f_med = #ffffff
f_low = #ffffff
f_med = #e47464
f_low = #66606b
f_inv = #000000
b_high = #000000
b_med = #201e21
b_low = #322e33
b_inv = #e47464
background = #29272b
background-alt = #444
foreground = #dfdfdf
foreground-alt = #555
primary = #ffb52a
secondary = #e60053
alert = #bd2c40
[bar/example]
monitor = ${env:MONITOR:HDMI-1}
; ---------------------------- BAR DEFAULT ----------------------------
[base]
width = 100%
height = 27
;offset-x = 1%
;offset-y = 1%
radius = 6.0
fixed-center = true
height = 35
radius = 0
background = ${colors.background}
foreground = ${colors.foreground}
foreground = ${colors.f_high}
line-size = 0
line-color = #f00
border-size = 0
border-color = #00000000
padding-left = 0
padding-right = 2
@ -53,48 +51,57 @@ padding-right = 2
module-margin-left = 1
module-margin-right = 2
font-0 = cascadia code:fontformat=truetype:size=12:antialias=true;0
#font-0 = fixed:pixelsize=10;1
#font-1 = unifont:fontformat=truetype:size=8:antialias=false;0
#font-3 = siji:pixelsize=10;1
fixed-center = true
wm-restack = i3
;override-redirect = true
modules-center = date xwindow
modules-left = i3
modules-right = memory cpu eth powermenu
font-0 = cascadia code:fontformat=truetype:size=12:antialias=true;0
;font-0 = fixed:pixelsize=10;1
;font-1 = unifont:fontformat=truetype:size=8:antialias=false;0
;font-3 = siji:pixelsize=10;1
; ---------------------------- BAR 1 ----------------------------
[bar/main]
inherit = base
monitor = ${env:MONITOR:HDMI-1}
modules-left = i3 xwindow
modules-right = filesystem memory cpu eth xkeyboard date
tray-position = right
tray-padding = 2
;tray-background = #0063ff
tray-background = #0063ff
wm-restack = i3
; ---------------------------- BAR 2 ----------------------------
;override-redirect = true
[bar/side]
inherit = base
monitor = ${env:MONITOR:VGA-1}
fixed-center = true
scroll-up = i3wm-wsnext
scroll-down = i3wm-wsprev
modules-left = i3 xwindow
modules-right = powermenu date
cursor-click = pointer
cursor-scroll = pointer
; ---------------------------- MODULES ----------------------------
[module/xwindow]
type = internal/xwindow
label = %title:0:30:...%
label = %title:0:80:...%
[module/xkeyboard]
type = internal/xkeyboard
blacklist-0 = num lock
format-prefix = " "
format-prefix-foreground = ${colors.foreground-alt}
format-prefix-underline = ${colors.secondary}
format-prefix = "kbd "
format-prefix-foreground = ${colors.f_med}
label-layout = %layout%
label-layout-underline = ${colors.secondary}
label-indicator-padding = 2
label-indicator-margin = 1
label-indicator-background = ${colors.secondary}
label-indicator-underline = ${colors.secondary}
label-indicator-foreground = ${colors.f_med}
label-indicator-background = ${colors.b_med}
[module/filesystem]
type = internal/fs
@ -103,9 +110,8 @@ interval = 25
mount-0 = /
mount-1 = /home
label-mounted = %{F#e47464}%mountpoint%%{F-}: %percentage_used%%
label-mounted = %{F#e47464}%mountpoint%%{F-} %percentage_used%%
label-unmounted = %mountpoint% not mounted
label-unmounted-foreground = ${colors.foreground-alt}
[module/i3]
type = internal/i3
@ -114,26 +120,29 @@ index-sort = true
wrapping-scroll = false
; Only show workspaces on the same output as the bar
;pin-workspaces = true
pin-workspaces = true
; modes
label-mode-padding = 2
label-mode-foreground = #000
label-mode-background = ${colors.primary}
label-mode-foreground = ${colors.f_inv}
label-mode-background = ${colors.b_inv}
; focused = Active workspace on focused monitor
label-focused = %index%
label-focused-background = ${colors.background-alt}
label-focused-underline= ${colors.primary}
label-focused-background = ${colors.b_high}
label-focused-foreground = ${colors.f_high}
label-focused-padding = 2
; unfocused = Inactive workspace on any monitor
label-unfocused = %index%
label-unfocused-padding = 2
label-unfocused-background = ${colors.background}
label-unfocused-foreground = ${colors.f_low}
; visible = Active workspace on unfocused monitor
label-visible = %index%
label-visible-background = ${self.label-focused-background}
label-visible-underline = ${self.label-focused-underline}
label-visible-background = ${colors.b_med}
label-visible-foreground = ${colors.f_low}
label-visible-padding = ${self.label-focused-padding}
; urgent = Workspace with urgency hint set
@ -141,34 +150,42 @@ label-urgent = %index%
label-urgent-background = ${colors.alert}
label-urgent-padding = 2
; Separator in between workspaces
; label-separator = |
[module/cpu]
type = internal/cpu
interval = 2
format-prefix = "CPU "
format-prefix-foreground = ${colors.foreground-alt}
format-underline = #f90000
format = <label> <ramp-coreload>
format-prefix = "cpu "
format-prefix-foreground = ${colors.f_med}
label = %percentage:2%%
; Spacing between individual per-core ramps
ramp-coreload-spacing = 0
ramp-coreload-0 = ▁
ramp-coreload-1 = ▂
ramp-coreload-2 = ▃
ramp-coreload-3 = ▄
ramp-coreload-4 = ▅
ramp-coreload-5 = ▆
ramp-coreload-6 = ▇
ramp-coreload-7 = █
[module/memory]
type = internal/memory
interval = 2
format-prefix = "MEM "
format-prefix-foreground = ${colors.foreground-alt}
format-underline = #4bffdc
format-prefix = "mem "
format-prefix-foreground = ${colors.f_low}
label = %percentage_used%%
[module/eth]
type = internal/network
interface = eno1
interface = enp5s0
interval = 3.0
format-connected = <label-connected>
format-connected-underline = #55aa55
format-connected-prefix = "ETH "
format-connected-prefix-foreground = ${colors.foreground-alt}
label-connected = %local_ip%
format-connected-prefix = "eth "
format-connected-prefix-foreground = ${colors.f_med}
label-connected = %downspeed:9%
format-disconnected =
;format-disconnected = <label-disconnected>
@ -188,7 +205,7 @@ time-alt = %H:%M:%S
format-prefix = 
format-prefix-foreground = ${colors.foreground-alt}
format-underline = #e47464
format-underline = ${colors.f_med}
label = %date% %time%
@ -247,58 +264,6 @@ bar-volume-empty = ─
bar-volume-empty-font = 2
bar-volume-empty-foreground = ${colors.foreground-alt}
[module/battery]
type = internal/battery
battery = BAT0
adapter = ADP1
full-at = 98
format-charging = <animation-charging> <label-charging>
format-charging-underline = #ffb52a
format-discharging = <animation-discharging> <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-1 = 
ramp-capacity-2 = 
ramp-capacity-foreground = ${colors.foreground-alt}
animation-charging-0 = 
animation-charging-1 = 
animation-charging-2 = 
animation-charging-foreground = ${colors.foreground-alt}
animation-charging-framerate = 750
animation-discharging-0 = 
animation-discharging-1 = 
animation-discharging-2 = 
animation-discharging-foreground = ${colors.foreground-alt}
animation-discharging-framerate = 750
[module/temperature]
type = internal/temperature
thermal-zone = 0
warn-temperature = 60
format = <ramp> <label>
format-underline = #f50a4d
format-warn = <ramp> <label-warn>
format-warn-underline = ${self.format-underline}
label = %temperature-c%
label-warn = %temperature-c%
label-warn-foreground = ${colors.secondary}
ramp-0 = 
ramp-1 = 
ramp-2 = 
ramp-foreground = ${colors.foreground-alt}
[module/powermenu]
type = custom/menu

View File

@ -2,4 +2,5 @@
killall -q polybar
polybar example 2>&1 | tee -a /tmp/polybar1.log & disown
polybar main 2>&1 | tee -a /tmp/polybar_main.log & disown
polybar side 2>&1 | tee -a /tmp/polybar_main.log & disown