Closed cmsj closed 7 years ago
@asmagill , do you think you can include #1116 ? :)
Re #1116, suggestions on the name? I've been calling it hs._asm.watchable
, which usually means it would be called hs.watchable
when added to core, but it doesn't have to be.
@cmsj, per your comment in the Google groups thread about including examples in the API docs... what are your thoughts on adding a "Sample" entry type? I think as long as we kept the "label" for the example one contiguous string with no spaces (e.g. hs.module.example_name
) it won't break any scripts, but I'd have to run some tests to be certain.
@asmagill . :+1: for hs.watchable
. Fits the established hs terminology and the purpose better than a more general hs.observable
IMHO.
@cmsj (and anyone else that wants to chime in), here is a list of things I've been working on that could be ready in the next couple of days, depending upon how quickly you want to get 0.9.51 out, and I'd like to get your thoughts on priorities and/or things to definitely include or hold off on:
hs.image
hs.image:crop
- returns a copy of the specified rectangle of the image as a new image objecths.image:template
- allows toggling the template property of an image. This affects at least the coloring and alpha value of an image when you display it in an hs.drawing
(create an image with ASCII art and display it, then put the image into an hs.menubar
object and then take it back out with hs.menubar:icon()
and display the returned object in a new drawing if you want to compare the difference)hs.pasteboard
hs.pasteboard.readArchiverDataForUTI
and hs.pasteboard.writeArchiverDataForUTI
- allows getting and pushing objects which conform to the NSCoding protocol, which includes many of the more complex objects some applications use the clipboard for. Ultimately I want to use this to allow archiving some of the userdata objects we create, but I think this will either require a wrapper to pull out the "super" class version of our objects or additions to our current classes to make them NSCoding compliant, so that part will have to wait till the next release or so.hs.pasteboard.writePListForUTI
- I still haven't figured out why it doesn't seem to like keyed tables (NSDictionary) since these are a valid PropertyList type and the readPListForUTI
version can return them, but it does currently work for arrays, strings, numbers, and boolean.hs.canvas
- It would be nice to decide on how we want to embed examples into the documentation, but for now I can leave it in my github site and include links to the examples page there. I would include the hs.drawing
wrapper, but it would probably be disabled by default for now -- instructions on setting a flag to enable/disable the wrapper will be included in the docs, though. I'm happy with the wrapper and have been using it for more than a month now, but... I'd like more tests since drawing is such an integral part of the visual aspects of Hammerspoon.
I want to hold off, unless there is disagreement, on the following for now:
hs.axuielement
- I still need to add some search parameters that @latenitefilms has suggested, and I would really like to move more of it into Objective-C then is at present. It would also be nice to merge this with hs.uielement
, but the last time I touched that module, I broke it, so I need to look a lot closer at it or contact the module's original author.
hs.touchbar
- (the virtual touchbar portion of it) I'm still not happy with the garbage collection routine... even after halting the stream and removing the view containing it from the window, if I then close (rather than just hide) the window, it crashes, so there is at least a small memory leak in the current implementation since we avoid closing it... not a leak I've noticed being a problem, but it is still there.
My thoughts, for what it's worth (which is probably very little)...
I completely agree with everything @asmagill has said. I agree that eventually all @asmagill's magical hs.axuielement
code should make its way into hs.uielement
. We've been using this code EXTENSIVELY, and it's so great.
I've also been using hs.touchbar
for a while now, and it's been rock solid for me, but more than happy to trust your genius as to if and when you should release!
Some things I'd personally LOVE to see in the next release if anyone's up for the challenge and there's enough time to do before you want to release publicly:
I feel like these inconsistencies would be good to solve, and I don't imagine it would be too time consuming to do?
I'd LOVE for someone to solve the hs.chooser
right-clicking issues as discussed here. Another suggestion discussed here, might also be worth investigating?
I'd still LOVE the ability to drag and drop to hs.menubar
(or the Hammerspoon Dock Icon). Based on what I've read, I honestly don't think this would be too hard to code for someone who actually knows and understand Objective-C. Discussed here. All I'm thinking is that once the Objective-C code makes the menubar "drag acceptable" (which I BELIEVE it only a matter of setting a tag?), then when someone drops something to it (i.e. a file, etc.), this gets saved in a temporary file (or just data within Hammerspoon), and then we can "communicate" with hs.menubar
to get at that data and manipulate it as needed.
I'd LOVE it if @asmagill could re-appropriate some of the awesome code he's written in hs.pasteboard
for reading binary plists, and apply it to a new module (i.e. hs.plist
or even include it in hs.settings
?) for reading and writing to plain-text and binary plists. We've been playing around with building the module ourselves, but it still currently relies on Command Line/Terminal commands - which is not ideal. Also discussed previously with @asmagill here.
Thanks so much to EVERYONE who contributes to Hammerspoon. You're all seriously impressive and inspirational. Hopefully once I eventually get better at coding in LUA, I'll actually be able to contribute something to the codebase!
Drag and drop to a NSStatusItem requires a custom view -- see http://stackoverflow.com/a/6006530. If this is to be added, it should probably be done with a menubar rewrite since we're heavily utilizing methods deprecated in 10.10 for hs.menubar
and it really should be redone using the button property for everything so it's more flexible and forward-compatible.
https://github.com/asmagill/hammerspoon_asm/tree/master/preferences looks like it might be useful for reading property list files. I need to revisit it and add support for writing back changes (currently its read-only), so it's not going to make 0.9.51, but I should be able to work on it after the new year.
I should be able to get canvas added in the next day or two, and I'd like one more crack at propertylists with the pasteboard module, but other than that, I think we're pretty close to ready.
Drag and drop to a NSStatusItem requires a custom view -- see http://stackoverflow.com/a/6006530. If this is to be added, it should probably be done with a menubar rewrite since we're heavily utilizing methods deprecated in 10.10 for hs.menubar and it really should be redone using the button property for everything so it's more flexible and forward-compatible.
Thanks so much for looking into this! HUGELY appreciated! No worries at all. I've since worked out a way to do "drag and dropping" using hs.webview
, which works great! Eventually, I'd still love to be able to drag and drop to hs.menubar
, but it's not super urgent.
https://github.com/asmagill/hammerspoon_asm/tree/master/preferences looks like it might be useful for reading property list files. I need to revisit it and add support for writing back changes (currently its read-only), so it's not going to make 0.9.51, but I should be able to work on it after the new year.
Yeah, I have had a quick look at your preferences module, but to be honest, I couldn't really wrap my head around it. If you're able to have a look at it next year, that would be amazing!
Thanks for your ongoing help and support!!
(Apologies, I'm not ignoring this discussion, I'm just in a pre-Christmas work crunch. I will have lots more time in the second half of next week)
np, figured as much... I'm trying to wrap up the low hanging fruit since I've got the time...
It seems like we're in pretty good shape here, last call for any things that are super important to be done right now, and then I'll try and get 0.9.51 out in the next couple of days :)
I broke Travis, Happy Christmas ;) I think it's the trick I was using to discover where to load Lua test files from. Will investigate tomorrow/Monday.
One day you're gonna have to explain to me what/who Travis is. Regardless, Merry Christmas and thank you SO MUCH for all your amazing help and support over the last few months! HUGELY appreciated!!! You too @asmagill - thank you, thank you, thank you.
@latenitefilms Travis is travis-ci.org - every time we push a new commit into Hammerspoon, they do a full build and run the test suite, and report back the results. It can be infuriating when it's broken, but it helps us catch mistakes :)
Ok folks, let's fire up the release train again! Get your nominations in for bugs/PRs to land :)