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

COLORSCHEME="dark"

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

case $COLORSCHEME in
	dark)
		gsettings set org.gnome.desktop.interface color-scheme 'prefer-light'
		COLORSCHEME="light" ;;
	*)
		gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark'
		COLORSCHEME="dark" ;;
esac

echo "export COLORSCHEME=$COLORSCHEME" > $HOME/.cache/colorscheme
pkill -SIGUSR1 zsh