#!/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 # - _agw_dir_dev = volatile chroot development environment switch (uname) case Linux NetBSD set -Ux _agw_dir_bin ~/bin set -Ux _agw_dir_rc ~/rc set -Ux _agw_dir_src ~/src set -Ux _agw_dir_dev ~/dev case Darwin set -Ux _agw_dir_bin ~/Binaries set -Ux _agw_dir_rc ~/Sources/scripts set -Ux _agw_dir_src ~/Sources set -Ux _agw_dir_dev ~/Development 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 function _agw_get_autoexec -d "Function for bootstrapping. Finds auto-execs." if test -d $argv[1] find $argv[1] -type f | env LC_ALL=C sort end end for f in (_agw_get_autoexec $_agw_dir_local/fish) \ (_agw_get_autoexec $_agw_dir_rc/fish) source $f end ## EOF