feat(fish): add some of my often used functions

This commit is contained in:
Stefan Imhoff
2022-12-31 11:17:53 +01:00
parent 8609f8f6d7
commit ded5962d24
5 changed files with 25 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
function deleteNodeModules --description "Delete all node_modules folders in a folder and subfolders"
find . -name "node_modules" -type d -exec rm -rf '{}' +
end

View File

@@ -0,0 +1,4 @@
function homebrewBackup --description "Create a snapshot of all currently installed Homebrew, Cask, Mac App Store, and WhaleBrew installations"
cd ~/.dotfiles/
brew bundle dump --describe -f
end

View File

@@ -0,0 +1,3 @@
function homebrewRestore --description "Install all Homebrew, Cask, Mac App Store, and WhaleBrew applications from a snapshot"
brew bundle --file ~/.dotfiles/Brewfile
end

View File

@@ -0,0 +1,5 @@
function replaceKittyLogo --description "Set a different icon for Kitty terminal"
cp ~/Dropbox/Software/Kitty/kitty-icon/kitty-dark.icns /Applications/kitty.app/Contents/Resources/kitty.icns
rm /var/folders/*/*/*/com.apple.dock.iconcache
killall Dock
end

View File

@@ -0,0 +1,10 @@
function update --description "Updating Homebrew, Ruby, Python, Node.js, Neovim, and MacOS"
brew update && brew outdated && brew upgrade && brew cleanup
sudo gem update --system && sudo gem update && gem cleanup all
pip install --upgrade pip
pip list -o --format columns | cut -d' ' -f1 | xargs -n1 pip install -U
npm update npm -g
npm update -g
nvim --headless "+Lazy! update" +qa
sudo softwareupdate -i -a
end