You are not logged in.

#51 2009-12-11 22:13:29

jasonwryan
Forum & Wiki Admin
From: .nz
Registered: 2009-05-09
Posts: 18,313
Website

Re: The dwm thread

I have a couple of questions:

1. Does the moveresize patch actually work in 5.7.2 It compiles successfully, but doesn't actually do anything. I have also tried a (newer?) variant the author posted to the mailing list, with the same result.

2. Anyone worked out how to get pertag to play nicely with bstack in 5.7.2? I tried following the suggestion at the bottom of this page but it wouldn't compile. (Hardly surprising given the post is probably quite old...)

I suspect that both questions stem from some fundamental conflicts between the different patches. I currently use bstack, push and nmaster.


Arch + dwm   •   Mercurial repos  •   Github

Registered Linux User #482438

Online

#52 2009-12-11 23:04:43

Tjh_
Member
From: Waterloo, Canada
Registered: 2009-11-28
Posts: 11
Website

Re: The dwm thread

hmm pertag 5.7.2 for some reason fail's to change the focus/unfocus border color. and thats really useful to me. Anyone here have that patch/version/problem?

Offline

#53 2010-02-24 17:29:09

jasonwryan
Forum & Wiki Admin
From: .nz
Registered: 2009-05-09
Posts: 18,313
Website

Re: The dwm thread

There is currently a debate on Wikipedia about deleting the dwm article: http://en.wikipedia.org/wiki/Wikipedia: … letion/Dwm

It is not a majority vote, so don't pile in with "+1 Keep" - but if you are aware of references that would qualify under Wikipedia's notability guidelines, then please add them to the page.


Arch + dwm   •   Mercurial repos  •   Github

Registered Linux User #482438

Online

#54 2010-02-24 17:41:23

n0dix
Member
Registered: 2009-09-22
Posts: 956

Re: The dwm thread

jasonwryan wrote:

There is currently a debate on Wikipedia about deleting the dwm article: http://en.wikipedia.org/wiki/Wikipedia: … letion/Dwm

It is not a majority vote, so don't pile in with "+1 Keep" - but if you are aware of references that would qualify under Wikipedia's notability guidelines, then please add them to the page.

This is awful, i think all the articles in wikipedia keep in there.

I don't read the justification for the keep/deletion of the article. Why is the problem, why to delete it?

Offline

#55 2010-03-01 01:48:02

JohannesSM64
Member
From: Norway
Registered: 2009-10-11
Posts: 623
Website

Re: The dwm thread

I'm very happy with my dwm setup now, but I still have 1 little thing I want to change:

The color used for non-focused tags with one or more clients that have recieved an urgency hint seems to be normfgcolor. With my colors, focused tags are dark grey, and non-focused tags with one or more clients that have recieved an urgency hint are black. It's not so easy to notice. I'd like the color for non-focused tags with one or more clients that has recieved an urgency hint to be something distinct, like red. I tried and failed to change it myself - it's not a config.h option, and not being skilled at C, dwm.c is confusing for me.

I know of the statuscolors patch, but I don't want that. It seems poorly written, overkill for what I want to change, and it's hard to combine with all my other patches (especially pango).

Can someone point me in the right direction? Thanks.

Offline

#56 2010-03-01 15:50:25

thayer
Fellow
From: Vancouver, BC
Registered: 2007-05-20
Posts: 1,560
Website

Re: The dwm thread

JohannesSM64 wrote:

I know of the statuscolors patch, but I don't want that. It seems poorly written, overkill for what I want to change, and it's hard to combine with all my other patches (especially pango).

Can someone point me in the right direction? Thanks.

By the sounds of it you've covered what's necessary; either the statuscolor patch or just patching it yourself.  I'm no C programmer either, but breaking down the dwm.c isn't that hard when you examine only the color-related code.  First, have a look at config.h and you'll find something like:

static const char normfgcolor[]     = "#666666";

Now, have a look at dwm.c and search for normfgcolor, which should show:

dc.norm[ColFG] = getcolor(normfgcolor);

Now start looking through the code for instances of 'dc.norm' and 'ColFG'.  That should give you an idea how variables and colours are initiated. From there you can try adding some vars and modifying the existing functions until you start seeing the results you desire.

Of course, the easy way out is simply changing your default colours to something more contrasting.

Last edited by thayer (2010-03-01 15:52:38)


thayer williams ~ cinderwick.ca

Offline

#57 2010-03-01 18:34:31

Chance
Member
Registered: 2008-12-05
Posts: 99

Re: The dwm thread

Question: Can you minimize windows in dwm?

Offline

#58 2010-03-01 18:49:56

jasonwryan
Forum & Wiki Admin
From: .nz
Registered: 2009-05-09
Posts: 18,313
Website

