-**** Update all packages
-#+begin_src shell :tangle ~/.config/ash/ashrc
- color=$(tput setaf 5)
- reset=$(tput sgr0)
-
- apu() {
- doas echo "${color}== upgrading with yay ==${reset}"
- yay
- echo ""
- echo "${color}== checking for pacnew files ==${reset}"
- doas pacdiff
- echo
- echo "${color}== upgrading flatpaks ==${reset}"
- flatpak update
- echo ""
- echo "${color}== upgrading zsh plugins ==${reset}"
- zpe-pull
- echo ""
- echo "${color}== updating nvim plugins ==${reset}"
- nvim +PlugUpdate +PlugUpgrade +qall
- echo "Updated nvim plugins"
- echo ""
- echo "${color}You are entirely up to date!${reset}"
- }
-#+end_src
-**** Clean all packages
-#+begin_src shell :tangle ~/.config/ash/ashrc
- apap() {
- doas echo "${color}== cleaning pacman orphans ==${reset}"
- (pacman -Qtdq | doas pacman -Rns - 2> /dev/null) || echo "No orphans"
- echo ""
- echo "${color}== cleaning flatpaks ==${reset}"
- flatpak remove --unused
- echo ""
- echo "${color}== cleaning zsh plugins ==${reset}"
- zpe-clean
- echo ""
- echo "${color}== cleaning nvim plugins ==${reset}"
- nvim +PlugClean +qall
- echo "Cleaned nvim plugins"
- echo ""
- echo "${color}All orphans cleaned!${reset}"
- }
-#+end_src
-**** Interact with 0x0
-#+begin_src shell :tangle ~/.config/ash/ashrc
- zxz="https://envs.sh"
- ufile() { curl -F"file=@$1" "$zxz" ; }
- upb() { curl -F"file=@-;" "$zxz" ; }
- uurl() { curl -F"url=$1" "$zxz" ; }
- ushort() { curl -F"shorten=$1" "$zxz" ; }
- uclip() { xclip -out | curl -F"file=@-;" "$zxz" ; }
-#+end_src