Simple command-line scripts that wrap interaction with macOS applications or are macOS-specific. Clone the repo and add its location to your path, ex:
git clone https://github.com/davidfmiller/apples.git ~/Documents/git/apples
echo 'PATH="$PATH:~/Documents/git/apples' >> ~/.bash_profile
source ~/.bash_profile
Set files/folders' Finder tags from the command-line:
> tag red ~/Desktop/image.tiff ~/Documents/tmp.txt # add red tag
> tag none # remove tag from cwd
Easily open files from the Terminal in applications which aren't the default editor associated with the filetype.
Open/activate a Mac application from the terminal
> app safari
… will open Safari.app
, and
> app acorn ~/Desktop/DSCF2375.tif ~/Desktop/DSCF2381.tif
... will open the images in Acorn
(assuming its installed), instead of the default application (most likely, Preview
).
There are several shortcuts for applications with long names:
chrome
→ Google Chromeqt
|quicktime
→ Quicktime Playeractivity
→ Activity Monitorprefs
→ System Preferences- etc...
View the source for a complete list
Change the profile settings in the active Terminal window:
> terminal-profile Pro
Plays the default OS X system beep sound (or another system sound if provided)
> beep [basso|blowfrog|funk|glass|hero|morse|ping|pop|purr|sosumi|submarine|tink]
Display exif info for one or more images
> exif [filenames]
Set the custom title of the active Terminal.app
window
> title "git"
Create items in Notes.app
from the command-line
> cat foo.txt | note "Contents of foo.txt"
Display a notification
> notify --title "Title" --subtitle "Subtitle"
(Will use Scripting Notifications if installed.)
Display the main screen's resolution
> resolution
Create items in Reminders.app
from the command-line
> todo "Pick up milk on the way home"
Set the system volume from the command-line
> volume 0
> volume mute # same as 0
> volume 100
> volume max # same as 100
> volume 50
All trademarks & copyrights remain the property of their respective owners.