Re: The dwm thread

Chance wrote:

Question: Can you minimize windows in dwm?

There aren't any 'windows' to minimize - their are clients and tags. You can send a client to another (not currently viewed) tag - which might achieve what you are looking for.


Arch + dwm   •   Mercurial repos  •   Github

Registered Linux User #482438

Online

#59 2010-03-01 20:32:43

Chance
Member
Registered: 2008-12-05
Posts: 99

Re: The dwm thread

jasonwryan wrote:
Chance wrote:

Question: Can you minimize windows in dwm?

There aren't any 'windows' to minimize - their are clients and tags. You can send a client to another (not currently viewed) tag - which might achieve what you are looking for.

No, i actually meant minimizing a window. I think awesome could do it, but it's okay. I'm still loving dwm. It's by far, imo, the easiest tiling manager to get used to and customize. I wish it had a minimize option though.

Also, does anyone use the transparency script? If so did you experience a lot of bugs like the site says?

Offline

#60 2010-03-01 23:41:34

JohannesSM64
Member
From: Norway
Registered: 2009-10-11
Posts: 623
Website

Re: The dwm thread

thayer wrote:
JohannesSM64 wrote:

I know of the statuscolors patch, but I don't want that. It seems poorly written, overkill for what I want to change, and it's hard to combine with all my other patches (especially pango).

Can someone point me in the right direction? Thanks.

By the sounds of it you've covered what's necessary; either the statuscolor patch or just patching it yourself.  I'm no C programmer either, but breaking down the dwm.c isn't that hard when you examine only the color-related code.  First, have a look at config.h and you'll find something like:

static const char normfgcolor[]     = "#666666";

Now, have a look at dwm.c and search for normfgcolor, which should show:

dc.norm[ColFG] = getcolor(normfgcolor);

Now start looking through the code for instances of 'dc.norm' and 'ColFG'.  That should give you an idea how variables and colours are initiated. From there you can try adding some vars and modifying the existing functions until you start seeing the results you desire.

Of course, the easy way out is simply changing your default colours to something more contrasting.

These are the lines containing dc.norm in my dwm.c, besides the initializations:

730:            col = m->tagset[m->seltags] & 1 << i ? dc.sel : dc.norm;
737:    drawtext(m->ltsymbol, dc.norm, False);
747:            drawtext(stext, dc.norm, False);
754:                    col = m == selmon ? dc.sel : dc.norm;
759:                    drawtext(NULL, dc.norm, False);
816:    pango_xft_render_layout(dc.xftdrawable, (col==dc.norm?dc.xftnorm:dc.xftsel)+(invert?ColBG:ColFG), dc.plo, x * PANGO_SCALE, y * PANGO_SCALE);
1150:   XSetWindowBorder(dpy, w, dc.norm[ColBorder]);
1878:   XSetWindowBorder(dpy, c->win, dc.norm[ColBorder]);

I don't see which of the lines choose the colors for urgent tags. Tried several hacks to no avail.

edit: googling found me this patch, but it it has a side effect: it makes selfgcolor red. Can't resolve it, but I think it's the pango patch (seen in best effect at line 816, above)

Last edited by JohannesSM64 (2010-03-02 00:00:20)

Offline

#61 2010-03-02 01:41:29

ataraxia
Member
From: Pittsburgh
Registered: 2007-05-06
Posts: 1,537

Re: The dwm thread

The colors for urgent tags are just the reverse of those for non-urgent tags. That's what the "invert" references are for.

There's my "urgentborder" patch - in the dwm wiki - which just makes an extra color for the borders of urgent windows. By default it's bright red.

Offline

#62 2010-03-02 19:11:44

eol
Member
Registered: 2009-05-30
Posts: 23

Re: The dwm thread

JohannesSM64 wrote:

googling found me this patch, but it it has a side effect: it makes selfgcolor red. Can't resolve it, but I think it's the pango patch (seen in best effect at line 816, above)

Hello, in the patch you linked at, the only line with red in it is this one (l.36) :

+static const char urgentbgcolor[]   = "#FF0000";

but it has nothing to do with selfgcolor.

Offline

#63 2010-03-02 20:56:59

JohannesSM64
Member
From: Norway
Registered: 2009-10-11
Posts: 623
Website

Re: The dwm thread

eol wrote:
JohannesSM64 wrote:

googling found me this patch, but it it has a side effect: it makes selfgcolor red. Can't resolve it, but I think it's the pango patch (seen in best effect at line 816, above)

Hello, in the patch you linked at, the only line with red in it is this one (l.36) :

+static const char urgentbgcolor[]   = "#FF0000";

but it has nothing to do with selfgcolor.

I think I must change this line to reflect the changes:

