From 6e864f0e64506912ae9a7117b9c2194c0d0e24fd Mon Sep 17 00:00:00 2001 From: Severin Kaderli Date: Sun, 30 Dec 2018 23:16:27 +0100 Subject: [PATCH 1/3] Show tray on the bottom bar on the left side Signed-off-by: Severin Kaderli --- system/.config/polybar/config | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/system/.config/polybar/config b/system/.config/polybar/config index 211a2fc..00b3861 100644 --- a/system/.config/polybar/config +++ b/system/.config/polybar/config @@ -42,7 +42,7 @@ separator = | scroll-up = i3wm-desknext scroll-down = i3wm-deskprev -tray-position = right +tray-position = none [bar/top2] inherit = bar/top @@ -54,11 +54,12 @@ bottom = true modules-left = modules-center = modules-right = music +tray-position = left [bar/bottom2] inherit = bar/bottom monitor = eDP-1 - +tray-position = none [module/i3] type = internal/i3 From 68caf3e6453ec8df44f2daf385da9280aae24e84 Mon Sep 17 00:00:00 2001 From: Severin Kaderli Date: Mon, 31 Dec 2018 00:11:13 +0100 Subject: [PATCH 2/3] Clean up polybar configuration Signed-off-by: Severin Kaderli --- system/.config/polybar/config | 212 +++++++++++++++++++++------------- 1 file changed, 131 insertions(+), 81 deletions(-) diff --git a/system/.config/polybar/config b/system/.config/polybar/config index 00b3861..fc0aba1 100644 --- a/system/.config/polybar/config +++ b/system/.config/polybar/config @@ -9,45 +9,55 @@ # # USAGE: # This file is automatically used by Polybar. -[colors] -background = #222D32 -foreground = #A1B0B8 +####################################### +# Variables +####################################### +[settings] +padding = 4 +background-color = #222D32 +foreground-color = #A1B0B8 +bar-height = 35 + +####################################### +# Top bar +####################################### [bar/top] monitor = HDMI-1 + width = 100% -height = 35 +height = ${settings.bar-height} offset-x = 0 offset-y = 0 -background = ${colors.background} -foreground = ${colors.foreground} - -padding-right = 2 -module-margin = 2 - font-0 = Noto Sans:pixelsize=12;3 font-1 = Noto Sans CJK JP:pixelsize=12;3 font-2 = Font Awesome 5 Free:style=Solid::pixelsize=12;3 font-3 = Font Awesome 5 Brands:pixelsize=12;3 font-4 = siji:pixelsize=12;3 +background = ${settings.background-color} +foreground = ${settings.foreground-color} + +padding-right = 2 +module-margin = 2 modules-left = i3 modules-center = xwindow modules-right = battery volume backlight wlan date power +tray-position = none separator = | -#wm-restack = i3 - scroll-up = i3wm-desknext scroll-down = i3wm-deskprev -tray-position = none - [bar/top2] inherit = bar/top monitor = eDP-1 + +####################################### +# Bottom bar +####################################### [bar/bottom] inherit = bar/top bottom = true @@ -61,9 +71,12 @@ inherit = bar/bottom monitor = eDP-1 tray-position = none + +####################################### +# i3 workspaces +####################################### [module/i3] type = internal/i3 -# Only show workspaces on the same output as the bar pin-workspaces = true strip-wsnumbers = true index-sort = true @@ -71,71 +84,64 @@ enable-click = true enable-scroll = true wrapping-scroll = false -label-mode = %mode% -label-mode-padding = 1 +format = +label-mode = [ %mode% ] +label-mode-padding = ${settings.padding} label-focused = %name% -label-focused-foreground = ${colors.background} -label-focused-background = ${colors.foreground} -label-focused-padding = 4 +label-focused-foreground = ${settings.background-color} +label-focused-background = ${settings.foreground-color} +label-focused-padding = ${settings.padding} label-unfocused = %name% -label-unfocused-padding = 4 +label-unfocused-padding = ${settings.padding} label-visible = %name% -label-visible-padding = 4 +label-visible-padding = ${settings.padding} label-urgent = %name% -label-urgent-foreground = ${colors.foreground} -label-urgent-background = ${colors.background} -label-urgent-padding = 4 +label-urgent-foreground = ${settings.foreground-color} +label-urgent-background = ${settings.background-color} +label-urgent-padding = ${settings.padding} + +####################################### +# Active window title +####################################### [module/xwindow] type = internal/xwindow -label = %title:0:50:...% -[module/date] -type = custom/script -exec = date +"%F %H:%M:%S" -format = 