- Moved existing functions from dotfiles over to this repo.

- Made pnew() loop till a valid name is given.
- Made bootstrap script to symlink all scripts to ~/.config/shell
This commit is contained in:
Pratik Tripathy
2024-02-09 10:04:49 +05:30
parent 44ccbbfe6e
commit 5765e05ec0
6 changed files with 159 additions and 15 deletions

17
10x_nvim.sh Normal file
View File

@@ -0,0 +1,17 @@
#!/bin/sh
# Nvim Distro-Switcher
alias nvim-lazy="NVIM_APPNAME=nvim-lazy nvim"
alias OldConfig="NVIM_APPNAME=oldconfig nvim"
nvims() {
items=$(find -L "$HOME"/.config -maxdepth 2 -name "init.lua" -type f -execdir sh -c 'pwd | xargs basename' \;)
config=$(printf "%s\n" "${items[@]}" | fzf --prompt=" Neovim Config  " --height=~50% --layout=reverse --border --exit-0)
if [ -z "$config" ]; then
echo "Nothing selected"
return 0
elif [ "$config" = "default" ]; then
config=""
fi
NVIM_APPNAME=$config nvim "$@"
}