You are not logged in.

#1 2011-08-25 09:31:45

moetunes
Member
From: A comfortable couch
Registered: 2010-10-09
Posts: 1,033

Simple Dynamic Tiling WM using XCB

I came to the party late with catwm but I liked it's simplicity so I kept using it, fixing a couple of bugs that crashed the wm and generally adding options to config it how I like. There was talk in the catwm thread about porting it to XCB but it seemed to fizzle out so after I was comfortable enough with the code I gave it a shot smile
   Keyboard support in xcb isn't so great at this stage so the keyboard shortcuts use the numbers for the keys instead of the keysyms, apart from that it is just your average minimal dynamic tiling window manager but a little bit quicker everywhere on average. It's early in its' life so there are a couple of anomalies which I'm sure I'll iron out in time.
   Here's a pic :
   tYTFvNg
   If you want to try a light window manager using xcb you can get it from github
   Comments, suggestions and/or questions are always welcome smile

Last edited by moetunes (2011-08-28 02:32:48)


You're just jealous because the voices only talk to me.

Offline

#2 2011-08-25 18:23:40

mhertz
Member
From: Denmark
Registered: 2010-06-19
Posts: 681

Re: Simple Dynamic Tiling WM using XCB

Thanks for the contribution , mate!

However, on my end I only get a black window without a mouse and no keybinds working?

Note to others, it needs xcb-util(in addition to xcb obviously, but thats a dep of xorg anyway, but xcb-util isnt), as else it will not build...

Anyway, to others interested, then I just wanted to say that when I last tried this wm in it's xorg variant, then it used only half the ram of dwm, where much smaller in filesize, had built in support through config.h for additional things like attach-aside, horizontal tiling, pertag, mouse-click-focus/auto-focus etc, besides of course the standard ones, and it was really a great auto tiling wm, so for sure give this little gem a spin!

@moetunes, could you please ellaborate on what this new name(from the source files and readme) stands for i.e. bluckywm ?

Offline

#3 2011-08-25 19:43:19

moetunes
Member
From: A comfortable couch
Registered: 2010-10-09
Posts: 1,033

Re: Simple Dynamic Tiling WM using XCB

@ mhertz  did you start X right? 'cause the window manager has nothing to do with the background or mouse cursor being drawn whether the window manager uses xlib or xcb. The xserver should run like it normally does, xcb has nothing to do with it. I just change the path to the binary in ~/.xinitrc to use this wm.
So if X isn't starting that would probably be why the keybindings didn't work.
There's no keysyms used atm so it'll probably pay to uncomment the printf lines mentioned in the readme to check that the keyboard you use matches mine
About the name; when I started this I needed a different name for the binary and went with what first come to mind. The first effort, luckywm, didn't work and the second effort, aluckywm, wasn't lucky at all and I figured it'd 'be lucky' if the third effort worked at all... I'm not super stitious but I'm more than a little stitious so I haven't changed the name.
I've been using this for a day on two comps and am about to throw it at a third smile


You're just jealous because the voices only talk to me.

Offline

#4 2011-08-25 21:30:04

el mariachi
Member
Registered: 2007-11-30
Posts: 595

Re: Simple Dynamic Tiling WM using XCB

AH as in BE LUCKY? lol I was reading Blucky and it was a bit weird! So I guess this is the new thread right? So I'll repeat my last post:
It seems I don't have keys now... I modified them with Xev but none of the keys work. The compilation went smoothly though.

Oh and thanks for continuing to develop this Moe.
About the name: it's set to 'meowm' now tongue sorry but I think I'll sabotage that part of the project to death haha xD

Last edited by el mariachi (2011-08-25 21:32:14)

Offline

#5 2011-08-25 21:32:44

moetunes
Member
From: A comfortable couch
Registered: 2010-10-09
Posts: 1,033

Re: Simple Dynamic Tiling WM using XCB

I have run this on two comps without an issue but the third gave me a little grief... wink
The reason I use numerical values for the keyboard modifiers is that XCB_MOD_MASK_1 doesn't map to the alt key here(took me ages to figure that out!) < important

To run this on the third comp which I haven't used in six months I did:

pacman -Ss xcb

there is four entries I had the first three already installed but don't recall doing anything xcb related on this comp so (?)

mkdir -v build/luckywm && cd build/luckywm
git init
git pull git://github.com/moetunes/Be_Lucky_Window_Manager

