macintosh

I use a Mac at and for work.

specs
modelMacbook Pro 13″
OSmacOS Sequoia
chipM2
memory24 GB

tools

Dozerhides stuff in the menu bar
Homebrewpackage manager
iTerm2terminal
VSCodiumcode editor

shortcuts

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

You can set up cron jobs to run Shorcuts:

# work-life balance
# start work
0 9,13 * * * shortcuts run hello
# leave work
0 12,17 * * * shortcuts run bye
already on flight mode at sharp

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

VSCode

Visual Studio Code is the bane of my existence at work. On my personal machine, I use vim for coding and text editing. However, since my config doesn’t work well on the Mac, I have to use this behemoth.

extensions
Catppuccintheme and icons
ElixirLSElixir language support and debugger
GitLensgit supercharger

Also check out VSCodium, a VS Code fork but without Microsoft’s branding, telemetry, and licensing.

A moment of silence for Atom, my first favourite editor.

resources

I Hate Macintosh