From a43249dc9ceb494a172c25a1a06c69b0543949ce Mon Sep 17 00:00:00 2001 From: Tobias Reisinger Date: Fri, 16 Apr 2021 10:20:05 +0200 Subject: [PATCH] Add bsp-layout to polybar --- .config/polybar/bars.ini | 4 ++-- .config/polybar/custom.ini | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.config/polybar/bars.ini b/.config/polybar/bars.ini index 6f13b11..4a13bef 100644 --- a/.config/polybar/bars.ini +++ b/.config/polybar/bars.ini @@ -50,7 +50,7 @@ [bar/portalo-base] inherit = bar/base - modules-left = bspwm + modules-left = bspwm bsp-layout modules-center = mpd modules-right = memory cpu temperature eth check-arch-updates date @@ -71,7 +71,7 @@ [bar/laptop-base] inherit = bar/base - modules-left = bspwm + modules-left = bspwm bsp-layout modules-center = mpd modules-right = pulseaudio battery xbacklight memory cpu temperature wlan eth check-arch-updates date powermenu diff --git a/.config/polybar/custom.ini b/.config/polybar/custom.ini index 0a70a0c..902a585 100644 --- a/.config/polybar/custom.ini +++ b/.config/polybar/custom.ini @@ -23,3 +23,17 @@ click-left = alacritty -e sh -c "$HOME/.local/bin/archlinux-update; checkupdates > $HOME/.cache/archlinux-updates.txt; read" & label = %output% + +[module/bsp-layout] + type = custom/script + exec = bsp-layout get $(bspc query -D --names -d focused) + interval = 0.1 + + format-prefix = " " + format-prefix-foreground = ${colors.foreground} + format-underline = ${colors.red} + format =