From 6a0e9d2d238f6002fdca5f42ec24b00ee1446583 Mon Sep 17 00:00:00 2001 From: Marcel Kapfer Date: Fri, 22 Jan 2021 10:19:09 +0100 Subject: [PATCH] [herbstluftwm] Adjust padding for polybar monitor-sensitive --- herbstluftwm/autostart | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/herbstluftwm/autostart b/herbstluftwm/autostart index 011b54b..6eddba5 100755 --- a/herbstluftwm/autostart +++ b/herbstluftwm/autostart @@ -183,8 +183,17 @@ hc unlock # or simply: hc detect_monitors -# make room for the panel -hc pad 0 22 +# make room for the panel, depending on how many monitors are configured +monitor_amount=$(hc list_monitors | wc -l) + +case "$monitor_amount" in + [2-3]) + hc pad 1 22 + ;; + *) + hc pad 0 22 + ;; +esac # find the panel panel=~/.config/herbstluftwm/panel.sh