Add code to source plugins and themes

This commit is contained in:
Ceda EI 2019-02-15 19:32:32 +05:30
parent 3b3d34f45d
commit 30671c610f
1 changed files with 17 additions and 0 deletions

17
wish.sh Normal file
View File

@ -0,0 +1,17 @@
#!/usr/bin/env bash
# Source all plugins
for i in ${WISH_PLUGINS[@]}; do
for j in "$XDG_CONFIG_HOME" "/usr/share" "$HOME/.config"; do
source "$j/wish/plugins/$i.sh" &> /dev/null && break
done
[[ $? -ne 0 ]] && echo "Plugin $i not found." >&2
done
# Source theme
WISH_THEME=${WISH_THEME:-plain}
for i in "$XDG_CONFIG_HOME" "/usr/share" "$HOME/.config"; do
source "$i/wish/themes/$WISH_THEME.sh" &> /dev/null && break
done
[[ $? -ne 0 ]] && echo "Theme $WISH_THEME not found." >&2