edit the bluckywm.c file to uncomment the first run line in grabkeys() (around about line 550) and uncomment the fprintf line in keypress()
copy the config.def.h file to config.h
and out of habit I ran

make clean && make

then I edited .xinitrc so the exec line pointed to the binary I just made.
changed to tty2 and ran

startx -- :1

With the wm up and running I pressed

Alt + h
Super + h
Shift + Alt + h
Ctrl + Alt + h

then switched to tty2 to get the numerical values for the modifiers and then killed the wm, switched to tty7 and edited the config.h file to suit and recommented the first run line in grabkeys() so the apps I open get keyboard focus and rebuilt the wm. All works fine now. Let me know if anyone has issues. Eventually I'll get keysyms working in this. smile
Cheers to mhertz for giving it a shot wink
edit : updated the method for the first run

Last edited by moetunes (2011-08-29 00:21:56)


You're just jealous because the voices only talk to me.

Offline

#6 2011-08-25 21:38:49

moetunes
Member
From: A comfortable couch
Registered: 2010-10-09
Posts: 1,033

Re: Simple Dynamic Tiling WM using XCB

el mariachi wrote:

AH as in BE LUCKY? lol I was reading Blucky and it was a bit weird! So I guess this is the new thread right? So I'll repeat my last post:
It seems I don't have keys now... I modified them with Xev but none of the keys work. The compilation went smoothly though.

Oh and thanks for continuing to develop this Moe.
About the name: it's set to 'meowm' now tongue sorry but I think I'll sabotage that part of the project to death haha xD

bluckywm was just going to be a "holding" name until I figured out something better but I am tending towards being super stitious wink You can call it whatever you like smile

On the keyboard issue : I've updated github to include a 'first run line' in grabkeys() which needs uncommenting as well as the logger lin in events() / XCB_KEY_PRESS to get the modifiers values then needs recommenting so apps can get keyboard focus. so do a git pull and a little editing wink
Cheers


You're just jealous because the voices only talk to me.

Offline

#7 2011-08-25 22:02:42

el mariachi
Member
Registered: 2007-11-30
Posts: 595

Re: Simple Dynamic Tiling WM using XCB

All rocking now wink
May I ask why is kill_client commented and (for me) not working when uncommented?

Offline

#8 2011-08-25 22:04:20

moetunes
Member
From: A comfortable couch
Registered: 2010-10-09
Posts: 1,033

Re: Simple Dynamic Tiling WM using XCB

After a day of using a xcb window manager I've noticed that apps that are slow to open the first time like firefox and xchat open much quicker and moving windows around or deleting them is snappier. Seems to be a good thing wink


You're just jealous because the voices only talk to me.

Offline

#9 2011-08-25 22:05:53

moetunes
Member
From: A comfortable couch
Registered: 2010-10-09
Posts: 1,033

Re: Simple Dynamic Tiling WM using XCB

el mariachi wrote:

All rocking now wink
May I ask why is kill_client commented and (for me) not working when uncommented?

There isn't a kill_client function yet because I haven't written it... smile
Cheers


You're just jealous because the voices only talk to me.

Offline

#10 2011-08-25 22:06:21

el mariachi
Member
Registered: 2007-11-30
Posts: 595

Re: Simple Dynamic Tiling WM using XCB

It's so fast it's frightening! urxvt always did this small lag before showing the prompt and now it's light speed baby! LeopardWM! nothing to see here Apple lawyers..

Last edited by el mariachi (2011-08-25 22:07:04)

Offline

#11 2011-08-25 22:08:29

el mariachi
Member
Registered: 2007-11-30
Posts: 595

Re: Simple Dynamic Tiling WM using XCB

moetunes wrote:
el mariachi wrote:

All rocking now wink
May I ask why is kill_client commented and (for me) not working when uncommented?

There isn't a kill_client function yet because I haven't written it... smile
Cheers

One simply cannot have everything at once tongue good work so far Moetunes! I'll be here testing it and using it you can count on that.

Offline

#12 2011-08-25 22:14:19

moetunes
Member
From: A comfortable couch
Registered: 2010-10-09
Posts: 1,033

Re: Simple Dynamic Tiling WM using XCB

