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
Daniel Flanagan 75ce979217
Fixes
2020-03-16 03:40:11 -05:00

26 lines
901 B
Bash
Executable file

#!/usr/bin/env sh
height="$(xrq polybar.height)"
margin="$(xrq polybar.margin)"
yoffset="$(xrq polybar.offset_y)"
window_margin="$(xrq bspwm.window_gap)"
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