scripts/applications/fish

43 lines
1.0 KiB
Fish

#!/usr/bin/env fish
# launch tmux if we're in an interactive terminal emulator
if status is-interactive && not status is-login && test -z "$TMUX"
exec tmux new-session
end
# bootstrapping information
# required universal variables:
# - _agw_dir_bin = volatile binary storage
# - _agw_dir_rc = the directory holding this repository
# - _agw_dir_src = non-volatile source code storage
switch (uname)
case Linux NetBSD
set -Ux _agw_dir_bin ~/bin
set -Ux _agw_dir_rc ~/rc
set -Ux _agw_dir_src ~/src
case Darwin
set -Ux _agw_dir_bin ~/Binaries
set -Ux _agw_dir_rc ~/Sources/scripts
set -Ux _agw_dir_src ~/Sources
case \*
echo (set_color red)"This platform is not configured!"
end
# per-computer configs go here
set -Ux _agw_dir_local $_agw_dir_rc/computers/(hostname)
# execute scripts
if test -f ~/.cargo/env
source ~/.cargo/env
end
for f in (test -d $_agw_dir_local/fish &&
find $_agw_dir_local/fish -type f |
env LC_ALL=C sort) \
(find $_agw_dir_rc/fish -type f |
env LC_ALL=C sort)
source $f
end
## EOF