You are not logged in.

#26 2011-10-15 01:10:50

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

Re: dminiwm snapwm & bipolarbar

One thing I've been wanting for a while is to have some applications start on a specific desktop and since it's been raining most of the morning there is a new option in the config file smile

// Applications to a specific desktop
static const Convenience convenience[] = { \
    /*  class     desktop follow */
    { "Thunar",       2,    1 },
    { "Leafpad",      2,    1 },
    { "Firefox",      3,    0 },
    { "Thunderbird",  5,    0 },
    { "Pysol",        6,    0 },
};

class = use xprop and find the class string
    e.g. WM_CLASS(STRING) = "leafpad", "Leafpad"
desktop = the desktop number you want the app to be on
follow = greater than 0 means change to the desktop the app opened on

Cheers


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

Offline

#27 2011-10-16 22:03:04

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

Re: dminiwm snapwm & bipolarbar

In post #21 rich_o mentioned he made a fork of this so I had a look at what he's done and one good idea I found was setting the number of desktops in the config.h file. It makes sense since the keyboard shortcuts have to be edited to suit so I pinched that idea. big_smile

Cheers


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

Offline

#28 2011-10-23 02:40:59

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

Re: dminiwm snapwm & bipolarbar

I've just started using xfce4-power-manager to get a better battery monitoring system (then me forgetting to check conky ...) so I needed the notification windows to be better managed so I've fined tuned things a bit. wink
Here's a pic :
tYXhtcQ
If someone finds a window they think should be included in not being managed it shouldn't be too hard to add it so just let me know, thanks.

Cheers

Last edited by moetunes (2012-02-16 19:18:55)


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

Offline

#29 2011-10-23 08:07:35

ntness
Member
From: The World
Registered: 2009-12-29
Posts: 97

Re: dminiwm snapwm & bipolarbar

This does everything I was using dwm for with the added bonus of handling sdl apps properly...I've made the switch and so far it's been wonderful. Minimalistic bliss. Thanks for sharing! big_smile


transcend to the fifth abode

Offline

#30 2011-10-23 08:26:25

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

Re: dminiwm snapwm & bipolarbar

ntness wrote:

This does everything I was using dwm for with the added bonus of handling sdl apps properly...I've made the switch and so far it's been wonderful. Minimalistic bliss. Thanks for sharing! big_smile

I've done nothing intentionally to make sure sdl apps work so if everything is fine with them it is just luck wink

