I haven’t been able to find anything on this but maybe, my vocabulary is missing something, or I’m looking in the wrong places. If I’ve missed something obvious, then my apologies in advance.
Normally drafts looks something like the top of the following, and what I want to do, is to go into a the bottom view, where it only shows the editor, so that I can focus on my writing, without the “noise” from actions, drafts list etc. in just one click.
Is there a way to do that? Perhaps through configuration or automation or something?
There are menu commands to hide/show the side bars in the View menu, which are assigned the ⌘-1 and ⌘-0 keyboard shortcuts. You can use those to quickly toggle those panels.
There is not one command to hide both, but it can be done with an action. There’s an example you can install in the directory, which you could assign a keyboard shortcut of your liking.
That you for your quick response. I found the following in a script to be doing some of what I wanted to achieve (the script example seems to be using deprecated functions, but the reference documentation is very good, so that was quickly handled):
However this still leaves the Action Bar and the Toolbar, which there don’t seem to be function for managing in the reference documentation. Could I be missing something, or is there another potential “workaround” for this?
Thanks, I’ll update that example to the newer APIs.
Action bar visibility is not scriptable, largely because that would not be possible to implement on iOS because of the way accessory views work – although I could make that an option on Mac, I suppose.
Do you use the action bar often on Mac? I’ve always found it somewhat superfluous on Mac and leave it hidden in my installations, as it’s usually easier to use keyboard shortcuts or the command palette to quickly access actions. Obviously, everyone’s preferences vary. It’s always seemed like mostly an iPhone thing to me.
Action bar visibility is not scriptable, largely because that would not be possible to implement on iOS because of the way accessory views work
Does the same apply to the Toolbar? And the Tag Entry for that matter?
Would it be possible to “simulate” key presses through scripting? I.e. simulating the press of ⌥ ⌘ T to hide the Toolbar? This is only relevant for me on MacOS.
For those interested, I found one way to get want I wished for, by creating an action with the following AppleScript:
on execute(draft)
tell application "Drafts"
activate
tell application "System Events"
tell application process "Drafts"
tell menu bar 1
tell menu bar item "View"
tell menu "View"
if exists menu item "Hide Tab Bar" then
click menu item "Hide Tab Bar"
end if
if exists menu item "Hide Tag Entry" then
click menu item "Hide Tag Entry"
end if
if exists menu item "Hide Action Bar" then
click menu item "Hide Action Bar"
end if
if exists menu item "Hide Draft List" then
click menu item "Hide Draft List"
end if
if exists menu item "Hide Action List" then
click menu item "Hide Action List"
end if
if exists menu item "Hide Toolbar" then
click menu item "Hide Toolbar"
end if
if exists menu item "Enter Full Screen" then
click menu item "Enter Full Screen"
end if
end tell
end tell
end tell
end tell
end tell
end tell
end execute
This requires Drafts getting permissions as follow under Privacy & Security in MacOS System Settings:
Privacy & SecurityAllow assistive applications to control the computerDrafts (enable)
It works on MacOS Sonoma 14.5 with English as primary language.
Any feedback or thoughts on this approach is welcome - i.e. security aspects or stability/longevity thoughts (different languages, other versions of MacOS).