Added kitty color autoconfig and on-the-fly config

This commit is contained in:
Wryn Wagner 2020-01-08 13:11:56 -07:00
parent 0ccfe3c9e2
commit cd090d0fab
2 changed files with 19 additions and 0 deletions

2
setup
View File

@ -52,3 +52,5 @@ function SYMLINK_CONFIG() {
SYMLINK_CONFIG "compton" "compton.conf";
SYMLINK_CONFIG "i3" "config";
SYMLINK_CONFIG "kitty" "kitty.conf";
SYMLINK_CONFIG "kitty" "theme.conf";

View File

@ -24,3 +24,20 @@ PROMPT=$'\n'' %B%F{128}%# %b%f'
setopt PROMPT_SUBST
PS1="$PREVIOUS_COMMAND_CONDITION $USER $SEPARATOR $DIRECTORY $GIT_BRANCH $PROMPT"
#RPROMPT="$(\e[1A) $GIT_BRANCH";
######################################################################################
#
function kittyChangeTheme () {
[ ! $1 ] && echo no filename given :c && return 1;
[ ! -f "$DOTWRYN/config/colorschemes/kitty/$1" ] \
&& echo colorscheme not supported && return 2;
rm $DOTWRYN/config/kitty/theme.conf
ln -s "$DOTWRYN/config/colorschemes/kitty/$1" "$DOTWRYN/config/kitty/theme.conf"\
&& echo 'theme changed successfully! (effective on new terminal session)'
}
_kittyChangeTheme () {
compadd $(ls $DOTWRYN/config/colorschemes/kitty)
}
compdef _kittyChangeTheme kittyChangeTheme;