Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions config/fish/conf.d/10-environment.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
set -gx VISUAL nvim
set -gx EDITOR $VISUAL

set -gx CLICOLOR 1
set -gx GOPATH "$HOME/.local/share/go"

fish_add_path --move --path \
"$HOME/.local/share/neovim/bin" \
"$GOPATH/bin" \
"$HOME/.local/bin"
16 changes: 16 additions & 0 deletions config/fish/conf.d/20-aliases.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
status --is-interactive; or return

alias l='ls -lAh'
alias ll='ls -al'
alias la='ls -A'

alias ..='cd ..'
alias ...='cd ../..'

if type -q bat
alias cat='bat --paging=never'
end

if type -q mise
alias mup='mise upgrade'
end
13 changes: 13 additions & 0 deletions config/fish/conf.d/90-integrations.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
status --is-interactive; or return

if type -q mise
mise activate fish | source
end

if type -q zoxide
zoxide init fish | source
end

if type -q tendr
tendr completion fish | source
end
7 changes: 7 additions & 0 deletions config/fish/config.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
set -g fish_color_command green
set -g fish_color_error red
set -g fish_color_autosuggestion brblack

if test -f "$HOME/.local.fish"
source "$HOME/.local.fish"
end
8 changes: 8 additions & 0 deletions config/fish/functions/brepo.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
function brepo --description 'Show branches for Git repositories in the current directory'
for d in *
test -d "$d"; or continue

printf '\n%s\n' "$PWD/$d"
command git -C "$d" branch
end
end
74 changes: 74 additions & 0 deletions config/fish/functions/fish_prompt.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
function __jj_prompt_info
type -q jj; or return

set -l jj_data (
jj log \
--ignore-working-copy \
--no-graph \
--color never \
-r @ \
-T 'change_id.shortest() ++ "|" ++ change_id.short(4)' \
2>/dev/null |
head -n 1
)

test -n "$jj_data"; or return

set -l parts (string split '|' -- "$jj_data")
set -l shortest $parts[1]
set -l short4 $parts[2]
set -l remainder (string replace -- "$shortest" '' "$short4")

set_color --bold magenta
printf '%s' "$shortest"

set_color normal
set_color 585858
printf '%s ' "$remainder"

set_color normal
end

function __git_prompt_info
type -q git; or return

set -l branch (git rev-parse --abbrev-ref HEAD 2>/dev/null)
test -n "$branch"; or return

set_color magenta
printf '%s ' "$branch"
set_color normal
end

function __vcs_prompt_info
set -l repo_root (git rev-parse --show-toplevel 2>/dev/null)

if test -n "$repo_root"; and test -d "$repo_root/.jj"
__jj_prompt_info
return
end

__git_prompt_info
end

function fish_prompt
if set -q SSH_CONNECTION; or set -q SSH_CLIENT; or set -q SSH_TTY
set_color green
printf '%s@%s ' "$USER" (prompt_hostname)
end

set_color yellow

if test "$PWD" = "$HOME"
printf '~ '
else
printf '%s ' (path basename "$PWD")
end

__vcs_prompt_info

set_color cyan
printf '%s ' ---

set_color normal
end
4 changes: 4 additions & 0 deletions config/fish/functions/fish_user_key_bindings.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
function fish_user_key_bindings
bind ctrl-h backward-kill-word
bind ctrl-space accept-autosuggestion
end
8 changes: 8 additions & 0 deletions config/fish/functions/stashed.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
function stashed --description 'Show stashes for Git repositories in the current directory'
for d in *
test -d "$d"; or continue

printf '\n%s\n' "$PWD/$d"
command git -C "$d" stash list
end
end
8 changes: 8 additions & 0 deletions config/fish/functions/urepo.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
function urepo --description 'Pull each Git repository in the current directory'
for d in *
test -d "$d"; or continue

printf '\n%s\n' "$PWD/$d"
command git -C "$d" pull
end
end
3 changes: 3 additions & 0 deletions config/herdr/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,6 @@ key = "prefix+t"
type = "plugin_action"
command = "herdr-navigator.open"
description = "jump to anything"

[experimental]
kitty_graphics = true
3 changes: 3 additions & 0 deletions tag-linux/config/fish/conf.d/20-aliases.linux.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
status --is-interactive; or return

alias ls='ls --color=auto -A -v'
6 changes: 6 additions & 0 deletions tag-macos/config/fish/conf.d/05-homebrew.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
set -gx HOMEBREW_NO_ASK 1
set -gx HOMEBREW_NO_UPGRADE_AUTO_UPDATES_CASKS 1

if test -x /opt/homebrew/bin/brew
/opt/homebrew/bin/brew shellenv fish | source
end
17 changes: 17 additions & 0 deletions tag-macos/config/fish/conf.d/20-aliases.macos.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
status --is-interactive; or return

alias ds='find . -name ".DS_Store" -type f -delete'
alias safe='xattr -r -d com.apple.quarantine'

alias bl='brew list -1 --formula'
alias blc='brew list -1 --cask'

function bd --description 'Show dependencies for Homebrew leaves'
brew leaves | xargs brew deps --formula --for-each | sed "s/^.*:/"(tput setaf 4)"&"(tput sgr0)"/"
end

function bup --description 'Update and clean up Homebrew'
brew update
and brew upgrade
and brew cleanup -s --prune=all
end
9 changes: 8 additions & 1 deletion tag-personal/config/tendr/conjuror.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
root: ~/Code/tombell
root: ~/Code/conjuror-app

after_start:
- |
Expand All @@ -14,3 +14,10 @@ workspaces:
- pi
- label: editor
- label: terminal
- label: website
root: ./website
tabs:
- label: server
- label: agent
- label: editor
- label: terminal
8 changes: 8 additions & 0 deletions tag-work/config/fish/conf.d/20-aliases.work.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
status --is-interactive; or return

function c --description 'Launch Claude and reset the terminal afterward'
claude
and tput reset
end

alias rw='railway'