Howto: dwm configuration and installation

Share your own howto's etc. Not for support questions!

Re: Howto: dwm configuration and installation

Postby m4rtin » 2014-03-07 01:20

In configuration section below, windows of "Gimp" and "Firefox" applications have some pre-configured behavior:

Code: Select all
/* tagging */
static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };

static const Rule rules[] = {
        /* class      instance    title       tags mask     isfloating   monitor */
        { "Gimp",     NULL,       NULL,       0,            True,        -1 },
        { "Firefox",  NULL,       NULL,       1 << 8,       False,       -1 },
};


Where are the classes "Gimp" and "Firefox" defined? Or does this work in a way that each executable named Gimp or Firefox will match?
In addition, what are the characteristics of programs which do not work (well) with tiling window managers? Are there many of such programs and is it a frequent problem when using tiling window manager on a daily basis?
User avatar
m4rtin
 
Posts: 28
Joined: 2009-01-15 07:12

Re: Howto: dwm configuration and installation

Postby Loomx » 2014-03-12 02:41

Where are the classes "Gimp" and "Firefox" defined?

From http://dwm.suckless.org/faq
Q: How do I find out the values of the rules[] array in config.h?

A: The class, instance and title properties of an X11 window can be
found out by issuing xprop(1). The corresponding values are:

WM_CLASS(STRING) = instance, class
WM_NAME(STRING) = title

Some programs allow you to set the title when you launch them, e.g. "xterm -title Mail -e Mutt" so you could specify special treatment for windows based on that.

In addition, what are the characteristics of programs which do not work (well) with tiling window managers?

Well, Gimp used to be a common example (hence the rule in config.h), but it now has a "single-window" mode which works fine in a tiling window manager.
Most programs work well - I haven't come across any other problem ones that I can think of anyway.
The only rule I use is:
Code: Select all
 static const Rule rules[] = {
    /* class      instance    title       tags mask     isfloating   monitor */
    {  NULL,      "xv",       NULL,       0,            True,        -1 },
};

as otherwise xv distorts the image to fit its window, which is not usually the effect I want... :shock:
Loomx
 
Posts: 55
Joined: 2010-09-28 01:11

Re: Howto: dwm configuration and installation

Postby princenguyen » 2014-06-15 06:39

I maked 4 tags: Main, Internet, Multimedia, Document. I want xterm to show only in the first tag. So xterm's tagmask is "1 << 0". But xterm windows would show up in every tags i'm working on, like dmenu.
Is there any ways to force xterm just show in a specific tag? And how to config dwm automatically focusing on a new opening window in an other tag?
princenguyen
 
Posts: 7
Joined: 2014-06-14 04:23

Re: Howto: dwm configuration and installation

Postby Loomx » 2014-06-16 03:46

