From aea7b0927ee66188e226cf069bc4a72323b657b7 Mon Sep 17 00:00:00 2001 From: David Tomaschik Date: Tue, 17 Feb 2026 12:31:12 -0800 Subject: [PATCH] Fish updates --- AGENTS.md | 29 ++++++++++++++++++++++++++++- dotfiles/config/fish/config.fish | 13 ++++++++++++- dotfiles/config/fish/fish_plugins | 2 ++ dotfiles/config/fish/fish_variables | 4 ++++ dotfiles/zshrc.d/skelify.zsh | 7 ++++--- 5 files changed, 50 insertions(+), 5 deletions(-) create mode 100644 dotfiles/config/fish/fish_plugins diff --git a/AGENTS.md b/AGENTS.md index e975061..753a6e3 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -5,7 +5,7 @@ on POSIX-style environments. It is cloned from github and installed from the `install.sh` script. It mostly relies on symlinking dotfiles and other resources into the appropriate -locations, bnut also installs dependencies in various ways. +locations, but also installs dependencies in various ways. I primarily target Debian Linux-based (Debian, Ubuntu, and Kali Linux) systems as well as MacOS. Other platforms are lower priorities. Shell scripts ending @@ -15,6 +15,13 @@ beginning suggesting a different shell will be used. `zsh` and `fish` are the key interactive shells to be configured, but `bash` may also be used at times. +## Project Structure + +* `bin/`: Contains executable scripts that should be available in the shell's `PATH`. +* `dotfiles/`: Contains configuration files (dotfiles) to be symlinked into the home directory. +* `packages/`: Contains lists of packages to be installed by the `install.sh` script. Each file in this directory corresponds to a package set. +* `install.sh`: The main installation script that sets up the environment, symlinks dotfiles, and installs packages. + ## Notes on Security Issues It is safe to have scripts and tools re-invoke themselves with sudo when they @@ -32,3 +39,23 @@ explain solution design. If making changes that affects how the user installs the tools, update `README.md` accordingly. + +### Adding a new dotfile + +1. Place the new dotfile in the `dotfiles/` directory. +2. The `install.sh` script will automatically symlink it to the home directory. + +### Adding a new script to `bin/` + +1. Add the new script to the `bin/` directory. +2. Ensure the script is executable (`chmod +x`). + +### Adding a new package + +1. Identify the appropriate package list in the `packages/` directory (e.g., `packages/cli`, `packages/kali`). +2. Add the new package name to the list. +3. If a new package set is required, create a new file in the `packages/` directory. + +### Platform-specific changes + +When making changes that are specific to a platform (e.g., Debian vs. macOS), please check for existing conventions in the `install.sh` script or other files. Use conditional logic (e.g., checking `uname`) to apply platform-specific settings. diff --git a/dotfiles/config/fish/config.fish b/dotfiles/config/fish/config.fish index 61e8042..f681987 100644 --- a/dotfiles/config/fish/config.fish +++ b/dotfiles/config/fish/config.fish @@ -1,4 +1,3 @@ - if test -x /opt/homebrew/bin/brew /opt/homebrew/bin/brew shellenv fish | source if test -d (brew --prefix)"/share/fish/completions" @@ -14,5 +13,17 @@ if command -q starship starship init fish --print-full-init | source end +function install_fisher + if not test -e ~/.config/fish/functions/fisher.fish + echo "Installing Fisher for fish shell..." + curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source + fisher install jorgebucaran/fisher + end +end + +if status --is-interactive + install_fisher +end + # Want this at the bottom to put this path first fish_add_path --move --path {$HOME}/bin diff --git a/dotfiles/config/fish/fish_plugins b/dotfiles/config/fish/fish_plugins new file mode 100644 index 0000000..cc36ec3 --- /dev/null +++ b/dotfiles/config/fish/fish_plugins @@ -0,0 +1,2 @@ +jorgebucaran/fisher +wfxr/forgit diff --git a/dotfiles/config/fish/fish_variables b/dotfiles/config/fish/fish_variables index dd617bb..2f71a55 100644 --- a/dotfiles/config/fish/fish_variables +++ b/dotfiles/config/fish/fish_variables @@ -2,6 +2,10 @@ # VERSION: 3.0 SETUVAR EDITOR:vim SETUVAR __fish_initialized:3800 +SETUVAR _fisher_jorgebucaran_2F_fisher_files:\x7e/\x2econfig/fish/functions/fisher\x2efish\x1e\x7e/\x2econfig/fish/completions/fisher\x2efish +SETUVAR _fisher_plugins:jorgebucaran/fisher\x1ewfxr/forgit +SETUVAR _fisher_upgraded_to_4_4:\x1d +SETUVAR _fisher_wfxr_2F_forgit_files:\x7e/\x2econfig/fish/conf\x2ed/bin\x1e\x7e/\x2econfig/fish/conf\x2ed/forgit\x2eplugin\x2efish\x1e\x7e/\x2econfig/fish/completions/_git\x2dforgit\x1e\x7e/\x2econfig/fish/completions/git\x2dforgit\x2ebash\x1e\x7e/\x2econfig/fish/completions/git\x2dforgit\x2efish SETUVAR fish_color_autosuggestion:4D5566 SETUVAR fish_color_cancel:\x2d\x2dreverse SETUVAR fish_color_command:39BAE6 diff --git a/dotfiles/zshrc.d/skelify.zsh b/dotfiles/zshrc.d/skelify.zsh index 0535453..1bf13cc 100644 --- a/dotfiles/zshrc.d/skelify.zsh +++ b/dotfiles/zshrc.d/skelify.zsh @@ -32,9 +32,10 @@ function skelify { return 1 fi echo ${target} - mkdir -p ${HOME}/.skel/${relhome} - mv ${target} ${HOME}/.skel/${relhome}/${fname} - ln -s ${fulltarget} ${HOME}/.skel/${relhome}/${fname} + local skeldir="${HOME}/.skel/dotfiles/${relhome}" + mkdir -p "${skeldir}" + mv ${target} "${skeldir}/${fname}" + ln -s "${skeldir}/${fname}" "${fulltarget}" else echo ${target} is not a directory or file. >/dev/stderr return 1