A heads up on a couple of issues... :
     I need to rework the spawn() function as it is just a quick hack to get the wm up and running and it spawns(pun?) a new defunct bluckywm when used.
    Hitting the f key in mplayer just adds a 'ghost' window and doesn't fullscreen mplayer and I haven't figured out how to kill a ghost yet. answers on the back of a tenner pls wink


You're just jealous because the voices only talk to me.

Offline

#13 2011-08-26 00:21:21

moetunes
Member
From: A comfortable couch
Registered: 2010-10-09
Posts: 1,033

Re: Simple Dynamic Tiling WM using XCB

I've fixed up the spawn() function spawning defunct processes ( and what an ugly hack that is... tongue ) and made a git pull more friendlier by renaming the config.h file on github to config.def.h so edits to config.h locally aren't overwritten.
Cheers


You're just jealous because the voices only talk to me.

Offline

#14 2011-08-26 07:40:40

moetunes
Member
From: A comfortable couch
Registered: 2010-10-09
Posts: 1,033

Re: Simple Dynamic Tiling WM using XCB

Some more work has been done :
    Fixed up an unmapping bug in client_to_desktop
    Added the option for a top panel
    Added a (brutal) kill_client function - I figure if wm_delete will work so will the keyboard shortcut/menu option to close the window of the app you want to kill

    The destroy_notify event only removes the window if it is on the current workspace - haven't found a suitable solution for this yet ( it's a carry over from catwm )
Cheers


You're just jealous because the voices only talk to me.

Offline

#15 2011-08-27 00:49:07

moetunes
Member
From: A comfortable couch
Registered: 2010-10-09
Posts: 1,033

Re: Simple Dynamic Tiling WM using XCB

More stuff has happened smile

I wanted to be able to add an app to the master area on occasions so I came up with a grid layout. It still has an adjustable master area !
Here's a pic :
tYTJteg

On another note: ps_mem.py shows bluckywm as using

132.0 KiB +  29.0 KiB = 161.0 KiB	bluckywm

which I think is pretty good  tongue (thanks @mhertz for mentioning that app)
Cheers

edit: spelling....

Last edited by moetunes (2011-08-27 00:50:09)


You're just jealous because the voices only talk to me.

Offline

#16 2011-08-27 08:24:39

moetunes
Member
From: A comfortable couch
Registered: 2010-10-09
Posts: 1,033

Re: Simple Dynamic Tiling WM using XCB

I've updated the grid tiling mode to work better on a wide screen monitor.
Here's a pick :
tYTM3dQ
with 3 or 4 windows open it is like the shot in the above post and with 5 or more open this is what it's like smile
Cheers

edit : updated screenshot

Last edited by moetunes (2011-08-28 09:12:15)


You're just jealous because the voices only talk to me.

Offline

#17 2011-08-27 08:44:49

el mariachi
Member
Registered: 2007-11-30
Posts: 595

Re: Simple Dynamic Tiling WM using XCB

nice big_smile could you add something though? no border when a window is fullscreen or it's the only window in a tiling mode big_smile

Offline

#18 2011-08-27 10:03:25

moetunes
Member
From: A comfortable couch
Registered: 2010-10-09
Posts: 1,033

Re: Simple Dynamic Tiling WM using XCB

el mariachi wrote:

nice big_smile could you add something though? no border when a window is fullscreen or it's the only window in a tiling mode big_smile

Some apps it seems, like thunar, don't like going fullscreen without a border if they're the only app on the screen, they always leave a small gap on the right and bottom. So I'll leave the border there if the app isn't being used in fullscreen tiling mode but is the only app on the screen. Turns out the fullscreen mode only made the master go fullscreen no matter which window was focused so I fixed that too wink

edit : there seems to be a few apps that won't go borderless nicely. I've found thunar, firefox, thunderbird, mplayer won't play nice unless there's another window on the screen. I'll have to put a check in for that...

edit edit : The only nice way to go borderless is with another app on the screen it seems so I added a catch that only lets borderless fullscreen mode happen if there is two apps or more on the screen. I'll push it to git shortly wink

Last edited by moetunes (2011-08-27 10:20:16)


You're just jealous because the voices only talk to me.

Offline

#19 2011-08-27 10:50:44

el mariachi
Member
Registered: 2007-11-30
Posts: 595

Re: Simple Dynamic Tiling WM using XCB

Humm thought it would be simpler... guess software doesn't like to be lonely xD

Offline

#20 2011-08-27 12:55:59

