From 3f2566213518519c661e768dcc879c574d5b3089 Mon Sep 17 00:00:00 2001 From: Spencer Hamm Date: Mon, 15 Sep 2025 23:52:58 -0500 Subject: [PATCH 1/9] updates --- .config/bat/themes/theme.tmTheme | 927 ++++++++++++++++++ .config/fish/completions/branch.fish | 5 - .config/fish/completions/g.fish | 4 - .config/fish/conf.d/00-env.fish | 5 + .config/fish/conf.d/zoxide.fish | 2 + .config/fish/config.fish | 4 + .config/fish/fish_plugins | 1 + .config/fish/functions/cat.fish | 7 + .config/fish/functions/git/gcleanup.fish | 3 + .config/fish/functions/git/gdelete.fish | 2 +- .config/fish/functions/ll.fish | 2 +- .../functions/manager/__detect_manager.fish | 31 + .config/fish/functions/manager/na.fish | 13 + .config/fish/functions/manager/nb.fish | 9 + .config/fish/functions/manager/nc.fish | 9 + .config/fish/functions/manager/ni.fish | 9 + .config/fish/functions/manager/nlx.fish | 15 + .../functions/{managers => manager}/nr.fish | 8 +- .../functions/{managers => manager}/nu.fish | 14 +- .../functions/{managers => manager}/nun.fish | 6 +- .config/fish/functions/managers/__detect.fish | 15 - .config/fish/functions/managers/na.fish | 9 - .config/fish/functions/managers/nb.fish | 4 - .config/fish/functions/managers/nc.fish | 4 - .config/fish/functions/managers/ni.fish | 4 - .config/fish/functions/managers/nlx.fish | 11 - Brewfile | 29 +- README.md | 3 + bin/git-delete-merged-branches | 7 + bin/pipes | 136 --- 30 files changed, 1077 insertions(+), 221 deletions(-) create mode 100644 .config/bat/themes/theme.tmTheme delete mode 100644 .config/fish/completions/branch.fish delete mode 100644 .config/fish/completions/g.fish create mode 100644 .config/fish/conf.d/00-env.fish create mode 100644 .config/fish/conf.d/zoxide.fish create mode 100644 .config/fish/functions/cat.fish create mode 100644 .config/fish/functions/git/gcleanup.fish create mode 100644 .config/fish/functions/manager/__detect_manager.fish create mode 100644 .config/fish/functions/manager/na.fish create mode 100644 .config/fish/functions/manager/nb.fish create mode 100644 .config/fish/functions/manager/nc.fish create mode 100644 .config/fish/functions/manager/ni.fish create mode 100644 .config/fish/functions/manager/nlx.fish rename .config/fish/functions/{managers => manager}/nr.fish (68%) rename .config/fish/functions/{managers => manager}/nu.fish (54%) rename .config/fish/functions/{managers => manager}/nun.fish (53%) delete mode 100644 .config/fish/functions/managers/__detect.fish delete mode 100644 .config/fish/functions/managers/na.fish delete mode 100644 .config/fish/functions/managers/nb.fish delete mode 100644 .config/fish/functions/managers/nc.fish delete mode 100644 .config/fish/functions/managers/ni.fish delete mode 100644 .config/fish/functions/managers/nlx.fish create mode 100755 bin/git-delete-merged-branches delete mode 100755 bin/pipes diff --git a/.config/bat/themes/theme.tmTheme b/.config/bat/themes/theme.tmTheme new file mode 100644 index 0000000..477a70a --- /dev/null +++ b/.config/bat/themes/theme.tmTheme @@ -0,0 +1,927 @@ + + + + + + name + theme + settings + + + settings + + background + #22212C + caret + #f8f8f0 + foreground + #f8f8f2 + invisibles + #3B3A32 + lineHighlight + #454158 + selection + #454158 + findHighlight + #effb7b + findHighlightForeground + #000000 + selectionBorder + #222218 + activeGuide + #9D550FB0 + bracketsForeground + #F8F8F2A5 + bracketsOptions + underline + bracketContentsForeground + #F8F8F2A5 + bracketContentsOptions + underline + tagsOptions + stippled_underline + + + + name + Comment + scope + comment + settings + + foreground + #7970A9 + fontStyle + + + + + name + String + scope + string + settings + + foreground + #FFFF80 + + + + name + Number + scope + constant.numeric + settings + + foreground + #9580FF + + + + name + Built-in constant + scope + constant.language + settings + + foreground + #9580FF + + + + name + User-defined constant + scope + constant.character, constant.other + settings + + foreground + #9580FF + + + + name + Variable + scope + variable + settings + + fontStyle + + + + + name + Ruby's @variable + scope + variable.other.readwrite.instance + settings + + fontStyle + + foreground + #FFCA80 + + + + name + String interpolation + scope + constant.character.escaped, constant.character.escape, string source, string source.ruby + settings + + fontStyle + + foreground + #FF80BF + + + + name + Ruby Regexp + scope + source.ruby string.regexp.classic.ruby,source.ruby string.regexp.mod-r.ruby + settings + + fontStyle + + foreground + #FFAC9B + + + + name + Keyword + scope + keyword + settings + + foreground + #FF80BF + + + + name + Storage + scope + storage + settings + + fontStyle + + foreground + #FF80BF + + + + name + Storage type + scope + storage.type + settings + + fontStyle + italic + foreground + #80FFEA + + + + name + Storage Type Namespace + scope + storage.type.namespace + settings + + fontStyle + italic + foreground + #80FFEA + + + + name + Storage Type Class + scope + storage.type.class + settings + + fontStyle + italic + foreground + #FF80BF + + + + name + Class name + scope + entity.name.class + settings + + fontStyle + underline + foreground + #80FFEA + + + + name + Meta Path + scope + meta.path + settings + + fontStyle + underline + foreground + #66d9ef + + + + name + Inherited class + scope + entity.other.inherited-class + settings + + fontStyle + italic underline + foreground + #80FFEA + + + + name + Function name + scope + entity.name.function + settings + + fontStyle + + foreground + #8AFF80 + + + + name + Function argument + scope + variable.parameter + settings + + fontStyle + italic + foreground + #FFCA80 + + + + name + Tag name + scope + entity.name.tag + settings + + fontStyle + + foreground + #FF80BF + + + + name + Tag attribute + scope + entity.other.attribute-name + settings + + fontStyle + + foreground + #8AFF80 + + + + name + Library function + scope + support.function + settings + + fontStyle + + foreground + #80FFEA + + + + name + Library constant + scope + support.constant + settings + + fontStyle + + foreground + #6be5fd + + + + name + Library class/type + scope + support.type, support.class + settings + + fontStyle + italic + foreground + #66d9ef + + + + name + Library variable + scope + support.other.variable + settings + + fontStyle + + + + + name + Support Other Namespace + scope + support.other.namespace + settings + + fontStyle + italic + foreground + #66d9ef + + + + name + Invalid + scope + invalid + settings + + background + #FF80BF + fontStyle + + foreground + #F8F8F0 + + + + name + Invalid deprecated + scope + invalid.deprecated + settings + + background + #9580FF + foreground + #F8F8F0 + + + + name + JSON String + scope + meta.structure.dictionary.json string.quoted.double.json + settings + + foreground + #CFCFC2 + + + + name + diff.header + scope + meta.diff, meta.diff.header + settings + + foreground + #7970A9 + + + + name + diff.deleted + scope + markup.deleted + settings + + foreground + #FF80BF + + + + name + diff.inserted + scope + markup.inserted + settings + + foreground + #8AFF80 + + + + name + diff.changed + scope + markup.changed + settings + + foreground + #E6DB74 + + + + scope + constant.numeric.line-number.find-in-files - match + settings + + foreground + #9580FF + + + + scope + entity.name.filename + settings + + foreground + #E6DB74 + + + + scope + message.error + settings + + foreground + #F83333 + + + + name + JSON Punctuation + scope + punctuation.definition.string.begin.json - meta.structure.dictionary.value.json, punctuation.definition.string.end.json - meta.structure.dictionary.value.json + settings + + foreground + #EEEEEE + + + + name + JSON Structure + scope + meta.structure.dictionary.json string.quoted.double.json + settings + + foreground + #80FFEA + + + + name + JSON String + scope + meta.structure.dictionary.value.json string.quoted.double.json + settings + + foreground + #FFFF80 + + + + name + JSON: 6 deep + scope + meta meta meta meta meta meta meta.structure.dictionary.value string + settings + + foreground + #8AFF80 + + + + name + JSON: 5 deep + scope + meta meta meta meta meta meta.structure.dictionary.value string + settings + + foreground + #FFCA80 + + + + name + JSON: 4 deep + scope + meta meta meta meta meta.structure.dictionary.value string + settings + + foreground + #FF80BF + + + + name + JSON: 3 deep + scope + meta meta meta meta.structure.dictionary.value string + settings + + foreground + #9580FF + + + + name + JSON: 2 deep + scope + meta meta meta.structure.dictionary.value string + settings + + foreground + #8AFF80 + + + + name + JSON: 1 deep + scope + meta meta.structure.dictionary.value string + settings + + foreground + #FFCA80 + + + + + + name + Markup: strike + scope + markup.strike + settings + + fontStyle + italic + foreground + #FFCA80 + + + + name + Markup: bold + scope + markup.bold + settings + + fontStyle + bold + foreground + #FFCA80 + + + + name + Markup: italic + scope + markup.italic + settings + + fontStyle + italic + foreground + #FFCA80 + + + + name + Markdown: heading + scope + markup.heading + settings + + foreground + #80FFEA + + + + name + Markdown: List Items Punctuation + scope + punctuation.definition.list_item.markdown + settings + + foreground + #FF80BF + + + + name + Markdown: Blockquote + scope + markup.quote + settings + + fontStyle + italic + foreground + #7970A9 + + + + name + Markdown: Blockquote Punctuation + scope + punctuation.definition.blockquote.markdown + settings + + fontStyle + italic + background + #7970A9 + foreground + #7970A9 + + + + name + Markdown: Separator + scope + meta.separator + settings + + foreground + #7970A9 + + + + name + Markup: raw inline + scope + text.html.markdown markup.raw.inline + settings + + foreground + #8AFF80 + + + + name + Markup: underline + scope + markup.underline + settings + + fontStyle + underline + foreground + #9580FF + + + + name + Markup: Raw block + scope + markup.raw.block + settings + + foreground + #CFCFC2 + + + + name + Markdown: Raw Block fenced source + scope + markup.raw.block.fenced.markdown source + settings + + foreground + #F8F8F2 + + + + name + Markdown: Fenced Bode Block + scope + punctuation.definition.fenced.markdown, variable.language.fenced.markdown + settings + + fontStyle + italic + foreground + #7970A9 + + + + name + Markdown: Fenced Language + scope + variable.language.fenced.markdown + settings + + fontStyle + italic + foreground + #7970A9 + + + + name + Punctuation Accessor + scope + punctuation.accessor + settings + + foreground + #FF80BF + + + + name + Meta Function Return Type + scope + meta.function.return-type + settings + + foreground + #FF80BF + + + + name + Punctuation Section Block Begin + scope + punctuation.section.block.begin + settings + + foreground + #ffffff + + + + name + Punctuation Section Block End + scope + punctuation.section.block.end + settings + + foreground + #ffffff + + + + name + Punctuation Section Embedded Begin + scope + punctuation.section.embedded.begin + settings + + foreground + #FF80BF + + + + name + Punctuation Section Embedded End + scope + punctuation.section.embedded.end + settings + + foreground + #FF80BF + + + + name + Punctuation Separator Namespace + scope + punctuation.separator.namespace + settings + + foreground + #FF80BF + + + + name + Variable Function + scope + variable.function + settings + + foreground + #8AFF80 + + + + name + Variable Other + scope + variable.other + settings + + foreground + #ffffff + + + + name + Variable Language + scope + variable.language + settings + + foreground + #9580FF + + + + name + Entity Name Module Ruby + scope + entity.name.module.ruby + settings + + foreground + #80FFEA + + + + name + Entity Name Constant Ruby + scope + entity.name.constant.ruby + settings + + foreground + #9580FF + + + + name + Support Function Builtin Ruby + scope + support.function.builtin.ruby + settings + + foreground + #ffffff + + + + name + Storage Type Namespace CS + scope + storage.type.namespace.cs + settings + + foreground + #FF80BF + + + + name + Entity Name Namespace CS + scope + entity.name.namespace.cs + settings + + foreground + #80FFEA + + + + uuid + 83091B89-765E-4F0D-9275-0EC6CB084126 + colorSpaceName + sRGB + semanticClass + theme.dracula + author + Zeno Rocha + + diff --git a/.config/fish/completions/branch.fish b/.config/fish/completions/branch.fish deleted file mode 100644 index 3ad6fd9..0000000 --- a/.config/fish/completions/branch.fish +++ /dev/null @@ -1,5 +0,0 @@ -source $__fish_data_dir/completions/git.fish - -# Merge command - -complete -f -x -c branch -a '(__fish_git_branches)' diff --git a/.config/fish/completions/g.fish b/.config/fish/completions/g.fish deleted file mode 100644 index 0b521be..0000000 --- a/.config/fish/completions/g.fish +++ /dev/null @@ -1,4 +0,0 @@ -complete -c g -w git - -complete -c g -n __fish_git_needs_command -a track -d 'Change branch tracking' -complete -f -c g -n '__fish_git_using_command track' -a "(__fish_git_remotes)" diff --git a/.config/fish/conf.d/00-env.fish b/.config/fish/conf.d/00-env.fish new file mode 100644 index 0000000..0674c70 --- /dev/null +++ b/.config/fish/conf.d/00-env.fish @@ -0,0 +1,5 @@ +set -q XDG_CONFIG_HOME; or set -Ux XDG_CONFIG_HOME $HOME/.config +set -q XDG_DATA_HOME; or set -Ux XDG_DATA_HOME $HOME/.local/share +set -q XDG_STATE_HOME; or set -Ux XDG_STATE_HOME $HOME/.local/state +set -q XDG_CACHE_HOME; or set -Ux XDG_CACHE_HOME $HOME/.cache +mkdir -p $XDG_CONFIG_HOME $XDG_DATA_HOME $XDG_STATE_HOME $XDG_CACHE_HOME diff --git a/.config/fish/conf.d/zoxide.fish b/.config/fish/conf.d/zoxide.fish new file mode 100644 index 0000000..7aa54e6 --- /dev/null +++ b/.config/fish/conf.d/zoxide.fish @@ -0,0 +1,2 @@ +type -q zoxide || return 1 +zoxide init fish | source diff --git a/.config/fish/config.fish b/.config/fish/config.fish index a4e2e25..73e0a16 100644 --- a/.config/fish/config.fish +++ b/.config/fish/config.fish @@ -26,6 +26,7 @@ fish_add_path -a ~/bin fish_add_path -a $VOLTA_HOME/bin fish_add_path -a $PNPM_HOME fish_add_path -a $BUN_INSTALL/bin +fish_add_path -a $HOME/.cargo/bin # Add function subdirectories to fish_function_path set fish_function_path (path resolve $__fish_config_dir/functions/*/) $fish_function_path @@ -35,6 +36,9 @@ set -gx PAGER less set -gx VISUAL code-insiders set -gx EDITOR hx +# Shared variables for internal functions +set -g ignored_git_dirs main master next + # Add any computer specific configs if test -e "$HOME/.extra.fish"; source ~/.extra.fish diff --git a/.config/fish/fish_plugins b/.config/fish/fish_plugins index 603f2b8..5b1e07f 100644 --- a/.config/fish/fish_plugins +++ b/.config/fish/fish_plugins @@ -2,3 +2,4 @@ jorgebucaran/fisher mattgreen/lucid.fish franciscolourenco/done kidonng/zoxide.fish +jorgebucaran/autopair.fish diff --git a/.config/fish/functions/cat.fish b/.config/fish/functions/cat.fish new file mode 100644 index 0000000..120f1da --- /dev/null +++ b/.config/fish/functions/cat.fish @@ -0,0 +1,7 @@ +function cat -d "Wrapper around cat" + if type -q bat + bat -p --theme theme $argv + else + cat + end +end diff --git a/.config/fish/functions/git/gcleanup.fish b/.config/fish/functions/git/gcleanup.fish new file mode 100644 index 0000000..c69a42f --- /dev/null +++ b/.config/fish/functions/git/gcleanup.fish @@ -0,0 +1,3 @@ +function gcleanup -d "Cleanup local branches that have been merged or squashed" + +end diff --git a/.config/fish/functions/git/gdelete.fish b/.config/fish/functions/git/gdelete.fish index dfd63cf..9c3c5dc 100644 --- a/.config/fish/functions/git/gdelete.fish +++ b/.config/fish/functions/git/gdelete.fish @@ -1,6 +1,6 @@ function gdelete -d "Delete selected branches" git branch --format="%(refname:short)" | - grep -vE "(main|master)" | + egrep -v "$(string join '|' $ignored_git_dirs)" | gum choose --no-limit $branches | xargs git branch -D end diff --git a/.config/fish/functions/ll.fish b/.config/fish/functions/ll.fish index 45fb376..68ee661 100644 --- a/.config/fish/functions/ll.fish +++ b/.config/fish/functions/ll.fish @@ -1,6 +1,6 @@ # Single line list all with hidden files function ll -d "List contents of directory" - if type -q exa + if type -q eza eza -1 --group-directories-first $argv else ls -1a $argv diff --git a/.config/fish/functions/manager/__detect_manager.fish b/.config/fish/functions/manager/__detect_manager.fish new file mode 100644 index 0000000..ca4d7a4 --- /dev/null +++ b/.config/fish/functions/manager/__detect_manager.fish @@ -0,0 +1,31 @@ +function __detect_manager + set -l git_root (command git rev-parse --show-toplevel 2>/dev/null) + + if test -n "$git_root" + if test -e "$git_root/package.json" + __detect_manager_switch git_root + else + echo "Inside a .git directory, but no package.json found in project root" + return 1 + end + else if test -e "$PWD/package.json" + __detect_manager_switch $pwd + else + echo "No package.json found in current directory" + return 1 + end +end + +function __detect_manager_switch + if test -e "$argv/pnpm-lock.yaml" + echo "pnpm" + else if test -e "$argv/yarn.lock" + echo "yarn" + else if test -e "$argv/bun.lockb" + echo "bun" + else if test -e "$argv/package-lock.json" + echo "npm" + else + echo "pnpm" + end +end diff --git a/.config/fish/functions/manager/na.fish b/.config/fish/functions/manager/na.fish new file mode 100644 index 0000000..665f3a2 --- /dev/null +++ b/.config/fish/functions/manager/na.fish @@ -0,0 +1,13 @@ +function na -d "Add a dependency for the current package manager" + set -l manager (__detect_manager) + if test $status -eq 1 + echo $manager + return + end + + if test $manager = "npm" + command npm install $argv + else + command $manager add $argv + end +end diff --git a/.config/fish/functions/manager/nb.fish b/.config/fish/functions/manager/nb.fish new file mode 100644 index 0000000..f26de7d --- /dev/null +++ b/.config/fish/functions/manager/nb.fish @@ -0,0 +1,9 @@ +function nb -d "Binary for the current package manager" + set -l manager (__detect_manager) + if test $status -eq 1 + echo $manager + return + end + + command $manager $argv +end diff --git a/.config/fish/functions/manager/nc.fish b/.config/fish/functions/manager/nc.fish new file mode 100644 index 0000000..19df5c6 --- /dev/null +++ b/.config/fish/functions/manager/nc.fish @@ -0,0 +1,9 @@ +function nc -d "Run create command for the current package manager" + set -l manager (__detect_manager) + if test $status -eq 1 + echo $manager + return + end + + command $manager create $argv +end diff --git a/.config/fish/functions/manager/ni.fish b/.config/fish/functions/manager/ni.fish new file mode 100644 index 0000000..50d94d1 --- /dev/null +++ b/.config/fish/functions/manager/ni.fish @@ -0,0 +1,9 @@ +function ni -d "Install dependencies for the current package manager" + set -l manager (__detect_manager) + if test $status -eq 1 + echo $manager + return + end + + command $manager install $argv +end diff --git a/.config/fish/functions/manager/nlx.fish b/.config/fish/functions/manager/nlx.fish new file mode 100644 index 0000000..81d7f2a --- /dev/null +++ b/.config/fish/functions/manager/nlx.fish @@ -0,0 +1,15 @@ +function ni -d "Download and execute current package manager" + set -l manager (__detect_manager) + if test $status -eq 1 + echo $manager + return + end + + if test $manager = "pnpm" + command pnpm dlx $argv + else if $manager = "bun" + command bunx $argv + else + command npx add $argv + end +end diff --git a/.config/fish/functions/managers/nr.fish b/.config/fish/functions/manager/nr.fish similarity index 68% rename from .config/fish/functions/managers/nr.fish rename to .config/fish/functions/manager/nr.fish index 44818ec..ead441e 100644 --- a/.config/fish/functions/managers/nr.fish +++ b/.config/fish/functions/manager/nr.fish @@ -1,8 +1,12 @@ function nr -d "Run a script from package.json for the current package manager" - set -l manager (__detect) + set -l manager (__detect_manager) + if test $status -eq 1 + echo $manager + return + end if count $argv > /dev/null - $manager $argv + command $manager $argv else cat package.json | \ yq '.scripts | sort_keys(.) | keys | join(" ")' | \ diff --git a/.config/fish/functions/managers/nu.fish b/.config/fish/functions/manager/nu.fish similarity index 54% rename from .config/fish/functions/managers/nu.fish rename to .config/fish/functions/manager/nu.fish index f04b847..a4641a4 100644 --- a/.config/fish/functions/managers/nu.fish +++ b/.config/fish/functions/manager/nu.fish @@ -2,21 +2,25 @@ function nu -d "Update dependencies for the current package manager" argparse --name=nu 'i/interactive' -- $argv or return - set -l manager (__detect) + set -l manager (__detect_manager) + if test $status -eq 1 + echo $manager + return + end if test -n "$_flag_i" if test $manager = "yarn" - yarn upgrade-interactive $argv + command yarn upgrade-interactive $argv else if $manager = "pnpm" - pnpm update -i $argv + command pnpm update -i $argv end return end if test $manager = "yarn" - yarn upgrade $argv + command yarn upgrade $argv else - $manager update $argv + command $manager update $argv end end diff --git a/.config/fish/functions/managers/nun.fish b/.config/fish/functions/manager/nun.fish similarity index 53% rename from .config/fish/functions/managers/nun.fish rename to .config/fish/functions/manager/nun.fish index ebbbaff..99758ab 100644 --- a/.config/fish/functions/managers/nun.fish +++ b/.config/fish/functions/manager/nun.fish @@ -1,9 +1,9 @@ function nun -d "Uninstall dependencies for the current package manager" - set -l manager (__detect) + set -l manager (__detect_manager) if test $manager = "npm" - npm uninstall $argv + command npm uninstall $argv else - $manager remove $argv + command $manager remove $argv end end diff --git a/.config/fish/functions/managers/__detect.fish b/.config/fish/functions/managers/__detect.fish deleted file mode 100644 index f39971c..0000000 --- a/.config/fish/functions/managers/__detect.fish +++ /dev/null @@ -1,15 +0,0 @@ -function __detect - set -l reporoot (git rev-parse --show-toplevel) - - if test -e "$reporoot/pnpm-lock.yaml" - echo "pnpm" - else if test -e "$reporoot/yarn.lock" - echo "yarn" - else if test -e "$reporoot/bun.lockb" - echo "bun" - else if test -e "$reporoot/package-lock.json" - echo "npm" - else - echo "A package manager lockfile was not found" - end -end diff --git a/.config/fish/functions/managers/na.fish b/.config/fish/functions/managers/na.fish deleted file mode 100644 index 8155c97..0000000 --- a/.config/fish/functions/managers/na.fish +++ /dev/null @@ -1,9 +0,0 @@ -function na -d "Add a dependency for the current package manager" - set -l manager (__detect) - - if test $manager = "npm" - npm install $argv - else - $manager add $argv - end -end diff --git a/.config/fish/functions/managers/nb.fish b/.config/fish/functions/managers/nb.fish deleted file mode 100644 index 0a13d94..0000000 --- a/.config/fish/functions/managers/nb.fish +++ /dev/null @@ -1,4 +0,0 @@ -function nb -d "Binary for the current package manager" - set -l manager (__detect) - $manager $argv -end diff --git a/.config/fish/functions/managers/nc.fish b/.config/fish/functions/managers/nc.fish deleted file mode 100644 index 31b0ace..0000000 --- a/.config/fish/functions/managers/nc.fish +++ /dev/null @@ -1,4 +0,0 @@ -function nc -d "Run create command for the current package manager" - set -l manager (__detect) - $manager create $argv -end diff --git a/.config/fish/functions/managers/ni.fish b/.config/fish/functions/managers/ni.fish deleted file mode 100644 index fb50c5e..0000000 --- a/.config/fish/functions/managers/ni.fish +++ /dev/null @@ -1,4 +0,0 @@ -function ni -d "Install dependencies for the current package manager" - set -l manager (__detect) - $manager install $argv -end diff --git a/.config/fish/functions/managers/nlx.fish b/.config/fish/functions/managers/nlx.fish deleted file mode 100644 index dc2151b..0000000 --- a/.config/fish/functions/managers/nlx.fish +++ /dev/null @@ -1,11 +0,0 @@ -function ni -d "Download and execute current package manager" - set -l manager (__detect) - - if test $manager = "pnpm" - pnpm dlx $argv - else if $manager = "bun" - bunx $argv - else - npx add $argv - end -end diff --git a/Brewfile b/Brewfile index 3363749..633a5bc 100644 --- a/Brewfile +++ b/Brewfile @@ -25,6 +25,8 @@ brew "hyperfine" brew "jq" brew "just" brew "mas" +brew "miniserve" +brew "pipes-sh" brew "procs" brew "rclone" brew "readline" @@ -38,6 +40,7 @@ brew "tealdeer" brew "terminal-notifier" brew "tokei" brew "vhs" +brew "watchexec" brew "watchman" brew "webp" brew "youtube-dl" @@ -46,7 +49,7 @@ brew "zellij" brew "zoxide" cask "1password" -cask "arc" +cask "alacritty" cask "audio-hijack" cask "cleanshot" cask "farrago" @@ -54,34 +57,26 @@ cask "figma" cask "firefox" cask "fission" cask "forklift" -cask "google-chrome" +cask "ghostty" cask "iina" cask "insomnia" cask "loopback" +cask "jordanbaird-ice" cask "raycast" cask "rectangle-pro" cask "soundsource" cask "visual-studio-code" -cask "font-input" -cask "font-inter" -cask "font-jetbrains-mono-nerd-font" -cask "font-roboto-mono" -cask "font-roboto" -cask "font-sf-compact" -cask "font-sf-mono" -cask "font-sf-pro" - mas "Amphetamine", id: 937984704 mas "Bear", id: 1091189122 mas "DaisyDisk", id: 411643860 -mas "Dato", id: 1470584107 +# mas "Dato", id: 1470584107 mas "Dropover", id: 1355679052 mas "iA Writer", id: 775737590 mas "Keka", id: 470158793 -mas "Keynote", id: 409183694 -mas "Numbers", id: 409203825 -mas "Pages", id: 409201541 -mas "Photomator", id: 1444636541 -mas "Pixelmator Pro", id: 1289583905 +# mas "Keynote", id: 409183694 +# mas "Numbers", id: 409203825 +# mas "Pages", id: 409201541 +# mas "Photomator", id: 1444636541 +# mas "Pixelmator Pro", id: 1289583905 mas "Things", id: 904280696 diff --git a/README.md b/README.md index e69de29..afc2616 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,3 @@ +# dotfiles + +🏡 🎂 🏡 diff --git a/bin/git-delete-merged-branches b/bin/git-delete-merged-branches new file mode 100755 index 0000000..eec965d --- /dev/null +++ b/bin/git-delete-merged-branches @@ -0,0 +1,7 @@ +#!/usr/bin/env zsh + +branches=$(git branch --no-color --merged | grep -vE "^(\*|\+)" | grep -vE "(main|master)") +if [ -n "$branches" ] +then + echo "$branches" | xargs -n 1 git branch -d +fi diff --git a/bin/pipes b/bin/pipes deleted file mode 100755 index 701fcad..0000000 --- a/bin/pipes +++ /dev/null @@ -1,136 +0,0 @@ -#!/usr/bin/env bash -# pipes.sh: Animated pipes terminal screensaver. -# -# This modified version is maintained at: -# -# https://github.com/pipeseroni/pipes.sh - -VERSION=1.2.0 - -M=32768 -p=1 -f=75 s=13 r=2000 t=0 -w=80 h=24 - -resize() { - w=$(tput cols) h=$(tput lines) -} - -# ab -> idx = a*4 + b -# 0: up, 1: right, 2: down, 3: left -# 00 means going up , then going up -> ┃ -# 12 means going right, then going down -> ┓ -sets=( - "┃┏ ┓┛━┓ ┗┃┛┗ ┏━" - "│╭ ╮╯─╮ ╰│╯╰ ╭─" - "│┌ ┐┘─┐ └│┘└ ┌─" - "║╔ ╗╝═╗ ╚║╝╚ ╔═" - "|+ ++-+ +|++ +-" - "|/ \/-\ \|/\ /-" - ".. .... .... .." - ".o oo.o o.oo o." - "-\ /\|/ /-\/ \|" # railway - "╿┍ ┑┚╼┒ ┕╽┙┖ ┎╾" # knobby pipe -) -v=() -RNDSTART=0 -BOLD=1 -NOCOLOR=0 - -OPTIND=1 -while getopts "p:t:f:s:r:RBChv" arg; do -case $arg in - p) ((p=(OPTARG>0)?OPTARG:p));; - t) - if [[ "$OPTARG" = c???????????????? ]]; then - V+=(${#sets[@]}) - sets+=("${OPTARG:1}") - else - ((OPTARG>=0 && OPTARG<${#sets[@]})) && V+=($OPTARG) - fi - ;; - f) ((f=(OPTARG>19 && OPTARG<101)?OPTARG:f));; - s) ((s=(OPTARG>4 && OPTARG<16 )?OPTARG:s));; - r) ((r=(OPTARG>=0)?OPTARG:r));; - R) RNDSTART=1;; - B) BOLD=0;; - C) NOCOLOR=1;; - h) echo -e "Usage: $(basename $0) [OPTION]..." - echo -e "Animated pipes terminal screensaver.\n" - echo -e " -p [1-]\tnumber of pipes (D=1)." - echo -e " -t [0-$((${#sets[@]} - 1))]\ttype of pipes, can be used more than once (D=0)." - echo -e " -t c[16 chars]\tcustom type of pipes." - echo -e " -f [20-100]\tframerate (D=75)." - echo -e " -s [5-15]\tprobability of a straight fitting (D=13)." - echo -e " -r LIMIT\treset after x characters, 0 if no limit (D=2000)." - echo -e " -R \t\trandom starting point." - echo -e " -B \t\tno bold effect." - echo -e " -C \t\tno color." - echo -e " -h\t\thelp (this screen)." - echo -e " -v\t\tprint version number.\n" - exit 0;; - v) echo "$(basename -- "$0") $VERSION" - exit 0 - esac -done - -# set default values if not by options -((${#V[@]})) || V=(0) - -cleanup() { - # clear up standard input - read -t 0.001 && cat /dev/null - - # terminal has no smcup and rmcup capabilities - ((FORCE_RESET)) && reset && exit 0 - - tput rmcup - tput cnorm - stty echo - ((NOCOLOR)) && echo -ne '\x1b[0m' - exit 0 -} -trap resize SIGWINCH -trap cleanup HUP TERM -trap 'break 2' INT - -resize - -for (( i=1; i<=p; i++ )); do - c[i]=$((i%8)) n[i]=0 l[i]=0 - ((x[i]=RNDSTART==1?RANDOM*w/32768:w/2)) - ((y[i]=RNDSTART==1?RANDOM*h/32768:h/2)) - v[i]=${V[${#V[@]} * RANDOM / M]} -done - -stty -echo -tput smcup || FORCE_RESET=1 -tput civis -tput clear -# any key press exits the loop and this script -while REPLY=; read -t 0.0$((1000/f)) -n 1 2>/dev/null; [[ -z $REPLY ]] ; do - for (( i=1; i<=p; i++ )); do - # New position: - ((${l[i]}%2)) && ((x[i]+=-${l[i]}+2,1)) || ((y[i]+=${l[i]}-1)) - - # Loop on edges (change color on loop): - ((${x[i]}>=w||${x[i]}<0||${y[i]}>=h||${y[i]}<0)) && ((c[i]=RANDOM%8, v[i]=V[${#V[@]}*RANDOM/M])) - ((x[i]=(x[i]+w)%w)) - ((y[i]=(y[i]+h)%h)) - - # New random direction: - ((n[i]=RANDOM%s-1)) - ((n[i]=(${n[i]}>1||${n[i]}==0)?${l[i]}:${l[i]}+${n[i]})) - ((n[i]=(${n[i]}<0)?3:${n[i]}%4)) - - # Print: - tput cup ${y[i]} ${x[i]} - echo -ne "\x1b[${BOLD}m" - [[ $NOCOLOR == 0 ]] && echo -ne "\x1b[3${c[i]}m" - echo -n "${sets[v[i]]:l[i]*4+n[i]:1}" - l[i]=${n[i]} - done - ((r>0 && t*p>=r)) && tput reset && tput civis && t=0 || ((t++)) -done - -cleanup \ No newline at end of file From ccf665984fec11e9d7f3fa1ebeb74e1303567f8a Mon Sep 17 00:00:00 2001 From: Spencer Hamm Date: Fri, 10 Oct 2025 02:27:36 -0500 Subject: [PATCH 2/9] updates --- .config/fish/fish_plugins | 1 - .config/fish/functions/{ => aliases}/cat.fish | 2 +- .config/fish/functions/aliases/code.fish | 8 +++++ .config/fish/functions/e.fish | 6 ++-- .config/ghostty/config | 11 +++++++ .config/ghostty/themes/personal | 22 ++++++++++++++ .config/mise/config.toml | 0 .stow-local-ignore | 1 + Brewfile | 30 +++++++++++-------- Justfile | 6 ++++ Masfile | 6 ++++ 11 files changed, 75 insertions(+), 18 deletions(-) rename .config/fish/functions/{ => aliases}/cat.fish (58%) create mode 100644 .config/fish/functions/aliases/code.fish create mode 100644 .config/ghostty/config create mode 100644 .config/ghostty/themes/personal create mode 100644 .config/mise/config.toml create mode 100644 Masfile diff --git a/.config/fish/fish_plugins b/.config/fish/fish_plugins index 5b1e07f..7146e17 100644 --- a/.config/fish/fish_plugins +++ b/.config/fish/fish_plugins @@ -1,5 +1,4 @@ jorgebucaran/fisher mattgreen/lucid.fish franciscolourenco/done -kidonng/zoxide.fish jorgebucaran/autopair.fish diff --git a/.config/fish/functions/cat.fish b/.config/fish/functions/aliases/cat.fish similarity index 58% rename from .config/fish/functions/cat.fish rename to .config/fish/functions/aliases/cat.fish index 120f1da..7f36df5 100644 --- a/.config/fish/functions/cat.fish +++ b/.config/fish/functions/aliases/cat.fish @@ -1,4 +1,4 @@ -function cat -d "Wrapper around cat" +function cat --wraps="bat" -d "Wrapper around cat" if type -q bat bat -p --theme theme $argv else diff --git a/.config/fish/functions/aliases/code.fish b/.config/fish/functions/aliases/code.fish new file mode 100644 index 0000000..99ec139 --- /dev/null +++ b/.config/fish/functions/aliases/code.fish @@ -0,0 +1,8 @@ +function vscode --wraps='open -b com.microsoft.VSCode' --description 'alias vscode open -b com.microsoft.VSCode' + # https://github.com/fish-shell/fish-shell/issues/9127 + if test $VISUAL = 'code-insiders' + open -b com.microsoft.VSCodeInsiders $argv + else + open -b com.microsoft.VSCode $argv + end +end diff --git a/.config/fish/functions/e.fish b/.config/fish/functions/e.fish index f84f60b..e00f8de 100644 --- a/.config/fish/functions/e.fish +++ b/.config/fish/functions/e.fish @@ -1,8 +1,8 @@ -function e -d "Open in default editor" +function e --wraps='open -b com.microsoft.VSCode' --description "Open in default editor" if count $argv > /dev/null # $EDITOR $argv - $VISUAL $argv + code $argv else - $VISUAL . + code . end end diff --git a/.config/ghostty/config b/.config/ghostty/config new file mode 100644 index 0000000..97277b9 --- /dev/null +++ b/.config/ghostty/config @@ -0,0 +1,11 @@ +# font-family = Berkeley Mono +font-family = TX-02 +font-size = 12 +theme = personal +window-padding-x = 8 +window-padding-y = 8 +macos-window-shadow = false +window-colorspace = display-p3 +window-height = 25 +window-width = 85 +macos-titlebar-proxy-icon = hidden diff --git a/.config/ghostty/themes/personal b/.config/ghostty/themes/personal new file mode 100644 index 0000000..36ad27b --- /dev/null +++ b/.config/ghostty/themes/personal @@ -0,0 +1,22 @@ +palette = 0=#7970A9 +palette = 1=#FF9580 +palette = 2=#8AFF80 +palette = 3=#FFFF80 +palette = 4=#9580FF +palette = 5=#FF80BF +palette = 6=#80FFEA +palette = 7=#F8F8F2 +palette = 8=#7970A9 +palette = 9=#FFAA99 +palette = 10=#A2FF99 +palette = 11=#FFFF99 +palette = 12=#AA99FF +palette = 13=#FF99CC +palette = 14=#99FFEE +palette = 15=#FFFFFF +background = #22212C +foreground = #F8F8F2 +cursor-color = #B9ADFF +cursor-text = #ffffff +selection-background = #52576B +selection-foreground = #ffffff diff --git a/.config/mise/config.toml b/.config/mise/config.toml new file mode 100644 index 0000000..e69de29 diff --git a/.stow-local-ignore b/.stow-local-ignore index 3b84b72..682becb 100644 --- a/.stow-local-ignore +++ b/.stow-local-ignore @@ -9,4 +9,5 @@ Justfile macos +Masfile Brewfile.lock.json diff --git a/Brewfile b/Brewfile index 633a5bc..86f8dff 100644 --- a/Brewfile +++ b/Brewfile @@ -1,32 +1,39 @@ -tap "homebrew/bundle" -tap "homebrew/cask-fonts" - brew "bat" +brew "bazelisk" +brew "biome" +brew "buildifier" +brew "cmake" brew "coreutils" brew "difftastic" brew "direnv" +brew "dive" brew "eza" brew "fd" brew "ffmpeg" brew "fish" brew "fzf" +brew "fzy" brew "gh" -brew "git" brew "git-delta" brew "git-lfs" +brew "git" brew "glow" brew "gnupg" +brew "gnutls" brew "gpg" brew "grc" brew "grex" brew "gum" brew "helix" +brew "httpie" brew "hyperfine" brew "jq" brew "just" +brew "lazygit" +brew "libyaml" brew "mas" brew "miniserve" -brew "pipes-sh" +brew "mise" brew "procs" brew "rclone" brew "readline" @@ -37,13 +44,16 @@ brew "sd" brew "stow" brew "tailspin" brew "tealdeer" +brew "television" brew "terminal-notifier" brew "tokei" +brew "unbound" brew "vhs" +brew "volta" brew "watchexec" brew "watchman" brew "webp" -brew "youtube-dl" +brew "yazi" brew "yq" brew "zellij" brew "zoxide" @@ -59,24 +69,18 @@ cask "fission" cask "forklift" cask "ghostty" cask "iina" -cask "insomnia" cask "loopback" cask "jordanbaird-ice" cask "raycast" cask "rectangle-pro" cask "soundsource" cask "visual-studio-code" +cask "visual-studio-code@insiders" mas "Amphetamine", id: 937984704 mas "Bear", id: 1091189122 mas "DaisyDisk", id: 411643860 -# mas "Dato", id: 1470584107 mas "Dropover", id: 1355679052 mas "iA Writer", id: 775737590 mas "Keka", id: 470158793 -# mas "Keynote", id: 409183694 -# mas "Numbers", id: 409203825 -# mas "Pages", id: 409201541 -# mas "Photomator", id: 1444636541 -# mas "Pixelmator Pro", id: 1289583905 mas "Things", id: 904280696 diff --git a/Justfile b/Justfile index 04de8d4..e0479cc 100644 --- a/Justfile +++ b/Justfile @@ -4,5 +4,11 @@ install: uninstall: stow -D . +installmas: + brew bundle install --file=./Masfile + +dumpmas: + brew bundle dump --force --file=- | grep '^mas' > Masfile + bins: chmod +x bin/* diff --git a/Masfile b/Masfile new file mode 100644 index 0000000..06c07cd --- /dev/null +++ b/Masfile @@ -0,0 +1,6 @@ +mas "Dato", id: 1470584107 +mas "Keynote", id: 409183694 +mas "Numbers", id: 409203825 +mas "Pages", id: 409201541 +mas "Photomator", id: 1444636541 +mas "Pixelmator Pro", id: 1289583905 From f4bcb66dadbac255c887625eb13c48d08942235d Mon Sep 17 00:00:00 2001 From: Spencer Hamm Date: Fri, 10 Oct 2025 03:29:30 -0500 Subject: [PATCH 3/9] updates --- .config/fish/conf.d/abbrs.fish | 5 ++++- Brewfile | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.config/fish/conf.d/abbrs.fish b/.config/fish/conf.d/abbrs.fish index 896e901..b9c51a5 100644 --- a/.config/fish/conf.d/abbrs.fish +++ b/.config/fish/conf.d/abbrs.fish @@ -9,11 +9,14 @@ abbr -a -- gc 'git commit -m' abbr -a -- gb 'git branch' abbr -a -- gi 'gignore' -# Yarn +# Node Package Managers abbr -a -- s 'nr start' abbr -a -- b 'nr build' abbr -a -- t 'nr test' +abbr -a -- c clear +abbr -a -- h history + # Misc abbr --add dotdot --regex '^\.\.+$' --function multicd abbr --add !! --position anywhere --function last_history_item diff --git a/Brewfile b/Brewfile index 86f8dff..20bc3ec 100644 --- a/Brewfile +++ b/Brewfile @@ -41,6 +41,7 @@ brew "rename" brew "ripgrep" brew "rm-improved" brew "sd" +brew "starship" brew "stow" brew "tailspin" brew "tealdeer" From 45c70ed93541aba029a45e95497e28954df83d22 Mon Sep 17 00:00:00 2001 From: Spencer Hamm Date: Fri, 10 Oct 2025 03:38:53 -0500 Subject: [PATCH 4/9] fix code function --- .config/fish/functions/aliases/code.fish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/fish/functions/aliases/code.fish b/.config/fish/functions/aliases/code.fish index 99ec139..1fadef1 100644 --- a/.config/fish/functions/aliases/code.fish +++ b/.config/fish/functions/aliases/code.fish @@ -1,4 +1,4 @@ -function vscode --wraps='open -b com.microsoft.VSCode' --description 'alias vscode open -b com.microsoft.VSCode' +function code --wraps='open -b com.microsoft.VSCode' --description 'alias vscode open -b com.microsoft.VSCode' # https://github.com/fish-shell/fish-shell/issues/9127 if test $VISUAL = 'code-insiders' open -b com.microsoft.VSCodeInsiders $argv From 0e89510622060c220067c0b1c683318583d7cee1 Mon Sep 17 00:00:00 2001 From: Spencer Hamm Date: Mon, 27 Oct 2025 01:19:30 -0500 Subject: [PATCH 5/9] updates --- .config/fish/config.fish | 25 +++++++++---- .config/fish/fish_plugins | 1 - .config/fish/functions/git/gcleanup.fish | 3 -- .config/ghostty/berkeley-mono-variable | 45 ++++++++++++++++++++++++ .config/ghostty/config | 12 ++++--- .config/starship/starship.toml | 23 ++++++++++++ bin/git-info | 38 -------------------- 7 files changed, 94 insertions(+), 53 deletions(-) delete mode 100644 .config/fish/functions/git/gcleanup.fish create mode 100644 .config/ghostty/berkeley-mono-variable create mode 100644 .config/starship/starship.toml delete mode 100755 bin/git-info diff --git a/.config/fish/config.fish b/.config/fish/config.fish index 73e0a16..b0d9cc2 100644 --- a/.config/fish/config.fish +++ b/.config/fish/config.fish @@ -1,5 +1,5 @@ # These came from the following file: -# eval ($HOMEBREW_PREFIX/bin/brew shellenv) +# eval (brew shellenv) if test -e /opt/homebrew/bin/brew set -gx HOMEBREW_PREFIX "/opt/homebrew"; set -gx HOMEBREW_CELLAR "/opt/homebrew/Cellar"; @@ -19,14 +19,21 @@ set -gx VOLTA_HOME "$HOME/.volta" set -gx PNPM_HOME "$HOME/Library/pnpm" set -gx BUN_INSTALL "$HOME/.bun" set -gx VOLTA_FEATURE_PNPM 1 +set -gx STARSHIP_CONFIG "$XDG_CONFIG_HOME/starship/starship.toml" # Path setup -fish_add_path -p /opt/homebrew/bin /opt/homebrew/sbin /usr/local/bin -fish_add_path -a ~/bin -fish_add_path -a $VOLTA_HOME/bin -fish_add_path -a $PNPM_HOME -fish_add_path -a $BUN_INSTALL/bin -fish_add_path -a $HOME/.cargo/bin +set -g prepath ( + path filter \ + /opt/homebrew/bin \ + /opt/homebrew/sbin \ + /usr/local/bin \ + $HOME/bin \ + $VOLTA_HOME/bin \ + $BUN_INSTALL/bin \ + $HOME/.cargo/bin +) + +fish_add_path --prepend --move $prepath # Add function subdirectories to fish_function_path set fish_function_path (path resolve $__fish_config_dir/functions/*/) $fish_function_path @@ -43,3 +50,7 @@ set -g ignored_git_dirs main master next if test -e "$HOME/.extra.fish"; source ~/.extra.fish end + +if type -q starship + starship init fish | source +end diff --git a/.config/fish/fish_plugins b/.config/fish/fish_plugins index 7146e17..a295c1e 100644 --- a/.config/fish/fish_plugins +++ b/.config/fish/fish_plugins @@ -1,4 +1,3 @@ jorgebucaran/fisher -mattgreen/lucid.fish franciscolourenco/done jorgebucaran/autopair.fish diff --git a/.config/fish/functions/git/gcleanup.fish b/.config/fish/functions/git/gcleanup.fish deleted file mode 100644 index c69a42f..0000000 --- a/.config/fish/functions/git/gcleanup.fish +++ /dev/null @@ -1,3 +0,0 @@ -function gcleanup -d "Cleanup local branches that have been merged or squashed" - -end diff --git a/.config/ghostty/berkeley-mono-variable b/.config/ghostty/berkeley-mono-variable new file mode 100644 index 0000000..ad28051 --- /dev/null +++ b/.config/ghostty/berkeley-mono-variable @@ -0,0 +1,45 @@ +font-size = 12 + +font-synthetic-style = false +font-family = "Berkeley Mono Variable" +# Font width (60 to 100) +# 60 = UltraCondensed +# 70 = ExtraCondensed +# 80 = Condensed +# 90 = SemiCondensed +# 100 = Normal +font-variation = wdth=60 +font-variation-bold = wdth=60 +font-variation-italic = wdth=60 +font-variation-bold-italic = wdth=60 +# Font weight (100 to 900) +# 100 = Thin +# 200 = ExtraLight +# 300 = Light +# 350 = SemiLight +# 400 = Regular +# 500 = Medium +# 600 = SemiBold +# 700 = Bold +# 800 = ExtraBold +# 900 = Black +# font-variation = wght=500 +# font-variation = wght=500 + +# aalt Access All Alternates +# calt Contextual Alternates +# ccmp Glyph Composition/Decomposition +# mark Mark Positioning +# mkmk Mark to Mark Positioning +# salt Stylistic Alternates +# ss01 Stylistic Set 1 <- slashed 0 +# ss02 Stylistic Set 2 <- dotted 0 +# ss03 Stylistic Set 3 <- gap 0 +# ss04 Stylistic Set 4 <- slashed 0, slash 7 +# ss05 Stylistic Set 5 <- dotted 0, slash 7 +# ss06 Stylistic Set 6 <- gap 0, slash 7 +font-feature = +calt +font-feature = +ss01 + +# Personal preference +adjust-cell-height = -2% diff --git a/.config/ghostty/config b/.config/ghostty/config index 97277b9..99ed741 100644 --- a/.config/ghostty/config +++ b/.config/ghostty/config @@ -1,11 +1,15 @@ -# font-family = Berkeley Mono -font-family = TX-02 -font-size = 12 theme = personal + window-padding-x = 8 window-padding-y = 8 -macos-window-shadow = false window-colorspace = display-p3 window-height = 25 window-width = 85 + macos-titlebar-proxy-icon = hidden +macos-window-shadow = true + +font-size = 12 +font-family = TX-02 + +# config-file = berkeley-mono-variable diff --git a/.config/starship/starship.toml b/.config/starship/starship.toml new file mode 100644 index 0000000..a535f9e --- /dev/null +++ b/.config/starship/starship.toml @@ -0,0 +1,23 @@ +# Get editor completions based on the config schema +"$schema" = 'https://starship.rs/config-schema.json' + +# Inserts a blank line between shell prompts +add_newline = true + +format="$all" + +right_format = """$status$cmd_duration""" + +[git_branch] +symbol = " " + +[git_status] +untracked = "⚑" +deleted = "✕" +modified = "±" + +[character] +format = "$symbol " +success_symbol = "[❯](white)" +error_symbol = "[❯](red)" + diff --git a/bin/git-info b/bin/git-info deleted file mode 100755 index fbcad86..0000000 --- a/bin/git-info +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env bash - -NOCOLOR='\033[0m' -RED='\033[0;31m' -GREEN='\033[0;32m' -ORANGE='\033[0;33m' -BLUE='\033[0;34m' -PURPLE='\033[0;35m' -CYAN='\033[0;36m' -LIGHTGRAY='\033[0;37m' -DARKGRAY='\033[1;30m' -LIGHTRED='\033[1;31m' -LIGHTGREEN='\033[1;32m' -YELLOW='\033[1;33m' -LIGHTBLUE='\033[1;34m' -LIGHTPURPLE='\033[1;35m' -LIGHTCYAN='\033[1;36m' -WHITE='\033[1;37m' - -LOCAL_BRANCHES=$(git branch -l | sed 's/* / /') -REMOTE_BRANCHES=$(git branch -r) -REMOTES=$(git remote -v | sed "s/^/ /") - -colorful() { - echo -e "${PURPLE}$@${NOCOLOR}" -} - -echo -colorful "Remote URLS:" -echo "$REMOTES" -echo - -colorful "Local Branches:" -echo "$LOCAL_BRANCHES" -echo - -colorful "Remote Branches:" -echo "$REMOTE_BRANCHES" From 3eeb84a5ed71145b5bc196b8e297872070986090 Mon Sep 17 00:00:00 2001 From: Spencer Hamm Date: Fri, 23 Jan 2026 01:19:58 -0600 Subject: [PATCH 6/9] updates --- .config/fish/functions/flushdns.fish | 4 ++ .../functions/manager/__detect_manager.fish | 2 +- .gitconfig | 41 +++++++++++-------- 3 files changed, 30 insertions(+), 17 deletions(-) create mode 100644 .config/fish/functions/flushdns.fish diff --git a/.config/fish/functions/flushdns.fish b/.config/fish/functions/flushdns.fish new file mode 100644 index 0000000..c5fd5e9 --- /dev/null +++ b/.config/fish/functions/flushdns.fish @@ -0,0 +1,4 @@ +function flushdns + sudo dscacheutil -flushcache + sudo killall -HUP mDNSResponder +end diff --git a/.config/fish/functions/manager/__detect_manager.fish b/.config/fish/functions/manager/__detect_manager.fish index ca4d7a4..2262ff0 100644 --- a/.config/fish/functions/manager/__detect_manager.fish +++ b/.config/fish/functions/manager/__detect_manager.fish @@ -3,7 +3,7 @@ function __detect_manager if test -n "$git_root" if test -e "$git_root/package.json" - __detect_manager_switch git_root + __detect_manager_switch $git_root else echo "Inside a .git directory, but no package.json found in project root" return 1 diff --git a/.gitconfig b/.gitconfig index ffc074d..068d1bc 100644 --- a/.gitconfig +++ b/.gitconfig @@ -1,21 +1,36 @@ -[color] - ui = true - [core] excludesfile = ~/.gitignore_global editor = hx quotepath = false + pager = delta + +[init] + defaultBranch = main + +[commit] + verbose = true [push] # https://git-scm.com/docs/git-config#git-config-pushdefault default = current + autoSetupRemote = true [pull] - rebase = false + rebase = true + autoStash = true + +[merge] + conflictStyle = zdiff3 [fetch] prune = true +[status] + branch = true + short = true + showStash = true + showUntrackedFiles = all # show individual untracked files + [alias] # basics a = add @@ -37,7 +52,7 @@ branches = branch -a --color -v cm = commit -m lol = log --graph --decorate --pretty=oneline --abbrev-commit - st = status --short --branch + st = status prune = fetch --prune undo = reset --soft HEAD^ who = shortlog --summary -- @@ -48,24 +63,18 @@ smudge = git-lfs smudge -- %f process = git-lfs filter-process -[pager] - diff = delta - log = delta - reflog = delta - show = delta - [delta] - plus-style = "syntax #2C3F37" - minus-style = "syntax #6C4345" syntax-theme = Dracula navigate = true side-by-side = true + dark = true + hunk-header-style = omit [interactive] diffFilter = delta --color-only +[color] + ui = true + [include] path = ~/.gitconfig.local - -[init] - defaultBranch = main From aad3f22448acbffe8cfb6cee24a587601b763d5d Mon Sep 17 00:00:00 2001 From: Spencer Hamm Date: Fri, 23 Jan 2026 02:06:37 -0600 Subject: [PATCH 7/9] updates --- bin/git-cc | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 bin/git-cc diff --git a/bin/git-cc b/bin/git-cc new file mode 100755 index 0000000..42ec737 --- /dev/null +++ b/bin/git-cc @@ -0,0 +1,21 @@ +#!/bin/zsh + +# Write commit using the conventional commit format +# +# Add Jira ID to scope if present in the branch name + +NEEDS_STAGING=(git diff --cached --name-only) + +if [[ -n $NEEDS_STAGING ]]; then + git add -A . +fi + +TYPE=$(gum choose "fix" "feat" "docs" "style" "refactor" "test" "chore" "revert") +JIRA=$(git symbolic-ref --short HEAD | egrep -o -m 1 "[a-zA-Z]{3,}-[\d]{3,}" | xargs echo) +SCOPE=$(gum input --value "$JIRA" --placeholder "Jira ID") + +test -n "$SCOPE" && SCOPE="($SCOPE)" + +SUMMARY=$(gum input --value "$TYPE$SCOPE: " --placeholder "Summary of this change") + +gum confirm "Commit changes?" && git commit -m "$SUMMARY" "$@" From cb00d8739cda1b3da0ad0d1373edfee1887955f1 Mon Sep 17 00:00:00 2001 From: Spencer Hamm Date: Mon, 26 Jan 2026 00:17:12 -0600 Subject: [PATCH 8/9] updates --- .config/aerospace/aerospace.toml | 221 +++++++++++++++++++++++++++++++ .config/ghostty/config | 2 +- bin/git-delete-local | 21 +++ 3 files changed, 243 insertions(+), 1 deletion(-) create mode 100644 .config/aerospace/aerospace.toml create mode 100755 bin/git-delete-local diff --git a/.config/aerospace/aerospace.toml b/.config/aerospace/aerospace.toml new file mode 100644 index 0000000..5fa7e97 --- /dev/null +++ b/.config/aerospace/aerospace.toml @@ -0,0 +1,221 @@ +# Place a copy of this config to ~/.aerospace.toml +# After that, you can edit ~/.aerospace.toml to your liking + +# Config version for compatibility and deprecations +# Fallback value (if you omit the key): config-version = 1 +config-version = 2 + +# Start AeroSpace at login +start-at-login = true + +# You can use it to add commands that run after AeroSpace startup. +# Available commands : https://nikitabobko.github.io/AeroSpace/commands +after-startup-command = [] + +# Normalizations. See: https://nikitabobko.github.io/AeroSpace/guide#normalization +enable-normalization-flatten-containers = true +enable-normalization-opposite-orientation-for-nested-containers = true + +# See: https://nikitabobko.github.io/AeroSpace/guide#layouts +# The 'accordion-padding' specifies the size of accordion padding +# You can set 0 to disable the padding feature +accordion-padding = 30 + +# Possible values: tiles|accordion +default-root-container-layout = 'tiles' + +# Possible values: horizontal|vertical|auto +# 'auto' means: wide monitor (anything wider than high) gets horizontal orientation, +# tall monitor (anything higher than wide) gets vertical orientation +default-root-container-orientation = 'auto' + +# Mouse follows focus when focused monitor changes +# Drop it from your config, if you don't like this behavior +# See https://nikitabobko.github.io/AeroSpace/guide#on-focus-changed-callbacks +# See https://nikitabobko.github.io/AeroSpace/commands#move-mouse +# Fallback value (if you omit the key): on-focused-monitor-changed = [] +on-focused-monitor-changed = ['move-mouse monitor-lazy-center'] + +# You can effectively turn off macOS "Hide application" (cmd-h) feature by toggling this flag +# Useful if you don't use this macOS feature, but accidentally hit cmd-h or cmd-alt-h key +# Also see: https://nikitabobko.github.io/AeroSpace/goodies#disable-hide-app +automatically-unhide-macos-hidden-apps = false + +# List of workspaces that should stay alive even when they contain no windows, +# even when they are invisible. +# This config version is only available since 'config-version = 2' +# Fallback value (if you omit the key): persistent-workspaces = [] +persistent-workspaces = [] + +# A callback that runs every time binding mode changes +# See: https://nikitabobko.github.io/AeroSpace/guide#binding-modes +# See: https://nikitabobko.github.io/AeroSpace/commands#mode +on-mode-changed = [] + +# Possible values: (qwerty|dvorak|colemak) +# See https://nikitabobko.github.io/AeroSpace/guide#key-mapping +[key-mapping] + preset = 'qwerty' + +# Gaps between windows (inner-*) and between monitor edges (outer-*). +# Possible values: +# - Constant: gaps.outer.top = 8 +# - Per monitor: gaps.outer.top = [{ monitor.main = 16 }, { monitor."some-pattern" = 32 }, 24] +# In this example, 24 is a default value when there is no match. +# Monitor pattern is the same as for 'workspace-to-monitor-force-assignment'. +# See: +# https://nikitabobko.github.io/AeroSpace/guide#assign-workspaces-to-monitors +[gaps] + inner.horizontal = 4 + inner.vertical = 4 + outer.left = 4 + outer.bottom = 4 + outer.top = 4 + outer.right = 4 + +# 'main' binding mode declaration +# See: https://nikitabobko.github.io/AeroSpace/guide#binding-modes +# 'main' binding mode must be always presented +# Fallback value (if you omit the key): mode.main.binding = {} +[mode.main.binding] + + # All possible keys: + # - Letters. a, b, c, ..., z + # - Numbers. 0, 1, 2, ..., 9 + # - Keypad numbers. keypad0, keypad1, keypad2, ..., keypad9 + # - F-keys. f1, f2, ..., f20 + # - Special keys. minus, equal, period, comma, slash, backslash, quote, semicolon, + # backtick, leftSquareBracket, rightSquareBracket, space, enter, esc, + # backspace, tab, pageUp, pageDown, home, end, forwardDelete, + # sectionSign (ISO keyboards only, european keyboards only) + # - Keypad special. keypadClear, keypadDecimalMark, keypadDivide, keypadEnter, keypadEqual, + # keypadMinus, keypadMultiply, keypadPlus + # - Arrows. left, down, up, right + + # All possible modifiers: cmd, alt, ctrl, shift + + # All possible commands: https://nikitabobko.github.io/AeroSpace/commands + + # See: https://nikitabobko.github.io/AeroSpace/commands#exec-and-forget + # You can uncomment the following lines to open up terminal with alt + enter shortcut + # (like in i3) + # alt-enter = '''exec-and-forget osascript -e ' + # tell application "Terminal" + # do script + # activate + # end tell' + # ''' + + # See: https://nikitabobko.github.io/AeroSpace/commands#layout + alt-slash = 'layout tiles horizontal vertical' + alt-comma = 'layout accordion horizontal vertical' + + # See: https://nikitabobko.github.io/AeroSpace/commands#focus + alt-h = 'focus left' + alt-j = 'focus down' + alt-k = 'focus up' + alt-l = 'focus right' + + # See: https://nikitabobko.github.io/AeroSpace/commands#move + alt-shift-h = 'move left' + alt-shift-j = 'move down' + alt-shift-k = 'move up' + alt-shift-l = 'move right' + + alt-ctrl-h = 'join-with left' + alt-ctrl-j = 'join-with down' + alt-ctrl-k = 'join-with up' + alt-ctrl-l = 'join-with right' + + # See: https://nikitabobko.github.io/AeroSpace/commands#resize + alt-minus = 'resize smart -50' + alt-equal = 'resize smart +50' + alt-f = 'fullscreen' + + # See: https://nikitabobko.github.io/AeroSpace/commands#workspace + alt-1 = 'workspace 1' + alt-2 = 'workspace 2' + alt-3 = 'workspace 3' + alt-4 = 'workspace 4' + alt-5 = 'workspace 5' + alt-6 = 'workspace 6' + alt-7 = 'workspace 7' + alt-8 = 'workspace 8' + alt-9 = 'workspace 9' + alt-a = 'workspace A' # In your config, you can drop workspace bindings that you don't need + alt-b = 'workspace B' + alt-c = 'workspace C' + alt-d = 'workspace D' + alt-e = 'workspace E' + alt-g = 'workspace G' + alt-i = 'workspace I' + alt-m = 'workspace M' + alt-n = 'workspace N' + alt-o = 'workspace O' + alt-p = 'workspace P' + alt-q = 'workspace Q' + alt-r = 'workspace R' + alt-s = 'workspace S' + alt-t = 'workspace T' + alt-u = 'workspace U' + alt-v = 'workspace V' + alt-w = 'workspace W' + alt-x = 'workspace X' + alt-y = 'workspace Y' + alt-z = 'workspace Z' + + # See: https://nikitabobko.github.io/AeroSpace/commands#move-node-to-workspace + alt-shift-1 = 'move-node-to-workspace 1' + alt-shift-2 = 'move-node-to-workspace 2' + alt-shift-3 = 'move-node-to-workspace 3' + alt-shift-4 = 'move-node-to-workspace 4' + alt-shift-5 = 'move-node-to-workspace 5' + alt-shift-6 = 'move-node-to-workspace 6' + alt-shift-7 = 'move-node-to-workspace 7' + alt-shift-8 = 'move-node-to-workspace 8' + alt-shift-9 = 'move-node-to-workspace 9' + alt-shift-a = 'move-node-to-workspace A' + alt-shift-b = 'move-node-to-workspace B' + alt-shift-c = 'move-node-to-workspace C' + alt-shift-d = 'move-node-to-workspace D' + alt-shift-e = 'move-node-to-workspace E' + alt-shift-g = 'move-node-to-workspace G' + alt-shift-i = 'move-node-to-workspace I' + alt-shift-m = 'move-node-to-workspace M' + alt-shift-n = 'move-node-to-workspace N' + alt-shift-o = 'move-node-to-workspace O' + alt-shift-p = 'move-node-to-workspace P' + alt-shift-q = 'move-node-to-workspace Q' + alt-shift-r = 'move-node-to-workspace R' + alt-shift-s = 'move-node-to-workspace S' + alt-shift-t = 'move-node-to-workspace T' + alt-shift-u = 'move-node-to-workspace U' + alt-shift-v = 'move-node-to-workspace V' + alt-shift-w = 'move-node-to-workspace W' + alt-shift-x = 'move-node-to-workspace X' + alt-shift-y = 'move-node-to-workspace Y' + alt-shift-z = 'move-node-to-workspace Z' + + # See: https://nikitabobko.github.io/AeroSpace/commands#workspace-back-and-forth + alt-tab = 'workspace-back-and-forth' + # See: https://nikitabobko.github.io/AeroSpace/commands#move-workspace-to-monitor + alt-shift-tab = 'move-workspace-to-monitor --wrap-around next' + + # See: https://nikitabobko.github.io/AeroSpace/commands#mode + alt-shift-semicolon = 'mode service' + +# 'service' binding mode declaration. +# See: https://nikitabobko.github.io/AeroSpace/guide#binding-modes +[mode.service.binding] + esc = ['reload-config', 'mode main'] + r = ['flatten-workspace-tree', 'mode main'] # reset layout + f = ['layout floating tiling', 'mode main'] # Toggle between floating and tiling layout + backspace = ['close-all-windows-but-current', 'mode main'] + + # sticky is not yet supported https://github.com/nikitabobko/AeroSpace/issues/2 + #s = ['layout sticky tiling', 'mode main'] + + alt-shift-h = ['join-with left', 'mode main'] + alt-shift-j = ['join-with down', 'mode main'] + alt-shift-k = ['join-with up', 'mode main'] + alt-shift-l = ['join-with right', 'mode main'] diff --git a/.config/ghostty/config b/.config/ghostty/config index 99ed741..ba03650 100644 --- a/.config/ghostty/config +++ b/.config/ghostty/config @@ -2,7 +2,6 @@ theme = personal window-padding-x = 8 window-padding-y = 8 -window-colorspace = display-p3 window-height = 25 window-width = 85 @@ -12,4 +11,5 @@ macos-window-shadow = true font-size = 12 font-family = TX-02 +mouse-hide-while-typing = true # config-file = berkeley-mono-variable diff --git a/bin/git-delete-local b/bin/git-delete-local new file mode 100755 index 0000000..9b3b520 --- /dev/null +++ b/bin/git-delete-local @@ -0,0 +1,21 @@ +#!/bin/zsh + +CURRENT_BRANCH=$(git branch --show-current) + +get_branches() { + git branch --format="%(refname:short)" \ + | egrep -v "master|main|next|prerelease|$CURRENT_BRANCH" \ + | gum choose --no-limit +} + +BRANCHES=$(get_branches) + +if [[ -z "$BRANCHES" ]]; then + echo "No branches selected" + exit 1 +fi + +for branch in "${BRANCHES[@]}"; do + echo "Deleting branch $branch" + git branch -D "$branch" +done From f71cce1a4f0f720b31ce46e1be8085098077da25 Mon Sep 17 00:00:00 2001 From: Spencer Hamm Date: Mon, 26 Jan 2026 00:25:33 -0600 Subject: [PATCH 9/9] updates --- bin/git-delete-local | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/bin/git-delete-local b/bin/git-delete-local index 9b3b520..c83e85f 100755 --- a/bin/git-delete-local +++ b/bin/git-delete-local @@ -2,20 +2,7 @@ CURRENT_BRANCH=$(git branch --show-current) -get_branches() { - git branch --format="%(refname:short)" \ - | egrep -v "master|main|next|prerelease|$CURRENT_BRANCH" \ - | gum choose --no-limit -} - -BRANCHES=$(get_branches) - -if [[ -z "$BRANCHES" ]]; then - echo "No branches selected" - exit 1 -fi - -for branch in "${BRANCHES[@]}"; do - echo "Deleting branch $branch" - git branch -D "$branch" -done +git branch --format="%(refname:short)" \ + | egrep -v "master|main|next|prerelease|$CURRENT_BRANCH" \ + | gum choose --no-limit \ + | xargs git branch -D