keep theme on reload (from alacritty) on unknown theme reload current

This commit is contained in:
Łukasz Pankowski 2020-07-21 23:15:29 +02:00
parent 60814159c2
commit 2ca2444491
2 changed files with 15 additions and 15 deletions

View File

@ -21,7 +21,8 @@ fi
bspc config border_width 4 bspc config border_width 4
bspc config window_gap 12 bspc config window_gap 12
sh ~/.config/bspwm/commands.sh dark-colors THEME=$(grep colors: ~/.config/alacritty/alacritty.yml | cut -d '*' -f 2)
sh ~/.config/bspwm/commands.sh theme "$THEME"
bspc config split_ratio 0.50 bspc config split_ratio 0.50
bspc config single_monocle true bspc config single_monocle true

View File

@ -3,9 +3,7 @@
CMD="$1" CMD="$1"
shift shift
if [ "$CMD" = theme ]; then if [ "$CMD" = theme -a "$1" = next ]; then
THEME="$1"
if [ "$THEME" = next ]; then
case $(bspc config focused_border_color) in case $(bspc config focused_border_color) in
'#23aba4') '#23aba4')
THEME=dark-blue THEME=dark-blue
@ -17,7 +15,8 @@ if [ "$CMD" = theme ]; then
THEME=dark THEME=dark
;; ;;
esac esac
fi elif [ "$CMD" = theme ] && [ "$1" = dark -o "$1" = dark-blue -o "$1" = light ]; then
THEME="$1"
else else
case $(bspc config focused_border_color) in case $(bspc config focused_border_color) in
'#068c70') '#068c70')