Closed cmsj closed 7 years ago
My Wishlist:
hs.webview.toolbar
priority
documentation and/or the way it's handled. See: #1300hasMoved
and gotFocus
callbacks to hs.webview
. See: #1259hs.changeUpdateInterval(value)
, and allow hs.updateAvailable()
to return the new version (if possible?). See: #1221hs.alert
doesn't display on correct screen in certain display configurations. See: #1196hs.drawing:bringToFront(true)
doesn't work for full-screen window. See: #1184hs.host
. See: #1170...and some others, that might not be suitable for 0.9.53
:
hs._asm.touchbar
to Hammerspoon core. See: #1078hs._asm.axuielement
to Hammerspoon core.hs.application
bundle handling. See: #1001Fixing the problem with repeating keys which make any type of navigation or repeating tasks unusably inconsistent: #1156, #1179, #1178, #1308
@MichaelHindley - Curious... have all your tests been on macOS 10.12? Have you tested on 10.11 as well? Any difference?
@latenitefilms no, I don't have access to a 10.11 machine, and I was not a user of hammerspoon at that time, so I can't answer to the timeline aspect of this issue.
sorry was a bit quick, yes, ALL tests were on 10.12 :)
No worries, thanks for the fast reply! I personally seem to have a lot more issues with Hammerspoon in 10.12 than 10.11, but it's proving diffierent to work out what's going on exactly, so that people smarter than I can fix it. Apple's obviously changed SOMETHING - hopefully someone can work out what.
@asmagill How do you feel about your hs.drawing->hs.canvas wrapper? Shall we flip it on by default and see if anyone notices? :)
@MichaelHindley I'll try and find some time to look at the hotkey stuff, but I continue to think that it's generally not a good idea to be emitting keyboard events while you're holding down keyboard keys. I know it's something that people are looking to Hammerspoon to solve, in the absence of the complex remapping features of Karabiner, on Sierra, but we're just running at the wrong layer of the OS to be doing truly powerful things with keyboards. That stuff needs to happen in the kernel, and that's somewhere we're not going to go.
What I would say is that some commits in the last few days on Karabiner Elements look to me like the groundwork is being laid there for complex remapping, so I'm hopeful that it won't be too much longer until usable builds are available which let people do the kinds of things you're looking for, in the part of the OS where they should be happening :)
(and I would encourage everyone who cares about getting awesome Karabiner features back, to go and donate to @tekezo via https://pqrs.org/osx/karabiner/pricing.html.en )
@asmagill I just had a look at the 0.9.53 milestone and it seems like too much of the stuff in there ends up pointing at you. I have no desire to be ordering you around, so please take a look and bump anything of yours that you're not ready to land :)
That stuff needs to happen in the kernel, and that's somewhere we're not going to go.
I wonder if this is the kind of thing that could be offered as an optional "spoon"? I know you don't want Hammerspoon to start messing with the Kernel, but in theory, I guess a "spoon" could offer this functionality for anyone who wants to "risk it"?
@latenitefilms well there's also my dogmatic refusal to allow binaries in Spoons, but ultimately I can't stop people from doing whatever they want with them. I think it's unlikely to happen though, you need to be really deeply knowledgeable about the kernel and how HID systems work, and outside of Apple, the best people at doing that stuff already have their own great projects :)
but sure, someone could fork Karabiner Elements when it's a bit more ready, and instead of its UI communicating with the kernel module, a Hammerspoon extension/Spoon could be communicating with it to map hotkeys and emit events.
@cmsj, by binaries are you including libraries in that definition (for example, the shared library portion of what we currently consider a third-party module)?
@latenitefilms, WRT to doing things in kernel land, I can see this as potentially having two parts. The first part being elevated access (e.g. when an application asks for an Administrator password)... my understanding of the "proper" way to do this (admittedly very limited understanding because I decided it wasn't a direction I was really comfortable for Hammerspoon to go in considering the alternatives proposed in #707) is to register a "helper application" along with your Application in it's Info.plist file and then it's actually the helper which performs the elevated tasks, not the primary application... I know that with sandboxed apps (which Hammerspoon is not) the helper must be in a specific place in the Application's bundle... not sure if that's required or not for un-sandboxed, but I would expect it to be... so 2 strikes right there for a spoon being a solution.
The second part, and probably the most important when doing kernel level things is that this usually requires a driver or kext to be written as well because we're adding or extending or removing something at the kernel level, not the application level... this too cannot live in the spoon directory but will have to be installed in specific system folders, require root access to install/remove, and probably require a reboot as well.
Now the idea of a fork allowing some sort of external control... that does sound appealing... keep the expertise of each where it can do the most good.
(And I'm sure I have some of the specifics above wrong... I did say my understanding of what's required was pretty superficial!)
That all makes sense. I guess my point was that if someone far smarter than I wanted to make a "spoon" that allowed Karabiner-like power and functionality - then the spoon bundle could contain the kernel "helper" files, and all you need to do in your init.lua
is use Terminal or AppleScript commands to "install" the helper. Similar to the way hs.ipc.cliInstall()
works I guess.
Either way, given basic Objective-C is already above my head, I doubt I'll be personally messing with the Kernel space anytime soon!
Ok, my comments re the items I think I can get to in the next couple of days and what should hold off:
Probables:
Fix up hs.webview.toolbar priority documentation and/or the way it's handled. See: #1300
Add hasMoved and gotFocus callbacks to hs.webview. See: #1259
Add User Locale to hs.host. See: #1170
Add Hammerspoon Bundles. See: #1182
hs.alert doesn't display on correct screen in certain display configurations. See: #1196
hs.drawing->canvas switch
hs.drawing
and hs.canvas
so we can get useful feedback if people do run into issues. I haven't (and I've been using canvas solely -- except for a few tests -- since before it was even added to Hammerspoon core, and while my config is pretty hairy in places, it's still just one person's experiences and usage patterns.Less-Probables, or "Are you $#^$@#%^@$#$ crazy?" 😜:
hs.drawing:bringToFront(true) doesn't work for full-screen window. See: #1184
Add hs._asm.touchbar to Hammerspoon core. See: #1078
Add hs._asm.axuielement to Hammerspoon core.
Add API to allow drag & drop support to Hammerspoon Dock Icon and/or Menubar. See: #1057
Add extension that allows reading/writing to plist files. Discussed here.
hs.webview.toolbar:copy
... a little harder, but adds the question: should the delegate do this automatically (only possible with our toolbar module since the parent class doesn't have a copy method... but then, only our toolbar module is available to us at present) or handle this in the policy callback... must ponderIn any case, I do think I can get to this by Sunday, so... unless you're really in a hurry for 53, it shouldn't delay things much if at all.
@asmagill re binaries in Spoons - yes, I mean the .so's. I've very intentionally not added the Spoons folder to package.cpath
. I think the Spoons should be for distributing units of Lua functionality. Something reasonably safe that users can install without worrying too much. If we add them to cpath
too then everything goes out the window, and we start having to worry about stable ABIs.
I really really do not want to encourage any kind of .so support in Spoons. I can't stop people from choosing to do it, but I won't be adding any support for it to Hammerspoon, nor will I be merging any Spoons that use it, to the official Spoons repository.
To be very clear, I love that you distribute unfinished/experimental/undocumented/etc extensions for people to play with, and I'm 100% fine with that - it's useful and fun, and they are taking ownership of managing them, by having to drop them into .hammerspoon
. Spoons are just supposed to be something different - a way for users to stand on each others' shoulders for creating their configs.
I've now switched over to running a Release build of master, and moved a few of my own self-contained config items into Spoons, and the relevant section of my init.lua
is: https://github.com/cmsj/hammerspoon-config/blob/master/init.lua#L42-L56 and I'm pretty happy with the way this is working so far :)
@asmagill ok, I think I've updated all the 0.9.53 milestones. There's no immediate rush to release - I'd like to do it soonish, because we haven't had a release this year yet, but a few days makes no difference, and any of the things on the milestone can be bumped if needs be :)
(also if people don't know, you can click on the 0.9.53
in the milestone box on this issue, and get taken to https://github.com/Hammerspoon/hammerspoon/milestone/10 to see the list)
- Add API to allow drag & drop support to Hammerspoon Dock Icon and/or Menubar. See: #1057
-- As I understand it, this requires a move to custom NSViews... which is something we should do for hs.menubar anyways since much of what we're doing in the module is deprecated or not recommended. But I see that as more of a 9.9.54 item unless someone disagrees.
It sounds like drag & drop to the hs.menubar
is definitely something that can only be done after hs.menubar
is revamped to use NSViews
- however, I wonder if it's worth adding a callback when you drag and drop stuff to the Hammerspoon dock item? Hammerspoon can already handle "spoon" files, so I wonder if it's worth adding an interface to support the dragging and dropping of other arbitrary things? Maybe support for both files and text? I'm happy to give this a bash over the weekend and see what I can uncover. I'm thinking that if you drag and drop text onto the Hammerspoon dock icon, then it could trigger a Lua callback that allow you to do "something" with that text, or if it's a file, the callback would give you the path to that file.
For anyone who's interested, #1177 could probably also be included in 0.9.53
.
I improved hammerspoon documentation pages with this userscript: https://openuserjs.org/scripts/krasnovpro/hammerspoon.org_Documentation
It restyle all and add iframe with toc: https://habrastorage.org/files/898/166/977/8981669778e24f80acae56e6d5c192ea.png
That looks awesome!
@krasnovpro it looks like I can make this a part of the built in document browser and web server provided by hs.doc.hsdocs
by using script injection, if you have no objections.
It would be nice. But check for bugs, just in case. I'm not a programmer.
Some fantasy about logo: Looks like a tank =)
@krasnovpro I like it, but I'm also very attached to our current logo :)
(in case it wasn't clear - that .zip is a release build of 0.9.53, with only the following details:
Thanks very much everyone who contributed to this release, I think it's a really good one :)
Approximately final number for the ~4 months of 0.9.52's life:
Hammerspoon-0.9.52.zip: 20314 downloads
It feels like we're on the home stretch for a bunch of work, so let's get our ducks in a row for 0.9.53.
Usual drill, please nominate anything for the milestone that you want/need urgently fixed/added