From cc7a249fae1734059ce4fc3bd0dc9f1664ee1cbc Mon Sep 17 00:00:00 2001 From: Donovan Glover Date: Sat, 20 Oct 2018 12:52:06 -0400 Subject: [PATCH] polybar: Add labels for bspwm status Now that I understand the difference between the monocle desktop layout and the fullscreen state of a node, it became clear that I would probably use both. Since I use the single_monocle config option, desktops with the tiled layout may contain a monocle node, so I needed a way to tell which layout a desktop was running. I initially thought about using sxhkd to send a notification with the layout portion of bspc query -T -d, however polybar supports showing the layout natively, so I don't need to use a keybind. The layout portion of the polybar config may not be needed if, for example, you decide to disable single_monocle and there is no ambiguity between fullscreen nodes and monocle desktops. --- .config/polybar/config | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.config/polybar/config b/.config/polybar/config index 55f84efb..f3c67877 100644 --- a/.config/polybar/config +++ b/.config/polybar/config @@ -77,6 +77,22 @@ wm-restack = bspwm type = internal/bspwm pin-workspaces = true +format = +label-monocle =  monocle mode +label-locked =  Locked +label-private =  Private +label-sticky =  Sticky + +label-monocle-padding = 1 +label-locked-padding = 1 +label-private-padding = 1 +label-sticky-padding = 1 + +label-monocle-foreground = ${color.yellow} +label-locked-foreground = ${color.background-alt} +label-private-foreground = ${color.background-alt} +label-sticky-foreground = ${color.background-alt} + label-focused-foreground = ${color.text} label-urgent-foreground = ${color.yellow} label-occupied-foreground = ${color.background-alt}