You are not logged in.

#226 2012-01-21 04:31:00

stlarch
Member
From: hell
Registered: 2010-12-25
Posts: 1,250

Re: monsterwm! ~ yet another tiny wm

Army, it looks like you're missing a good chunk of it. Maybe take another look at the newer one in his github or someone else's (like jasonwryan wink ) and compare it to yours to see what you're missing. You can look at mine too if you want hmm

Offline

#227 2012-01-21 08:46:30

Army
Member
Registered: 2007-12-07
Posts: 1,784

Re: monsterwm! ~ yet another tiny wm

Thanks stlarch!

edit:
Ok, I see, this works a lot better. But I discovered, that it doesn't show up nicely with monsterwm-xcb dualhead branch, which I'm trying right now, seems like that one has another output.
edit2:
Ok, monsterwm-xcb with dualhead has an output like this (for 9 workspaces, one terminal opened on workspace 0)

0:1:0:0:0:1:0 0:1:1:0:0:0:0 0:1:2:0:0:0:0 0:1:3:0:0:0:0 0:1:4:0:0:0:0 0:1:5:0:0:0:0 0:1:6:0:0:0:0 0:1:7:0:0:0:0 0:1:8:0:0:0:0

7 digits per desktop rather than 5 in monsterwm.
I'm not sure what the first two digits mean, one of them has to be the monitor I'm on at the moment (I guess it's the first digit). But what does the other one stand for?

Last edited by Army (2012-01-21 09:53:55)

Offline

#228 2012-01-21 10:08:47

Cloudef
Member
Registered: 2010-10-12
Posts: 636

Re: monsterwm! ~ yet another tiny wm

Army wrote:

Thanks stlarch!

edit:
Ok, I see, this works a lot better. But I discovered, that it doesn't show up nicely with monsterwm-xcb dualhead branch, which I'm trying right now, seems like that one has another output.
edit2:
Ok, monsterwm-xcb with dualhead has an output like this (for 9 workspaces, one terminal opened on workspace 0)

0:1:0:0:0:1:0 0:1:1:0:0:0:0 0:1:2:0:0:0:0 0:1:3:0:0:0:0 0:1:4:0:0:0:0 0:1:5:0:0:0:0 0:1:6:0:0:0:0 0:1:7:0:0:0:0 0:1:8:0:0:0:0

7 digits per desktop rather than 5 in monsterwm.
I'm not sure what the first two digits mean, one of them has to be the monitor I'm on at the moment (I guess it's the first digit). But what does the other one stand for?

Oh yeah, that. I'm not still quite sure in what format I should do the desktop information on dualhead branch.
If you have any ideas, do tell.

The first number is monitor ID, the second is boolean if the monitor is active. However, it outputs every monitor's desktop line as seperate.
So, should I output all monitors at same line, or should I give information how many monitors you have, eg. how many lines to parse?

Offline

#229 2012-01-21 10:15:58

Army
Member
Registered: 2007-12-07
Posts: 1,784

Re: monsterwm! ~ yet another tiny wm

I'll look if I'm able to configure it right, I'm not home yet where I have a second monitor.

Offline

#230 2012-01-21 11:14:09

c00kiemon5ter
Member
From: Greece
Registered: 2010-06-01
Posts: 562
Website

Re: monsterwm! ~ yet another tiny wm

all in one line is way easier to parse
with the desktop and monitor id you don't even have to output the information in the "correct" order.
each block is self contained, it has all the info you need for that part.


.:[ git me! ] :.

Offline

#231 2012-01-21 12:28:09

Cloudef
Member
Registered: 2010-10-12
Posts: 636

Re: monsterwm! ~ yet another tiny wm

c00kiemon5ter wrote:

all in one line is way easier to parse
with the desktop and monitor id you don't even have to output the information in the "correct" order.
each block is self contained, it has all the info you need for that part.

Yeah, sounds sane enough. I pushed a fix.
I'm still figuring out why the libreoffice has the issues it has.

Offline

#232 2012-01-21 13:12:12

Army
Member
Registered: 2007-12-07
Posts: 1,784

Re: monsterwm! ~ yet another tiny wm

I gave the dualhead branch a quick try. Cloudef, does dualhead work for you? It's supposed to work kind of like in dwm, right? Dwm of course works very nice. Well, all I can say so far, monsterwm dualhead doesn't work for me. Unfortunately I can't use the external monitor the whole day, it's my parent's monitor which they use. But you wrote, that it's in a very early state, so I guess right now it's not so important that I test it here.

Offline

#233 2012-01-21 15:18:53

Cloudef
Member
Registered: 2010-10-12
Posts: 636

Re: monsterwm! ~ yet another tiny wm

Army wrote:

I gave the dualhead branch a quick try. Cloudef, does dualhead work for you? It's supposed to work kind of like in dwm, right? Dwm of course works very nice. Well, all I can say so far, monsterwm dualhead doesn't work for me. Unfortunately I can't use the external monitor the whole day, it's my parent's monitor which they use. But you wrote, that it's in a very early state, so I guess right now it's not so important that I test it here.

File a bug report smile Dualhead atm works for me, but yeah it's still quite early code.

Offline

#234 2012-01-21 16:16:10

Army
Member
Registered: 2007-12-07
Posts: 1,784

Re: monsterwm! ~ yet another tiny wm

Ok, I can file a bug report, but I won't be able to do that many tests like with the fullscreen problem, because I hardly have an external monitor at hand. I still can use one today and tomorrow, well, only at weekends when I'm at home. Will you work on it this weekend? If so, I'll wait with the bugreport. What informations would be useful for you in this case? Xrandr outputs is the only thing that comes to my mind right now, not much information..

Offline

#235 2012-01-21 16:47:13

Cloudef
Member
Registered: 2010-10-12
Posts: 636

Re: monsterwm! ~ yet another tiny wm

Army wrote:

Ok, I can file a bug report, but I won't be able to do that many tests like with the fullscreen problem, because I hardly have an external monitor at hand. I still can use one today and tomorrow, well, only at weekends when I'm at home. Will you work on it this weekend? If so, I'll wait with the bugreport. What informations would be useful for you in this case? Xrandr outputs is the only thing that comes to my mind right now, not much information..

Well, I have few debug prints in monsterwm, though I should really add more of them anyways.
If it segfaults then compile with make CFLAGS='-g -DWMNAME=\"monsterwm\" -DVERSION=\"bleh\" -DXINERAMA=1' LDFLAGS="-g -lxcb -lxcb-icccm -lxcb-xinerama"
And give backtrace using gdb. I think I'm gonna edit the makefile to have debug option, so you don't have to do this with hand.

Anyways, if it isn't segfault, just explain the behavior. Give stdout output and xrandr information yeah. I've been pretty busy today, but hopefully I have time for tomorrow.

Offline

#236 2012-01-21 17:15:20

Army
Member
Registered: 2007-12-07
Posts: 1,784

Re: monsterwm! ~ yet another tiny wm

Ok, no it doesn't segfault! I'll file the bugreport and explain it there. See ya wink

Offline

#237 2012-01-21 20:41:43

Cloudef
Member
Registered: 2010-10-12
Posts: 636

Re: monsterwm! ~ yet another tiny wm

Something from my personal branch.
tY2RrMQ

It's still xcb, has multi-monitor support, uses cairo for panel. Still needs system tray with keyboard access and thinking of porting the openbox style menu from dwm.
Too bad my personal branch starts to go against the "small" philosophy.

Offline

#238 2012-01-22 15:33:24

Army
Member
Registered: 2007-12-07
Posts: 1,784

Re: monsterwm! ~ yet another tiny wm

Feature request:
In

static const AppRule rules[] = { \
    /*  class     desktop follow float */
    { "foo",      1,         False, False },
    { "bar",      2,         False, False },
};

it would be great if it was possible to apply rules according to names as well. Would be useful for terminal applications. I for example always want rtorrent to be on the last workspace, because I don't have to see it all day.

@Cloudef, using your dualhead branch, in the compilation process I always got a warning

monsterwm.c:446:6: warning: ‘client_to_monitor’ defined but not used [-Wunused-function]

I fixed it by adding it in the config.h like this

#define DESKTOPCHANGE(K,N) \
    {  MOD4,             K,              change_desktop, {.i = N}}, \
    {  MOD4|ShiftMask,   K,              client_to_desktop, {.i = N}}, \
    {  MOD4|ControlMask, K,              client_to_monitor, {.i = N}},

This is the right way, right? So using e.g. MOD4+Control+2, I should be able to move a client to monitor 2, right?

Last edited by Army (2012-01-22 15:33:52)

Offline

#239 2012-01-22 15:53:23

TheLemonMan
Member
From: Italy
Registered: 2011-09-04
Posts: 214
Website

Re: monsterwm! ~ yet another tiny wm

Army wrote:

Feature request:
In

static const AppRule rules[] = { \
    /*  class     desktop follow float */
    { "foo",      1,         False, False },
    { "bar",      2,         False, False },
};

it would be great if it was possible to apply rules according to names as well. Would be useful for terminal applications. I for example always want rtorrent to be on the last workspace, because I don't have to see it all day.

Its just not documented but if it doent match the class name it already tries to match the name too.

Offline

#240 2012-01-22 16:49:36

Cloudef
Member
Registered: 2010-10-12
Posts: 636

Re: monsterwm! ~ yet another tiny wm

Army wrote:

@Cloudef, using your dualhead branch, in the compilation process I always got a warning
*snip*
This is the right way, right? So using e.g. MOD4+Control+2, I should be able to move a client to monitor 2, right?

Yeah, that's right. Guess I forgot to add that function to config.h.def, I fixed few issues recently on the dualhead branch as well.
Urxvt allows you to spawn application with different instance, and monsterwm checks both the instance and class name in code.

Oh, also do you still have problems with the dualhead branch?

@c00kiemon5ter
I changed the tile function so, that it won't tile if n == 0, think I managed to seg fault it when I had one tiled window and one floating.

if (!head->next || !n || (head->next->istransient && !head->next->next) || mode == MONOCLE) {

I'm too arsed to fork now and send a pull request smile

Offline

#241 2012-01-22 19:05:09

c00kiemon5ter
Member
From: Greece
Registered: 2010-06-01
Posts: 562
Website

Re: monsterwm! ~ yet another tiny wm

TheLemonMan wrote:
Army wrote:

Feature request:
In

static const AppRule rules[] = { \
    /*  class     desktop follow float */
    { "foo",      1,         False, False },
    { "bar",      2,         False, False },
};

it would be great if it was possible to apply rules according to names as well. Would be useful for terminal applications. I for example always want rtorrent to be on the last workspace, because I don't have to see it all day.

Its just not documented but if it doent match the class name it already tries to match the name too.

yep, it's already there

Cloudef wrote:

@c00kiemon5ter
I changed the tile function so, that it won't tile if n == 0, think I managed to seg fault it when I had one tiled window and one floating.

if (!head->next || !n || (head->next->istransient && !head->next->next) || mode == MONOCLE) {

I'm too arsed to fork now and send a pull request smile

if there is no window, there is no head (and also no current)
the first check is that: if (!head) return;

so it should be ok, I've never had any problem with it.
head is always null if there is no client, and it's also free'd.
that happens on the removeclient function


.:[ git me! ] :.

Offline

#242 2012-01-22 19:34:31

Cloudef
Member
Registered: 2010-10-12
Posts: 636

Re: monsterwm! ~ yet another tiny wm

@c00kiemon5ter
Hmm, yeah. It might be something else then, I can't seem to reproduce it anymore.
Edit: Yeah, my personal branch was bit out of date smile

Last edited by Cloudef (2012-01-22 19:42:40)

Offline

#243 2012-01-22 20:41:45

c00kiemon5ter
Member
From: Greece
Registered: 2010-06-01
Posts: 562
Website

Re: monsterwm! ~ yet another tiny wm

hey TheLemonMan, did you get fibanocci working ?

I just pushed a new approach to handling different layouts, now each layout is handled in its own function. I think this is cleaner, saner and easier to understand from the code prespective, it cost about 9 or 10 lines but I think its worth it.

-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
C                                1            102            264            650
C/C++ Header                     1              9              9             66
-------------------------------------------------------------------------------
SUM:                             2            111            273            716
-------------------------------------------------------------------------------

Last edited by c00kiemon5ter (2012-01-22 20:43:40)


.:[ git me! ] :.

Offline

#244 2012-01-22 23:46:34

whooper
Member
From: Germany
Registered: 2008-12-24
Posts: 37

Re: monsterwm! ~ yet another tiny wm

Is there a way to define a rule that sets the application in floating mode on all the desktops?

Thanks for the amazing wm, I've been using it for a few weeks and it's great.

Offline

#245 2012-01-23 02:33:06

c00kiemon5ter
Member
From: Greece
Registered: 2010-06-01
Posts: 562
Website

Re: monsterwm! ~ yet another tiny wm

hi there, I pushed some code to keep the properties of the moving window. So, if a window was fullscreen when it's moved to another desktop, it's still fullscreen, if it was floating, it's still floating
I think that should cover it whooper

I also fixed a minor bug that reserved the space for any floating client in grid layout wink

Last edited by c00kiemon5ter (2012-01-23 02:41:48)


.:[ git me! ] :.

Offline

#246 2012-01-23 03:41:47

whooper
Member
From: Germany
Registered: 2008-12-24
Posts: 37

Re: monsterwm! ~ yet another tiny wm

Thanks!

I also noticed a bug when starting a floating application in tiling and bstack modes (doesn't occur on grid mode):

bstack
tile

And another when closing a file on geany in tiling and bstack modes (doesn't occur on grid mode):

geany

I start galculator and geany with this rule:

static const AppRule rules[] = { \
    /*  class      desktop    follow */
    { "galculator",     1,      True,	True },
    { "Geany",     1,       True,	False },

Offline

#247 2012-01-23 03:46:29

c00kiemon5ter
Member
From: Greece
Registered: 2010-06-01
Posts: 562
Website

Re: monsterwm! ~ yet another tiny wm

yeah, I know about that, I've mentioned this behavior on previous posts. It happens when the floating/transient window is the 1st/head/master window. I had looked for an easy fix but there wasn't one at that time, I'll check it again tommorow
(5am here -- I need cookies, milk and sleep)


.:[ git me! ] :.

Offline

#248 2012-01-23 15:17:40

TheLemonMan
Member
From: Italy
Registered: 2011-09-04
Posts: 214
Website

Re: monsterwm! ~ yet another tiny wm

c00kiemon5ter wrote:

hey TheLemonMan, did you get fibanocci working ?

My own implementation of the dwindle fibonacci layout big_smile I'll try to get also the spiral layout in, i have some code but has some silght logic flaws in it that have to be ironed.
Enjoy

Offline

#249 2012-01-23 17:20:09

c00kiemon5ter
Member
From: Greece
Registered: 2010-06-01
Posts: 562
Website

Re: monsterwm! ~ yet another tiny wm

whooper wrote:

Thanks!

I also noticed a bug when starting a floating application in tiling and bstack modes (doesn't occur on grid mode):
bstack  tile

And another when closing a file on geany in tiling and bstack modes (doesn't occur on grid mode):
geany

Fixed! I made a couple of changes, so now if the master window is floating or is trancient that area gets filled.
Also, now all transient or floating clients get a border. This affects monocle layout, where transients and floating windows would not get a border. Also affected is the last tiled window in any mode, except monocle, when all other windows are floating; in that case that window gets a border.

In other words, windows don't have borders if
* they're the only window on the screen (regadless of the layout),
* the layout is monocle and the window is not transient or floating
- transient and floating windows always get border

I also added some documentation on how tile and bstack get pixel-perfect,
and fix to preserve the transient property of the window when moved to another desktop.

a minor report: if ones opens, say, mplayer, or easier to reproduce with two mplayer windows, the 2nd window doesn't immediately get a border. I'm not sure why that is. I tried to fix that, but doesn't seem to be completely fixed, instead there seems to be some kind of race condition(?) when the client gets configured.
I also unrolled some code, so the overall quility and readability is better (654 loc for .c / 720 sum)

@TheLemonMan
heh! with a quick look, I have no idea what's going on there tongue
see you also got it in a callback function, keeping up! great x)

Last edited by c00kiemon5ter (2012-01-24 16:04:12)


.:[ git me! ] :.

Offline

#250 2012-01-24 06:15:51

Cloudef
Member
Registered: 2010-10-12
Posts: 636

Re: monsterwm! ~ yet another tiny wm

I'm atm without internet, so I can't merge changes from monsterwm for a while. Maybe next week.
E: Got internet sooner than I thought, changes merged.

Last edited by Cloudef (2012-01-24 16:49:50)

Offline

Board footer

Powered by FluxBB