Hacker News new | past | comments | ask | show | jobs | submit login
Hydra: A lightweight OS X window manager with a powerful API (github.com)
446 points by LaSombra on July 3, 2014 | hide | past | web | favorite | 151 comments



If you're looking for a window manager for OSX without having to actually configure anything, you can try using Spectacle: http://spectacleapp.com/

For instance on my imac 27'' I have Option+Command+Left|Right keys mapped to side (similar to windows 7.

And I can also have 4 windows open at once using Shift+Option+Command+Up|Down|Left|Right to move them to the different corners. Works really well with less than 2 minutes of setting the hotkey on a simple GUI configuration window.


I'm a -big- huge fan of Spectacle, I've been using it for a long time now and couldn't imagine life on a Mac without it. There's worth noting that there's a plethora of similar apps out there:

http://alternativeto.net/software/spectacle/?platform=mac


If you are already using Alfred, I'd suggest having a look at the new workflows available, in particular layout, which covers a lot of the features of spectacle.

For instance, typing 'layout left' in alfred will push the window the left side, topleft for the corner, etc.


Mind linking to the particular layout workflow you're talking about? Or is it now built in? I currently use spectacle, but would prefer to use Alfred.


Looks like he might be talking about this: http://projects.jga.me/layouts/

Github repo: https://github.com/jgallen23/layouts

I personally find that I don't need anything more than what Spectacle gives me (splitting windows is really it). That said, I love me some Alfred workflows. Alfred is the single best software purchase I've ever made.


I did find that one and tried it out, but it doesn't have multiple monitor support. I'll stick with spectacle for the moment.

My alfred workflow library is incredibly sparse at the moment, so if you have any other good resources you'd like to share, that'd be great.


I use Alfred a lot, and I've installed a lot of workflows, but I don't use many of them.

The one I use the most, by far, is "Plain Text Paste," which I use almost every time I paste anything (I use the hotkey CMD-SHIFT-V). It's here: http://cachefly.alfredapp.com/beta/Plain%20Text%20Paste.alfr...

The only other workflows I use regularly are hotkeys to open websites I visit regularly, like our own website and our WordPress log-in control panel.

I'd too would love to hear which workflows other HN readers use a lot.


Thanks for that one.

I have a similar one to yours that creates a new plain text document from text on the clipboard.

My most often used one is Open current safari tab in chrome. I prefer using safari as I seem to get the best battery life using it. I don't have flash installed so any page that may have a flash component just gets opened in chrome using that Alfred workflow.


I occasionally need to open links in Firefox (rather than Chrome) so I have a FF <url> workflow that simply opens that link in Firefox. I need to automate more of my workflows.


Thanks for sharing that, solves a problem which bugs me on a daily basis!


Might be a good idea sdegutis, to have sample configuration that replicates the setup from Spectacle, Moom, etc., similar to what you did with Zephyros (I think?).


Ah not a bad idea, thanks! Will look into it.


Agreed! Another long time user of Spectacle.


I've been looking for this a while ago; all I could find were relatively expensive apps that didn't really work. Thanks <3


I can't find the minimum OSX version on the Spectacle site or github. Do you have any idea which one it is?


ShiftIt is extremely similar to Spectacle (I use both on different machines) and should be functional back to 10.6.

https://github.com/fikovnik/ShiftIt


I haven't tried Spectacle, but I'm happily running Divvy and Cinch on my 10.5 PPC Mac. :)


According to the info at MacUpdate, it's OS X 10.7 or later.

http://www.macupdate.com/app/mac/41147/spectacle


Spectacle should work on 10.6+ according to it's Info.plist: <key>LSMinimumSystemVersion</key> <string>10.6</string>


Sorry I'm not sure either, I know it works with latest OSX and the one before that.


Its really nice, I wish it could do some auto-tiling, but all things considered it works quite well


Thanks!


This looks great, but my favourite thing might be the Principles section:

  > Hydra must be stable. It should never crash
  > Hydra must be lightweight... never use more than 10 MB of memory
  > API should be completely transparent
  > API must not be bloated
I think these principles should be the standard to which we all hold our software. Looking forward to testing this out!

Edit to say: it would be really great to see some more complete code samples but I'm sure that'll come in time.


I'm not sure I fully agree. For example

> Hydra must be stable. It should never crash

It's clearly better to have an app that never crashes than an equivalent one that crashes all the time.

