herbstluftwm: panel: add icon function

This commit is contained in:
Thomas Preisner 2016-12-08 23:04:09 +01:00
parent b3174e23e4
commit 2cbdc3112c

View file

@ -14,9 +14,11 @@ panel_width=${geometry[2]}
if [ "$HOSTNAME" = warthog ]; then
panel_height=30
font="-*-fixed-medium-*-*-*-26-*-*-*-*-*-*-*"
iconpath=${HOME}/.config/herbstluftwm/icons_large
else
panel_height=16
font="-*-fixed-medium-*-*-*-12-*-*-*-*-*-*-*"
iconpath=${HOME}/.config/herbstluftwm/icons
fi
bgcolor=$(hc get frame_border_normal_color)
selbg=$(hc get window_border_active_color)
@ -57,6 +59,11 @@ else
}
fi
# Icons
function icon() {
echo -n "^fg(#000000)^ro(1x$height)^fg()^bg(${color[${2}]})^fg(#151515) ^i(${iconpath}/${1}.xbm) ^fg(#000000)^ro(1x$height)^fg()^bg()"
}
hc pad $monitor $panel_height
{