aboutsummaryrefslogtreecommitdiff
path: root/dotfiles/.local/bin/chcolors
blob: e62b0474215896130a1777219212358ede13b1f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh

COLORSCHEME="dark"

if [ -f $HOME/.cache/colorscheme ]; then
	. $HOME/.cache/colorscheme
fi

case $COLORSCHEME in
	dark)
		COLORSCHEME="light" ;;
	*)
		COLORSCHEME="dark" ;;
esac

sed -i --follow-symlinks \
	"s/^colors:.*/colors: \*$COLORSCHEME/g" \
	$HOME/.config/alacritty/alacritty.yml

echo "export COLORSCHEME=$COLORSCHEME" > $HOME/.cache/colorscheme