Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
goomwwm: Get out of my way, Window Manager (github.com/seanpringle)
85 points by udp on July 8, 2012 | hide | past | favorite | 69 comments


Interesting. I use Awesome[1] daily, and it's pretty great, but I wish it had less flexible layouts and more grid-like ones.

Actually, what I've been contemplating writing for a while is a window manager that notices what windows you have open, clusters those into sets (windows may be in multiple sets!), creates workspaces based on these clusters, automatically flips between these clusters when it senses you're switching to another one, and attempts to display windows as disconnected floating golden rectangles (still 2d, but not encompassing every pixel on your screen). I really really hate managing windows...

[1] http://awesome.naquadah.org/


Awesome's "tile" layouts can do a whole lot - enough that I only ever use tile and max.

The tile layouts have a primary area and a secondary area. There are four different tile layouts with the primary area either on the left, right, top, or bottom. Once you pick one of those, you can control how many windows are in the primary area - the rest fill the secondary area. You can split the secondary area into divisions and increase or decrease the number of divisions; it will fill each division with windows in a round-robin style, placing the new window in the primary area - if the primary area is full, the oldest window gets pushed into the secondary area.

Of course, if you open a window and specifically want to move it to the secondary area, it's as simple as giving focus to that window and moving it down the stack.

This might sound complicated, but the keybindings are quite natural once you learn them (kind of like vim). All the window manager shortcuts start with the [mod4] ("windows") key. It's that with j/k to cycle up and down the stack, add [shift] to shift the position of the window in the stack. It's the [mod4] key with h/l to increase/decrease the size of the primary area; add [shift] to that to increase/decrease the number of windows in the primary area or [ctrl] to increase/decrease the number of subdivisions (I remember "C"ontrol "C"olumn, even though it's not columns if you're using a layout with the primary on the top or bottom).

You might wonder how one could use tile mode for everything: what if you're coding away (which usually involves several terminals open), then you need to open gitk - one of those tiny panes is way too small! Well, you don't need to change the whole layout for that; you can toggle properties on individual windows to add either fullscreen [mod4]+f, maximized [mod4]+m, or floating [mod4]+[ctrl]+[space].


My use cases are very similar (I basically use awesome to manage a bunch of urxvts). When I run across regular GUI apps I typically just run them in a new workspace so they can either be fullscreen or not have to fight with xterms for space. It works well for me, but I don't run a lot of other things besides xterms in awesome (I mostly use it in a VM anyway)


Would you mind uploading your rc files for Awesome? I'm thinking of trying out some tiling window managers again.


https://github.com/shawnjgoff/.config There is a ton of stuff in there that will be usless for most people, but it does have my awesome config.

Here is a screenshot so you can see the Awesome theme and the Conky setup: http://i.imgur.com/nv7sn.png?1


Could you share the background graphic?:)



Thank you!


I use nwm [1] daily now (for the past week) at work.

I've used awesome before but I found nwm to be a nice fit, and its cool that it's made in Javascript. You could probably make your own features like that very easy, its not very big yet. It looks a lot like dwm feature wise, since the creator originally used that.

[1] https://github.com/mixu/nwm


I, too, use awesome daily. I might be wrong, but I guess the i3 window manager can group windows in a 'tabbed' style and other interesting stuff. I tried it for some time, but didn't really dig the way it handles two monitors. Apart from that, it seems to be a great alternative to awesome wm.


Yes, in i3 you can switch a container between tiled (the default), tabbed, and stacked layouts. I actually like i3's handling of two monitors a lot [0]; workspaces are global and can be created on either monitor. For me that's easy to understand and fits my work style (one workspace with email and IM on one monitor, multiple workspaces with terminals and web browsers on the other).

My only complaint with i3 is how the concept of splitting and changing tiling orientation between horizontal and vertical are intertwined. [1] I think it would be much more intuitive to have two tiling layouts (horizontal and vertical), a single kind of split that is only responsible for splitting, and no separate concept of orientation.

To help myself get used to i3, I wrote myself this small program for visualize the tree structure of my containers. [2]

[0] http://i3-wm.org/docs/userguide.html#multi_monitor

[1] http://i3-wm.org/docs/userguide.html#_orientation_and_split_...