However, making sure that your app is 100% crash-free isn't a zero cost thing. It takes time and effort to (often, a lot of both) to get to a completely crash-free app, meaning that the app either costs more, takes longer, or has to compromise on features - or possibly all three. In some case, that trade off is clearly going to be worth it - I'd rather a self-driving car took 10 years longer to develop than have one that rebooted itself twice a day, but in others I'm fine living with the occasional crash if it means cheaper or more feature-rich applications.


For a window manager, crashing is kinda a pain depending how it restarts. Maybe another way to state the implicit goal would be

> Hydra must gracefully and rapidly restart should it crash w/o losing any user data.

And then maybe it could do this be serializing state into a sqlite or redis instance. We always to be careful of muddling the goal and the mechanism.


I agree. Like I say, there are some instances where zero crashes is absolutely the right goal. It may not be absolutely mandatory for a window manager (in the way it would be for a self-driving car), but I can understand why someone would want this as a goal for this app.

My point was more that I don't think it's a sensible standard for all software. I hear this kind of thing quite regularly, usually by non-technical managers, often in a way that seems to suggest they think bugs are either the result of pure sloppiness, incompetence or downright malice.


I don't think "Must never use more than 10 MB of memory" is a reasonable standard to hold all software to.


To put this in perspective, a full screen application running on a Retina display needs at least 40MB total for its front and back buffers.


Nope, but I would venture to guess that most software would be improved by sticking to that.


I don't even feel confident in that claim. If keeping memory usage under 10 MB requires a significant amount of developer effort, that is effort that isn't going into something else that I might value a lot more than, say, 20 MB of RAM.


Not just developer effort, but also sometimes program runtime efficiency. RAM is cheap, RAM is pretty fast (compared to disk or network); cache shit there when it makes sense to do so for overall efficiency.

10MB is a fairly ridiculous modern standard to limit yourself to, IMO (and I started on the C64 and generally do dislike and try to avoid bloat).


Can you give an example of the kinds of samples you would like to see, and where you would look for them? (I presume under the Examples section on the README page?) That will help me know what to put there.


You have a link to your own config and some screenshots of it in action, maybe it would be good to pull out the relevant sections of your config so people can replicate what they see in the screenshots?


Not a bad idea, will do. Thanks.


I do not like the "API should be completely transparent" and "API must not be bloated".

I personally think APIs exist to hide complexity. They should make sense, they should be usable, but they need not be transparent.

Let's have a rather contrived example. In SDL, you can call SDL_Init(). That does a lot of things, and what it does differs on windows, linux, and OSX. I absolutely don't want the more transparent API of SDL_Init_Windows_Video(), SDL_Init_Windows_Audio(), SDL_Init_Linux_Video() .... And so on. Realistically, for absolute transparency, you'd just do away with the API and write every line of code SDL currently hides (Reductio ad absurdum I know)

The entire point of having that one SDL_Init() call that's identical on all platforms, even though it does many opaque things underneath (and different things per platforms) is that it's easier to understand and use. The goal of an API is to be usable and useful, nothing else. Transparency can often get in the way of usability.

As for the "bloated" bit. Well, I'd rather be able to do too many things than too few. It's a great goal to have a purely orthogonal (no method may be accomplished with another combination of methods) API, but it should not be done at the expense of usability.

    > Nothing should be put into it except what's impossible or impractical to do in pure Lua, and what's extremely common and likely to be used in everyone's configs.
The entire quote makes it seem even more damning to me. Why would you cater to what's "likely to be used in everyone's configs"? That's another way of saying "Let's support only the least common denominator" which to me seems like a bad philosophy.

This philosophy would lead to twitter not having a friendship API because the only thing practically every api user does is login and (arguably) tweet, only a few deal with friendships or account settings. It would lead to linux not having a configuration option for running more than one physical CPU or hotswapping ram because the wide majority of people will never use these options.

I'm happy that the author of this software decided to make it simple and it seems to be working here, but in the majority of cases of API design, I'd much rather the API be usable, not transparent, and large, not minimalistic. I'd rather be able to call a method that does some common activity for me which I could technically do myself in a 1000 lines of code than not have such a method because it's "bloat".


You can't really compare a platform speciffic "window manager" to a multiplatform 3D/2D rendering api.


It was the parent I responded to who said all software should strive for this. My argument is not against the philosophy of the window manager in this instance, but rather against applying it everywhere as the parent seemed to think would be good.

