#!/bin/bash

sw=$(wattr w $(lsw -r))
sh=$(wattr h $(lsw -r))

colbr="#111115" 	# border colour
colfn="#a8aaa7"		# font colour
colbg="#050505"		# bg colour
bb=2 	 # bar border
bw=122   # bar width
bh=26    # bar height
by=10 	 # bar y
bx=$((sw - bw - by))	# bar x

bars() {
	echo "" 		  | lemonbar -d -B $colbr -g "$bw"x"$bh"+"$bx"+"$by" -p &
	$HOME/bin/scr/bar | lemonbar -d -F $colfn -B $colbg -g "$((bw - bb*2))"x"$((bh - bb*2))"+$((bx + bb))+$((by + bb)) -f tewi-9
}

if pgrep -x "lemonbar" > /dev/null
then
	pkill lemonbar
	bars &
else
	bars &
fi
