Last active
January 23, 2023 05:38
-
-
Save ZacharyThompson/8f7057cf69a4730a33600a852c337cf5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export XDG_CONFIG_HOME="$HOME/.config" | |
export XDG_DATA_HOME="$HOME/.local/share" | |
export XDG_CACHE_HOME="$HOME/.cache" | |
export XDG_STATE_HOME="$HOME/.local/state" | |
export GRADLE_USER_HOME="$XDG_DATA_HOME/gradle" | |
export NODE_REPL_HISTORY="$XDG_DATA_HOME/node_repl_history" | |
export NPM_CONFIG_USERCONFIG="$XDG_CONFIG_HOME/npm/npmrc" | |
export NVM_DIR="$XDG_DATA_HOME/nvm" | |
export TLDR_CACHE_DIR="$XDG_CACHE_HOME/tldrc" | |
export WGETRC="$XDG_CONFIG_HOME/wgetrc" | |
export PYTHONSTARTUP="$XDG_CONFIG_HOME/python/pythonrc" | |
export GOPATH="$XDG_DATA_HOME/go" | |
export CARGO_HOME="$XDG_DATA_HOME/cargo" | |
export JULIA_DEPOT_PATH="$XDG_DATA_HOME/julia:$JULIA_DEPOT_PATH" | |
export RUSTUP_HOME="$XDG_DATA_HOME/rustup" | |
fish_add_path "$HOME/.local/bin" "$GOPATH/bin" "$CARGO_HOME/bin" "/usr/local/opt/llvm/bin" | |
export BROWSER="firefox.sh" | |
export EDITOR="nvim" | |
# Set bat as the manpage viewer | |
if type -q $bat | |
set -x MANPAGER "sh -c 'col -bx | bat -l man -p'" | |
end | |
function fish_user_key_bindings | |
# fish_default_key_bindings | |
fish_vi_key_bindings | |
end | |
alias glog 'git log --oneline --graph --decorate -15' | |
alias grep 'grep --color=auto' | |
alias ls 'exa' | |
alias mkdir 'mkdir -p' | |
alias pip 'python3 -m pip' | |
alias python3 'python3.11' | |
alias rm 'rm -I' | |
alias sudo 'sudo ' # allows aliases to work with sudo | |
alias tree 'tree -aC' | |
alias update 'brew upgrade && brew autoremove' | |
alias vi 'ovi' | |
alias vim 'nvim' | |
alias ytdl 'yt-dlp --embed-metadata -i -4 -o "%(title)s.%(ext)s"' | |
alias ytdl-a 'yt-dlp --embed-metadata -i -4 -x -f bestaudio/best -o "%(title)s.%(ext)s"' | |
alias ytdl-ap 'yt-dlp --embed-metadata -i -4 -x -f bestaudio/best -o "%(autonumber)s.%(title)s.%(ext)s"' | |
alias ytdl-p 'yt-dlp --embed-metadata -i -4 -o "%(autonumber)s.%(title)s.%(ext)s"' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function fish_prompt --description 'Write out the prompt' | |
set -l last_pipestatus $pipestatus | |
set -lx __fish_last_status $status # Export for __fish_print_pipestatus. | |
if not set -q __fish_git_prompt_show_informative_status | |
set -g __fish_git_prompt_show_informative_status 1 | |
end | |
if not set -q __fish_git_prompt_hide_untrackedfiles | |
set -g __fish_git_prompt_hide_untrackedfiles 1 | |
end | |
if not set -q __fish_git_prompt_color_branch | |
set -g __fish_git_prompt_color_branch magenta --bold | |
end | |
if not set -q __fish_git_prompt_showupstream | |
set -g __fish_git_prompt_showupstream informative | |
end | |
if not set -q __fish_git_prompt_color_dirtystate | |
set -g __fish_git_prompt_color_dirtystate blue | |
end | |
if not set -q __fish_git_prompt_color_stagedstate | |
set -g __fish_git_prompt_color_stagedstate yellow | |
end | |
if not set -q __fish_git_prompt_color_invalidstate | |
set -g __fish_git_prompt_color_invalidstate red | |
end | |
if not set -q __fish_git_prompt_color_untrackedfiles | |
set -g __fish_git_prompt_color_untrackedfiles $fish_color_normal | |
end | |
if not set -q __fish_git_prompt_color_cleanstate | |
set -g __fish_git_prompt_color_cleanstate green --bold | |
end | |
set -l color_cwd | |
set -l suffix | |
if functions -q fish_is_root_user; and fish_is_root_user | |
if set -q fish_color_cwd_root | |
set color_cwd $fish_color_cwd_root | |
else | |
set color_cwd $fish_color_cwd | |
end | |
set suffix '#' | |
else | |
set color_cwd $fish_color_cwd | |
set suffix '$' | |
end | |
# PWD | |
set_color $color_cwd | |
echo -n (prompt_pwd) | |
set_color normal | |
printf '%s ' (fish_vcs_prompt) | |
set -l status_color (set_color $fish_color_status) | |
set -l statusb_color (set_color --bold $fish_color_status) | |
set -l prompt_status (__fish_print_pipestatus "[" "]" "|" "$status_color" "$statusb_color" $last_pipestatus) | |
echo -n $prompt_status | |
set_color normal | |
echo -n "$suffix " | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment