Replies: 2 comments 2 replies
-
To get Hammerspoon to use a particular size/position when it first creates the help window, you can pass it to Note that the The reason
|
Beta Was this translation helpful? Give feedback.
-
I appreciate your input into this. |
Beta Was this translation helpful? Give feedback.
-
Pulling my hair out on this one...
I'm trying to resize the window for the help screen which I launch from the console.
The icon launches hs.doc.hsdocs.help() just fine, but I can't figure out how to automatically resize it.
Seems simple. Here's what I've tried:
I can run a function to grab the window name and then set it's size:
This works fine if the window has already appeared, but
if I trigger the help win like so:
function getHelp()
hs.doc.hsdocs.help()
setHelpWin()
end
the window hasn't been found yet, so nothing happens. I added a timer to delay resizing the newly-called help window:
function getHelp()
hs.doc.hsdocs.help()
hs.timer.doAfter(2, function() print("Howdy") end )
end
Here's the log result:
2023-04-07 13:41:57: -- Loading extension: doc
2023-04-07 13:41:57: -- Loading extension: timer
The timer function works fine by itself, but not when run inside the getHelp() function.
I also tried to just put the system to sleep briefly:
...and the log result:
Beta Was this translation helpful? Give feedback.
All reactions