This repository has been archived on 2024-03-28. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/common/fish/paths.fish

60 lines
1.7 KiB
Fish
Raw Normal View History

2020-01-16 17:01:59 -06:00
#!/usr/bin/env fish
2020-02-10 21:20:38 -06:00
set -Ux GOPATH $HOME/.go
2021-05-14 15:13:43 -05:00
set paths_candidates \
2020-01-20 14:01:06 -06:00
$HOME/.go \
$GOPATH/bin \
2021-03-03 01:05:58 -06:00
$DOTFILES_PATH/common/bin \
2020-01-20 14:01:06 -06:00
$HOME/.bin \
$HOME/.cargo/bin \
$HOME/.nimble/bin \
2021-01-06 10:53:27 -06:00
$HOME/.yarn/bin \
$HOME/.netlify/helper/bin
2020-01-20 14:01:06 -06:00
2021-05-14 15:13:43 -05:00
for d in $paths_candidates $ENV_PATH/*/bin
test -d $d && set -ga fish_user_paths $d
end
test -d $HOME/.local/bin && set -ga fish_user_paths $HOME/.local/bin
test -d $HOME/.bin && set -ga fish_user_paths $HOME/.local/bin
2020-01-16 17:01:59 -06:00
has_command python && set -ga fish_user_paths (python -m site --user-base)/bin
has_command ruby && set -ga fish_user_paths (ruby -e 'print Gem.user_dir')/bin
2020-01-20 14:01:06 -06:00
2021-03-06 22:07:30 -06:00
if set -q NICE_HOME
2020-01-20 14:01:06 -06:00
else
2021-03-06 22:07:30 -06:00
set -Ux NICE_HOME $HOME
test (basename $HOME) = .home && set -Ux NICE_HOME (realpath $HOME/..)
test -f $HOME/.nice_home && set -Ux NICE_HOME (cat $HOME/.nice_home)
test -f $ENV_PATH/.nice_home && set -Ux NICE_HOME (cat $ENV_PATH/.nice_home)
2020-01-20 14:01:06 -06:00
end
for p in $NICE_HOME $HOME $ENV_PATH
2020-01-22 17:25:47 -06:00
test -f $p/.nice_home && set -Ux NICE_HOME (cat $p/.nice_home)
2020-01-20 14:01:06 -06:00
end
2020-01-16 17:01:59 -06:00
2020-01-22 17:25:47 -06:00
set -Ux NOTES_PATH $NICE_HOME/doc/notes
set -Ux SCROTS_PATH $NICE_HOME/img/scrots
set -Ux USER_LOGS_PATH $NICE_HOME/doc/logs
set -Ux XDG_DESKTOP_DIR $HOME/desktop
set -Ux XDG_PUBLICSHARE_DIR $HOME/public
set -Ux XDG_TEMPLATES_DIR $HOME/templates
set -Ux XDG_DOCUMENTS_DIR $NICE_HOME/doc
set -Ux XDG_DOWNLOAD_DIR $NICE_HOME/dl
set -Ux XDG_MUSIC_DIR $NICE_HOME/music
set -Ux XDG_PICTURES_DIR $NICE_HOME/img
set -Ux XDG_VIDEOS_DIR $NICE_HOME/video
set -Ux XDG_GAMES_DIR $NICE_HOME/games
2020-03-06 15:44:26 -06:00
set -Ux TMUX_PLUGIN_MANAGER_PATH $XDG_CONFIG_HOME/tmux/plugins/
2020-01-23 12:38:19 -06:00
set -Ux NOTES_PATH $XDG_DOCUMENTS_DIR/notes
set -Ux USER_LOGS_PATH $XDG_DOCUMENTS_DIR/logs
set -Ux SCROTS_PATH $XDG_PICTURES_DIR/scrots
2020-10-27 17:10:54 -05:00
if test -n "$NIX_PATH"
set NIX_PATH :
end
set -Ux NIX_PATH $HOME/.nix-defexpr/channels:$NIX_PATH