You are not logged in.

#1 2009-07-08 18:03:24

carick
Member
Registered: 2009-01-15
Posts: 15

Writing a WM

I am interested in writing a tiling window manager and I don't really know where to start. I know some C++, and a decent amount of java, but I believe I would write the WM in C or C++, so I was thinking about looking at the DWM code because it is small and in C, but I didn't really know if that would be enough or where else to look.

What are the major concepts? How long does it typically take?
Sorry this is vague, the thought is in a very infant stage.

Thanks in advance.

Offline

#2 2009-07-08 18:08:31

lifeafter2am
Member
From: 127.0.0.1
Registered: 2009-06-10
Posts: 1,332

Re: Writing a WM

First and foremost I would think long and hard about what other WM's are lacking that you want.  Then you can decide whether it is best to start from scratch, or start a fork of another WM.


#binarii @ irc.binarii.net
Matrix Server: https://matrix.binarii.net
-------------
Allan -> ArchBang is not supported because it is stupid.

Offline

#3 2009-07-08 18:17:26

carick
Member
Registered: 2009-01-15
Posts: 15

Re: Writing a WM

its not necessarily that they are lacking. I really like ion3 and my WM would have many of the same features. Like i like the titled tab per tile, manually configured tiles, the scatch ws, and the keyboard control (no need for mouse). I saw Musca and it looks promising, but I didnt like that it didnt have titled tabs. I saw tritium, but it seems to have a gnome panel.

However, the main reason I would like to do this is to learn and get that feeling that I did something really cool, built a WM from scratch.

Offline

#4 2009-07-08 18:44:03

ZeroTruths
Member
Registered: 2009-07-02
Posts: 77

Re: Writing a WM

I would suggest that you think long and hard about writing your own window manager.
If your just doing this to learn (which I completely unstestand and support) I would suggest making something on a smaller scale. A window manager could be a massive undertaking, and if your not careful and don't do excessive planning, you'll quickly see the project become an entity of its own.
If your looking for an extremely configurable WM, then I would suggest AwesomeWM. I've been configuring it for close to two weeks now, and I'm still not done. To me, it feels as if I'm programming my own WM myself smile. It is a tiling WM that's actually based off of DWM and uses the Lua scripting language for all of its configurations (at least for the most recent release).

I can understand that you'd want to create something meaningful and such, but why reinvent the wheel when there are so many options? wink

Offline

#5 2009-07-08 18:53:14

lifeafter2am
Member
From: 127.0.0.1
Registered: 2009-06-10
Posts: 1,332

Re: Writing a WM

ZeroTruths wrote:

I would suggest that you think long and hard about writing your own window manager.
If your just doing this to learn (which I completely unstestand and support) I would suggest making something on a smaller scale. A window manager could be a massive undertaking, and if your not careful and don't do excessive planning, you'll quickly see the project become an entity of its own.
If your looking for an extremely configurable WM, then I would suggest AwesomeWM. I've been configuring it for close to two weeks now, and I'm still not done. To me, it feels as if I'm programming my own WM myself smile. It is a tiling WM that's actually based off of DWM and uses the Lua scripting language for all of its configurations (at least for the most recent release).

I can understand that you'd want to create something meaningful and such, but why reinvent the wheel when there are so many options? wink

Well heck, if you really want to program, then install XMonad.  It's written (both the program and the config file) in Haskel.


#binarii @ irc.binarii.net
Matrix Server: https://matrix.binarii.net
-------------
Allan -> ArchBang is not supported because it is stupid.

Offline

#6 2009-07-08 21:17:50

moljac024
Member
From: Serbia
Registered: 2008-01-29
Posts: 2,676

Re: Writing a WM

However if you do decide to write a window manager from scratch, consider what others are lacking.
I'll give you one thing: EWMH support. If you can make a decent tiling window manager with EWMH support, hats off to you smile

I'm sure someone is bound to mention awesome now, does it have EWMH support ? Either way, I really dislike that WM...


The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...

Offline

#7 2009-07-08 22:20:31

HashBox
Member
Registered: 2009-01-22
Posts: 271

Re: Writing a WM

No offense to the others here, but don't let them put you off carick, I think writing a window manager, whether big or small, is a great way to learn how X11 works. Probably the most useful resource for me has been http://incise.org/tinywm.html which is (from the site):

TinyWM is a tiny window manager that I created as an exercise in minimalism. It is also maybe helpful in learning some of the very basics of creating a window manager. It is only around 50 lines of C.

The site also includes a fully commented version which should give you a good idea of what everything is doing. If you take that and add some tiling logic on to it then you will have a basic tiling window manager smile

Good luck!

Offline

#8 2009-07-09 03:30:04

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: Writing a WM

carick wrote:

its not necessarily that they are lacking. I really like ion3 and my WM would have many of the same features. Like i like the titled tab per tile, manually configured tiles, the scatch ws, and the keyboard control (no need for mouse). I saw Musca and it looks promising, but I didnt like that it didnt have titled tabs. I saw tritium, but it seems to have a gnome panel.

However, the main reason I would like to do this is to learn and get that feeling that I did something really cool, built a WM from scratch.

Try echinus/dwm.

Further, don't judge WMs by their screenshot. Tritium does not require a gnome panel, that's just how that person is using it. Echinus for example has an option to hide titles.

If you still want to mess about with a WM, take a look at existing ones first. I found one very close to what I wanted and with a few small patches was able to make it perfect.

dwm and echinus have very readable code and are easy to modify - which is probably why there's so many dwm derivatives.  So if you do want to start somewhere, that's a good spot - dwm's code pretty flexible.

moljac024: Echinus is tiling, with ewmh support.

James

Last edited by iphitus (2009-07-09 03:31:21)

Offline

#9 2009-07-09 07:32:52

moljac024
Member
From: Serbia
Registered: 2008-01-29
Posts: 2,676

Re: Writing a WM

iphitus wrote:

moljac024: Echinus is tiling, with ewmh support.
James

I'll give it a try....

Last edited by moljac024 (2009-07-09 07:33:26)


The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...

Offline

Board footer

Powered by FluxBB