pango_xft_render_layout(dc.xftdrawable, (col==dc.norm?dc.xftnorm:dc.xftsel)+(invert?ColBG:ColFG), dc.plo, x * PANGO_SCALE, y * PANGO_SCALE);

But I don't know how.

Offline

#64 2010-03-02 21:47:35

steve___
Member
Registered: 2008-02-24
Posts: 439

Re: The dwm thread

I suggest asking on the mailing list.

Offline

#65 2010-03-22 13:31:51

lswest
Member
From: Munich, Germany
Registered: 2008-06-14
Posts: 453
Website

Re: The dwm thread

I'm in the process of trying to switch from AwesomeWM to DWM, and the only issue I've found that is preventing me from switching is the following:
DWM floating windows stay above tiling windows (all tiling window managers seem to use this behaviour except for Awesome).

The reason why this is important to me is that I sometimes mix floating and tiling windows, and leave the floating window "in the background" (in Awesome, at least).  Something like Skype in the background, or a gmrun prompt where I'm double-checking a command from a terminal screen.  I could also, of course, just use a floating layout, but then I have the same problem in reverse.

I asked on #suckless (irc.oftc.net), and I was told that the restack(Monitor *m) (line 1365 in dwm.c) method is where I need to start, but I'm having trouble comprehending what exactly the function does, and how I should edit it.  Any suggestions would be much appreciated!

I realize that I could just stick with Awesome, but I'd rather move away from the semi-constant syntax changes, and instead just edit the source code for one thing every time it updates.  I believe this to be the right thread to place the question, since all I'm really looking for is a suggestion, or a place to start.  Maybe even just an explanation of the method itself.

I appreciate any suggestions or help!
Lswest

Relevant section of dwm.c (I believe):

(lines: 1365 and onwards).
restack(Monitor *m) {
    Client *c;
    XEvent ev;
    XWindowChanges wc;

    drawbar(m);
    if(!m->sel)
        return;
    if(m->sel->isfloating || !m->lt[m->sellt]->arrange)
        XRaiseWindow(dpy, m->sel->win);
    if(m->lt[m->sellt]->arrange) {
        wc.stack_mode = Below;
        wc.sibling = m->barwin;
        for(c = m->stack; c; c = c->snext)
            if(!c->isfloating && ISVISIBLE(c)) {
                XConfigureWindow(dpy, c->win, CWSibling|CWStackMode, &wc);
                wc.sibling = c->win;
            }
    }
    XSync(dpy, False);
    while(XCheckMaskEvent(dpy, EnterWindowMask, &ev));
}

Lswest <- the first letter of my username is a lowercase "L".
"...the Linux philosophy is "laugh in the face of danger". Oops. Wrong one. "Do it yourself". That's it." - Linus Torvalds

Offline

#66 2010-03-22 14:19:54

steve___
Member
Registered: 2008-02-24
Posts: 439

Re: The dwm thread

It's important to remember that tags are not desktops.  The workflow of dwm is to "pull" in the tags you want by pressing 'mod+ctrl+<tag ##>'.  In this example you could set skype to tag 9 and at any time press mod+ctrl+9 to see it.

Offline

#67 2010-03-22 14:22:54

lswest
Member
From: Munich, Germany
Registered: 2008-06-14
Posts: 453
Website

Re: The dwm thread

steve___ wrote:

It's important to remember that tags are not desktops.  The workflow of dwm is to "pull" in the tags you want by pressing 'mod+ctrl+<tag ##>'.  In this example you could set skype to tag 9 and at any time press mod+ctrl+9 to see it.

It's true that I could, but I've never gotten into the habit of doing so.  Also, I have yet to find a rule that applies to all Skype windows.  I can get it to move the main window automatically, but the conversations always seem to spawn on whatever tag is currently active, making a mess of things.  I'll take it into account and also play around with different window properties settings for Skype on a tag.  I'm still curious if it's possible to change the floating layout setup on DWM though.  Thanks for the suggestion!

Last edited by lswest (2010-03-22 14:23:03)


Lswest <- the first letter of my username is a lowercase "L".
"...the Linux philosophy is "laugh in the face of danger". Oops. Wrong one. "Do it yourself". That's it." - Linus Torvalds

Offline

#68 2010-03-22 14:34:14

steve___
Member
Registered: 2008-02-24
Posts: 439

Re: The dwm thread

WM_CLASS(STRING) = \"NAME\", \"CLASS\"" && xprop | grep "WM_WINDOW_ROLE\|WM_CLASS"

This should show the properites of the window.

If you still want the skype conversations to float, then using the 'per tag' patch and setting the tag (eg 9) to float should work.

Offline

#69 2010-03-22 14:58:04

lswest
Member
From: Munich, Germany
Registered: 2008-06-14
Posts: 453
Website

Re: The dwm thread

I had the window info before, but it never seemed to take affect in Awesome.  However, I now run Skype through a bash script and the class value has changed to the same value for each, making it easier to manage.

I'll take your advice and use pertag, thanks for the help smile

Last edited by lswest (2010-03-22 15:16:27)


Lswest <- the first letter of my username is a lowercase "L".
"...the Linux philosophy is "laugh in the face of danger". Oops. Wrong one. "Do it yourself". That's it." - Linus Torvalds

Offline

#70 2010-04-08 08:48:27

bendover
Member
Registered: 2010-04-08
Posts: 1

Re: The dwm thread

Hi guys!

I'm using the current version of dwm with bstack and Xinerama. Is there a way to change the change the view of the current tags on both screens with one shortcut?

At the moment I'd do something like Mod+3, Mod+comma, Mod+3, Mod+comma (with the default config.h). Is there a good way to do this all at once?

Offline

#71 2010-05-08 09:40:04

Aakko
Member
Registered: 2007-10-23
Posts: 63

Re: The dwm thread

I use Roxterm as a terminal in dwm. How do I config dmenu to open console apps in roxterm? For example if I start wicd-curses from dmenu it would open in a new terminal window.

Offline

#72 2010-05-08 11:01:29

eol
Member
Registered: 2009-05-30
Posts: 23

Re: The dwm thread

Hello,

Aakko wrote:

I use Roxterm as a terminal in dwm. How do I config dmenu to open console apps in roxterm? For example if I start wicd-curses from dmenu it would open in a new terminal window.

copy dmenu_run to tdmenu_run and edit it like :

#!/bin/sh
exe=`dmenu_path | dmenu ${1+"$@"}` && urxvtc -e $exe

then add a keybinding in dwm for tdmenu_run

Offline

#73 2010-05-08 13:56:11

thayer
Fellow
From: Vancouver, BC
Registered: 2007-05-20
Posts: 1,560
Website

Re: The dwm thread

eol wrote:

copy dmenu_run to tdmenu_run and edit it like :

#!/bin/sh
exe=`dmenu_path | dmenu ${1+"$@"}` && urxvtc -e $exe

then add a keybinding in dwm for tdmenu_run

The problem with this approach is that you need two different key bindings; one for launching shell apps and another for regular apps (otherwise you're launching everything through a shell process).

As much as I like dmenu, it's lacking in too many ways for my tastes.  For that reason I use gmrun.  It's super lightweight as well, and a good deal smarter when it comes to stuff like this.  It also supports autocomplete and filetype-based execution.  You can find my gmrunrc here:

http://bit.ly/hscpeC

I still have dmenu installed, but I have it bound to mod4+shift+p instead and gmrun bound to mod4+p.

Last edited by thayer (2010-12-05 22:40:04)


thayer williams ~ cinderwick.ca

Offline

#74 2010-05-11 17:32:34

rb
Member
From: Argentina
Registered: 2010-05-07
Posts: 143

Re: The dwm thread

I (almost) finished the initial configuration of my dwm laptop. As a former user of Gnome I must confess that I'm in love! Despite being completely unfamiliar with C, I managed to configure almost everything that I wanted. However, I still have some doubts / questions.

Is there a clean way to add a trayer or notify are that? I really would like to have my Pidgin icon, wireless status and so in a tray area. I googleed a bit, but only found messy solutions.

I want some information in the status bar, just like this beautiful shot from a user's netbook. In the meantime, I'll manage with the standard stuff.

However I can't seem to get the batter script work. I went to the wiki, read about the configuration of the status bar and added both scripts (first one, then another, finally both) to my .xinitrc BUT only the date one works. I installed acpi, and lsmod show ac, battery, etc up. When I do modprobe battery (ie) and then dmesg | grep battery I got this:

ACPI Exception: AE_TIME, Evaluating _BIF (20091214/battery-363)
ACPI: Battery Slot [BATO] (battery present)

Is this good? I am doing something wrong?

One last thing, after I installed Urxvt and added transparency to it, my dwm bar failed to start with the wm. After I open any app (a terminal, opera, whatever) appears. Is not a big deal, but I feel isn't working as intended tongue

Thanks for reading!


Sorry for my English. Feel free to point out my errors.

Offline

#75 2010-05-11 18:49:03

jasonwryan
Forum & Wiki Admin
From: .nz
Registered: 2009-05-09
Posts: 18,313
Website

Re: The dwm thread

You need to have a single status bar script that prints both time/date and your battery state. Combine the two from the wiki page and you should be fine...

What does acpi -V show?

The bar behaviour you describe is odd: you haven't mapped anything else to Mod-b in your config?


Arch + dwm   •   Mercurial repos  •   Github

Registered Linux User #482438

Online

Board footer

Powered by FluxBB