So no, you can't really compare those, I agree, but it was not me who brought in an arbitrary piece of software, but the parent comment.


Hail Hydra!


Came here for this. Didn't leave disappointed.


"Bloat" is emotional, not factual. It's meaningless without well-justified examples and alternatives.


I tried a ton of window managers (Divvy [1], Spectacle [2], Alfred worflows, scripts) over the years, but the most advanced, most easy to use and fastest solution is Moom [3]. It's extremely flexible, configurable, have nice design and clever tricks. It has far more features that all of the above. I'm not searching the perfect window manager anymore.

[1]: https://mizage.com/divvy/

[2]: http://spectacleapp.com/

[3]: http://manytricks.com/moom/


I'll second the motion for Moom. Great app, but I'm really glad to see some viable OSS solutions in this space. Environment hacking FTW.

I'll also mention a feature I adore from FlexiGlass[1]: the ability to map <modifier>-<1/2/3 finger move> to move the window under the mouse. For example, I use <option>-<2 finger move> for this mapping. No mouse click & hold required, and the entire window is the "hit zone". FlexiGlass can also resize similarly, but I tend to just use my Moom bindings to snap windows where I want them.

I find this to be incredibly pleasant to use for window moves because it's a very immediate experience, more like arranging paper on your desk. Even better, the window being moved doesn't have to be in the frontmost application. This makes it even faster to move background windows. The usual window movement via titlebar or window snapping app requires the moved window be frontmost/focused, so there's a switching back and forth required. Between the giant, whole window, hit area and less focus switching, FlexiGlass' approach is a huge win IMO. I still feel a bit self-conscious about having this app installed for one feature, but it's really that good.

[1] http://nulana.com/flexiglass/


I started with the moom trial, but when it came time for me to make a purchase, I ended up going with BetterSnapTool. It might not be quite as flexible as Moom, but a) it fit my personal needs and b) it was less than half the price.


I miss my days on Ubuntu with i3 tiling window manager. I currently use an app called Amethyst[1] but find it to be a bit buggy at times and just doesn't live up to i3 or awesome. I wonder if hydra can be used as a launch point to create a better tiling window manager for OSX. I'm not familiar with the APIs that OSX exposes, if any, to do things like window management but it would be awesome to see some more control over workspaces and not just the windows within a workspace.

[1] https://github.com/ianyh/Amethyst


Amethyst is the first tiling window manager I've used for any substantial length of time. I made my desktop transition from NetBSD -> OSX before tiling window managers were really much used. Amethyst gets props from me in being the first that has worked intuitively and stabily such that I've actually stuck with it for any length of time.

As for Linux, I realize that I'm personally in a place where leaving OSX would cause me no grief whatsoever. I catalogued everything I run on my Mac these days, and was pleasantly surprised to find I have zero local commercial software that I depend on, or indeed any Mac-only software. Generally, when I've used recent Linux desktops, I've discovered that the experience is at least on par with my Mac, with the added bonus that Emacs doesn't have so many quirks.

Battery life on my MacBook Air is really the only thing keeping me from moving back. I have to wonder if there is any movement to achieve power management parity with OSX in Linux.


I was in the same position and switched to Arch long ago. Power management in my MacBook Air 11 2013 is as good as in OS X, if not better. This sounds like a bold statement, but mind that it's almost 100% Intel hardware. Intel funded powertop, which is a utility that allows you to track and optimize software and hardware power usage.

Even Linus himself used this machine for quite long. He then moved on to a Chromebook Pixel. These days he seems to be using a Vaio.


How long does your battery last under Linux, with reasonable screen brightness? What's the battery discharge rate indicated by powertop? Are you using a full desktop environment?


I run a very minimalistic environment without a DE. I use XMonad as a WM. My only graphical applications are Firefox and Zathura.

With wireless on, while browsing the web, powertop shows around 5.2W. This is with a pretty bright screen. With reasonable usage, you can go well past 5 hours. Note this machine has a tiny battery in comparison to the 13 inch model.

I believe things could be even better (-0.5W) if I used another driver for the Broadcom wireless card (currently using the stock one in the kernel), as it doesn't support power management. Besides, on X11 the keyboard and the trackpad do not sleep properly.

Best hardware I've seen in this regard was a X220, and a Nokia N9. But the Mac is extremely good. If one cherry picks hardware for Linux like Apple does for OS X, the experience can be very good these days.


