diff --git a/config/fish/config.fish b/config/fish/config.fish index bae9be6..4bf98c6 100644 --- a/config/fish/config.fish +++ b/config/fish/config.fish @@ -20,46 +20,55 @@ if status is-interactive # fish_config theme choose "kanagawa" # fish_config theme choose "Dracula" - command -qv nmcli && alias nmlist "nmcli device wifi list" - command -qv tree && alias tree "tree -L 3 -a -I '.git' --charset X " - command -qv tree && alias dtree "tree -L 3 -a -d -I '.git' --charset X " - - command -qv wl-copy && alias cwd "wl-copy \$(pwd)" - command -qv wl-copy && alias cc "wl-copy \$(echo \$history[1])" - - command -qv fabric-ai && alias ai "fabric-ai -p \$(fabric-ai -l | fzf)" - command -qv xdg-open && alias o "xdg-open" - - command -qv lazygit && alias lg lazygit - - if command -qv nvim; - if ! command -qv ~/.local/bin/v; - alias v nvim - end - alias vim v - alias vi v - alias mini "NVIM_APPNAME=mini.nvim nvim" - set -gx EDITOR nvim - end - if command -qv vim; - alias vi vim - alias v vim - set -gx EDITOR vim + if command -q mise + /usr/bin/mise activate fish | source end - command -qv jj && alias rev "jj log -G -T 'commit_id.short(8)'" + if command -q direnv + /usr/bin/direnv hook fish | source + end - if command -qv shred + if command -q zoxide + /usr/bin/zoxide init fish | source + end + + if command -q fzf + /usr/bin/fzf --fish | source + alias zk="nvim \$(fzf --walker=file --walker-root=/home/sjb/Documents/nca-notes/ --preview 'bat --color=always -n --line-range :500 {}')" + #set -gx FZF_CTRL_T_OPTS "--preview 'bat --color=always -n --line-range :500 {}'" + #set -gx FZF_ALT_C_OPTS "--preview 'eza --icons=always --color=always {} | head -200'" + end + command -q nmcli && alias nmlist "nmcli device wifi list" + + if command -q tree + alias tree "tree -L 3 -a -I '.git' --charset X " + alias dtree "tree -L 3 -a -d -I '.git' --charset X " + end + + if command -q wl-copy + alias cwd "wl-copy \$(pwd)" + alias cc "wl-copy \$(echo \$history[1])" + end + + command -q fabric && alias ai "fabric -p \$(fabric-ai -l | fzf)" + command -q xdg-open && alias o "xdg-open" + command -q lazygit && alias lg lazygit + + command -q nvim && set -gx EDITOR nvim + + command -q jj && alias rev "jj log -G -T 'commit_id.short(8)'" + + if command -q shred alias nuke "shred -u -n 1" end - if command -qv wt; + if command -q wt alias wtc "wt switch --create --execute=$EDITOR" alias wts "wt switch" alias wtr "wt remove @" end - if command -qv /usr/bin/opencode; + if command -q /usr/bin/opencode alias oc "opencode" end @@ -74,26 +83,7 @@ if status is-interactive set -gx VISUAL $EDITOR - if test -x /usr/bin/mise; - /usr/bin/mise activate fish | source - end - - if test -x /usr/bin/direnv; - /usr/bin/direnv hook fish | source - end - - if test -x /usr/bin/zoxide; - /usr/bin/zoxide init fish | source - end - - if test -x /usr/bin/fzf; - /usr/bin/fzf --fish | source - alias zk="nvim \$(fzf --walker=file --walker-root=/home/sjb/Documents/nca-notes/ --preview 'bat --color=always -n --line-range :500 {}')" - #set -gx FZF_CTRL_T_OPTS "--preview 'bat --color=always -n --line-range :500 {}'" - #set -gx FZF_ALT_C_OPTS "--preview 'eza --icons=always --color=always {} | head -200'" - end - - if test -x /usr/bin/jj; + if command -q jj /usr/bin/jj util completion fish | source end diff --git a/config/mise/config.toml b/config/mise/config.toml new file mode 100644 index 0000000..4443f8e --- /dev/null +++ b/config/mise/config.toml @@ -0,0 +1,23 @@ +[settings] +experimental = true + +[tools] +age = "latest" +bun = "latest" +"cargo:cargo-llvm-cov" = "latest" +codex = "latest" +copilot-cli = "latest" +"github:ZinoKader/portal" = "latest" +"github:danielmiessler/fabric" = "latest" +"github:mrusme/reader" = "latest" +"github:ulyssa/iamb" = "latest" +herdr = "latest" +neovim = "latest" +node = "latest" +"npm:@earendil-works/pi-coding-agent" = "latest" +"npm:mermaid-cli" = "latest" +"npm:pi-acp" = "latest" +opencode = "latest" +pi = "latest" +tree-sitter = "latest" +worktrunk = "latest" diff --git a/script/v b/script/v index ea2bb03..6f56414 100755 --- a/script/v +++ b/script/v @@ -1,6 +1,6 @@ #!/usr/bin/env sh -required_tools=(nvim realpath) +required_tools=(realpath nvim) missing=() for tool in "${required_tools[@]}"; do