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-02-12 09:49:29 -06:00

24 lines
861 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)"
# export BAR_FONT_DECLARATION="${BAR_FONT}:pixelsize=${BAR_FONT_SIZE};1"
# export BAR_ICON_FONT_DECLARATION="${BAR_ICON_FONT}:style=Solid:pixelsize=${BAR_ICON_FONT_SIZE};1"
# export BAR_ICON_FONT_2_DECLARATION="${BAR_ICON_FONT_2}:style=Regular:pixelsize=${BAR_ICON_FONT_SIZE};1"
# TODO: if bspwm is the active window manager
if has_command bspc; then
if [ ! "$(xrq polybar.bottom_of_display)" -eq 1 ]; 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