Hmm... Even 5 hours is pretty low compared to what I get under OSX with normalish usage on my MBA 11". I've also found that I get markedly better battery life when I connect to my Apple-branded wifi base station than when I connect to wifi just about anywhere else. This makes me wonder if Apple doesn't have some proprietary power scaling stuff with the wifi. Still, 5 hours is good enough that I might consider a more thorough checking out.

EDIT: I should add that I've only spent time in 10.9 on this MBA 11 2013 model. I've been told the battery life in 10.9 really is quite a lot better than in 10.8.


Well, with comparable usage I was getting perhaps 20 extra min on OS X. It's very good I think. It's pretty clear when you check sensor temperature: both machines are equally cold.

In the old (and not so old) times, laptops with horrid Linux power management would be extra warm due to all components being powered up all time. Far from it right now, if you cherry pick hardware. There's still room for improvement, though.


Having emacs-like keybindings by default in all native text fields and text boxes (including this one) is a huge plus for OS X. In Linux, I had to write everything in emacs and copy/paste it into the field in question. Fine for emails, not so great for address bars, impossible for dmenu, etc.


I have emacs-like keybindings in most Linux apps, including dmenu. For some apps that don't support this by default, you can configure it via their gtk backend.


I installed Ubuntu with xmonad on my work mac after one terrible month with OSX's pathetic window manager/amethyst/hacks.


I also miss awesome, and xnomad wasn't cutting it. Hopefully Amethyst is what I need.


What is that you prefer from awesome?


i3 is great - currently solving my needs quite nicely.


I've been using Slate[1] for a while which may be worth considering as an alternative. Hydra does look pretty slick, though!

[0] https://github.com/jigish/slate


Been using Slate as well but it's not maintained anymore. I wanted to switch to Phoenix - https://github.com/sdegutis/Phoenix/ which is from the same guy that this Hydra. I think the idea of Hydra was the rewrite it in Lua but I can't speak for him. Will definitely try it out asap!


Hydra is indeed my successor to Phoenix. Phoenix and Zephyros (and AppGrid if you can find it) are deprecated in favor of Hydra. But I can't just delete those projects, as existing users may not want to port their configs to Lua. Oh how I wish I could though.


I find it great that you've opted for Lua over JS. I see far too many projects with JS shoveled in where Lua would be a better, cleaner, and simpler fit.


I'm very glad to hear that. I was expecting a lot of people to be disappointed that it's not JS, but honestly I think Lua is a lot cleaner and simpler, and it is just so small and easy to integrate with in C, it's really hard not to use it in a project!


I'm one of those people still using Zephyros, mostly so that I could keep using beer (https://github.com/v-yarotsky/beer). I skipped Phoenix but might give Hydra a try (knowing no Lua though) just to see what you've been doing with it.


Put me on the list of disappointed that it's not JS.


I'm another Slate user -- looks like Hydra is a spiritual successor... I'll give it a go.


Ah I had no clue Slate wasn't actively maintained anymore. I just caught up with the new JS API. Damnit. Well, guess I'll look at Hydra now...


Second that. I’m still happy with Slate, but prefer an active developed solution.


