hlwm: fix monitor padding for lemonbar
This commit is contained in:
parent
1c78cab349
commit
66ee27664d
@ -169,12 +169,13 @@ hc detect_monitors
|
|||||||
if [ -f ~/.config/herbstluftwm/herbstpanel.sh ]; then
|
if [ -f ~/.config/herbstluftwm/herbstpanel.sh ]; then
|
||||||
bar_height=$(($hlwm_font_height))
|
bar_height=$(($hlwm_font_height))
|
||||||
for m in $(hc list_monitors | cut -d : -f 1); do
|
for m in $(hc list_monitors | cut -d : -f 1); do
|
||||||
hc pad "$m" 0 0 $bar_height 0
|
|
||||||
hc monitor_rect "$m" | {
|
hc monitor_rect "$m" | {
|
||||||
read -r x y w h
|
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" \
|
printf "%s\t%u\t%u\t%u\t%u\n" \
|
||||||
"$m" "$x" "$y" "$w" $bar_height
|
"$m" "$x" "$y" "$w" $bar_height
|
||||||
}
|
}
|
||||||
done | sh ~/.config/herbstluftwm/herbstpanel.sh
|
done | sh ~/.config/herbstluftwm/herbstpanel.sh &
|
||||||
fi
|
fi
|
||||||
|
@ -66,8 +66,8 @@ while IFS=" " read -r m x y w h; do
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
printf "%s%s%s\n" "$left" "$center" "$right"
|
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" &
|
-B "$hlwm_background" -F "$hlwm_foreground" -f "$hlwm_face" &
|
||||||
done
|
done
|
||||||
herbstclient -w reload >/dev/null
|
herbstclient -w reload
|
||||||
kill 0
|
kill 0
|
||||||
|
Loading…
Reference in New Issue
Block a user