diff options
| author | Pavel Egorov <[email protected]> | 2025-06-23 20:04:21 +0300 |
|---|---|---|
| committer | Pavel Egorov <[email protected]> | 2025-06-23 20:04:21 +0300 |
| commit | 07a8d1a5ff04cdba62dba7c7d4d776fb830d1683 (patch) | |
| tree | fe1390bd4db8fe5e32e7082d2918e2992a9c241a /.config | |
| parent | 413373a89982da6c4db7e19208a1ddcbcedea4e9 (diff) | |
| download | dotfiles-07a8d1a5ff04cdba62dba7c7d4d776fb830d1683.tar.gz dotfiles-07a8d1a5ff04cdba62dba7c7d4d776fb830d1683.zip | |
[fish] do program-specific configurations conditionally
Diffstat (limited to '')
| -rw-r--r-- | .config/fish/conf.d/abbr.fish | 12 | ||||
| -rw-r--r-- | .config/fish/conf.d/alias.fish | 6 | ||||
| -rw-r--r-- | .config/fish/conf.d/js.fish | 4 | ||||
| -rw-r--r-- | .config/fish/conf.d/python.fish | 4 |
4 files changed, 17 insertions, 9 deletions
diff --git a/.config/fish/conf.d/abbr.fish b/.config/fish/conf.d/abbr.fish index 2f3b72c..c763d85 100644 --- a/.config/fish/conf.d/abbr.fish +++ b/.config/fish/conf.d/abbr.fish | |||
| @@ -7,11 +7,13 @@ abbr --add ga "git add" | |||
| 7 | abbr --add gco "git checkout" | 7 | abbr --add gco "git checkout" |
| 8 | 8 | ||
| 9 | # Added proxy flags | 9 | # Added proxy flags |
| 10 | set -l ssconfig "/etc/shadowsocks-rust/config.json" | 10 | if type -q sslocal |
| 11 | set -l parsed_config (jq -r .local_address,.local_port $ssconfig) | 11 | set -l ssconfig "/etc/shadowsocks-rust/config.json" |
| 12 | set -l SSPROXY "socks5://$parsed_config[1]:$parsed_config[2]" | 12 | set -l parsed_config (jq -r .local_address,.local_port $ssconfig) |
| 13 | abbr --add curlss "curl --proxy=$SSPROXY" | 13 | set -l SSPROXY "socks5://$parsed_config[1]:$parsed_config[2]" |
| 14 | abbr --add ytdlpss "yt-dlp --proxy=$SSPROXY" | 14 | abbr --add curlss "curl --proxy=$SSPROXY" |
| 15 | abbr --add ytdlpss "yt-dlp --proxy=$SSPROXY" | ||
| 16 | end | ||
| 15 | 17 | ||
| 16 | # Pacman | 18 | # Pacman |
| 17 | abbr --add pacman-unlock "sudo rm /var/lib/pacman/db.lck" | 19 | abbr --add pacman-unlock "sudo rm /var/lib/pacman/db.lck" |
diff --git a/.config/fish/conf.d/alias.fish b/.config/fish/conf.d/alias.fish index 442d3d8..64bac90 100644 --- a/.config/fish/conf.d/alias.fish +++ b/.config/fish/conf.d/alias.fish | |||
| @@ -1,3 +1,5 @@ | |||
| 1 | # ls & alternatives | 1 | # ls & alternatives |
| 2 | alias ls "eza --long --almost-all --binary --smart-group --group-directories-first --git --git-repos --color=auto --icons=never" | 2 | if type -q eza |
| 3 | alias lss "ls --total-size" | 3 | alias ls "eza --long --almost-all --binary --smart-group --group-directories-first --git --git-repos --color=auto --icons=never" |
| 4 | alias lss "ls --total-size" | ||
| 5 | end | ||
diff --git a/.config/fish/conf.d/js.fish b/.config/fish/conf.d/js.fish index dab58c6..443fe29 100644 --- a/.config/fish/conf.d/js.fish +++ b/.config/fish/conf.d/js.fish | |||
| @@ -1 +1,3 @@ | |||
| 1 | fnm env --use-on-cd --shell fish | source | 1 | if type -q fnm |
| 2 | fnm env --use-on-cd --shell fish | source | ||
| 3 | end | ||
diff --git a/.config/fish/conf.d/python.fish b/.config/fish/conf.d/python.fish index 54f931f..b3b5eec 100644 --- a/.config/fish/conf.d/python.fish +++ b/.config/fish/conf.d/python.fish | |||
| @@ -1 +1,3 @@ | |||
| 1 | pyenv init - | source | 1 | if type -q pyenv |
| 2 | pyenv init - | source | ||
| 3 | end | ||
