dotfiles/macos.local/.local/bin/launcher.org
2024-10-01 17:42:59 -05:00

732 B
Executable file

Application Launcher Script

Search several locations for applications with choose.

  #!/bin/sh
  app="$(ls /Applications/ /Applications/Utilities/ /System/Applications/ /System/Applications/Utilities/ ~/Applications/ | grep '\.app$' | sed 's/\.app$//g' | choose -f "SauceCodePro Nerd Font" -s 15 -b ece0c9).app"

Try opening the app in each location.

  open -n "$HOME/Applications/$app" || open -n "/Applications/$app" || open -n "/System/Applications/Utilities/$app" || open -n "/System/Applications/$app" || open -n "/Applications/Utilities/$app"