#!/bin/sh THEME='tomorrow' VARIANT='dark' CONFIG_LOCS="/etc/default/base16" . /etc/default/base16 if [ -e "$HOME/.config/base16.conf" ]; then . $HOME/.config/base16.conf CONFIG_LOCS+=" $HOME/.config/base16.conf" fi if [ -n "$XDG_CONFIG_HOME" ] && [ -e "$XDG_CONFIG_HOME/base16.conf" ]; then . $XDG_CONFIG_HOME/base16.conf CONFIG_LOCS+="$XDG_CONFIG_HOME/base16.conf" fi BASEDIR="/usr/share/base16" # Perform validity checks on themes if [ -z $(cat $BASEDIR/index | grep $THEME) ]; then echo "Theme $THEME does not exist! Check one of: $CONFIG_LOCS" exit 2 fi case "$VARIANT" in light|dark) ;; *) echo "Variant must be either light or dark! You provided $VARIANT" exit 2 ;; esac # Now we get to the actual input if [ $# -lt 2 ]; then echo "Not enough arguments! Usage: $0