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

13 lines
732 B
Org Mode
Executable file

#+title: Application Launcher Script
Search several locations for applications with =choose=.
#+begin_src sh :tangle ~/.local/bin/launcher :mkdirp yes :tangle-mode o755
#!/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"
#+end_src
Try opening the app in each location.
#+begin_src sh :tangle ~/.local/bin/launcher :mkdirp yes :tangle-mode o755
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"
#+end_src