diff --git a/.config/fish/conf.d/venv.fish b/.config/fish/conf.d/venv.fish deleted file mode 100644 index 9ed02c31..00000000 --- a/.config/fish/conf.d/venv.fish +++ /dev/null @@ -1,33 +0,0 @@ -# Based on https://gist.github.com/bastibe/c0950e463ffdfdfada7adf149ae77c6f -# Changes: -# * Instead of overriding cd, we detect directory change. This allows the script to work -# for other means of cd, such as z. -# * Update syntax to work with new versions of fish. - -function __auto_source_venv --on-variable PWD --description "Activate/Deactivate virtualenv on directory change" - status --is-command-substitution; and return - - # Searched directories are the current directory, and the root of the current git repo if applicable - set dirs (pwd) - if git rev-parse --show-toplevel &>/dev/null - set -a dirs (realpath (git rev-parse --show-toplevel)) - end - - # Scan directories for a fish-compatible virtual environment - set VENV_DIR_NAMES env .env venv .venv - for venv_dir in $dirs/$VENV_DIR_NAMES - if test -e "$venv_dir/bin/activate.fish" - break - end - end - - # Activate venv if it was found and not activated before - if test "$VIRTUAL_ENV" != "$venv_dir" -a -e "$venv_dir/bin/activate.fish" - source $venv_dir/bin/activate.fish - # Deactivate venv if it is activated but the directory doesn't exist - else if not test -z "$VIRTUAL_ENV" -o -e "$venv_dir" - deactivate - end -end - -__auto_source_venv diff --git a/.config/python/pythonrc b/.config/python/pythonrc deleted file mode 100644 index f3f86a5e..00000000 --- a/.config/python/pythonrc +++ /dev/null @@ -1,17 +0,0 @@ -import os -import atexit -import readline - -history = os.path.join(os.environ['XDG_CACHE_HOME'], 'python_history') -try: - readline.read_history_file(history) -except OSError: - pass - -def write_history(): - try: - readline.write_history_file(history) - except OSError: - pass - -atexit.register(write_history)