diff options
-rwxr-xr-x | .config/herbstluftwm/panel-bot.sh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/.config/herbstluftwm/panel-bot.sh b/.config/herbstluftwm/panel-bot.sh index 4a3bc18..a42ea1e 100755 --- a/.config/herbstluftwm/panel-bot.sh +++ b/.config/herbstluftwm/panel-bot.sh @@ -8,7 +8,6 @@ monitor=${1:-0} hc attr "monitors.$monitor" > /dev/null || { printf "Invalid monitor $monitor" && exit 1 ; } -monitor_tag="$(herbstclient attr "monitors.$monitor.tag")" monitor_offset_x=$(hc monitor_rect "$monitor" | awk '{print $1 }') monitor_offset_y=$(hc monitor_rect "$monitor" | awk '{print $2 }') monitor_width=$(hc monitor_rect "$monitor" | awk '{ print $3 }') @@ -32,6 +31,9 @@ panel_offset_y=$(( monitor_offset_y + monitor_height - panel_height )) # Declare clients as an array declare -a clients + # Check which tag the monitor is on now + monitor_tag="$(herbstclient attr "monitors.$monitor.tag")" + # Collect all clients on the monitor for client in $(hc attr clients | grep '0x') do |