It`s been my only wm since I fixed up numlock being on stopping the keyboard shortcuts from working. I hope it works as well for you as it does for me. smile

Cheers


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

Offline

#31 2011-10-23 18:42:27

ntness
Member
From: The World
Registered: 2009-12-29
Posts: 97

Re: dminiwm snapwm & bipolarbar

Found a possible bug. When sending SCID (chess database application found in AUR) to its own desktop and then closing the app, all dminiwm keybindings stop working and I'm forced to hard reset. I've tried the same process with several other apps and am unable to reproduce the error.


transcend to the fifth abode

Offline

#32 2011-10-23 20:32:12

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

Re: dminiwm snapwm & bipolarbar

ntness wrote:

Found a possible bug. When sending SCID (chess database application found in AUR) to its own desktop and then closing the app, all dminiwm keybindings stop working and I'm forced to hard reset. I've tried the same process with several other apps and am unable to reproduce the error.

I grabbed the source for scid and had the same problem. You don't need to hard reset the computer as ctrl+alt+F1 still works and then ctrl+c will kill dminiwm so you can just restart the wm.
I think scid is a pretty poorly written app. It is a 157000 line sh script that uses bind to capture the keys and I haven't come across any other app that does that.
You just have to add a line in the destroynotify function to fix it. Line 785 is remove_window so add grabkeys(); after that

void destroynotify(XEvent *e) {
    int i = 0;
    int j = 0;
    int tmp = current_desktop;
    client *c;
    XDestroyWindowEvent *ev = &e->xdestroywindow;

    save_desktop(tmp);
    for(j=0;j<TABLENGTH(desktops);++j) {
        select_desktop(j);
        for(c=head;c;c=c->next)
            if(ev->window == c->win)
                i++;

        if(i != 0) {
            remove_window(ev->window);
            grabkeys();
            select_desktop(tmp);
            return;
        }

        i = 0;
    }
    select_desktop(tmp);
}

Has things working fine here. smile

Cheers


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

Offline

#33 2011-10-23 23:50:26

ntness
Member
From: The World
Registered: 2009-12-29
Posts: 97

Re: dminiwm snapwm & bipolarbar

moetunes wrote:
ntness wrote:

Found a possible bug. When sending SCID (chess database application found in AUR) to its own desktop and then closing the app, all dminiwm keybindings stop working and I'm forced to hard reset. I've tried the same process with several other apps and am unable to reproduce the error.

I grabbed the source for scid and had the same problem. You don't need to hard reset the computer as ctrl+alt+F1 still works and then ctrl+c will kill dminiwm so you can just restart the wm.
I think scid is a pretty poorly written app. It is a 157000 line sh script that uses bind to capture the keys and I haven't come across any other app that does that.
You just have to add a line in the destroynotify function to fix it. Line 785 is remove_window so add grabkeys(); after that

void destroynotify(XEvent *e) {
    int i = 0;
    int j = 0;
    int tmp = current_desktop;
    client *c;
    XDestroyWindowEvent *ev = &e->xdestroywindow;

    save_desktop(tmp);
    for(j=0;j<TABLENGTH(desktops);++j) {
        select_desktop(j);
        for(c=head;c;c=c->next)
            if(ev->window == c->win)
                i++;

        if(i != 0) {
            remove_window(ev->window);
            grabkeys();
            select_desktop(tmp);
            return;
        }

        i = 0;
    }
    select_desktop(tmp);
}

Has things working fine here. smile

Cheers

After rebuilding from the latest source and making sure grabkeys(); was in place, the issue still presents itself. I've decided to just keep it under the desktop it's opened under. I agree that scid isn't pretty at all when it comes to code, however, decent chess database apps are greatly wanting. Anyway, I love this wm too much to let a niggle like this deter me from using it. Thanks again.


transcend to the fifth abode

Offline

#34 2011-10-24 05:11:41

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

Re: dminiwm snapwm & bipolarbar

ntness wrote:

After rebuilding from the latest source and making sure grabkeys(); was in place, the issue still presents itself. I've decided to just keep it under the desktop it's opened under. I agree that scid isn't pretty at all when it comes to code, however, decent chess database apps are greatly wanting. Anyway, I love this wm too much to let a niggle like this deter me from using it. Thanks again.

The above fix worked before I posted it. I moved the three scid windows to a new desktop and it seems that works ok but only moving the main window and closing it kills the keyboard shortcuts. Try moving the three windows to the one desktop and running in fullscreen mode and see how you go. I'll see if I can find something out about how bind works and sort this out.

edit: even opening a terminal on the desktop just the main window is on and killing the scid window keeps the keyboard shortcuts working so I'm guessing it might be something to do with dminiwm's remove_window function but nothing I've come up with yet has changed things.

Cheers

Last edited by moetunes (2011-10-24 05:25:32)


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

Offline

#35 2011-10-24 07:05:37

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

Re: dminiwm snapwm & bipolarbar

I removed grabkeys() from the destroynotify function as it didn't provide the fix as expected, I thought it worked but I was moving all scid windows to the same desktop and the app exits ok if you do that (at least it does here wink ). Scid works ok in fluxbox so it's something I'll have to work on... smile

Cheers


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

Offline

#36 2011-11-14 09:49:08

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

Re: dminiwm snapwm & bipolarbar

So after taking the relevant facts into consideration i.e.
.  there's too many lines of code in scid for me to scroll through
.  I found a viable workaround for ntness
.  everything I use works fine
.  no one else has mentioned any problems
.  I'm lazy
all I've done with this wm lately is clean some code up and use it daily.
wink

Cheers


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

Offline

#37 2011-11-14 23:22:24

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

Re: dminiwm snapwm & bipolarbar

A minor fix for when the swap_master function is called with only one window open.
In dminiwm.c line 336 looks like

if(head != NULL && current != NULL && mode != 1) {

and it should be

if(head->next != NULL && current != NULL && mode != 1) {

edit: This was a carry over from the original catwm.

Cheers

Last edited by moetunes (2011-11-16 18:20:38)


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

Offline

#38 2011-11-21 06:32:31

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

Re: dminiwm snapwm & bipolarbar

So...
I wasn't that happy with xfce4-power-manager for battery monitoring so I made a light app that checks the battery status and if it is charged or low there's a small X window that pops up. I used XSetTransientForHint so I could have the window treated like a popup only to find dminiwm didn't check for them. Now it does smile
Here's a pic:
tYmRvaA
The update has been pushed to github.

Cheers

Last edited by moetunes (2012-02-16 19:19:54)


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

Offline

#39 2011-11-25 11:56:23

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

Re: dminiwm snapwm & bipolarbar

Something else for the minimalists.
tYmcybw
Using a dynamic tiler can have its' drawbacks. I wanted a light analogue clock that would stay round and centered in the window but couldn't find one so I made this.
tYmcydA
It seems to be very light on resources so far but does flicker if you stare at it.
I recommend not staring at it tongue

Cheers

Last edited by moetunes (2012-02-16 19:20:40)


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

Offline

#40 2011-11-25 15:45:56

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

Re: dminiwm snapwm & bipolarbar

Just dropping aline here to say thanks for this, I already like it a lot :]

tYmc3Ng

[ch|b]eers


.:[ git me! ] :.

Offline

#41 2011-11-26 00:32:44

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

Re: dminiwm snapwm & bipolarbar

Nice looking desktop there c00kiemon5ter. smile
richo4 offered a way to click on a window to focus it (on github) so I added that in with an option in the config to turn it on/off.

#define CLICK_TO_FOCUS 1  /* 1=Don't 0=Focus an unfocused window when clicked */

Seems to work fine either way.

I added an option to gcc in the Makefile

 -s 

it reduces the size of the binary by about a quarter.

There's still room according to cloc

10:04:49 am
 [ dminiwm-0.1.8 ]$ cloc ./src/dminiwm.c ./src/config.h.def 
Use of qw(...) as parentheses is deprecated at /usr/bin/cloc line 1841.
       2 text files.
       2 unique files.                              
       0 files ignored.

http://cloc.sourceforge.net v 1.55  T=0.5 s (4.0 files/s, 2312.0 lines/s)
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
C                                1            132             81            819
Teamcenter def                   1             10             19             95
-------------------------------------------------------------------------------
SUM:                             2            142            100            914
-------------------------------------------------------------------------------

big_smile

Cheers

Last edited by moetunes (2011-11-27 04:50:01)


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

Offline

#42 2011-11-27 21:35:27

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

Re: dminiwm snapwm & bipolarbar

c00kiemon5ter offered on github a function that takes you back to the last opened desktop which I thought was pretty cool so it's been added. The keyboard shortcut for it is :

    {  MOD1,             XK_Tab,        last_desktop,    {NULL}},

I merged the request on github and then couldn't push to the dminimalwm repo from any computer here so I deleted that repo. The new one is here and in my sig.

Cheers


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

Offline

#43 2011-11-27 23:41:01

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

Re: dminiwm snapwm & bipolarbar

Another good idea from c00kiemon5ter. The next/prev_desktop functions have been replaced by the shorter rotate_desktop function, which requires an edit to the config file. Change

    {  MOD4,             XK_Right,      next_desktop,      {NULL}},
    {  MOD4,             XK_Left,       prev_desktop,      {NULL}},

To

    {  MOD4,             XK_Right,      rotate_desktop,    {.i = 1}},
    {  MOD4,             XK_Left,       rotate_desktop,    {.i = -1}},

if you keep your own config.h file. smile

Cheers

Last edited by moetunes (2011-11-27 23:48:36)


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

Offline

#44 2011-11-29 06:01:07

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

Re: dminiwm snapwm & bipolarbar

I've been working on a status bar today for the next incarnation of my port of catwm. Here's a pic
tYmk0Yg
I've been thinking I would take dminiwm back a few steps so it is more minimal and start a wm with more features from where dminiwm is now. I do prefer the minimalistic approach but like to have something to tinker with. I'm crap at naming things so any suggestions on a name for it will be appreciated. smile

Cheers

Last edited by moetunes (2012-02-16 19:22:41)


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

Offline

#45 2011-11-30 19:26:29

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

Re: dminiwm snapwm & bipolarbar

I've added a desktop switcher to the statusbar. It's clickable and the current desktop is shown as a different colour. The bar is toggleable.
Here's a pic :
tYmoyNA
Adding the bar hasn't increased the window managers resource use by much at all but has taken it over 1000 sloc...
I threw it up in this repo for anyone that wants to try it.
Next up is trying to have conky output showing in the space that's left.

Cheers

Last edited by moetunes (2012-02-16 19:23:50)


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

Offline

#46 2011-12-01 02:02:03

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

Re: dminiwm snapwm & bipolarbar

There's now a rc file so the font and colors can be updated from a keyboard shortcut.
You can try the latest here.

Cheers


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

Offline

#47 2011-12-01 05:19:55

hellomynameisphil
Member
From: /home/phil/Vancouver
Registered: 2009-10-02
Posts: 257
Website

Re: dminiwm snapwm & bipolarbar

What is it going to actually be called? In various places, I see nextwm, snapwm and woodywm.

Offline

#48 2011-12-01 05:56:56

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

Re: dminiwm snapwm & bipolarbar

I started calling it woodywm then did a web search and found out that already had a net presence so changed it to snapwm. The Nextwm repo on github is just where I share it from, it was there from when I had to shuffle the repos about because I couldn't push to the dminimalwm repo. This has gone past the 1000 sloc mark so it's not d mini wm dminiwm is. But who knows, this might end up as dminiwm if it stays light enough.
In a day or two I should have the keyboard shortcuts and commands in the rc file for easy reloading.


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

Offline

#49 2011-12-01 09:43:02

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

Re: dminiwm snapwm & bipolarbar

I've reworked how the update_config function goes about updating things and it all works fine now, 'cept the the bar height is set to be relevant to the font height and I haven't worked out the right order to do things so the bar gets resized if the font is. The bar will be sized for the font if the wm is restarted though . Apart from that I'm suprised how painless starting to use a rc file has been. smile
Further on :

What is it going to actually be called?

I guess this could be called dminiwm-experimental. If it all turns to mud I have no problems starting from dminiwm again. wink
I've never made a desktop switcher or statusbar before so I could have the wrong approach to either...

Cheers


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

Offline

#50 2011-12-02 00:46:51

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

Re: dminiwm snapwm & bipolarbar

I've added error checking for loading the colours and there are default colours in the config.h.def file which get used if the rc file is edited badly. There's a fix for the toggle_bar function too.


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

Offline

Board footer

Powered by FluxBB