-
Notifications
You must be signed in to change notification settings - Fork 2
/
solarize
executable file
·42 lines (35 loc) · 1.32 KB
/
solarize
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/sh
set -eu
SROOT=$HOME/src/solarized
mode="${1:-$(basename "$0")}"
case $mode in
dark)
theme=Ambiance
;;
light)
theme=Radiance
;;
esac
if [ -z "$theme" ]; then
echo "panic: mode must be either 'light' or 'dark'"
exit 1
fi
# emacs; needs emacs-goodies-el and emacs bits installed from
# https://github.com/sellout/emacs-color-theme-solarized
emacsclient --alternate-editor /bin/true -e \
"(load-theme 'solarized-$mode)" \
"(setq frame-background-mode '$mode)" \
"(mapc 'frame-set-background-mode (frame-list))"
sed -r -i -e "/@@@THEME@@@/s/light|dark/$mode/" ~/.emacs
# xchat bits from https://github.com/jtmohr/xchat-colors-solarized
if [ -f ~/.xchat2/colors.conf ]; then
cp "$SROOT/xchat-colors-solarized/solarized-${mode}-colors.conf" ~/.xchat2/colors.conf
fi
if [ -d ~/.config/hexchat ]; then
unzip -oq "$SROOT/hexchat/solarized-${mode}.hct" -d ~/.config/hexchat
fi
# gnome-terminal bits from https://github.com/sigurdga/gnome-terminal-colors-solarized
"$SROOT/gnome-terminal-colors-solarized/install.sh" -s "${mode}" -p Default --skip-dircolors
gsettings set org.gnome.desktop.wm.preferences theme "$theme"
gsettings set org.gnome.desktop.interface gtk-theme "$theme"
gsettings set org.gnome.desktop.interface icon-theme "ubuntu-mono-$mode"