
Show HN: Autumn – A macOS window manager for (Type|Java)Script hackers - sephoric
https://sephware.com
======
sephoric
Greetings fellow hackers! Author of Autumn here!

I've been writing Autumn on and off for a few months, because there's
something really satisfying and rewarding about automating something you do
often, and then using that to automate more, and building upward in a cycle.

That, plus I wanted to see how close to building a "legit IDE" I could get
while completely faking it with WKWebViews. So Autumn kind of grew from those
two principles and I'm really happy with how it turned out.

I'd be glad to answer any questions, I'll be here for a few more hours. (I
don't have internet at home so I use the library's wifi for stuff like this,
and it closes early today.)

~~~
sephoric
Also, sorry for the terrible website. Web design is not my forte, I'm an app
guy, and this was the quickest thing I could hack together in a couple days.
Also I'm aware of the issues with the video demo, I'm uploading the file to
YouTube so it should be fixed soon!

~~~
tptacek
This site is great. It's clean, easy to read, and looks professional.

It's hard for me to evaluate how useful this would be to my workflow without
seeing the API, and it looks like I have to actually run the app to do that.
It might be worth putting a copy on the website.

~~~
sephoric
Thank you for the advice, you're the second person to bring that up, and it
seems like a fine idea, so I will do that this morning :)

[UPDATE] I have added the full and complete documentation to the website,
which I hope will help you decide whether you'd like to try Autumn!

------
armitron
Some more macOS window managers, all free and opensource:

Spectacle, Slate, Phoenix (similar to Slate)

And by far my personal favorite:

Mjolnir which is extensible in Lua! Also, Hammerspoon its continuation.

[1]
[https://github.com/eczarny/spectacle](https://github.com/eczarny/spectacle)

[2] [https://github.com/jigish/slate](https://github.com/jigish/slate)

[3] [https://github.com/sdegutis/Phoenix](https://github.com/sdegutis/Phoenix)

[4]
[https://github.com/sdegutis/mjolnir/](https://github.com/sdegutis/mjolnir/)

[5]
[https://github.com/Hammerspoon/hammerspoon](https://github.com/Hammerspoon/hammerspoon)

~~~
sephoric
That is a great list! Autumn's API was inspired by a lot of these, so you may
find some similarities, although I redesigned Autumn's API from the ground-up
to be intuitive, simple and predictable, and so that it would lend a lot more
easily to the built-in documentation viewer. Searching through online
documentation was always one of my most sore points when using other
programmable window managers, so that was one of my biggest focuses in Autumn,
and one of the aspects of it I'm most happy with how it turned out. That, the
developer console, and the integrated IDE (Monaco editor), are some ways that
I felt I could take the next step up from earlier window managers.

~~~
badsectoracula
> Searching through online documentation was always one of my most sore points
> when using other programmable window managers

For me that is always one of the most sore points of almost _every single
desktop application_ , or at least those released this side of the millennium
(older stuff tend to have actual offline documentation with them).

I don't use macOS these days (i dislike how Apple doesn't care about backwards
compatibility and every time i upgrade macOS i have apps i bought break left
and right - at this point almost nothing works on my oldest iMac), but thumbs
up for providing your users documentation with the software they bought
instead of sticking it to some wiki in a web server somewhere and hoping for
the best (of course having the docs available on the web is fine and for some
welcome, since they can check out what the app can do before even buying it,
just not as a replacement for local docs you can pull up at any moment
regardless of your internet connectivity - or even version of the software).

------
vemv
I feel deeply aligned with the goals of this project, but unfortunately (for
me) I think a given solution is not really hackable unless it's open source.

Depending on a given indivudual's opinions, availability, etc tends to be at
odds with hackability.

At the same time I respect the author's desire to be rewarded for his work.
Perhaps Patreon or the like could be a sustainable model. It's what the iTerm
author uses (and quite a few other people who I do support).

~~~
sephoric
Patreon's model relies on monthly fees, which is something that
philosophically I am against with software like Autumn, because it's not a
continual service but a product that took a finite time to complete, so it
should have a finite price. I also took counsel of someone who makes over $10k
/ month in monthly donations for open source work, who strongly recommends
against it for personal products but encourages it for products that can
benefit organizations.

~~~
chris_st
Patreon has a per-accomplishment tier, used by (e.g.) the "Pepper and Carrot"
webcomic[1] to fund each page individually. You might consider that model for
features...

[1] [https://www.peppercarrot.com](https://www.peppercarrot.com) (highly
recommended if your tolerance for cute/silly is high :-)

Oh, and the author's patreon page:
[https://www.patreon.com/davidrevoy](https://www.patreon.com/davidrevoy)

~~~
sephoric
Thank you, I did not know about this, it looks like an interesting path worth
considering.

------
0x8BADF00D
It's a neat API as far as window managers go. But I'm afraid I can't use it
unless it is open source. Most WMs are open source, Xmonad, awesome, and i3
come to mind. With a little bit of hacking, you can setup Xmonad w/ XQuartz on
OS X, but it is a bit buggy. I couldn't get xmobar to work, and keybinds don't
work all the time, especially if XQuartz has an existing keybind for that
particular key.

~~~
badsectoracula
Generally speaking with those sorts of small indie programs you are paying for
quality and convenience. Having to do "a little bit of hacking" and -
especially - running an X server on macOS as your primary window system so
that you can have some customizability doesn't exactly bring quality to my
mind, but it might be me :-P

(of course for some the ability to be able to edit the source code of their
window manager might be something they absolutely need, but they may just not
be the target audience and... well, even then, you don't need the license to
be open source, just the source code available and perhaps a license that
allows sharing patches among people who already have the code)

~~~
0x8BADF00D
> Generally speaking with those sorts of small indie programs you are paying
> for quality and convenience.

If I care about convenience, why wouldn't I just use the default WM? Quality
is also debatable. For a WM productivity is far more important than quality.

~~~
badsectoracula
> If I care about convenience, why wouldn't I just use the default WM?

Because it might not have the functionality you want. Things aren't black and
white, but one solution might be closer to what you need than jury rigging
something yourself.

> Quality is also debatable. For a WM productivity is far more important than
> quality.

We'd need to agree both on "quality" and "productivity" here since those do
not have well defined meaning. For me when it comes to software that helps me
be productive, quality _includes_ it helps me be productive, so there isn't a
relationship where i can say that one is more important than the other since
one _implies_ the other.

------
jarpineh
Yes. I was just trying to learn Hammerspoon. This is more familiar language
and has an IDE to boot.

7 days for trial isn’t that much for productivity app. Then again its only 8
dollars or so.

I wish there was repository or discussion forum for automation scripts.

Also, I would like to react to Mac notifications. That has been seemingly
impossible to do...

~~~
sephoric
Forum for discussion is actually one of my highest priorities for this month!
I'm not settled on whether to use something like Discourse, phpBB, a
subreddit, a mailing list, a custom forum, or a GitHub repo with Issues
enabled. This requires more thought, and maybe more discussion, but it was on
the todo list since day one of writing Autumn.

I will look into reacting to Mac notifications, that sounds like it could be
useful but I'm not sure I understand what it means. Could you elaborate?

~~~
jarpineh
Thank you for your response.

If the subject is interesting/useful I don’t believe forum software matters
that much to us users. All those that you mentioned would work fine, I’d say.

Notification issues I have tried to solve with Bettertouchtool and
Hammerspoon, but I havent been able to find notification API access in them.
Though I don’t know if Apple provides such access to notifications. Use cases
I have are reacting to Slack, iTerm, Mail and browser notifications as events.
I’d like to access the notification content in plain text or object and then
decide how to process it. Depending on message content, time of day, place,
connected network &c I could put up rules on how to proceed. I could show
notifications on touchbar or on screen in less distracting ways than what
notification center allows. I could pool certain notifications and check them
all in one place, such as bot messages from various slack channels.

Notifications seem easier way to get information moving between apps than
trying to use their specific APIs (if such is even available). Sort of light
weight RPC from apps to my custom tools.

~~~
sephoric
That does sound very useful, yeah. I'll look into whether it can be done, but
my gut feeling is that it can't. Typically apps can only respond to their own
generated Apple notifications, not those generated from other apps.

------
saagarjha
Have you taken a look at Hammerspoon?

~~~
sephoric
Yes, Hammerspoon goes in many different directions with its API, providing not
only the kitchen sink but the house and the neighbors' houses, but lacking the
paintings and many walls. That inspired a lot of decisions in how I designed
Autumn's API, because I wanted the user experience to be buttery smooth from
start to finish, and I wanted the API to be both useful and comprehensive
without being overwhelming or spartan.

------
Kabootit
General question: is it possible to assign different applications as tabs of
one window on MacOS?

A fellow developer does this via some app on his Windows box to keep entire
projects grouped together.

------
sneak
see also: Slate window manager, configured with javascript.

[https://github.com/jigish/slate](https://github.com/jigish/slate)

~~~
sephoric
Slate is great, it was one of the first window managers I ever tried. In fact
Slate inspired a good portion of the early versions of Autumn. You can almost
think of Autumn as Slate with an embedded IDE, built-in documentation,
developer console, and an API designed with TypeScript in mind.

~~~
DonHopkins
I was also quite inspired by Slate. Unfortunately there hasn't been any
activity with it for about 5 years or so. It's great you're picking up the
mantel and running with it, because the essential idea is great!

I was interested in Slate because I was looking for a good way to implement
pie menus for a Mac window manager. And I'd already implemented pie menus for
HTML, so I wanted to come up with a way to use that code (and any other html
user interface or graphics too, of course) in the window manager.

About 5 years ago I opened this issue, describing an experiment I did making
the web browser in a topmost window with a transparent background to implement
user interface overlays scripted in HTML.

WebView window for HTML user interfaces like pie menus to Slate. #322:
[https://github.com/jigish/slate/issues/322](https://github.com/jigish/slate/issues/322)

Slate used a hidden WebView for its scripting engine. So I made it un-hidden
and float on top of all the other windows, and was easily able to use it to
draw any kind of user interface stuff on top of all the other Mac windows. And
I could track the position of windows and draw a little clickable tab next to
or on top of the window title bar, that you could click on to pop up a pie
menu.

It actually worked! But I didn't take it much further, because I never got any
feedback on the issue I opened, so gave up on using Slate itself, and never
got around to starting my own JavaScript window manager myself (like you
did!). I opened my issue in June 2013, but the last commit was Feb 2013, so
development must have stopped by then.

But I wrote up a description of my ideas about "aQuery" (like jQuery, for
accessibility), and bounced the idea off of some people who are into
accessibility and user interface design, and learned about Morgan Dixon's work
on Prefab, something you should definitely check out if you're developing a
window manager.

[https://donhopkins.com/mediawiki/index.php/AQuery](https://donhopkins.com/mediawiki/index.php/AQuery)

Here's an HN posting that describes Morgan Dixon's "Prefab" \-- imagine how
powerful a window manager would be if it could do all that stuff, fully
programmable from JavaScript, in combination with full access to the
Accessibility APIs.

[https://news.ycombinator.com/item?id=11520967](https://news.ycombinator.com/item?id=11520967)

Morgan Dixon's work is truly breathtaking and eye opening, and I would love
for that to be a core part of a scriptable hybrid Screen Scraping /
Accessibility API approach.

Screen scraping techniques are very powerful, but have limitations.
Accessibility APIs are very powerful, but have different limitations. But
using both approaches together, screencasting and re-composing visual
elements, and tightly integrating it with JavaScript, enables a much wider and
interesting range of possibilities.

Think of it like augmented reality for virtualizing desktop user interfaces.
The beauty of Morgan's Prefab is how it works across different platforms and
web browsers, over virtual desktops, and how it can control, sample, measure,
modify, augment and recompose guis of existing unmodified applications, even
dynamic language translation, so they're much more accessible and easier to
use!

~~~
sephoric
This sounds incredibly useful and is something I am going to strongly look
into and consider as a future (separate) project. Thanks for sharing these
thoughts!

------
huxflux
Wish the trial was at least 30 days (and more documentation on the API). Not
pointing fingers here, but please don't let us turn HN into Betalist.

