mirror of
https://github.com/Matir/skel.git
synced 2026-05-25 21:19:09 -07:00
Fish updates
This commit is contained in:
29
AGENTS.md
29
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.
|
||||
|
||||
@@ -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
|
||||
|
||||
2
dotfiles/config/fish/fish_plugins
Normal file
2
dotfiles/config/fish/fish_plugins
Normal file
@@ -0,0 +1,2 @@
|
||||
jorgebucaran/fisher
|
||||
wfxr/forgit
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user