Another amazing OS X WM: Sizeup (https://www.irradiatedsoftware.com/sizeup/)

No config, all shortcuts bound to Ctrl + Option + Command + arrows and a few others. They have an unlimited free trial, but pay for it if you really use it.


+1 for SizeUp, tried most of them and prefer this app.


+2. Can't live without it. I'm paralyzed on a machine without it (or Alfred)


I use SizeUp, but I miss the extensibility of xmonad.


Project Author here: Thanks everyone for making Hydra bypass Zephyros as my most starred project! (Especially considering Zephyros is deprecated in favor of Hydra, and I can't really delete Zephyros since people might still be using it.)


For the "closed-source-but-non-programming-power-user" alternative to this, I'm a huge advocate of BetterTouchTool (http://www.boastr.net/). You can easily bind window snaps to everything from keypresses, to four-finger-sweeps on the trackpad, to dragging window titlebars to the screen corners. Also it's so much fun to infuriate friends when they try to use my trackpad and it moves windows all over the place.


I Quickly had a look on all the window manager alternatives mentioned here. Currently I use flexiglass, but I use it for one reason only. It allows me to move windows like in linux.

When holding Mouse button 1 + alt anywhere in the window I can move it. I really like this feature, I never use the titlebar to move windows.

Do any of the alternatives (or hydra it self) allow me to do this? I'd like to try them out. See if it has advantages over flexiglass.


If BetterTouchTool doesn't let you do some custom key/mouse input, it's probably not possible. :-)

You can use keypress + mouse movement:

http://imgur.com/ZeV8grb

...or just with the mouse alone:

http://imgur.com/JNXYf1q


The 1.1 milestone has plans for "mouse-moved" and "modifiers-changed" events that you can register for, which would let you create a feature very similar to this, where if you hold down option and move the mouse, it will move the window under the mouse with it. I'll file an issue to investigate if it's possible to register for "mouse-clicked" events and override them to be no-ops (so that you don't actually click into the window). That sounds like a fun feature :)



Just what I've been looking for! Thanks for this :)


For me, the bigger idea to tiling wm, or these psuedo tiling wm is that I never have to use mouse to move/resize/shuffle windows. I too initially missed that feature when I first started using a tiling wm, but that quickly went away as soon as I had the keyboard shortcuts memorized.


Oh nice! Custom swipes is an excellent idea, I am totally going to have to look into seeing if I can add that to the API.


I absolutely love BTT. I've setup my mouse buttons and trackpad gestures to do so many different things in my apps that I'd be lost without them.


Wouldn't F-Script[1] achieve the same? I'm not sure how much love it's received for Mavericks but it's a great way to peek into any Cocoa app and call methods.

[1] http://www.fscript.org


I have used Divvy in the past, but now use Keyboard Maestro for window management. (http://www.keyboardmaestro.com/)

You do have to configure things and set them up a bit, but it can do SO much more than just window management.

Just throwing another option out there…For me, Keyboard Maestro is one of those must-have programs like Alfred or Hazel—totally changes how you do things.


Interesting. I use Moom for this http://manytricks.com/moom/, but I will give this a try.


This thread really does show the best of Hacker News. I wandered in here intrigued by Hydra and ended up checking out 3 or 4 open-source pieces of software that do similar things thanks to recommendations here.

The choice is absolutely brilliant. I love seeing so many open-source recommendations. I went for Spectacle in the end, but I'll definitely be keeping an eye on Hydra and seeing how it progresses.


I agree that this discussion has been enormously helpful. On first glance, I'm was very disappointed that this thread seems only to be about alternatives, not discussing the product at hand. If this were an announcement of a product, it would be disappointing to only have people discuss how excited they were about other software that isn't mine.

But your comment made me realize it's just about ego—I'm definitely benefitting from this discussion and should admit as much!


This looks great. Will try it out. It has always surprised me how OS X has such a poor window placement story given how much emphasis apple seems to place on User Experience.


I don't there is anything too surprising about this. "User Experience" isn't something you can measure on a single line, there are different aspects to it. I'm not an expert but I think the following are some of the things that users can appreciate:

1. That things work smoothly.

2. That things look pretty.

3. That it's easy to figure out what a program does when you first use it.

4. That it's possible to control the program efficiently, i.e., that you can quickly activate a program's different functions.

5. That a program is powerful, in that it enables you to customize it to work exactly as you need and automate it's use.

I've heard people claim Apple focuses on 1-3, I've never heard people say Apple focuses on 4 and 5. For windows placement in particular, Mac OS (as practically all window managers) has a method that covers 1-3: move and resize with the mouse.


Maybe its just because I came from Windows, but I generally expect hitting the maximize button to take the app to take up the whole screen space. On OS X, some apps do and some don't.

This violates #3 for me.

Another one is minimizing a window and then Alt-Tabbing to it (whatever the Mac equivalent is..) doesn't bring that window back up.. You are just left staring at the same app.

This violates #1 for me.


Maybe it is indeed because you come from Windows, but OS X doesn't have a Maximize button. The green light of OS X's traffic-light configuration is Zoom. But it's becoming Full Screen in Yosemite, so that should be closer to what you want out of the button.

As to your second point, that probably has the same cause. On OS X, you Cmd-Tab between applications, not between windows. Within an application, you can Cmd-Backtick between windows, but I don't think there's a navigatable collection of all windows across all applications.


Check out HyperSwitch ( http://bahoom.com/hyperswitch ) - it makes cmd+tab and cmd+backtick way more useful. Window previews, cycle through minimised windows and other good stuff


> I've heard people claim Apple focuses on 1-3, I've never heard people say Apple focuses on 4 and 5

I think 4 applies to an extent; MacOS has very good (albeit stolen from Emacs) universal text navigation shortcuts, for instance. Funnily enough, they used to be quite keen on 5, with Services and Applescript. Services are still around, but have faded into obscurity, with surprisingly few users even being aware they exist; to an extent, they may be replaced by action extensions.


It doesn't shock me. Apple is all about the UE, but isn't at all about User Choice. Apple would prefer to tell you where the windows are best positioned for optimal usage rather than letting you tell them.

Plus for the majority of average users they'll never need side by side windows anyway, that is a "power user" feature (like multiple desktops, or similar).


I have a somewhat related question for anyone with chrome devtools experience.

Is it possible to control the size (width and height) of the chrome debugger panel using the devtools api? I want to build a chrome extension that provides window management like Hydra or spectacle, but for the developer tools window. Building hot keys that could do things like send the console window exactly half screen in any direction or full screen, and also the same controls for the second console window. I spend a lot of time in the developer panel (as I'm sure many people do) and think a window manager could be a huge help. I read the api docs fairly thoroughly and also posted this same question to the google group and the stack overflow group with no response to either. Anyone out there know?


Unfortunately, it doesn't appear to be possible. See https://groups.google.com/a/chromium.org/forum/#!topic/chrom...


Thank you! I searched google groups but was unable to find something like this. I did try and code up a simple prototype and ran into the same scope issues as the author of the linked thread.


Welp, my sample config's REPL command was broken in the beta that everyone downloaded. And my first attempt at fixing it didn't actually work. It works on Beta 6. Nothing like my project being #2 on HN to make me rush enough to need two tries to fix a 1-line bug, heh.


Hey I'm checking out your config file now, Where can I get the grid package you are using?



good fast work!

REPL is working for me now :-)


Looks really cool! I was using [slate](https://github.com/jigish/slate), but it seems to be abandonware.

I have a couple of things I'd like:

- A [Divvy](http://mizage.com/divvy/)-style grid. When I used Divvy, this really made a dramatic difference in my window management - Rich Spaces/Mission Control support. It'd be great to send windows to certain spaces, make spaces for windows, etc.

I'm excited to write a Hydra config for myself, it seems great!


I've been using IrradiateSoftware's sizeup for years, and have never looked back.... until I came back to a Linux desktop.


Is there a way to do XMonad style layouts with this system? Since moving to OSX, I've missed Xmonad badly. The big thing that has been lacking is the ability for newly opened windows to automatically be placed into a grid, according to the layout that is currently defined, and then have the ability to shuffle windows around within that layout.


That should be a really easy config, especially after events are added in 1.1; I'll see what I can do it create it and add it to the wiki, unless someone beats me to it :)


I wrote my own window manager a few weeks ago: http://zonesformac.com

Emphasis is on support for multiple screens, ease of use and snappiness. (which doesn't come across in my video I guess...)

I know my download page sucks, but if anyone wants to try and give me feedback, I'd be happy to read it. Send an email.


Looks pretty neat. Reminds me of Moom, and the defaults Windows 7 drag-to-position features.


Can we stop naming software "Hydra"? At my company alone there are several tools and libraries that go by the name of Hydra. Each time someone refers to Hydra, you have to clarify which tool/library they are talking about.


Naming things is the hardest part of writing software. Really it is.


Nah, not really. Just get yourself a Swahili dictionary and you're set for a whole bunch of projects. They'll have similar names to mine (Rafiki, Nena, Chombo, Sanduku, Ramani, ...) but they'll be easily pronounceable, well-sounding and with a bit of luck even still available in .com/.net/.org/.two-letter-country-code-du-jour.


That's actually really good advice, thanks.


I find this quite intriguing, but Optimal Layout,

http://most-advantageous.com/optimal-layout/

basically has most of my needs covered.


Looks promising but how is multi monitor support? And how easy would it be to detect whether I am on my 1 screen laptop or 3 screen desktop, and use different setups accordingly?


I believe `screen.allscreens()[1]` always represents the current "primary screen". So yeah it should be possible.


Is it possible to move windows from one desktop to another?


It probably is. I used Phoenix (the JS predecessor to Hydra) and that exact functionality is one of my most used hotkeys:

Capslock + E = Swap currently selected window to other desktop, make that window fullscreen and center the mouse cursor on it


Looks awesome.

But I have some issues I can't seem to resolve - I saved the sample config in the specified path (it should be correct since on reload the app says "Hydra sample config loaded"), but I can't open the repl (Hydra Error: "Attempt to call a nil value"). And using the Cmd+Ctrl+Alt+J doesn't make the window shorter, only moves it to the right (going out of the screen).

I am sure this is just a beta release hiccup.


Yep, that was indeed an error. Tried fixing it, released beta5. Actually fixed it, released beta6. Nothing like being on the front page of HN to make me rush enough to mess that up one-line-fix on the first try. :)


Unfortunately, I still get the same errors.


Cool tool. Would be a good idea to get it on homebrew for one liner install. I noticed when checking whether it was on homebrew that there's another piece of software already by that name that could be worth avoiding (despite being an almost perfect name for what this does).


I think GUI apps only go in cask[1] not homebrew. But yeah, totally a good idea to put it in there. Thanks! Can you file an issue for this in Hydra?

[1]: http://caskroom.io/


Any idea what his require grid is referring to in his own config file?

link - https://github.com/sdegutis/dotfiles/blob/osx/home/.hydra/in...


It refers to the grid.lua[1] file in the same directory as that init.lua. It's also found in the wiki[2].

[1]: https://github.com/sdegutis/dotfiles/blob/osx/home/.hydra/gr...

[2]: https://github.com/sdegutis/hydra/wiki/Useful-Hydra-librarie...


I've been using slate, but I must admit the API for it is not that incredible (certain math operations are not very elegant) -- https://github.com/jigish/slate


Looks great! Have been looking for a Slate replacement for a while...

Have you considered adding Lua calls for accessing and modifying window contents, selections, etc? OS X has a rich collection of APIs for doing this via Scripting Bridge and AXAccessibility.


Hmm yeah, that would be pretty cool! Can you file an issue for this feature request?


I actually rolled my own WM with some AppleScript. Here is one of my scripts that divides the screen between the two frontmost applications.

https://www.refheap.com/87844


Wow, that is really neat!


Works like a charm. Can think of an enhancement:

https://github.com/sdegutis/hydra/issues/134

What do you think? No voting system in github :(


I am pretty happy with zooom2. It gave my wmaker features back.

http://www.coderage-software.com/zooom/index.html


I've been using https://github.com/ianyh/Amethyst for a couple weeks and have been pretty happy with it.


Is there support for saving/restoring window layouts? I find that feature very handy in Slate when removing/adding external monitors.


There's an issue in the 1.1 milestone for adding the event that an external monitor was added/removed. Once you have that, I don't see what's stopping you from creating this feature :)


sdegutis: would it be possible to get spaces / mission control into the API? That is, if it's not already there; I looked in every module and couldn't find anything that looked applicable. Farthest I got was screen.mainscreen()["__screen"], which is a userdata.


Probably. I think Amethyst does this, so we should be able to too. Can you file an issue for this feature request? Thanks.



Spaces control would be great. I rely on SizeUp for that today, but would be nice to have programmatic control.


Is there anything like this for Windows?


I've been using WinSplit Revolution for years and love it. It's not extensible, but lets you do things like toggle between 1/3, 1/2, and 2/3 of the space, which I use a lot.


The window management capabilities are built into Windows. You use the Windows Key + Arrow Key to move windows around like that.

To get the dictionary hot key and the other scripting abilities in Windows you would use AutoHotKey.


cool!

one thing that kind of bugs me is that when you reload the config file, if there's something wrong with it, it just loads the fallback config. i don't see any error messages, so its hard to figure out what i did wrong in the config.


It should be showing error messages as a notification, found in notification center. Also, error messages should be automatically appended to `logger.lines`, which you can browse in a textgrid using `logger.show()`.


Awesome work, sdegutis!

I love your Zephyros and Phoenix projects. Keep working!

I really miss good tiling wm on MacOS X.


<3


Can one of these window managers support focus follows mouse on OSX ?


This looks great, and reminds me of AutoIt on Windows in some ways.


Note: beta7 is out as of 90 minutes ago, everyone update!


Definitely going to give this a try. Looks great.


I've had a ton of success with Slate, FWIW.


please do mention that this is available on releases >=10.9


All I ask for is an awesome wm.


Well played.


Hail Hydra!

...sorry, just saw Winter Soldier this week.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: