macintosh

I use a Mac at and for work.

tools
asdfruntime version manager
VS CodeIDE
Colimacontainer runtime
Dozerhides stuff in the menu bar
fzffuzzy finder
ghGitHub CLI
gumfor glamorous shell scripts
Homebrewpackage manager
iTerm2terminal
jqJSON processor
Obsidianpersonal knowledge management
PosticoPostgreSQL client
ShellCheckshell script analysis
starshipshell prompt
VS Code extensions
Catppuccintheme and icons
CredoElixir linter
ElixirLSElixir language support and debugger
GitLensgit supercharger
NPMmanage dependencies
shell-formatshell script formatter
Vitesttesting framework

shortcuts

morn
runs every morning and sets me up for the work day (turns the Wi-Fi on, opens Slack and IDE, etc.)
sol
checks the UV index in the area and lets me know if it's safe to go outside
join
opens the Meet link of the next calendar event
qrl
generates a QR code from the clipboard
eve
runs when I go for lunch or clock out of work (sets DND, turns the Wi-Fi off for good measure, then sleeps)

You can set up cron jobs to run Shorcuts:

# work-life balance
0 9,13 * * * shortcuts run morn
0 12,17 * * * shortcuts run eve
flight mode at

osascript

Send a system notification with sound (sound files in /System/Library/Sounds or ~/Library/Sounds)

osascript -e 'display notification "take a break" sound name "Glass"'

Show a popup dialog. I currently use this to remind me to take breaks every 20 minutes throughout the work day

*/20 9-17 * * 1-5 osascript -e 'display dialog "take a break"'

grimoire

Copy and paste stuff via Terminal

echo 'meow' | pbcopy
pbpaste

GPG issues? Usually occurs after package update

gpgconf --kill gpg-agent

Make Mac sleep

pmset sleepnow

Prevent Mac from sleeping

caffeinate
caffeinate -u -t 3600 # stay awake for an hour

get battery cycle count

system profiler SPPowerDataType | grep "Cycle Count" | awk '{print $3}'

xcode woes

xcode-select --install
xcode-select --reset

Remind yourself to leave. This will constantly prompt your terminal with a Time to leave! message every minute. To disable it, you have to log off (or use kill).

leave 1700 # leave at 17:00
leave +0130 # leave in 1 hour and 30 minutes

resources

I Hate Macintosh