[2] https://github.com/sciurus/i3tree


Take a look at tinywm to get an idea of the basics behind writing your own window manager. I'm using evilwm, and have been for years. However, I've tried about 15 different tiling window managers, and I have yet to find one that suits my needs perfectly. I stayed with subtle for about a week, but it just wasn't for me.


I used evilwm for several years back on RedHat 7.x. I've been stuck on XP since. I fondly remember the fun of exploring just how stripped-down WM i could practically use. And how tiny resources it used.

http://www.6809.org.uk/evilwm/ it's a massive 40k download.



The tutorial[1] makes me consider trying something besides dwm[2] for the first time in years. There are some neat ideas there.

[1]http://aerosuidae.net/goomwwm/tutorial [2]http://dwm.suckless.org/


For me "get out of my way" means i don't wanna have to configure-reconfigure-rereconfigure it every week and i don't wanna have to learn a new language for that.

I don't wanna have to go through a "video" (hi nwm) to show me how it works.

I'm ok with a 5min first time setup and 5min reading the man page, then that's it.

Most tiling and "minimalistic" wms fail at that.

So i'm using KDE/XFCE/etc. Heck, KDE's kwin tiling mode is just fine.


For what it's worth: I read on his blog that the original author of awesome-wm (j. danjou) stated in an interview that he used awesome with the default rc pretty much untouched (some people on the mailing list are heavily modifying it).

Moreover, awesome is "pluggable" into classic gnome 2.x


Ive tried countless times but i can't satisfy myself with defaults on awesomewm. always have to tweak it and it takes a while.

Incidently awesomewm configuration system is extremely powerful. But I don't wanna "waste" hours on that anymore (that is, all the wm config in general).

If KDE brings too many troubles (the config is dead easy but it has other quirks, like memory usage, bugs, etc), I might just go back to the trusty window maker. Simple, easy. Maybe the way it should always have been ;-)


For me, awesome was the first window manager that I liked without having to tweak much. I did eventually tweak little things, but that is a very slow process happening over a long period -- the default config works well enough for me.


This reminds me of Divvy for OS X. Once I started using Divvy I couldn't go back. http://mizage.com/divvy/


I still use Ratpoison. This looks interesting ; I like that people still actually make window managers. Probably a lot of creative work can be put into that.


Have you considered upgrading to stumpwm by the same author? It has all the features ratpoison does plus support for floating layout via gnew-float, among other things. And it's written in Common Lisp, so you can hack/customize/extend it as easily as [if not more so than] emacs.


I loved Ion (http://tuomov.iki.fi/software/) to death back in the day and for a few years was floating in limbo after it's author went weird about it's licensing.

I'm pleased to say that there is now Notion (not ion):

http://notion.sourceforge.net/

Notion is a fork of an earlier version of Ion with a more permissible license but behaves and looks exactly like Ion always did.

Notion and Ion were so-called stacked tiling window managers, their position and layout were not fixed in patterns of dividing the screen up like (iirc) Awesome and XMonad.


Same story here, regarding Ion. A guy I know who also used Ion said that's enough, we can't find a replacement so let's write one. I helped a bit. It does what we need, it's fast, and it's easy to configure. https://opensource.conformal.com/wiki/spectrwm


Looks cool, but what's up with the source being just one 4k line C file?


It's all going to end up in the same executable anyway!


dwm is a really nice tiling window manager and is even smaller: https://github.com/sr/dwm/blob/master/dwm.c


Some people like it that way!

Also, it's 3,727 lines.



Umm yeah that's a 4k line C file?


What matters is size, not lines. You can just inline everything and it'll be like 3 lines of code.


It's a question of readability and code organization, not sheer size.



the link is cool and all but why don't you tell us why you like it?

I use it constantly and have invested quite a bit of time in my .xmonad.hs file but I'm interested in hearing why other people like it as well.

For myself I love that I can basically code my own wm and make it what I want. It's like a wm toolkit.

I also like that it keeps my haskell chops from rusting too much.


Can anybody tell me what this has that dwm doesn't? A run-time config file I guess, but you don't generally need to reconfigure your wm once you've got it working in a way you're comfortable with.


I've been using Sean's previous window manager, musca[1], since early 2009 and love it. Interesting to see what else he's come up with!

I just read through the tutorial and in a lot of ways this is very like musca. Similar commands (some are identical, in fact), similar config file etc. It also looks more flexible and powerful than musca! I will definitely be trying this out. Perhaps I've found my new WM...

[1] http://aerosuidae.net/


I've been using spectrwm (www.spectrwm.org), which was called scrotwm, for a couple of years now. I switched from musca (Sean's previous wm), mainly because musca didn't handle full-screen apps very well.

It has been pretty rock solid. I like that a window can float if you want, it is good for watching something with mplayer.

It is written by a BSD guy and the code is nice and easy to follow if you want to see some X11 programming.


I'm surprised nobody said a word about stumpwm yet (http://stumpwm.org). It's a lisp window manager built with the mentality of rat poison.

The great thing about it is how it integrate with emacs/slime. For instance, let's say you want to close all the windows from the second/third workspace, you write the code in emacs and evaluate it in the context of stumpwm.


For those of us who don't have an available modifier key (or at least one that's accessible without looking down at the keyboard), is there a way to use a prefix key à la ratpoison and stumpwm? There's a patch for dwm that provides that functionality, so I assume it wouldn't be hard to add for goomwwm if it's not currently supported.


I'm new to (learning) programming and already need to manage windows better. I knew I had this need, but I did not know what this was called until seeing GOOMWWM's screenshots.

I'm on OSX. I typically have Firefox, Terminal, and TextWrangler open while I work through Zed Shaw's LPtHW course. What window manager should I use?


If you're using OS X, you don't really have a choice of what window manager to use; you're at the mercy of Apple. If you're looking for ways to wrangle all your windows in OS X, I'd recommend something like SizeUp or Divvy. These aren't window managers in the classic linux sense, but they do provide convenient keyboard shortcuts for keeping your windows organized in OS X. I use SizeUp at work and home and it gives me all I need in Mac land.

If you're looking to up your terminal skills, I'd recommend looking at something like tmux.


It's a shame xorg doesn't support IOKit any more. If it did, you'd be able to run an X server (not rootless) on OS X without having to boot a different kernel.

XQuartz is nice, but you're still subject to the OS X mouse acceleration etc.



That certainly helps, but it's not quite enough: http://d43.me/blog/1205/the-cause-for-all-your-mac-os-x-mous...

I suppose when I said "mouse acceleration" I really meant "mouse lag".


I also found that sizeup mostly fills my WM needs on mac

In some ways I prefer it to strict tiling window management like awesome or xmonad.

You lose the "windows automatically tile" functionality, but the other side of that is that it's easier to break the paradigm for when you don't want to tile.

free unlimited trial: http://www.irradiatedsoftware.com/sizeup/

or $14 for a license


Spectacle is a free open source application with the same feature set as SizeUp.

http://spectacleapp.com/


there's also tylerwm (google it). I'm currently writing my own with a totally different approach.


Have you tried tylerwm? It looks like what I desperately want on OS X, but every review I've read suggests it's too unstable to use. I'm nervous about paying $10 for something I'm not sure will work.


I tried tylerwm about three months ago and it was quite flaky. Sometimes it would re-arrange windows while I'm typing. Turned it off an hour later.


Save your money, it's unusable (windows jump around randomly).


There are a bunch of apps that can do this for you, with varying degrees of automation:

ShiftIt (Free/OSS): https://github.com/fikovnik/ShiftIt/tree/shiftit16

DoublePane ($3): http://5amcode.com/

Tyler ($10): http://blog.reflare.com/tagged/tyler

SizeUp ($13): http://www.irradiatedsoftware.com/sizeup/

Divvy ($14): http://mizage.com/divvy/

There are some old versions of ShiftIt available in the GitHub downloads, but you might want to compile a more recent version yourself. It's what I use on my 11" MacBook Air, where I mostly use the left-half, right-half, full-screen, and center-window commands. If your use case would be similar, DoublePane might be an easier choice, though it doesn't look like it does centering.


Optimal Layout (Application switcher + window manager): http://most-advantageous.com/optimal-layout

I just stumbled into it, I recommend watching the video.


And they all make you really sad if you're looking for a real tiling wm or, worse, have actually used one before.

The window manager situation on OSX is still dire.


