herbstluftwm: panel: ensure compatibility with custom functions

This commit is contained in:
Thomas Preisner 2016-12-08 23:28:57 +01:00
parent 79c9582b13
commit 0e66bbc27a

View file

@ -142,7 +142,8 @@ hc pad $monitor $panel_height
echo -n "$separator" echo -n "$separator"
echo -n "^bg()^fg() ${windowtitle//^/^^}" echo -n "^bg()^fg() ${windowtitle//^/^^}"
# small adjustments # small adjustments
right="$separator^bg() $date $separator" right=""
right="${right} ^bg() $(icon clock2 green) $date"
right_text_only=$(echo -n "$right" | sed 's.\^[^(]*([^)]*)..g') right_text_only=$(echo -n "$right" | sed 's.\^[^(]*([^)]*)..g')
# get width of right aligned text.. and add some space.. # get width of right aligned text.. and add some space..
width=$($textwidth "$font" "$right_text_only ") width=$($textwidth "$font" "$right_text_only ")