]> code.delx.au - spectrwm/commitdiff
Tweak the urgency indicator default padding for urgent_collapse = 1.
authorReginald Kennedy <rk@rejii.com>
Thu, 14 May 2015 04:21:01 +0000 (12:21 +0800)
committerReginald Kennedy <rk@rejii.com>
Thu, 14 May 2015 05:05:40 +0000 (13:05 +0800)
e.g. * 1 3* -> *1 3*

Add clarification for urgent_collapse in the man page.

closes #96

spectrwm.1
spectrwm.c

index 811d16dca1e1fc721b95521c3d3517dcd35bd37e..71c53de787e964baaffe85f4924183cd409804e4 100644 (file)
@@ -445,8 +445,9 @@ Set this to the opposite of
 to collapse the border between tiles.
 Disable by setting to 0.
 .It Ic urgent_collapse
-Enables hiding of placeholders in the urgency hint indicator for workspaces that
-do not have any urgent windows.
+Minimizes the space consumed by the urgency hint indicator by removing the
+placeholders for non-urgent workspaces, the trailing space when there are
+urgent windows and the default leading space.
 Enable by setting to 1.
 .It Ic urgent_enabled
 Enable or disable the urgency hint indicator in the status bar.
index b894d0b920fc805eedf164e41374d521e0b6a33d..ac5d6cf6b1348646653c16f1c02eaf0716b14857 100644 (file)
@@ -2280,7 +2280,7 @@ bar_fmt(const char *fmtexp, char *fmtnew, struct swm_region *r, size_t sz)
 
        /* bar_urgent already adds the space before the last asterisk */
        if (urgent_enabled)
-               strlcat(fmtnew, "* +U*+4<", sz);
+               strlcat(fmtnew, (urgent_collapse ? "*+U*+4<" : "* +U*+4<"), sz);
 
        if (window_class_enabled) {
                strlcat(fmtnew, "+C", sz);