macmini ~/.config
This commit is contained in:
33
fish/config.fish
Normal file
33
fish/config.fish
Normal file
@@ -0,0 +1,33 @@
|
||||
if status is-interactive
|
||||
# Commands to run in interactive sessions can go here
|
||||
end
|
||||
set -g fish_greeting
|
||||
|
||||
# HOMEBREW
|
||||
# tuna - https://mirrors.tuna.tsinghua.edu.cn/help/homebrew/
|
||||
set -x HOMEBREW_BREW_GIT_REMOTE https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git
|
||||
set -x HOMEBREW_API_DOMAIN https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles/api
|
||||
set -x HOMEBREW_BOTTLE_DOMAIN https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles
|
||||
|
||||
# USTC - https://mirrors.ustc.edu.cn/help/brew.git.html
|
||||
# set -xU HOMEBREW_BREW_GIT_REMOTE https://mirrors.ustc.edu.cn/brew.git
|
||||
|
||||
set -q GHCUP_INSTALL_BASE_PREFIX[1]; or set GHCUP_INSTALL_BASE_PREFIX $HOME ; set -gx PATH $HOME/.cabal/bin /Users/congyu/.ghcup/bin $PATH # ghcup-env
|
||||
|
||||
|
||||
# >>> conda initialize >>>
|
||||
# !! Contents within this block are managed by 'conda init' !!
|
||||
if test -f /opt/homebrew/Caskroom/miniforge/base/bin/conda
|
||||
eval /opt/homebrew/Caskroom/miniforge/base/bin/conda "shell.fish" "hook" $argv | source
|
||||
else
|
||||
if test -f "/opt/homebrew/Caskroom/miniforge/base/etc/fish/conf.d/conda.fish"
|
||||
. "/opt/homebrew/Caskroom/miniforge/base/etc/fish/conf.d/conda.fish"
|
||||
else
|
||||
set -x PATH "/opt/homebrew/Caskroom/miniforge/base/bin" $PATH
|
||||
end
|
||||
end
|
||||
# <<< conda initialize <<<
|
||||
|
||||
# Added by OrbStack: command-line tools and integration
|
||||
# This won't be added again if you remove it.
|
||||
source ~/.orbstack/shell/init2.fish 2>/dev/null || :
|
||||
4
fish/fish_variables
Normal file
4
fish/fish_variables
Normal file
@@ -0,0 +1,4 @@
|
||||
# This file contains fish universal variable definitions.
|
||||
# VERSION: 3.0
|
||||
SETUVAR __fish_initialized:4300
|
||||
SETUVAR fish_user_paths:/opt/homebrew/sbin\x1e/opt/homebrew/bin
|
||||
5
fish/functions/amnesia.fish
Normal file
5
fish/functions/amnesia.fish
Normal file
@@ -0,0 +1,5 @@
|
||||
function amnesia --description 'amnesia'
|
||||
pushd ~/amnesia/
|
||||
fish s.fish
|
||||
popd
|
||||
end
|
||||
5
fish/functions/clash_proxy.fish
Normal file
5
fish/functions/clash_proxy.fish
Normal file
@@ -0,0 +1,5 @@
|
||||
function clash_proxy --description 'use clash proxy in terminal'
|
||||
export https_proxy=http://127.0.0.1:7890;
|
||||
export http_proxy=http://127.0.0.1:7890;
|
||||
export all_proxy=socks5://127.0.0.1:7890
|
||||
end
|
||||
31
fish/functions/fish_prompt.fish
Normal file
31
fish/functions/fish_prompt.fish
Normal file
@@ -0,0 +1,31 @@
|
||||
function fish_prompt --description 'Write out the prompt'
|
||||
set -l last_pipestatus $pipestatus
|
||||
set -lx __fish_last_status $status # Export for __fish_print_pipestatus.
|
||||
set -l normal (set_color normal)
|
||||
set -q fish_color_status
|
||||
or set -g fish_color_status red
|
||||
|
||||
# Color the prompt differently when we're root
|
||||
set -l color_cwd $fish_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
|
||||
end
|
||||
set suffix ' #'
|
||||
end
|
||||
|
||||
# Write pipestatus
|
||||
# If the status was carried over (if no command is issued or if `set` leaves the status untouched), don't bold it.
|
||||
set -l bold_flag --bold
|
||||
set -q __fish_prompt_status_generation; or set -g __fish_prompt_status_generation $status_generation
|
||||
if test $__fish_prompt_status_generation = $status_generation
|
||||
set bold_flag
|
||||
end
|
||||
set __fish_prompt_status_generation $status_generation
|
||||
set -l status_color (set_color $fish_color_status)
|
||||
set -l statusb_color (set_color $bold_flag $fish_color_status)
|
||||
set -l prompt_status (__fish_print_pipestatus "[" "]" "|" "$status_color" "$statusb_color" $last_pipestatus)
|
||||
|
||||
echo -n -s (prompt_login)' ' (set_color $color_cwd) (prompt_pwd) $normal (fish_vcs_prompt) $normal " "$prompt_status $suffix " "
|
||||
end
|
||||
Reference in New Issue
Block a user