moetunes
Member
From: A comfortable couch
Registered: 2010-10-09
Posts: 1,033

Re: Simple Dynamic Tiling WM using XCB

Pushed it to git if you want to try it. I'm not happy with the workaround and will see what I can find out about it ...
If you want to see things not working right for yourself you can comment out the lines that check for a second window and rebuild it.

void toggle_fullscreen() {
    if(mode != 1) {
        //if(head->next == NULL)   <--
           // return;              <--
        holder = mode;
        mode = 1;
    }
    else {
        mode = holder;
    }

    tile();
    update_current();
}

Cheers


You're just jealous because the voices only talk to me.

Offline

#21 2011-08-28 02:30:32

moetunes
Member
From: A comfortable couch
Registered: 2010-10-09
Posts: 1,033

Re: Simple Dynamic Tiling WM using XCB

I've done some code cleanup and fine tuned some functions big_smile

I've renamed the github repo so if you want the latest
you'll have to go here
Cheers.


You're just jealous because the voices only talk to me.

Offline

#22 2011-08-28 11:48:40

moetunes
Member
From: A comfortable couch
Registered: 2010-10-09
Posts: 1,033

Re: Simple Dynamic Tiling WM using XCB

Fixed the fullscreen app issue wink
Cheers


You're just jealous because the voices only talk to me.

Offline

#23 2011-08-28 13:36:53

mhertz
Member
From: Denmark
Registered: 2010-06-19
Posts: 681

Re: Simple Dynamic Tiling WM using XCB

I have for the last few days wanted to again try to give automatic tiling a chance instead of manual, but since I haven't been able to use bluckywm, I have instead just made myself a nice patched dwm configured to my liking, but I do really want to try this new wm out also!

i'm sorry to say that I can still not get bluckywm to work on my end!

I haven't begun to mess with finding the right keys, since I cannot even initialise bluckywm through xcb?

When I test something, I normally don't bother editing .xinitrc back and forth, so I just run 'xinit ~/.bin/bluckywm', but when that failed, I also just in case tried through .xinitrc/startx, but still nothing!

I get a black screen, but no mouse or border or anything, and the VT from where it was started just states:

 :: bluckywm : 1362X746

Btw, you write in the readme that xcb-utils is needed, but it's xcb-util... Just to not confuse any new users...

Thanks in advance!

Offline

#24 2011-08-28 14:16:27

el mariachi
Member
Registered: 2007-11-30
Posts: 595

Re: Simple Dynamic Tiling WM using XCB

I have xcb-util/proto and libxcb installed. Other than that nothing else. My mouse pointer has reverted to the X.org cross though (only the "hourglass" one follows my theme).
That happened to me once mrhertz, but then it got fixed in a git push.

edit: still looking for a better kill_client moe? This is still a bit aggressive on my urxvt (kills the daemon).
Only thing that is unusable atm (for me) is the Gimp.

Last edited by el mariachi (2011-08-28 14:18:45)

Offline

#25 2011-08-28 21:11:29

mhertz
Member
From: Denmark
Registered: 2010-06-19
Posts: 681

Re: Simple Dynamic Tiling WM using XCB

Thanks for your reply, mate!

Yeah, I do have both libxcb and xcb-proto installed, as they're standard xorg-server deps, and when i'm wanting to test bluckywm, then I also momentarilly install xcb-util, but still nothing...

Oh well, it's no biggie for me personally, as i've yet again found out that manual tiling suits me much better than automatic, so I have returned from dwm to musca again...

Edit:

Doh! I'm very sorry guys, it does work fine!

I didn't think it had "initialised" propperly, since I couldn't see a mouse pointer, but I now tested with adding 'urxvt &' on the line before 'exec ~/.bin/beluckywm', and sure enough, now urxvt starts fullscreen, which means the wm works, as without a wm, then urxvt only uses a small window when starting up in bare x...

None keyboard commands did work, but that's normal, as described in the readme...

Anyway, I just wanted to state that you shouldn't spend any time on my stupidity! smile

Again I must say that for all the auto-tiling loving people, then please check this wm out as it's a very attractive offering imho, which includes the functionality of dwm with the most usefull patches allready applied(again, imho), and with ps_mem.py then beluckywm uses in total 175kb compared to the allready very low 576kb of dwm...

CU, Martin.

Last edited by mhertz (2011-08-28 21:50:44)

Offline

Board footer

Powered by FluxBB