#!/usr/bin/env sh height="$(xrq polybar.height)" margin="$(xrq polybar.margin)" yoffset="$(xrq polybar.offset_y)" eheight="$((height + margin + yoffset))" bar_monitor="$(xrq polybar.display_monitor)" # TODO: if bspwm is the active window manager if has_command bspc; then if [ ! "$(xrq polybar.bottom_of_display)" = "true" ]; then bspc config -m "${bar_monitor}" top_padding "$eheight" bspc config -m "${bar_monitor}" bottom_padding "0" else bspc config -m "${bar_monitor}" top_padding "0" bspc config -m "${bar_monitor}" bottom_padding "$eheight" fi fi polybar lytedev