aboutsummaryrefslogtreecommitdiff
path: root/dotfiles/.local/bin/chcolors
blob: 7732267deb02389ff760d44410896362c0c7ad47 (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
	source $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