Hacker News new | past | comments | ask | show | jobs | submit login
Way Cooler tiling window manager (way-cooler.org)
158 points by Ianvdl on July 2, 2017 | hide | past | web | favorite | 98 comments

At a high level, this sounds a lot like a Wayland version of Awesome: https://awesomewm.org

Both are tiling window managers that are extensible through Lua, support D-Bus, etc.

If you want to check out something conceptually similar, but aren’t ready for Wayland, consider trying Awesome.

From the docs:

> Way Cooler comes in two primary flavors: i3 and awesome.

> The i3 flavor is set up like a default i3 install, with the same keybindings and tiling algorithm. The only difference between this flavor and actual i3 is that the primary configuration format is still Lua.

Sounds very good, I'm an i3 user and I had a lot of trouble getting Sway going on my Ubuntu Xenial box, so I'm going to give this a whirl.

Application name checks out.

I've been using tiling window managers for over 10 years, and for this time has been spent on ratpoison (after brief stints with wmii, awesome and dwm).

Despite i3/xmonad/bspwm/etc/etc I keep going back to ratpoison for two features I haven't found elsewhere:

- chained key commands, a la emacs. E.g., I use C-a b to open a bash terminal. I do use non-chained commands, like Mod4+n to go to the next window, but chained key commands can be much easier to do one-handed, and so far it seems ratpoison is the only to offer built in support for this.

- manual window arrangement. I don't care for the window layouts most tiling WM's since dwm/xmonad seem to use.

Until I see those features in another wm I'll probably remain one of the handful of ratpoison users.

After using Ratpoison as my only window manager starting in 2004, I've now switched to Stumpwm for the better multiscreen support. (It's the successor to Ratpoison, written in Common Lisp.)

Stumpwm really is great for multiple monitors, I have an 8 screen setup and it works flawlessly.

I'm curious, what kind of layout do you use? In particular, do you sometimes leave some part of the screen not not covered by some tile? (If so, why?) It seems to me that you always look for a grid, no?

Also, how many tiles do you end up having on average on the same window? I'm curious because to me any value higher than 3 doesn't seem practical, I'd rather switch to another window.

Finally, do you save your layouts? It seems like a lot of work if you have a very precise layout and it's discarded when you shut down.

BSPWM supports both. You can chain key commands with sxhkd (which is completely decoupled from bspwm actually, but most use it with bspwm), and BSPWM completely supports manual tiling.

I'd be interesting to hear more on what manual window arrangement means to you. It's not obvious to me what you are indicating.

I'm pretty sure writing chained commands would be 2-3 lines of Lua. You're welcome to keep waiting but I invite you to dip your toes in & see what it'd look like. I rather suspect you'd find a community interested in helping you chase your dreams. No need to be bystander and follower on this one.

Have you tried Stumpwm? It's meant to be the successor to Ratpoison. Written entirely in Common Lisp, and allows for configuration while it's running. I've been using it full time for almost a year and I doubt I'll switch anytime soon.

I'm just now in the process of moving from XFCE to Ratpoison - I'm trying more and more to memorize the hot-keys and avoid moving my hand to the mouse.

i3 has modes which sort of allow the chained key command idea.

i3 has mode maps which are not quite like chained commands, but pretty close (e.g. you have to exit the map instead of just abandoning the chain if you change your mind halfway through a press).

I love them, they can do anything and you have the option of a pop up key map that displays the key function (or whatever you want) once you hit the first key.

Privately using dwm [1] for many years now and never looked back.

But having to working under a MS Windows 10 setup now, I was wondering:

Is there anything equivalent for MS Windows?


[1] http://dwm.suckless.org/

http://www.brain-dump.org/projects/dwm-win32/ This is literally a win32 port of dwm. It can probably accept slightly modified versions of the upstream patches.

Works okay on Windows 10, but has some weird behaviour around the search menu on Windows 10 Enterprise LTSB.


Windows 10 has the ability to tile windows by dragging one of them to the left or right screen edge, or corners (dragging one to the top edge maximize it).

But they can only resize nearby windows when there are a vertical split between two windows.

If i try using a full height window on one side, and two half height on the other, Windows fails to resize the neighbors to match any changes i make.

You might want to look into Aqua Snap, it solves a lot of those resizing problems. I'm not affiliated, just a happy customer.


This might take away some of the pain of resizing windows:

> Taekwindow is a simple, lightweight and free Windows program that allows you to move and resize windows by dragging them with the Alt key, similar to many X11 window managers.


  WinSplit Revolution (Free, closed source, abandoned)
Can be configured to have shortcuts to place your windows in any position you want. Out-the-box it has numpad shortcuts for a 2x2 or 3x3 grid and you can add as many as you want to it and the keys will cycle through them.

You have to download it from cnet because it's not maintained any more and the original website redirects to a paid-for alternative, but it still works for me with Windows 7.


  Window Grid (Free, closed source, last build 2016-05-17)
Layout windows on a dynamic grid by dragging with the right mouse button.


  PWT - Python Windows Tiler (Open source)
can remove the unnecessary parts of the windows, such as scrollbars, menu bar, etc..



  More suggestions here:

Also Win+Arrows moves windows to sides/corners. It can do up to a 2x2 grid. Not full featured but better than nothing.

I really like AquaSnap for Windows and Magnet for MacOS: http://www.nurgo-software.com/products/aquasnap https://www.techrepublic.com/article/magnet-why-the-macos-wi...

They're half-way between the minimal snapping built into each OS and a full-blown tiling WM. The keyboard shortcuts for left and right 2:3rds and shortcuts for moving a window to a specific quadrant in Magnet are my most-used, since often I want a terminal and a browser, or two IDE windows, or IDE + browser + docs (dash) + terminal on one screen.

I used bug.n for a while


It worked pretty well but was occasionally buggy, but that's the best that can be expected without replacing the Explorer Shell. I'd recommend trying it out.

This is the one that best fits my needs as well. I've been using it for a few years. About every year I look around to see if there's anything better, but I keep coming back to it. It's not perfect, but it does the job, most of the time.

Personally, I've found that the type of program I run on Windows does not lend itself well to tiling -- they all need to be pretty big to work well, and if I tile two programs, then on average each will be 50%, which is too small for the Windows programs.

So instead I came up with a number of window positions and sizes that I liked and I use AutoHotKey to invoke each of them with a hotkey. So for example, I have a setting for a full-height, 80% width, window at the left edge, and another one for the same size at the right edge. Now I can put my browser on the right edge, and my ConEmu on the left edge, and while reading HackerNews in the browser I can see when the build I've started in ConEmu is done :-)

Any chance you can share ahk?

never found one :( the sad thing is, the few times I use windows I want one specific tiling mode - a single vertical split with keystrokes to move the split line left or right, and to swap the left/right panes. (e.g. read a howto in a browser, follow along with it in the app in the other pane). I was hoping for something that would just let me do that, but no dice.

It's going to be a tough battle if they want to win my heart away from i3.

Fear not, friend. There's a very active port of i3 to wayland: https://github.com/SirCmpwn/sway

I haven't personally tried it, but I have heard about it a few times, so I assume it's fairly good. This is the list of supported features, if you are interested: https://github.com/SirCmpwn/sway/issues/2

The problem for me is that i3 is only a part of the puzzle. I use sxhkd for a bunch of hotkeys; that has to be replaced. I use xdotool _a lot_, and I don't know if such functionality is even possible in wayland. I use scoot heavily, both as a way to screenshot from a hotkey (presumably easy to replace?) and as part of scripts; my script which locks the computer uses scrot, imagemagick and i3lock. There's probably a bunch of other small things in my system which will break by not having an X server too.

This is why I dislike Wayland. Forcing so much functionality through the WM means I can't just build my system out of small parts. I also do things that Wayland is specifically designed to break, like keylogging myself.

I agree with your first point against Wayland, but your second point isn't correct: Wayland's design is not meant to prevent keyloggers just to make them optional.

Same problem, really: now I have to find a window manager that natively supports key logging, rather than just running a small shell script in the background that listens for keyboard events.

Understandable. One of the reasons I haven't switched is because so far my system works pretty well and I haven't had the need to use Wayland. What hotkeys do you use sxhkd for? I vaguely remember sxhkd supporting chords while i3 not doing so, but I don't remember more than that.

I use i3wm's `bindsym` for stuff that's related to window management, like moving around windows, resizing them, moving windows or focus to workspaces, etc. Other stuff, like volume control, screenshots (print screen -> take screenshot, upload to a web server, put URL in clipboard), mouse movement (with xdotool), etc. is handled through sxhkd. There's no reason I couldn't just use bindsym for all of that, but now non-windowing hotkeys is not coupled with the WM, so I could choose to switch window manager and still have all non-WM hotkeys work.

Sounds interesting. Could you share your setup/workflow?

Here's my git repository with all dotfiles and such: https://github.com/mortie/nixConf

I use i3wm (well, i3-gaps) as the WM. Xdotool is just used to move the cursor with hotkeys: https://github.com/mortie/nixConf/blob/7c12d4215c703de0c6935..., scrot is used both for a print screen button (scrot takes the picture, then it's copied to my server with scp, and the URL is put in the clipboard: https://github.com/mortie/nixConf/blob/master/bin/mshot) and for i3lock (scrot takes the picture, imagemagick pixelates, i3lock shows it: https://github.com/mortie/nixConf/blob/master/bin/mlock).

I also have a project called dedaemon: https://github.com/mortie/dedaemon. That uses udev to listen to events, like displays or input devices being connected or disconnected, and does a preconfigured to them. I for example have these lines, which sets the resolution and frame rate to any connected monitor to the highest possible, and positions it to the left of the primary monitor: https://github.com/mortie/nixConf/blob/7c12d4215c703de0c6935.... I imagine porting that functionality to wayland would be really hard, and probalby require writing custom extensions to each window manager separately.

There's also this other project I have, which isn't really related to wayland, but which I still feel is relevant: mmenu - https://github.com/mortie/mmenu. It just makes dmenu work as a calculator, running the input through python if it doesn't match a program in your $PATH, plus some other features.

Thanks for sharing! I really appreciate it. Already "borrowed" the screen lock solution, and will look into other productivity enhancements :)

You sound like someone who'd like keynav http://www.semicomplete.com/projects/keynav

Since it wasn't linked last time I looked, code is also at https://github.com/jordansissel/keynav

Shameless plug: I maintain a fork at https://github.com/yjftsjthsd-g/keynav because the original author hasn't been active in a while.

Edit: wrong link :)

That looks pretty interesting. stole the idea and made something similar in bash: https://github.com/mortie/nixConf/blob/master/bin/mousetree, with hotkeys configured with sxhkd: https://github.com/mortie/nixConf/blob/d87f241963edc49a57171...

Not so shameless if you add a scroll functionality I tell you lol.

Actually even otherwise, it's not like you're earning money so no need to disclaim!

Heh, so I went to look and see how hard it would be to simulate mouse scrolling, and the answer is... none. Literally none. Because X11 "mouse scroll" events are represented as button presses. Mouse buttons are 1=left, 2=middle, 3=right, 4=scroll-up, 5=scroll-down. So you just stick the relevant lines in your keynavrc; ex.

   i click 4                                                                                                                             
   e click 5                                                                                                                             
That said, I may make an effort to document this better.

I saw, I came here to thank and noticed you replied :)

Hm. That would be useful. I might have to do that.

> I make unoriginal projects with better code than the thing they rip off.

Nice github tagline for SirCmpwn ;-)

I've checked the linked issue from time-to-time, looks like it's getting really close to feature complete now. Will probably explore Wayland + Sway after new laptop purchase later this year.

In other news, i3 has been at the very core of my computing experience for 5 years running, absolutely fantastic application.

i3 is my #1 reason for wanting to switch from MacOS to Linux. I love a good tiling window manager, and the workarounds to emulate a tiling WM in MacOS just aren’t close enough to the real thing.

Did you try [chunkwm](https://github.com/koekeishiya/chunkwm) yet? It's the successor of kwm which I have tried on macOS. Mainly I use i3 at Linux but for some work I have to use macOS as well. The only native apps which feel Linux like are iTerm and Emacs (the mac port) because it's possible to suppress the window decorations. Every other native app takes for a real tiling wm too much space with its Titel bar and other frames.

I did this recently for the same reason.

Do not wait and get a Linux system with i3 tomorrow. You will be so much faster and more structured in your daily workflow than with Alt-Tab.

A nice side effect: Apps feel much faster than on OSX. I don't know why but everything is snappier and just more resonsive despite a much weaker CPU and same hires screen on the Linux system. Especially the terminal rendering and application switching which is instant.

It might have to do with the transition animations in OSX. I found a long time ago that turning off the animations in Windows makes a system feel a while lot more responsive.

I switched from OSX to Linux specifically for i3. Linux is still a pretty annoying OS with lots of little to even big problems like NetworkManager flaking out, suspend/resume being flaky, trackpad annoyances, etc. But despite all of that, I still use Linux because i3 is that damn good. i3 has fundamentally made computing more enjoyable, and enables me to stay "in the flow" much more.

Have you tried out openbsd?

Not trying to start a flame war but once I managed to install it how I liked the entire system felt so cohesive and well designed. (Ifconfig handling wpa for instance) and it turned out to be so much lighter that my laptops battery life went up 20%.

It was an older thinkpad though. So I guess YMMV.

I like the BSDs in general and have used them in the past. But for my work I can only use OSX or Linux, as some of the stuff I need is only supported on those OSes. I could probably make a BSD work if I really wanted to, but it's easier to just go with the flow on some things.

You can run another window manager (i3) under Xquartz.


This isn't really helpful because the vast majority of OSX apps do not use X11.

Maybe Amethyst is your jam: https://ianyh.com/amethyst/

by workarounds did you mean amethyst?

As a long time awesomeWM (and other tiling WM) user, I've found it to be more than acceptable.

KDE managed to do that with me and it isn't even a tiling WM ... and I spent quite a lot of time on i3pystatus (and somewhat less time on j4-dmenu-desktop).

And for i3 on Wayland there's already Sway.

I feel the same way, although Wayland is a good perk. Will check it out.

Surprising there's no comment on XMonad yet. Well, it needs a replacement as soon as Wayland is going to become established.

I was a little disappointed to find out it's based on the C WLC library rather than being a full Rust implementation.

There's some complications involved with switching, you might find this thread interesting: https://github.com/way-cooler/way-cooler/issues/248

My faovurite window manager ever is GOOMWWM, which is a manual[1] tiling window manager with some stacking window manager features, is extremely keyboard centric, lightweight, customisable and easy to use. Its also tiny, so if you want to hack the source, its not that dificult to figure out.

Its sadly not actively developed (the latest github commit was 2 years ago), but in my experience, its been very stable and I’ve used it for years without any issues (although I stopped using it almost 2 years ago when I started using a mac for work).

I haven’t tried way cooler, but if it were to let me work like I did in goomwwm (especially manual tiling), I’d be sold. Dbus as the integration mechanism sounds interesting and I like rust and lua too.

[1] I never liked automatic tiling personally

Does anybody know what's the _current_ status of window decorations in wayland? Client-side decorations was an incredibly poor choice in the original design. From the screenshot I cannot tell if it's just a custom theme or the "wm" is drawing them.

The WM is drawing its own decorations, but in the screenshot you can also see that the GTK+ programs are drawing decorations too, so you've got two layers of decorations.

AFAIK it's unchanged. The Wayland spec doesn't really concern itself with decorations. It's up to the apps and compositor to figure it out.

QT allows decorations to be disabled and so works well with a tiling compositor. GTK doesn't. There are various GTK patches and hacks floating around to address this but nothing upstream. Older software generally works well by virtue of pre-dating client-side decorations.

I don't expect anything anymore from GTK given it's current track record. The latest issue I discovered was the 'letter' to filename shortcut you used to have in file dialogs. It now triggers recursive search instead. Incredibly irritating, especially when used with large and/or FUSE directories, even considering there's a one line patch to allow customization though dconf which has been ignored since more than one year.

GTK 3 has been downhill usability-wise for me. One of the primary reasons I've stopped as a developer to use it entirely.

The recursive search is frustrating. I'm so used to doing <first few letters><enter> to navigate from the root directory all the way down to what I'm looking for. It's not only the small hangs while it searches but also the information overload with all of the results when I'm only ever looking for a specific sub directory in the directory I'm currently in. I guess I'm so used to using it as a hotkey instead of a search.

The additional problem is that the search results are also incrementally updated. On an open dialog, I had in three different occasions click on a result just to automatically select an unwanted [new] result.

Also, the path bar is long gone. It used to support tab completion, which was actually faster than selecting files and/or searching for them. I don't know what they're thinking.

The list of gripes I have with GTK 3 is increasing at each release.

Wait a second, how does Qt do that? If the application developer chooses to use client side decorations in an application, e.g. something similar to GtkHeaderBar, how does Qt know how the application should look like with client side decorations disabled, without the application developer explicitly adding support for that?

I'm not sure if this completely answers your question but ...

Ordinarily QT will automatically render decorations inside an application's Wayland window, but if the QT_WAYLAND_DISABLE_WINDOWDECORATION environment variable is set, it only renders the content inside the decorations. The window manager can them draw it's own decorations around the outside, when it composites the desktop.

It's not ideal. There's no mechanism for an application to supply hints to the window manager to control it's decorations like in X. Nor can the application draw custom borders like when using client-side decorations. There's really no other way of implementing the stacking and tabbed window layouts which are popular in tiling window managers though. Thankfully it's good enough for most applications and the compositor can have overrides (e.g in a user config file) for special cases.

This goes on my "need to check out" list. I've been toying with the idea of switching to a tiling window manager for a long time, but I've held it off over not wanting to switch window managers yet again when making the move to Wayland.

I spend most of my time working in OS X and I use Hammerspoon. It is really an awesome tool. It allowed me to establish truly keyboard-centric workflow. Not just for managing windows, a lot more. I also have Linux machine at home, I don't use it a lot yet I've been thinking about developing better way to work in Linux - something that lets me keep my hands in "the home row". Can someone recommend a tool similar to Hammerspoon?

God knows how to install on Fedora, install script didn't work for me on my test box (installs but doesn't appear on list of WMs in login screen)

You likely need to add a new file under /usr/share/xsessions, copy an existing one to a way cooler oriented version

Gotya, thank you!

> configurable using Lua,

Oh, brings back memories from when I used to have Sawfish installed.


Nothing beats Ratpoison in that aspect though.


All the real elite programmers are wobblies.

  Way Cooler is designed from the ground up to be secure. Rust 
  prevents Way Cooler from ever having a data race, dangling 
  pointers, or a segfault. Large classes of security 
  vulnerabilities, such as from buffer overruns or use after 
  free, are a thing of the past.
haha nice selling point. Could add this to any app built with a memory managed language. =P

Data races are possible in memory managed languages. And segfaults are thrown over the fence to the runtime. I'm sure anyone who has used Java in anger has seen segfaults. I certainly have.

Personally, I think the statement is too strong. Rust is not immune to these things as the compiler is victim to all the realities of software development that all projects face. But it certainly does dramatically reduce the bug vectors.

Java as specified is memory-safe. It cannot cause application-visible segfaults (hotspot uses segfault handlers internally for some trickery but that's not really relevant here).

Of course bugs in the JVM, native libraries or things like sun.misc.Unsafe might. But that's no different for rust, once you start using unsafe or use C libraries things might explode.

Yeah, I suppose for the end user I doesn't matter if program stopped working because of segmentation fault or a panic. Though, if one were to choose on of those issues, then obviously runtime errors are preferable over memory-safety problems that might lead to an arbitrary code execution.

BTW, in Java data races do not cause undefined-behaviour. In fact there is no undefined behaviour in Java at all (as specified at least, in practice as you and many others have observed things may work quite differently).

Who said anything about UB? You can easily fuck up a parallel program in a nondeterministic may without UB. If two threads are in a deadlock, each waiting for the other thread to release a resource it needs, nobody cares that it wasn't caused by UB.

> Personally, I think the statement is too strong. Rust is not immune to these things as the compiler is victim to all the realities of software development that all projects face. But it certainly does dramatically reduce the bug vectors.

The Rust compiler is extremely good at preventing undefined behavior in code that's not being written maliciously. You really can't encounter one by accident.

While true, fact of the matter is that window managers (esp for Wayland, since the window manager now needs to contain a compositor and complete Wayland server implementation itself) need to be speedy enough and bind to enough libraries at a low level that most of them wind up being written in C, so this is a selling point vs the competition as it stands.

I would be interested to know if the performance can be noticed in (sensibly written) non-C window managers, but I doubt it. Probably the biggest reason for many of them being written in C is a cultural thing. I, for one, know only the C Xlib.

Yeah also when was the last time a WM exploit was relevant?

The statement misses the point. Linux desktops are not terribly stable and something always crashes sooner or later; that's why all of them ship with watchdogs that restart crashed stuff quickly.

The advantage of desktop components that don't crash is just that, they don't crash-and-restart.

> Linux desktops are not terribly stable and something always crashes sooner or later

One's experience on the Linux desktop depends on the distro choice, the applications used, and the hardware itself. I once had a Slackware box that ran non-stop as my daily driver with no crashes or odd behavior; I only rebooted it for kernel upgrades. I've had Debian and Ubuntu boxes that were crash-happy turds, but I've also had stable Debian-based machines.

In my experience, the most stable machines are name-brand pro workstations that use fully open source GPU and audio drivers, running stable branches of conservative distros like Slackware. If you're running a bleeding edge distro like Arch on a self-built Kaby Lake or Ryzen beast with the latest and greatest GPU using closed source drivers, yeah you're going to have stability issues.

On all distros and computers I always had the occasional PDF or image that crashed the document or image viewer. OpenOffice or LibreOffice also crashes from time to time, especially if it's used for long, or has to handle big documents, and especially if those documents were imported. I've seen all sorts of stupid interactions between media software, e.g. pausing a video in Firefox while running mplayer in the background somehow corrupted buffers on one machine. More than once I saw Flash, when it still was a thing, show garbled frame-buffer contents etc.

I think your general observation is correct, though.

Most spurious crashes are likely incorrect combinations of software by the distro that are only very slightly incompatible. This is way more likely on a distro that in principle just ships "the latest of everything".

Many are in software that handles complex formats or interacts with the graphics / audio system. Many/all of the former have a very poor security track record which matches up with the crashes: a parser full of vulnerabilities is more likely to choke on the occasional flipped bit or on a slightly incorrect file.

> Linux desktops are not terribly stable and something always crashes sooner or later

Simply not true, my Linux desktops have an uptime (system and desktop processes) of weeks to months. I've never seen a single Linux distro "ship with watchdogs" perhaps you can provide more details about what you mean.

Both KDE and Gnome automatically restart the desktop shell if it crashes. systemd includes a watchdog that instantly re-locks the session if the session locker crashes. D-Bus activated services are automatically restarted as well, when in use. There are probably more of these mechanisms.

I know Fedora 25 + GNOME will restart gnome-shell if it crashes. Not sure if it's implemented using a watchdog or if there's some listener for segfault events.

I know this because I have an unfixed and reproducible crashing bug in gnome-shell:

1) unplug my 4K monitor from HDMI

2) start up the Display tool in system settings

Then they're missing the point because they specifically mention security, not stability.

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