(I see that your question has been answered in the other thread, but I'll add it here for reference: )

See my post above regarding `xprop' to get the properties of an X11 window.
Double check that the string you get from running `xprop' is correct.

e.g. Running `xprop' then clicking an xterm gives:
Code: Select all
...
WM_CLASS(STRING) = "xterm", "XTerm"
...

so the instance is `xterm' and the class is `XTerm' (note the capitalisation)
Loomx
 
Posts: 55
Joined: 2010-09-28 01:11

Re: Howto: dwm configuration and installation

Postby princenguyen » 2014-06-20 18:33

Thanks :D, it works. One more question, I want to change font to Arial. I tried to edit "terminus" from "arial" in config.h but not working:
static const char font[] = "-*-arial-medium-r-*-*-16-*-*-*-*-*-*-*";
When I was patching xft, there is errors:
Code: Select all
hoang@BLACK110:~/build/dwm-6.0$ sudo make clean install
cleaning
dwm build options:
CFLAGS   = -std=c99 -pedantic -Wall -Os -I. -I/usr/include -I/usr/X11R6/include -DVERSION="6.0" -DXINERAMA
LDFLAGS  = -s -L/usr/lib -lc -L/usr/X11R6/lib -lX11 -L/usr/X11R6/lib -lXinerama
CC       = cc
creating config.h from config.def.h
CC dwm.c
dwm.c:42:25: fatal error: X11/Xft/Xft.h: No such file or directory
compilation terminated.
make: *** [dwm.o] Error 1
princenguyen
 
Posts: 7
Joined: 2014-06-14 04:23

Re: Howto: dwm configuration and installation

Postby Loomx » 2014-06-21 21:54

Try installing the package `libxft-dev'

See this thread for more details: http://crunchbang.org/forums/viewtopic.php?id=22523, particularly the posts by Unia.

OR - perhaps try using the pango patch which has a few more features instead of the xft patch
(from what I've read - I've never used either of them)
http://dwm.suckless.org/patches/pango
Loomx
 
Posts: 55
Joined: 2010-09-28 01:11

Re: Howto: dwm configuration and installation

Postby princenguyen » 2014-06-22 20:18

Thanks, I have installed pango (need some libpango dependencies) and I can apply ttf for the topbar. But the tabbar i had patched before is blank without title name. Pango and tab seem to be conflict patches.
princenguyen
 
Posts: 7
Joined: 2014-06-14 04:23

Re: Howto: dwm configuration and installation

Postby Loomx » 2014-06-24 09:21

You could always try `tabbed'
http://tools.suckless.org/tabbed/
rather than patching dwm if the patches are giving you problems
Loomx
 
Posts: 55
Joined: 2010-09-28 01:11

Re: Howto: dwm configuration and installation

Postby DebbyIan » 2014-10-20 11:20

Can we post any other issues/problems/requests here? Or is this thread just for initial dwm configuration?

There is no Minimize feature because the concept of Workspaces is altered. So "tabs" are used instead. I was wondering if there was a way to hide windows instead? The reason is to expose the background.



Is it just me or does Debian rock??

Image
DebbyIan
 
Posts: 114
Joined: 2013-05-09 12:12

Re: Howto: dwm configuration and installation

Postby Loomx » 2014-10-20 22:58

DebbyIan wrote:Can we post any other issues/problems/requests here? Or is this thread just for initial dwm configuration?

Why not... :D

There is no Minimize feature because the concept of Workspaces is altered. So "tabs" are used instead. I was wondering if there was a way to hide windows instead? The reason is to expose the background.

Well, that kind of defeats the purpose of a tiling wm, doesn't it?
You can just view a tag that has no windows attached to it; then all you will see is the root window (i.e. the background)
Loomx
 
Posts: 55
Joined: 2010-09-28 01:11

Re: Howto: dwm configuration and installation

Postby DebbyIan » 2014-10-20 23:24

Just a blank tag. I suppose it can be done but it's not very elegant.
I was hoping to expose the root window on any given tag and not have to specifically go to a specific tag.
DebbyIan
 
Posts: 114
Joined: 2013-05-09 12:12

Re: Howto: dwm configuration and installation

Postby Loomx » 2014-10-20 23:43

Whatever tag{s} you choose to view, if there are no windows attached to that tag{s} then you see the root window.
You don't have to go to a specific tag.

Remember: tags != workspaces - they are a bit more, well, 'dynamic' than that.
Loomx
 
Posts: 55
Joined: 2010-09-28 01:11

Re: Howto: dwm configuration and installation

Postby DebbyIan » 2014-10-20 23:49

Hope I'm not trolling. What the heck..
All my tags have windows attached. Dynamism could be bit more dynamic.
Well I suppose I should set up tag N + 1 and then use that.
DebbyIan
 
Posts: 114
Joined: 2013-05-09 12:12

Re: Howto: dwm configuration and installation

Postby Loomx » 2014-10-21 00:01

DebbyIan wrote:All my tags have windows attached. Dynamism could be bit more dynamic.

:lol:

What is it exactly you want to do, anyway? Do you just want to be able to temporarily hide all your windows away?
Loomx
 
Posts: 55
Joined: 2010-09-28 01:11

Re: Howto: dwm configuration and installation

Postby DebbyIan » 2014-10-21 00:34

I've simply run out of tags.
I suppose I could have a tag called "0" but oh no, Modkey + 0 is assigned to composite of all tags.
I've simply run out of the 9 tags. If you think about it, if you have one or two distinct apps per tag then 9 tags isn't nearly enough.
:)
DebbyIan
 
Posts: 114
Joined: 2013-05-09 12:12

PreviousNext

Return to Docs, Howtos, Tips & Tricks

Who is online

Users browsing this forum: No registered users and 3 guests

fashionable