Skip to content

Instantly share code, notes, and snippets.

View nriley's full-sized avatar

Nicholas Riley nriley

View GitHub Profile
@nriley
nriley / Fix broken Finder windows.applescript
Created January 26, 2020 19:55
Fix Catalina Finder windows that sprout unwanted toolbars
-- Fix Catalina Finder windows that sprout unwanted toolbars
-- Takes advantage of the property that these windows cannot have their toolbars hidden through AppleScript
-- Nicholas Riley <[email protected]>
use AppleScript version "2.4" -- Yosemite (10.10) or later
use scripting additions
tell application "Finder"
set _windows to Finder windows
repeat with _window in _windows
@nriley
nriley / init.lua
Last active March 6, 2024 17:02
Hammerspoon script for ensuring Sidecar is active when iPad is plugged in (macOS 10.15; see comments for versions up to macOS 13)
hs.loadSpoon('SpoonInstall')
spoon.SpoonInstall.use_syncinstall = true
Install = spoon.SpoonInstall
log = hs.logger.new('init', 5)
-- function debugUI(msg, table)
-- log:d(msg)
-- log:d(hs.inspect(table))
-- end