Month: January 2019

Supernil

When calling super in Ruby without arguments, you expect all arguments being passed to the superclass method. If you want to pass your own arguments, you just put them there. If you don’t want to pass any arguments, you need to put empty braces after the super call: So far nothing new. Now imagine a block being passed to your…

Preventing Finder from reopening windows on startup

By default, the macOS Finder re-opens all windows from the last session when logging in. The following LaunchAgent uses AppleScript to close all Finder windows on startup: Put it into ~/Library/LaunchAgents/com.example.CloseFinder.agent.plist and load it using launchctl load ~/Library/LaunchAgents/com.example.CloseFinder.agent.plist On the next startup, there should be no more open Finder windows from the last session.