Skip to content

Instantly share code, notes, and snippets.

@Dieterbe
Created March 21, 2019 17:51
Show Gist options
  • Save Dieterbe/d7fdee42d8d5b3e20f39ac39c1eb8ace to your computer and use it in GitHub Desktop.
Save Dieterbe/d7fdee42d8d5b3e20f39ac39c1eb8ace to your computer and use it in GitHub Desktop.
#!/bin/bash
style=$1
if [ "$style" != "LIGHT" -a "$style" != light -a "$style" != "dark" ]; then
echo "arg1 must be LIGHT, light or dark" >&2
exit 2
fi
# shell
# if we source this in terminals we can't just reload termite with proper colors,
# so let's try just doing it in termite and also disabling in .config/sh/env-interactive
#source /home/dieter/.config/base16-shell/base16-default.light.sh
# i3
cd ~/.i3/
if [ $(readlink config) != "config-$style" ]; then
rm config
ln -s config-$style config
i3-msg reload >/dev/null
fi
cd - >/dev/null
cd ~/.config/termite
if ! [[ "$(readlink config)" =~ $style ]]; then
rm config
ln -s templates/base16-tomorrow.$style.config config
killall -USR1 termite
fi
cd - >/dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment