Skip to content
A fully-featured window manager written in Go.
Go Other
  1. Go 98.1%
  2. Other 1.9%
Branch: master
Clone or download

Latest commit

BurntSushi main: better detect executable
Use a more reliable means of finding the executable that wingo was
initially run with.
Latest commit f86f435 Feb 25, 2018


Type Name Latest commit message Commit time
Failed to load latest commit information.
commands Fix a bug in synchronous command execution. Jul 9, 2016
config s/ $//g — remove annoying trailing whitespace from config files May 1, 2014
cursors Documentation abound. Oct 22, 2012
data Fix archlinux PKGBUILD Jan 19, 2015
event Simplify and send special Subscribed event. Apr 13, 2013
focus New gofmt Nov 20, 2012
frame Migrate away from imports. Jan 29, 2016
githooks fix PKGBUILD Dec 21, 2014
heads Corrects workspace geometries on ApplyStruts May 25, 2013
hook bad juju Apr 24, 2013
layout Resize all clients to a maximized state upon placement. (I think Mar 7, 2013
logger Documentation abound. Oct 22, 2012
misc Add support for retrieving the script configuration file path. Jun 4, 2013
prompt Migrate away from imports. Jan 29, 2016
render Documentation abound. Oct 22, 2012
scripts Add commands and examples for growing to edge. Feb 11, 2013
stack More EWMH support. Works well with KDE. Oct 15, 2012
text Migrate away from imports. Jan 29, 2016
wingo-cmd Solve this damn DISPLAY issue once and for all. Apr 15, 2013
wini When we lower case something, we do it for a reason. Jan 26, 2013
wm Migrate away from imports. Jan 29, 2016
workspace Only shuffle states when the client isn't iconified. Apr 17, 2013
xclient bad juju Apr 24, 2013
.gitignore ignore wiki clone Oct 22, 2012
COMPLIANCE Back to xcompmgr. compton is still a little buggy for me. Dec 29, 2012
COPYING WTFPL Apr 26, 2012
HACKING Some HACKING tips. Dec 16, 2012
HOWTO-COMMANDS Fix issue #38. Sockets are now in XDG_RUNTIME_DIR named by $DISPLAY. Jan 26, 2013
HOWTO-CONFIGURE How to configure Wingo. Oct 20, 2012
INSTALL It'd be nice if we logged stderr too. Oct 22, 2012
Makefile change colcheck to use 80 cols Jul 9, 2016 maintenance mode Feb 18, 2017
STYLE Add style guidelines. May 29, 2012
cmd_hacks.go Shorter name. Oct 12, 2012
doc.go New gofmt Nov 20, 2012
ewmh_supported.go A document detailing Wingo's compliance with desktop standards. Plus … Oct 16, 2012
ipc.go Print IPC command errors to the wingo logs as well. Sep 10, 2013
main.go main: better detect executable Feb 25, 2018
ownership.go Add a little bit more debug output in WM ownership code. Jan 29, 2013
root.go Fixes issue #54. Add an option to move head focus as the pointer moves. Dec 16, 2012
session.vim vimL syntax May 14, 2013
write_config.go Good riddance to that infernal bindata package. Oct 26, 2012
xephyr-wingo Fix issue #38. Sockets are now in XDG_RUNTIME_DIR named by $DISPLAY. Jan 26, 2013

NOTE: This repository is in maintenance mode. Wingo is still used every day, but because there are no tests, it is impossible to add new functionality. Therefore, I will only be doing work on Wingo required to make it work.

Wingo is an X window manager written in pure Go. All of its dependencies, from communicating with X up to drawing text on windows, are also in Go. Wingo is mostly ICCCM and EWMH compliant (see COMPLIANCE).

If you have Go installed and configured on your machine, all you need to do is: (For Archlinux users, Wingo is in the AUR.)

go get

And in your $HOME/.xinitrc:

exec wingo

Or if you're brave and are using a desktop environment, just run this to replace your current window manager: (Seriously though, save you work. Wingo is still very alpha.)

wingo --replace


You can find me in the #wingo IRC channel on FreeNode.

My triple head setup

Triple head with Wingo

Dude... why?

Wingo has two features which, when combined, set it apart from other window managers (maybe):

  1. Support for both floating and tiling placement policies. Wingo can be used as a regular floating (stacking) window manager, complete with decorations, maximization, sticky windows, and most other things you might find in a window manager. Wingo can also be switched into a tiling mode where window decorations disappear, and windows are automatically managed via tiling.

  2. Workspaces per monitor. In a multi-head setup, each monitor can display its own workspace---independent of the other monitors. This makes changing your view of windows in multi-head setups much easier than in most other window managers, which will only allow you to see one workspace stretched across all of your monitors. Also, since placement policies like floating and tiling affect workspaces, this makes it possible for one monitor to be tiling while another is floating!

WARNING: The major drawback of using a workspaces per monitor model is that it violates an implicit assumption made by EWMH: that one and only one workspace may be viewable at any point in time. As a result, in multi-head setups, pagers and taskbars may operate in confusing ways. In a single head setup, they should continue to operate normally. Wingo provides prompts that allow you to add/remove workspaces and select clients that may alleviate the need for pagers or taskbars.


Wingo is extremely configurable. This includes binding any of a vast number of commands to key or mouse presses, theming your window decorations and setting up hooks that will fire depending upon a set of match conditions.

All configuration is done using an INI like file format with support for simple variable substitution (which makes theming a bit simpler). No XML. No recompiling. No scripting.

A fresh set of configuration files can be added to $HOME/.config/wingo with

wingo --write-config

Each configuration file is heavily documented.

Configuring key/mouse bindings and hooks uses a central command system called Gribble. For example, one can add a workspace named "cromulent" with this command:

AddWorkspace "cromulent"

But that's not very flexible, right? It'd be nice if you could specify the name of workspace on the fly... For this, simply use the "Input" command as an argument to AddWorkspace, which shows a graphical prompt and allows you to type in a name:

AddWorkspace (Input "Enter your workspace name:")

The text entered into the input box will be passed to the AddWorkspace command.

Please see the HOWTO-COMMANDS file for more info. We've barely scratched the surface.

Scripting Wingo

So I lied earlier. You can kind of script Wingo by using its IPC mechanism. You'll need to make sure that wingo-cmd is installed:

go get

While Wingo is running, you can send any command you like:

wingo-cmd 'AddWorkspace "embiggen"'

Or perhaps you can't remember how to use the AddWorkspace command:

wingo-cmd --usage AddWorkspace

Which will print the parameters, their types and a description of the command.

Want to pipe some information to another program? No problem, since commands can return stuff!

wingo-cmd GetWorkspace

And you can even make commands repeat themselves every X milliseconds, which is ideal for use with something like dzen to show the name of the currently active window:

wingo-cmd --poll 500 'GetClientName (GetActive)' | dzen2

Finally, you can see a list of all commands, their parameters and their usage: (even if Wingo isn't running)

wingo-cmd --list-usage

(Wingo actually can provide enough information for ambitious hackers to script their own layouts in whatever programming language they like without ever having to deal with X at all. Assuming it has support for connecting to unix domain sockets. Or you could just use a shell with 'wingo-cmd' if you're into that kind of tomfoolery.)


Having some set number of workspaces labeled 1, 2, 3, 4, ... is a thing of the past. While Wingo won't stop you from using such a simplistic model, it will egg you on to try something else: dynamic workspaces.

Dynamic workspaces takes advantage of two things: workspace names and adding/removing workspaces as you need them.

This is something that I find useful since I'm typically working on multiple projects, and my needs change as I work on them. For example, when working on Wingo, I might add the "wingo" workspace, along with the "xephyr" workspace and the "gribble" workspace. When I'm done, I can remove those and add other workspaces for my next project. Or I can leave those workspaces intact for when I come back to them later.

With Wingo, such a workflow is natural because you're no longer confined to "removing only the last workspace" or some other such nonsense. Plus, adding a workspace requires that you name it---so workspaces always carry some semantic meaning.

(N.B. I don't mean to imply that this model is new, just uncommon; particularly among floating window managers. I've personally taken the model from xmonad-contrib's DynamicWorkspaces module.)

Tiling layouts

Right now, only simple tiling layouts are available. (Vertical and Horizontal.) Mostly because those are the layouts that I primarily use. I'll be adding more as they are demanded.

Ummm... manual tiling?

I'd actually love to add this to Wingo. It's slightly more complex than automatic tiling layouts, because it introduces the concept of containers, which is something that Wingo knows nothing about. Namely, a container can hold zero or more windows and an empty container may have focus.

Why doesn't Wingo have..?


Another popular workspace model (particularly among tiling window managers) is tagging a window with one or more workspaces.

Not only do I find this needlessly complex, but it doesn't really make sense in a model where more than one workspace can be visible in multi-head setups.

Shaded windows

This is in Openbox, but not Wingo. Honestly, I just never use it. I'm not really opposed to them, though.

Tabbed windows

The thought of programming the decorations for this scares me. This, like manual tiling, would also require that Wingo have a notion of containers (which it doesn't).


Bandwidth allotment exceeded. Seriously.

If an ambitious person wanted to run with it, that's fine, but there are serious hurdles. The most pertinent one is mixing OpenGL with the pure X Go Binding. I am not sure how to do it.

One could use the X RENDER extension, but I think everyone hates that.


I have done a non-trivial amount of research into Wayland (but not a big amount) and there are serious hurdles to overcome before Go can work with the Wayland protocol in a practical way. Namely, while a pure Go binding could be written easily enough, it would be forced into software compositing---which could be too slow. In order to do hardware compositing, I think you need OpenGL (specifically, EGL), which links against the libwayland libraries. (Yeah, that's a recursive dependency. Wooho.)

Plus, in order to use Wayland, Wingo would need a compositing backend (along with every other non-compositing X11 window manager). This is also not an easy task.

Supposedly there are some ideas for plans floating around that would let non-compositing X window managers to "plug into" the Wayland reference compositor (Weston). When this will be possible (or even if it will be possible with a window manager written in Go) remains to be seen.

If I am in err (and this is quite likely; my OpenGL knowledge is limited), please ping me.


You really should be using the 'go' tool to install Wingo, and therefore shouldn't care about dependencies. But I'll list them anyway---with many thanks to the authors (well, the ones that aren't me anyway).


Wingo is heavily inspired by Openbox and Xmonad. Basically, Openbox's floating semantics (although most window managers are the same in this regard) and Xmonad's automatic tiling style plus its workspace model (workspaces per monitor). I've also adopted Xmonad's "greedy" workspace switching and embedded the concepts from the "DynamicWorkspaces" contrib library into the Gribble command system.

Go your own way

Wingo is actually split up into many sub-packages. It is possible (but not necessarily likely) that you could pick out some of these sub-packages and use them in your own window manager. The packages of particular interest are probably the ones that do the most nitty gritty X stuff---especially relating to drawing windows. Here's a quick run down of those:


Sets up some plain old X cursors. Not very interesting.


Provides several different kinds of prompt windows that can take user input. These should actually work in an existing window manager. (See the examples in the package directory.) Prompt requires both the 'render' and 'text' Wingo packages.


Renders some very basic shapes and gradients to X windows.


Renders text to windows. Also provides a special window type that can act as a text box for user input.


The only other package worth mentioning is 'frame'. It's probably too monolithic to be used in another window manager (unless you really like Wingo's decorations), but it's possible that it could serve as a half-decent template for your own frames.

The rest of the sub-packages (excluding xclient and wm, since they are very Wingo specific) could also be used, particularly since only minimal Client interfaces are required. However, most of them aren't that complex and therefore probably aren't worth it. And the ones that do have some complexity (maybe 'heads' and 'workspace') aren't packages that I'm particularly proud of.

Also, if you're wanting to make a Go window manager, my xgbutil package (separate from Wingo) will be a big help. Feel free to ping me.

My past X work

There's too much. The highlights are pytyle and Openbox Multihead.

For more:

You can’t perform that action at this time.