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

View File

@ -66,8 +66,8 @@ while IFS=" " read -r m x y w h; do
;;
esac
printf "%s%s%s\n" "$left" "$center" "$right"
done | lemonbar-xft -g "${w}x${h}+${x}+${y}" \
done | lemonbar-xft -b -g "${w}x${h}+${x}+${y}" \
-B "$hlwm_background" -F "$hlwm_foreground" -f "$hlwm_face" &
done
herbstclient -w reload >/dev/null
herbstclient -w reload
kill 0