This repository has been archived on 2024-03-28. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/apps/de/polybar/run
2020-01-24 15:35:53 -06:00

20 lines
584 B
Bash
Executable file

#!/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