You can always dual boot with Linux and OSX. I am triple booting on mine, and it works perfectly. The only reason I really boot into OSX is to do iPhone development.


Lots of alternatives were discussed at http://news.ycombinator.com/item?id=4059820


I think that the window manager is a little lower-level than what you're thinking of. If you're running a Mac, you would already have whatever proprietary program Apple uses in OS/X to display windows and the desktop environment. This is my understanding at least.


Thanks for clarifying that, Robert.

The whatever proprietary program Apple uses in OS/X isn't cutting it for me. I spend too much time getting the windows how I want them and it's never quite right. I would like to automatically tessellate my windows as seen in the GOOMWWM. Is there a way to do that in OSX, and if so, what is this type of software called?



I use Divvy for my OS X window management. http://mizage.com/divvy/


I suppose using X11 on OS X it must be possible to use another WM than the one provided by Apple (quartz-wm). After all, they're providing twm, so there must be a way to run it.


I think this is exactly correct. My understanding is that you can run a window manager like XMonad (and, in fact, I've met people who do) but then you will only be able to use X programs and not native Mac ones. If all you need is a terminal emulator, a browser and a text editor then this would work perfectly.


dwm <3


When will there be a window manager that supports GTK3?


GTK3 is a widget toolkit. Most window managers, especially tiling window managers, don't draw any widgets (or draw their own simple widgets when necessary). The window managers that are part of the Gnome desktops (Metacity, Gnome Shell, Unity) do link with the respective versions of GTK (GTK2 for Metacity, GTK3 for the other two) to draw menus, etc.

All X11 window managers are capable of managing GTK3 applications.


A caveat: GTK3 brought a lot of changes in GTK/GDK internals including how window sizing was handled, both based on widget size requirements and based on user interactions for resizing. This was intended in part to provide better support for WM paradigms like Windows and Wayland where clients have more control of their own size, and resulted in UI additions like resize grips by default in the corner of windows. It also cleaned up the code to be less semantically tied to X11's windowing rules. In many cases it's more efficient to use a single toplevel window and do logic application-side than make the X server work harder (due to context switches and changes in rendering codepaths).

The downside to these changes is that several GTK3 features were horribly broken outside of GNOME's default window manager. I've seen at least five or six window managers that would freeze applications with the mouse grabbed as of GTK3.2: click on the wrong part of a menubar or on the resize corner and you had to resort to the keyboard to kill the offending application before it or your mouse would work. Version 3.4 or thereabouts has fixed these bugs for the most part; even window managers that don't support much in the way of ClientMessage-based window manager protocols should work fine now. But for some time GTK3 did interact very poorly with most window managers.

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=630972

That this was so hairy and bug-prone is, in my opinion, a symptom of interacting with the ugly beast that is X11. If you read the code of the affected window managers and GTK, you would probably agree.


>the ugly beast that is X11

What's your opinion on Wayland? Specifically, how likely is it that the reliability and consistency of the graphical parts of desktop Linux will improve if the applications I use the most are ported to Wayland?


It looks like it's shaping up very nicely to solve the problems it was designed to solve--namely, making every frame of image on the screen pixel-perfect. However, I don't know if it's going to solve other outstanding problems (or regress on some fronts).

Despite the pains, X allows window managers to arbitrate over window management policy relatively effectively. From what I see so far, it seems that this will be a less clear-cut scheme in Wayland, given its clientside window management and decoration setup. Individual applications will have more freedom to misbehave in terms of custom titlebars etc. and refusing to cooperate with management actions. In an environment where GTK, Qt, wrapped X programs, and other toolkits will be coexisting, there's a lot of room for implementations to behave differently in ways that will confuse and upset users. Whether this will actually be the case is yet to be seen, but I've never seen three different software projects implement a feature in exactly the same way without sharing code.

As the saying goes, we live in exciting times.


>As the saying goes, we live in exciting times.

Users of desktop Linux live in exciting times, you means.


Wayland may improve the speed of compositing on the Linux desktop, but it's very unlikely to improve consistency or reliability. Wayland applications draw their own window decorations (rather than a window manager), which obviously doesn't encourage consistency. And last I heard, when a Wayland application hangs, its window will become completely immovable. No, really.




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

Search: