diff --git a/env.sh b/env.sh index 9db4242..f4dc670 100644 --- a/env.sh +++ b/env.sh @@ -1,7 +1,7 @@ # general variables export FPATH=$FPATH:/usr/share/zsh export PATH=$PATH:~/.local/bin:~/bin/python/ -export EDITOR=vim +export EDITOR="nvim" # python virtualenv varibles export AUTOSWITCH_DEFAULTENV="baseline" diff --git a/theme_switch.sh b/theme_switch.sh new file mode 100644 index 0000000..1e941b8 --- /dev/null +++ b/theme_switch.sh @@ -0,0 +1,32 @@ +#!/usr/bin/bash + +PATH=$PATH:~/.local/bin + +function set_light () { + sed -i -r "/set background=/s/=.*/=light/g" ~/sources/gitea_irisib/vimrc/visual.vimrc + nvr --remote-send ":set background=light" + kitty @ set-colors -a "~/.config/kitty/solarized_light.conf" + rm ~/.config/kitty/theme.conf 2> /dev/null + ln -s ~/.config/kitty/solarized_light.conf ~/.config/kitty/theme.conf +} + +function set_dark () { + sed -i -r "/set background=/s/=.*/=dark/g" ~/sources/gitea_irisib/vimrc/visual.vimrc + nvr --remote-send ":set background=dark" + kitty @ set-colors -a "~/.config/kitty/solarized_dark.conf" + rm ~/.config/kitty/theme.conf 2> /dev/null + ln -s ~/.config/kitty/solarized_dark.conf ~/.config/kitty/theme.conf +} + + +case $1 in + light) + set_light + ;; + dark) + set_dark + ;; + *) + echo "dark or light" + ;; +esac diff --git a/xonshrc b/xonshrc index 7ecb868..897e865 100644 --- a/xonshrc +++ b/xonshrc @@ -33,6 +33,12 @@ omx.plugins = [ # initialize oh-my-xonsh omx.init() + $XONSH_COLOR_STYLE = "solarized-dark" $CASE_SENSITIVE_COMPLETIONS = False +$UPDATE_OS_ENVIRON = True +$XONTRIB_SH_SHELLS = ['bash', 'zsh'] +xontrib load sh +$PATH.append("~/.local/bin") +aliases["vim"] = ["nvim", "--listen", "/tmp/nvimsocket"]