hlwm: fix monitor padding for lemonbar

This commit is contained in:
Lucas 2020-04-25 20:43:15 +00:00
parent 1c78cab349
commit 66ee27664d
2 changed files with 6 additions and 5 deletions

View file

@ -169,12 +169,13 @@ hc detect_monitors
if [ -f ~/.config/herbstluftwm/herbstpanel.sh ]; then
bar_height=$(($hlwm_font_height))
for m in $(hc list_monitors | cut -d : -f 1); do
hc pad "$m" 0 0 $bar_height 0
hc monitor_rect "$m" | {
read -r x y w h
y=$(($y + $h - $bar_height))
# `lemonbar -b` is relative from the bottom, so no need
# to do arithmetic in here
#y=$(($y + $h - $bar_height))
printf "%s\t%u\t%u\t%u\t%u\n" \
"$m" "$x" "$y" "$w" $bar_height
}
done | sh ~/.config/herbstluftwm/herbstpanel.sh
done | sh ~/.config/herbstluftwm/herbstpanel.sh &
fi