diff --git a/.config/fish/config.fish b/.config/fish/config.fish deleted file mode 100644 index 08d7bba..0000000 --- a/.config/fish/config.fish +++ /dev/null @@ -1,37 +0,0 @@ -if command -vq flatpak - set -ga fish_user_paths ~/.local/share/flatpak/exports/bin /var/lib/flatpak/exports/bin - set -gx --path XDG_DATA_DIRS /usr/local/share/ /usr/share/ ~/.local/share/flatpak/exports/share - for install_dir in (flatpak --installations) - set -gxa XDG_DATA_DIRS $install_dir/exports/share - end -end - -egrep "^export " ~/.bash_profile | while read e - set var (echo $e | sed -E "s/^export ([A-Za-z_]+)=(.*)\$/\1/") - set value (echo $e | sed -E "s/^export ([A-Za-z_]+)=(.*)\$/\2/") - - # remove surrounding quotes if existing - set value (echo $value | sed -E "s/^\"(.*)\"\$/\1/") - - if test $var = "PATH" - # replace ":" by spaces. this is how PATH looks for Fish - set value (echo $value | sed -E "s/:/ /g") - - # use eval because we need to expand the value - eval set -xg $var $value - - continue - end - - # evaluate variables. we can use eval because we most likely just used "$var" - set value (eval echo $value) - - #echo "set -xg '$var' '$value' (via '$e')" - set -xg $var $value -end - -if status --is-interactive - fastfetch -end - -set -U fish_user_paths /usr/local/ubin ~/bin ~/go/bin ~/anaconda3/bin $fish_user_paths diff --git a/.config/zsh/functions b/.config/zsh/functions index 390ae12..8c50d32 100644 --- a/.config/zsh/functions +++ b/.config/zsh/functions @@ -1,21 +1,23 @@ #!/bin/zsh function zsh_add_config() { - [ -f "$ZSH_CONFIG/$1" ] && ! [ -L "$ZSH_CONFIG/$1" ] && source "$ZSH_CONFIG/$1" + [ -f "$ZDOTDIR/$1" ] && ! [ -L "$ZDOTDIR/$1" ] && source "$ZDOTDIR/$1" } function zsh_add_plugin() { PLUGIN_NAME=$(echo $1 | cut -d"/" -f2) - if ! [ -d "$ZSH_CONFIG/plugins/$PLUGIN_NAME" ]; then - git clone "https://github.com/$1.git" "$ZSH_CONFIG/plugins/$PLUGIN_NAME" + if ! [ -d "$ZDOTDIR/plugins/$PLUGIN_NAME" ]; then + git clone "https://github.com/$1.git" "$ZDOTDIR/plugins/$PLUGIN_NAME" fi zsh_add_config "plugins/$PLUGIN_NAME/$PLUGIN_NAME.plugin.zsh" zsh_add_config "plugins/$PLUGIN_NAME/$PLUGIN_NAME.zsh" + zsh_add_config "plugins/$PLUGIN_NAME/async" + zsh_add_config "plugins/$PLUGIN_NAME/nix.plugin.zsh" } function zsh_fpath_plugin() { PLUGIN_NAME=$(echo $1 | cut -d"/" -f2) - if ! [ -d "$ZSH_CONFIG/plugins/$PLUGIN_NAME" ]; then - git clone "https://github.com/$1.git" "$ZSH_CONFIG/plugins/$PLUGIN_NAME" + if ! [ -d "$ZDOTDIR/plugins/$PLUGIN_NAME" ]; then + git clone "https://github.com/$1.git" "$ZDOTDIR/plugins/$PLUGIN_NAME" fi - fpath+=($ZSH_CONFIG/plugins/$PLUGIN_NAME) + fpath+=($ZDOTDIR/plugins/$PLUGIN_NAME) } diff --git a/.config/zsh/plugins/zsh-syntax-highlighting b/.config/zsh/plugins/zsh-syntax-highlighting deleted file mode 160000 index caa749d..0000000 --- a/.config/zsh/plugins/zsh-syntax-highlighting +++ /dev/null @@ -1 +0,0 @@ -Subproject commit caa749d030d22168445c4cb97befd406d2828db0 diff --git a/.zshrc b/.zshrc index ddd90a6..b6c5669 100644 --- a/.zshrc +++ b/.zshrc @@ -1,29 +1,28 @@ -# The following lines were added by compinstall -zstyle :compinstall filename "$HOME/.zshrc" - autoload -Uz compinit compinit -# End of lines added by compinstall -# Lines configured by zsh-newuser-install -HISTFILE=~/.histfile +HISTFILE="$HOME/.zsh_history" HISTSIZE=10000 SAVEHIST=10000 bindkey -e -# End of lines configured by zsh-newuser-install -export PATH="/usr/local/ubin:$HOME/bin:$HOME/go/bin:$HOME/.cargo/bin:$HOME/anaconda3/bin:$PATH:/usr/local/cuda/bin" +export PATH="/usr/local/ubin:$HOME/bin:$HOME/go/bin:$HOME/.cargo/bin:$PATH" export EDITOR="vim" +export TERMINAL="konsole" +export TERM="konsole" +export BROWSER="firefox" +export VIDEO="mpv" +export OPENER="xdg-open" -ZSH_CONFIG="$HOME/.config/zsh" -source "$ZSH_CONFIG/functions" +export ZDOTDIR="$HOME/.config/zsh" +source "$ZDOTDIR/functions" zsh_add_config keybinds.zsh -PURE_PROMPT_SYMBOL="$" +export PURE_PROMPT_SYMBOL="$" if [ "$USER" = "root" ]; then - PURE_PROMPT_SYMBOL="#" + export PURE_PROMPT_SYMBOL="#" fi -PROMPT_PURE_SSH_CONNECTION=YES +export PROMPT_PURE_SSH_CONNECTION=YES zsh_fpath_plugin sindresorhus/pure autoload -U promptinit; promptinit zstyle :prompt:pure:user color cyan @@ -31,7 +30,7 @@ zstyle :prompt:pure:host color white zstyle ':prompt:pure:prompt:*' color white prompt pure -zsh_add_plugin zsh-users/zsh-syntax-highlighting +zsh_add_plugin zdharma-continuum/fast-syntax-highlighting ZSH_AUTOSUGGEST_STRATEGY=(history completion) zsh_add_plugin zsh-users/zsh-autosuggestions