scripts/applications/fish

43 lines
1.0 KiB
Plaintext
Raw Normal View History

2019-08-18 06:26:48 -07:00
#!/usr/bin/env fish
# launch tmux if we're in an interactive terminal emulator
2019-08-05 16:11:41 -07:00
if status is-interactive && not status is-login && test -z "$TMUX"
2019-07-05 19:09:01 -07:00
exec tmux new-session
end
# bootstrapping information
2019-07-29 03:35:19 -07:00
# required universal variables:
2019-08-19 06:40:45 -07:00
# - _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
2019-08-05 16:11:41 -07:00
case \*
echo (set_color red)"This platform is not configured!"
2019-06-28 17:33:53 -07:00
end
2019-06-18 09:13:09 -07:00
# per-computer configs go here
2019-10-19 10:20:17 -07:00
set -Ux _agw_dir_local $_agw_dir_rc/computers/(hostname)
# execute scripts
2019-06-28 17:35:31 -07:00
if test -f ~/.cargo/env
2019-07-05 19:09:01 -07:00
source ~/.cargo/env
2019-06-28 17:35:31 -07:00
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