Skip to content

Instantly share code, notes, and snippets.

@lincerely
Created June 16, 2024 01:30
Show Gist options
  • Save lincerely/bfab3f21f1fc0a5a729d41092ab78b63 to your computer and use it in GitHub Desktop.
Save lincerely/bfab3f21f1fc0a5a729d41092ab78b63 to your computer and use it in GitHub Desktop.
CotEditor toggle monospace font
tell application "CotEditor"
set curfont to do shell script "defaults read com.coteditor.CotEditor fontName"
if curfont is "Osaka-Mono" then
do shell script "defaults write com.coteditor.CotEditor fontName Osaka"
do shell script "defaults write com.coteditor.CotEditor showPageGuide -bool no"
else if curfont is "Osaka" then
do shell script "defaults write com.coteditor.CotEditor fontName Osaka-Mono"
do shell script "defaults write com.coteditor.CotEditor showPageGuide -bool yes"
end if
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment