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/config.fish

59 lines
1.9 KiB
Fish
Raw Normal View History

2020-01-17 03:02:53 -06:00
#!/usr/bin/env fish
2020-01-22 17:25:47 -06:00
set -Ux XDG_CONFIG_HOME $HOME/.config
2020-11-06 00:31:43 -06:00
set -Ux DOTFILES_PATH $XDG_CONFIG_HOME/lytedev-dotfiles
2021-03-06 22:07:30 -06:00
set -Ux ENV_PATH $XDG_CONFIG_HOME/lytedev-env
2021-03-03 01:05:58 -06:00
set -Ux FISH_PATH $XDG_CONFIG_HOME/fish
2020-01-17 03:02:53 -06:00
2021-03-03 01:05:58 -06:00
source $FISH_PATH/paths.fish
2020-01-16 17:01:59 -06:00
2021-03-06 22:07:30 -06:00
for s in $ENV_PATH/*/config.d.fish
source $s (dirname $s)
end
2020-01-16 17:01:59 -06:00
status --is-interactive || exit
2021-05-14 15:16:27 -05:00
test (uname) = Linux && $DOTFILES_PATH/common/colors/vconsole
2020-01-20 14:01:06 -06:00
for f in key-bindings colors prompt aliases
2021-03-03 01:05:58 -06:00
source $FISH_PATH/$f.fish
2020-01-20 14:01:06 -06:00
end
2021-03-06 22:07:30 -06:00
has_command nnn && source $DOTFILES_PATH/common/nnn/config.fish
2020-01-16 17:01:59 -06:00
2020-01-22 17:25:47 -06:00
set -Ux _JAVA_AWT_WM_NONREPARENTING 1
set -Ux TERMINAL kitty
2021-04-16 09:00:26 -05:00
set -Ux BROWSER firefox-nightly
2020-01-22 17:25:47 -06:00
set -Ux ERL_AFLAGS "-kernel shell_history enabled -kernel shell_history_file_bytes 1024000" # iex history
2020-07-02 11:17:42 -05:00
set -Ux LESS "-r"
2020-11-05 22:29:58 -06:00
set -Ux LS_COLORS 'ow=01;36;40' # more sane ls colors
2021-02-11 10:52:13 -06:00
set -Ux EXA_COLORS '*=0'
2020-11-05 22:29:58 -06:00
set -Ux EDITOR nvim
2020-11-22 00:21:37 -06:00
set -Ux VISUAL nvim
set -Ux PAGER less
2020-11-05 22:29:58 -06:00
set -Ux MANPAGER 'env MANWIDTH="" nvim --cmd "let g:prosession_on_startup=0" +Man!'
2020-01-22 17:25:47 -06:00
2020-11-22 00:21:37 -06:00
function fish_greeting;
set_color -b black brblack
printf "%s@%s %s\n" $USER (hostname) (date)
2020-11-22 09:30:11 -06:00
printf "%6d processes running\n" (ps -aux | wc -l)
2021-03-01 14:52:06 -06:00
has_command free && printf "%6sGB memory available\n" (free -g | grep '^Mem:' | tr -s ' ' | cut -d ' ' -f7)
test -f /proc/sys/kernel/pty/nr && printf "%6d PTYs open\n" (cat /proc/sys/kernel/pty/nr)
2020-11-22 00:21:37 -06:00
end
2020-01-16 17:01:59 -06:00
2021-05-14 15:13:43 -05:00
if has_command brew && test -f (brew --prefix asdf)/lib/asdf.fish
set -Ux ASDF_DIR (brew --prefix asdf)
source (brew --prefix asdf)/lib/asdf.fish
else if test -f $HOME/.asdf/asdf.fish
source $HOME/.asdf/asdf.fish
else if test -f /opt/asdf-vm/asdf.fish
source /opt/asdf-vm/asdf.fish
end
2021-03-06 22:07:30 -06:00
# assume the user uses "$HOME" to just store their mess of dotfiles and other
2020-01-16 17:01:59 -06:00
# nonsense that clutters it up and that they have a preferred starting
# directory where they keep the stuff they actually care about
# we only do this if the user is opening a shell at $HOME
2020-01-20 09:12:52 -06:00
if test $PWD = $HOME; or test $PWD = $NICE_HOME;
cd $NICE_HOME || cd
end