diff options
| author | Eugene Triguba <hello@eugenetriguba.com> | 2026-06-04 22:10:29 -0400 |
|---|---|---|
| committer | Eugene Triguba <hello@eugenetriguba.com> | 2026-06-04 22:18:28 -0400 |
| commit | d5a141088341524b34cd1c43ea683f8d0c7c2fe4 (patch) | |
| tree | 896a9b146c51e28bbfc4e23449c1997b19c14b55 /.config | |
| parent | Remove custom vars file (diff) | |
| download | dotfiles-d5a141088341524b34cd1c43ea683f8d0c7c2fe4.zip | |
Migrate to fish
Diffstat (limited to '.config')
| -rw-r--r-- | .config/fish/conf.d/env.fish | 20 | ||||
| -rw-r--r-- | .config/fish/conf.d/fzf.fish | 3 | ||||
| -rw-r--r-- | .config/fish/conf.d/git-prompt.fish | 3 | ||||
| -rw-r--r-- | .config/fish/conf.d/go.fish | 5 | ||||
| -rw-r--r-- | .config/fish/conf.d/macos.fish | 17 | ||||
| -rw-r--r-- | .config/fish/conf.d/pyenv.fish | 8 | ||||
| -rw-r--r-- | .config/fish/config.fish | 34 | ||||
| -rw-r--r-- | .config/fish/fish_variables | 4 |
8 files changed, 94 insertions, 0 deletions
diff --git a/.config/fish/conf.d/env.fish b/.config/fish/conf.d/env.fish new file mode 100644 index 0000000..4aacf61 --- /dev/null +++ b/.config/fish/conf.d/env.fish @@ -0,0 +1,20 @@ +set -gx TERM xterm-256color + +set -gx EDITOR nvim +set -gx PAGER less +set -gx MANPAGER less +set -gx MANWIDTH 80 + +set -gx GPG_TTY (tty) + +set -gx XDG_CONFIG_HOME $HOME/.config +set -gx XDG_DATA_HOME $HOME/.local/share +set -gx XDG_CACHE_HOME $HOME/.cache +set -gx XDG_STATE_HOME $HOME/.local/state + +set -gx SRC_DIR $HOME/src +set -gx BIN_DIR $HOME/bin + +fish_add_path \ + $BIN_DIR \ + $HOME/.local/bin diff --git a/.config/fish/conf.d/fzf.fish b/.config/fish/conf.d/fzf.fish new file mode 100644 index 0000000..d06005e --- /dev/null +++ b/.config/fish/conf.d/fzf.fish @@ -0,0 +1,3 @@ +if command -q fzf + fzf --fish | source +end diff --git a/.config/fish/conf.d/git-prompt.fish b/.config/fish/conf.d/git-prompt.fish new file mode 100644 index 0000000..91f1f97 --- /dev/null +++ b/.config/fish/conf.d/git-prompt.fish @@ -0,0 +1,3 @@ +set -g __fish_git_prompt_showdirtystate 1 +set -g __fish_git_prompt_showupstream auto +set -g __fish_git_prompt_showcolorhints 1 diff --git a/.config/fish/conf.d/go.fish b/.config/fish/conf.d/go.fish new file mode 100644 index 0000000..63924f8 --- /dev/null +++ b/.config/fish/conf.d/go.fish @@ -0,0 +1,5 @@ +set -gx GOPATH $SRC_DIR/go +set -gx GOBIN $GOPATH/bin +set -gx GOPROXY direct + +fish_add_path $GOBIN diff --git a/.config/fish/conf.d/macos.fish b/.config/fish/conf.d/macos.fish new file mode 100644 index 0000000..0df139e --- /dev/null +++ b/.config/fish/conf.d/macos.fish @@ -0,0 +1,17 @@ +if test (uname) = Darwin + fish_add_path \ + /opt/homebrew/bin/ \ + /opt/homebrew/opt/curl/bin \ + $HOME/.poetry/bin \ + $HOME/.local/bin \ + $HOME/Library/pnpm + + if command -q brew + brew shellenv | source + end + + set -gx LDFLAGS "-L/opt/homebrew/lib" + set -gx CPPFLAGS "-I/opt/homebrew/include" + set -gx LIBRARY_PATH "$LIBRARY_PATH:"(brew --prefix)"/lib" +end + diff --git a/.config/fish/conf.d/pyenv.fish b/.config/fish/conf.d/pyenv.fish new file mode 100644 index 0000000..2c45cb7 --- /dev/null +++ b/.config/fish/conf.d/pyenv.fish @@ -0,0 +1,8 @@ +if test -d ~/.pyenv + set -gx PYENV_ROOT ~/.pyenv + fish_add_path $PYENV_ROOT/bin + + if command -q pyenv + pyenv init - | source + end +end diff --git a/.config/fish/config.fish b/.config/fish/config.fish new file mode 100644 index 0000000..82fdbde --- /dev/null +++ b/.config/fish/config.fish @@ -0,0 +1,34 @@ +# Disable greeting +set -g fish_greeting + +abbr -a gs git status +abbr -a gc git commit +abbr -a ga git add +abbr -a gd git diff +abbr -a gds git diff --staged +abbr -a gp git push +abbr -a gpo git push origin +abbr -a gpl git pull +abbr -a gplrb git pull --rebase +abbr -a gl git log +abbr -a gv "git log --graph --decorate --oneline" +abbr -a gch git checkout +abbr -a gcb "git checkout -b" + +abbr -a l "ls -al" + +function auto_venv --on-variable PWD + if test -n "$VIRTUAL_ENV" + set parentdir (dirname "$VIRTUAL_ENV") + if not string match -q "$parentdir/*" "$PWD" + if functions -q deactivate + deactivate + end + end + end + if test -z "$VIRTUAL_ENV" + if test -f "$PWD/.venv/bin/activate.fish" + source "$PWD/.venv/bin/activate.fish" + end + end +end diff --git a/.config/fish/fish_variables b/.config/fish/fish_variables new file mode 100644 index 0000000..59f8c3b --- /dev/null +++ b/.config/fish/fish_variables @@ -0,0 +1,4 @@ +# This file contains fish universal variable definitions. +# VERSION: 3.0 +SETUVAR __fish_initialized:4300 +SETUVAR fish_user_paths:/opt/homebrew/bin\x1e/opt/homebrew/opt/openjdk\x4024/bin\x1e/opt/homebrew/opt/curl/bin\x1e/Users/eugene/Library/pnpm\x1e/Users/eugene/bin\x1e/Users/eugene/\x2elocal/bin |