read bar colours from xrdb

This commit is contained in:
ktyl 2021-08-21 17:57:24 +01:00
parent 266e081c92
commit 04f1e195d0
4 changed files with 39 additions and 12 deletions

View File

@ -3,12 +3,12 @@ sxhkd & # enable keybinds
. $SCRIPTS/comp # mblur . $SCRIPTS/comp # mblur
. $SCRIPTS/keeb # caps lock -> ctrl+esc . $SCRIPTS/keeb # caps lock -> ctrl+esc
. $SCRIPTS/bar/launch # bar
redshift -l 53:0 & # make our eyes less strained redshift -l 53:0 & # make our eyes less strained
mopdiy & # bops mopidy & # bops
xbanish & # fuck off cursor xbanish & # fuck off cursor
udiskie & # external drive management udiskie & # external drive management
dunst & # notifs
#asusd-user & #asusd-user &

View File

@ -5,13 +5,22 @@ export BSPWM_CONFIG="${XDG_CONFIG_HOME:-$HOME/.config}/bspwm"
# theme colours # theme colours
. "${HOME}/.cache/wal/colors.sh" . "${HOME}/.cache/wal/colors.sh"
# launch bar
. $SCRIPTS/bar/launch
bspc monitor --reset-desktops 1 2 3 4 5 6 7 8 9 0 bspc monitor --reset-desktops 1 2 3 4 5 6 7 8 9 0
bspc config border_width 0 bspc config border_width 0
bspc config window_gap 0 bspc config window_gap 0
bspc config top_padding 27 visible=$CONFIG/polybar/.visible
bspc config bottom_padding 0
vpadding=0
hpadding=0
bspc config top_padding $vpadding
bspc config bottom_padding $vpadding
bspc config left_padding $hpadding
bspc config right_padding $hpadding
bspc config split_ratio 0.52 bspc config split_ratio 0.52
bspc config borderless_monocle true bspc config borderless_monocle true

View File

@ -1,7 +1,20 @@
#!/usr/bin/env bash #!/usr/bin/env bash
polybar example & # launch bar export BAR_VISIBILITY=$CONFIG/polybar/.visible
touch $CONFIG/polybar/visible # create a file to keep track of the bar's visibility [[ -f $BAR_VISIBILITY ]] && rm $BAR_VISIBILITY
# create a file to keep track of the bar's visibility
# file exists -> bar visible # file exists -> bar visible
# file doesnt exist -> bar hidden # file doesnt exist -> bar hidden
#touch $BAR_VISIBILITY
# terminate already running bar instances
killall -q polybar
# wait until the processes have been shut down
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
# launch bar
polybar example & # launch bar
#touch $BAR_VISIBILITY

View File

@ -1,16 +1,21 @@
#!/usr/bin/env bash #!/usr/bin/env bash
visible=$CONFIG/polybar/visible visible=$CONFIG/polybar/.visible
barheight=27 barheight=27
padding=0
if [ -f $visible ]; then if [ -f $visible ]; then
bspc config top_padding 0
polybar-msg cmd hide polybar-msg cmd hide
rm $visible rm $visible
else else
bspc config top_padding 27 #bspc config top_padding ((padding+$barheight))
polybar-msg cmd show polybar-msg cmd show
((padding=padding+barheight))
touch $visible touch $visible
fi fi
bspc config top_padding $padding