From b9d295d45cb700fdf8bd13e82c989d99f3b49a98 Mon Sep 17 00:00:00 2001 From: Vlad Doster Date: Sat, 4 Jan 2020 23:57:26 -0500 Subject: [PATCH 1/2] Made polybar more extensible --- .config/polybar/config | 2 +- .local/bin/launch_polybar | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.config/polybar/config b/.config/polybar/config index 78e78d42..38af3a9a 100644 --- a/.config/polybar/config +++ b/.config/polybar/config @@ -21,7 +21,7 @@ background = #1d2021 foreground = #ebdbb2 [bar/main] -monitor = ${env:MONITOR:eDP-1-1} +monitor = ${env:MONITOR:} enable-ipc = true width = 100% height = 20 diff --git a/.local/bin/launch_polybar b/.local/bin/launch_polybar index ccd8158b..20b1029a 100755 --- a/.local/bin/launch_polybar +++ b/.local/bin/launch_polybar @@ -3,6 +3,12 @@ # Terminate already running bar instances killall -q polybar -for i in $(polybar -m | awk -F: '{print $1}'); do MONITOR=$i polybar main & done +if type "xrandr"; then + for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do + MONITOR=$m polybar --reload main & + done +else + polybar --reload main & +fi echo "Bars launched..." From 1bde7817489cede22cd0ffa987738e5a4b5ac7f6 Mon Sep 17 00:00:00 2001 From: Vlad Doster Date: Sun, 5 Jan 2020 23:01:33 -0500 Subject: [PATCH 2/2] fix(polybar config): added pin workspaces option --- .config/polybar/config | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.config/polybar/config b/.config/polybar/config index 38af3a9a..1899b86f 100644 --- a/.config/polybar/config +++ b/.config/polybar/config @@ -130,6 +130,8 @@ format = index-sort = true wrapping-scroll = false +pin-workspaces = true + label-mode-padding = 1 label-mode-foreground = ${colors.white} label-mode-background = ${colors.darkyellow}