From 66ee27664d615d7a68362284d52b240b9b3e8dee Mon Sep 17 00:00:00 2001 From: Lucas Date: Sat, 25 Apr 2020 20:43:15 +0000 Subject: [PATCH] hlwm: fix monitor padding for lemonbar --- xdg-config-dir/herbstluftwm/autostart | 7 ++++--- xdg-config-dir/herbstluftwm/herbstpanel.sh | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/xdg-config-dir/herbstluftwm/autostart b/xdg-config-dir/herbstluftwm/autostart index 6c3c328..add75a3 100755 --- a/xdg-config-dir/herbstluftwm/autostart +++ b/xdg-config-dir/herbstluftwm/autostart @@ -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 diff --git a/xdg-config-dir/herbstluftwm/herbstpanel.sh b/xdg-config-dir/herbstluftwm/herbstpanel.sh index ed34067..3871fc6 100644 --- a/xdg-config-dir/herbstluftwm/herbstpanel.sh +++ b/xdg-config-dir/herbstluftwm/herbstpanel.sh @@ -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