You are not logged in.

#126 2010-02-15 18:11:57

Meyithi
Member
From: Wirral, UK
Registered: 2009-06-21
Posts: 550
Website

Re: Show off your Dwm configuration!

feb10_thumb.jpg

feb10_dirty_thumb.jpg

Just started with DWM yesterday and is my first tiler, whittling down GTK apps to CLI and getting used to the keyboard.

Config @ http://www.meyithi.com/dots


The mind roams more freely in empty rooms.
dwm - colours - ncmpcpp - system
irc://irc.freenode.net:meyithi

Offline

#127 2010-02-27 05:37:02

sicpsnake
Member
From: Austin, TX.
Registered: 2010-02-25
Posts: 128
Website

Re: Show off your Dwm configuration!

201002262327591280x1024.th.png

config.h

/* appearance */
static const char font[] = "-*-*-*-*-*-*-10-*-*-*-*-*-*-*";
static const char normbordercolor[] = "#1B1B1B";
static const char normbgcolor[]     = "#1D1D1D";
static const char normfgcolor[]     = "#E6E6E6";
static const char selbordercolor[]  = "#191919";
static const char selbgcolor[]      = "#292929";
static const char selfgcolor[]      = "#DEDEDE";
static const unsigned int borderpx  = 1;        /* border pixel of windows */
static const unsigned int snap      = 32;        /* snap pixel */
static const Bool showbar           = True;        /* False means no bar */
static const Bool topbar            = True;        /* False means bottom bar */

/* tagging */
static const char *tags[] = { "1:web", "2:term", "3:dev", "4:misc" };

static const Rule rules[] = {
/* class      instance    title       tags mask     isfloating   monitor */
    { NULL,        NULL,        NULL,        0,        False,        0 },
    { NULL,        NULL,        NULL,        0,        False,        0 },
};

/* layout(s) */
static const float mfact    = 0.55;

#include "bstack.c"

static const Bool resizehints    = False;

static const Layout layouts[] = {
    { "[=]",    tile },
    { "[_]",    bstack },
    { "[~]",    NULL },
    { "[M]",    monocle },
};

#define MODKEY Mod4Mask
#define TAGKEYS(KEY,TAG) \
    { MODKEY,                       KEY,      view,           {.ui = 1 << TAG} }, \
    { MODKEY|ControlMask,           KEY,      toggleview,     {.ui = 1 << TAG} }, \
    { MODKEY|ShiftMask,             KEY,      tag,            {.ui = 1 << TAG} }, \
    { MODKEY|ControlMask|ShiftMask, KEY,      toggletag,      {.ui = 1 << TAG} },

#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }

/* commands */
static const char *dmenucmd[]        = { "dmenu_run", "-fn", font, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor, NULL };
static const char *termcmd[]        = { "urxvt", NULL };
static const char *ffcmd[]            = { "firefox", NULL };
static const char *mutecmd[]        = { "amixer", "-q", "sset", "Master", "toggle", NULL };
static const char *volupcmd[]        = { "amixer", "-q", "sset", "Master", "5-", "unmute", NULL };
static const char *voldowncmd[]     = { "amixer", "-q", "sset", "Master", "5+", "unmute", NULL }; 
static const char *playcmd[]        = { "mpc", "play", NULL };
static const char *pausecmd[]       = { "mpc", "pause", NULL };  
static const char *prevcmd[]        = { "mpc", "prev", NULL };
static const char *nextcmd[]        = { "mpc", "next", NULL };  

/* Key binds */
static Key keys[] = {
    { MODKEY,            XK_F10,        spawn,            {.v = volupcmd } },
    { MODKEY,           XK_F11,     spawn,          {.v = voldowncmd } },
    { MODKEY,           XK_F12,     spawn,          {.v = mutecmd } },
    { MODKEY,            XK_m,      spawn,          {.v = dmenucmd } },
    { MODKEY,            XK_p,      spawn,          {.v = ffcmd } },
    { MODKEY,            XK_Return, spawn,          {.v = termcmd } },
    { MODKEY,            XK_b,      togglebar,      {0} },
    { MODKEY,            XK_j,      focusstack,     {.i = +1 } },
    { MODKEY,            XK_k,      focusstack,     {.i = -1 } },
    { MODKEY,            XK_h,      setmfact,       {.f = -0.05} },
    { MODKEY,            XK_l,      setmfact,       {.f = +0.05} },
    { MODKEY,            XK_Return, zoom,           {0} },
    { MODKEY,                       XK_Tab,    view,           {0} },
    { MODKEY|ShiftMask,             XK_c,      killclient,     {0} },
    { MODKEY,                       XK_t,      setlayout,      {.v = &layouts[0]} },
    { MODKEY,                       XK_f,      setlayout,      {.v = &layouts[1]} },
    { MODKEY,                       XK_q,      setlayout,      {.v = &layouts[2]} },
    { MODKEY,                       XK_space,  setlayout,      {0} },
    { MODKEY|ShiftMask,             XK_space,  togglefloating, {0} },
    { MODKEY,                       XK_0,      view,           {.ui = ~0 } },
    { MODKEY|ShiftMask,             XK_0,      tag,            {.ui = ~0 } },
    { MODKEY,                       XK_comma,  focusmon,       {.i = -1 } },
    { MODKEY,                       XK_period, focusmon,       {.i = +1 } },
    { MODKEY|ShiftMask,             XK_comma,  tagmon,         {.i = -1 } },
    { MODKEY|ShiftMask,             XK_period, tagmon,         {.i = +1 } },
    TAGKEYS(                        XK_1,                      0)
    TAGKEYS(                        XK_2,                      1)
    TAGKEYS(                        XK_3,                      2)
    TAGKEYS(                        XK_4,                      3)
    /*TAGKEYS(                        XK_5,                      4)
    TAGKEYS(                        XK_6,                      5)
    TAGKEYS(                        XK_7,                      6)
    TAGKEYS(                        XK_8,                      7)
    TAGKEYS(                        XK_9,                      8)*/
    { MODKEY|ShiftMask,             XK_q,      quit,           {0} },
    { MODKEY,                       XK_Down,   spawn,     {.v = pausecmd } },
    { MODKEY,                       XK_Up,     spawn,     {.v = playcmd } },
    { MODKEY,                       XK_Right,  spawn,     {.v = nextcmd } },
    { MODKEY,                       XK_Left,   spawn,     {.v = prevcmd } },
};

static Button buttons[] = {
    /* click                event mask      button          function        argument */
    { ClkLtSymbol,          0,              Button1,        setlayout,      {0} },
    { ClkLtSymbol,          0,              Button3,        setlayout,      {.v = &layouts[2]} },
    { ClkWinTitle,          0,              Button2,        zoom,           {0} },
    { ClkStatusText,        0,              Button2,        spawn,          {.v = termcmd } },
    { ClkClientWin,         MODKEY,         Button1,        movemouse,      {0} },
    { ClkClientWin,         MODKEY,         Button2,        togglefloating, {0} },
    { ClkClientWin,         MODKEY,         Button3,        resizemouse,    {0} },
    { ClkTagBar,            0,              Button1,        view,           {0} },
    { ClkTagBar,            0,              Button3,        toggleview,     {0} },
    { ClkTagBar,            MODKEY,         Button1,        tag,            {0} },
    { ClkTagBar,            MODKEY,         Button3,        toggletag,      {0} },
};

Offline

#128 2010-02-28 02:07:32

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

Re: Show off your Dwm configuration!

Meyithi wrote:

http://www.meyithi.com/graphics/feb10_thumb.jpg

http://www.meyithi.com/graphics/feb10_dirty_thumb.jpg

Just started with DWM yesterday and is my first tiler, whittling down GTK apps to CLI and getting used to the keyboard.

Config @ http://www.meyithi.com/dots

Can you please tell me how you got transparency enabled on dwm?

From previous experience on other WM, i figure it must be xcompmgr + transset. But I was wondering if you somehow have it on default where every single window you open will have transparency already.

Offline

#129 2010-02-28 02:11:23

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

Re: Show off your Dwm configuration!

I can't speak for Meyithi, but I know of this: http://dwm.suckless.org/patches/transparency

Offline

#130 2010-02-28 02:21:15

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

Re: Show off your Dwm configuration!

JohannesSM64 wrote:

I can't speak for Meyithi, but I know of this: http://dwm.suckless.org/patches/transparency

Ah, thanks for that. But now the noob in me needs to ask...how do i install patches in Dwm? lol

Offline

#131 2010-02-28 02:51:09

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

Re: Show off your Dwm configuration!

Chance wrote:

Ah, thanks for that. But now the noob in me needs to ask...how do i install patches in Dwm? lol

It's explained on the dwm patches page: http://dwm.suckless.org/patches/

#edit On transparency, Meyithi's setup may be semi-transparent Urxvt - the patch is for transparency on non-focussed clients (which is a different thing)...

Last edited by jasonwryan (2010-02-28 03:14:43)


Arch + dwm   •   Mercurial repos  •   Github

Registered Linux User #482438

Offline

#132 2010-03-02 20:07:34

simongmzlj
Member
From: Canada
Registered: 2008-11-06
Posts: 135

Re: Show off your Dwm configuration!

Chance wrote:

Can you please tell me how you got transparency enabled on dwm?

From previous experience on other WM, i figure it must be xcompmgr + transset. But I was wondering if you somehow have it on default where every single window you open will have transparency already.

That effect is done entirely by the terminal. The transparency patch makes non focused windows slightly transparent, its much like, if I recall correctly, what the trail focus trail plugin in compiz does. It needs to be paired with xcompmgr.

Offline

#133 2010-03-02 20:11:14

simongmzlj
Member
From: Canada
Registered: 2008-11-06
Posts: 135

Re: Show off your Dwm configuration!

Do you mind sharing you irssi theme? It looks awesome

Offline

#134 2010-03-02 20:27:17

Meyithi
Member
From: Wirral, UK
Registered: 2009-06-21
Posts: 550
Website

Re: Show off your Dwm configuration!

Chance wrote:

Can you please tell me how you got transparency enabled on dwm?

Terminal is Sakura which has pseudo-transparency built in, half of the thread have just turned their noses up but DWM is just as manageable with a mouse as any other WM with the added bonus of never having to drag windows about.


The mind roams more freely in empty rooms.
dwm - colours - ncmpcpp - system
irc://irc.freenode.net:meyithi

Offline

#135 2010-03-02 20:54:23

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

Re: Show off your Dwm configuration!

simongmzlj wrote:

Do you mind sharing you irssi theme? It looks awesome

It's weechat. I haven't themed it besides changing weechat.bar.status.color_bg.

Offline

#136 2010-03-04 05:54:44

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

Re: Show off your Dwm configuration!

Meyithi wrote:
Chance wrote:

Can you please tell me how you got transparency enabled on dwm?

Terminal is Sakura which has pseudo-transparency built in, half of the thread have just turned their noses up but DWM is just as manageable with a mouse as any other WM with the added bonus of never having to drag windows about.

I just checked out a thread on 'Best Transparent Terminal' and someone mentioned that Sakura needs xcompmgr (obvious), but it also needs transset. Is that the set up you use? I'm looking more for a default system setup where i don't have to set the transparency setting everytime i boot up the machine.

Offline

#137 2010-03-05 06:23:11

simongmzlj
Member
From: Canada
Registered: 2008-11-06
Posts: 135

Re: Show off your Dwm configuration!

Chance wrote:

I just checked out a thread on 'Best Transparent Terminal' and someone mentioned that Sakura needs xcompmgr (obvious), but it also needs transset. Is that the set up you use? I'm looking more for a default system setup where i don't have to set the transparency setting everytime i boot up the machine.

Most terminals support both pseudo and real transparency. What you're seeing is most likely pseudo transparency. Pseudo transparency is not real transparency, it simulates the appearance of transparency by grabbing the root window's pixmap (in effect, the wallpaper). Effective, especially in a tiling window manager, but not real transparency. Real transparency requires a composition manager to be running. Most people running dwm are probably using rxvt. It supports both types of transparency.

Offline

#138 2010-03-05 19:48:46

simongmzlj
Member
From: Canada
Registered: 2008-11-06
Posts: 135

Re: Show off your Dwm configuration!

I thought I'd share a modification of a dwm patch I did. I recently became a fan of the nmaster patch after playing with it. However, I found the fact that tries to fill the master area first annoying. This version tries to balance window placement until nmaster level has been hit, for example:

no of windows | *master | other
1               1         0
2               1         1
3               1         2
4               2         2
5               2         3
6               3         3
*respects nmaster set in config.h

Here's the patch: smrt-nmaster.c

enum {MaxMon = 8};
static int nmasters[MaxMon];
static int initnm = 0;

static void
initnmaster(void) {
    int i;

    if(initnm)
        return;
    for(i = 0; i < MaxMon; i++)
        nmasters[i] = nmaster;
    initnm = 1;
}

static void
incnmaster(const Arg *arg) {
    if(!arg || !selmon->lt[selmon->sellt]->arrange || selmon->num >= MaxMon)
        return;
    nmasters[selmon->num] += arg->i;
    if(nmasters[selmon->num] < 0)
        nmasters[selmon->num] = 0;
    arrange(selmon);
}

static void
setnmaster(const Arg *arg) {
    if(!arg || !selmon->lt[selmon->sellt]->arrange || selmon->num >= MaxMon)
        return;
    nmasters[selmon->num] = arg->i > 0 ? arg->i : 0;
    arrange(selmon);
}

static void
ntile(Monitor *m) {
    int x, y, h, w, mw, nmax, nm;
    unsigned int i, n;
    Client *c;

    initnmaster();
    /* override layout symbol */
    snprintf(m->ltsymbol, sizeof m->ltsymbol, "=%d]", nmasters[m->num]);
    for(n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++);
    c = nexttiled(m->clients);
    nmax = m->num < MaxMon ? nmasters[m->num] : nmaster;
    nm = nmax == 1 ? 1 : MIN(n / 2, nmax);
    if(nm > n)
        nm = n;
    /* master */
    if(nm > 0) {
        mw = m->mfact * m->ww;
        h = m->wh / nm;
        if(h < bh)
            h = m->wh;
        y = m->wy;
        for(i = 0; i < nm; i++, c = nexttiled(c->next)) {
            resize(c, m->wx, y, (n == nm ? m->ww : mw) - 2 * c->bw,
                   ((i + 1 == nm) ? m->wy + m->wh - y : h) - 2 * c->bw, False);
            if(h != m->wh)
                y = c->y + HEIGHT(c);
        }
        n -= nm;
    } else
        mw = 0;
    if(n == 0)
        return;
    /* tile stack */
    x = m->wx + mw;
    y = m->wy;
    w = m->ww - mw;
    h = m->wh / n;
    if(h < bh)
        h = m->wh;
    for(i = 0; c; c = nexttiled(c->next), i++) {
        resize(c, x, y, w - 2 * c->bw,
               ((i + 1 == n) ? m->wy + m->wh - y : h) - 2 * c->bw, False);
        if(h != m->wh)
            y = c->y + HEIGHT(c);
    }
}

static void
nbstack(Monitor *m) {
    int x, y, h, w, mh, nmax, nm;
    unsigned int i, n;
    Client *c;

    initnmaster();
    /* override layout symbol */
    snprintf(m->ltsymbol, sizeof m->ltsymbol, "T%dT", nmasters[m->num]);
    for(n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++);
    c = nexttiled(m->clients);
    nmax = m->num < MaxMon ? nmasters[m->num] : nmaster;
    nm = nmax == 1 ? 1 : MIN(n / 2, nmax);
    if(nm > n)
        nm = n;
    /* master */
    if(nm > 0) {
        mh = m->mfact * m->wh;
        w = m->ww / nm;
        if(w < bh)
            w = m->ww;
        x = m->wx;
        for(i = 0; i < nm; i++, c = nexttiled(c->next)) {
            resize(c, x, m->wy, ((i + 1 == nm) ? m->wx + m->ww - x : w) - 2 * c->bw,
                   (n == nm ? m->wh : mh) - 2 * c->bw, False);
            if(w != m->ww)
                x = c->x + WIDTH(c);
        }
        n -= nm;
    } else
        mh = 0;
    if(n == 0)
        return;
    /* tile stack */
    x = m->wx;
    y = m->wy + mh;
    w = m->ww / n;
    h = m->wh - mh;
    if(w < bh)
        w = m->ww;
    for(i = 0; c; c = nexttiled(c->next), i++) {
        resize(c, x, y, ((i + 1 == n) ? m->wx + m->ww - x : w) - 2 * c->bw,
               h - 2 * c->bw, False);
        if(w != m->ww)
            x = c->x + WIDTH(c);
    }
}

Offline

#139 2010-03-13 22:52:40

gtklocker
Member
Registered: 2009-09-01
Posts: 460

Re: Show off your Dwm configuration!

Can someone help me with dwm?

Every config.h I use, just can't compile...

$ makepkg -s
==> Making package: dwm 5.7.2-2 x86_64 (Sun Mar 14 00:48:42 EET 2010)
==> Checking Runtime Dependencies...
==> Checking Buildtime Dependencies...
==> Retrieving Sources...
  -> Found dwm-5.7.2.tar.gz in build dir
  -> Found config.h in build dir
  -> Found dwm.desktop in build dir
==> Validating source files with md5sums...
    dwm-5.7.2.tar.gz ... Passed
    config.h ... Passed
    dwm.desktop ... Passed
==> Extracting Sources...
  -> Extracting dwm-5.7.2.tar.gz with bsdtar
==> Removing existing pkg/ directory...
==> Entering fakeroot environment...
==> Starting build()...
dwm build options:
CC dwm.c
CFLAGS   = -std=c99 -pedantic -Wall -Os -I. -I/usr/include -I/usr/include/X11 -DVERSION="5.7.2" -DXINERAMA
LDFLAGS  = -s -L/usr/lib -lc -L/usr/lib/X11 -lX11 -L/usr/lib/X11 -lXinerama
CC       = cc
In file included from dwm.c:274:
config.h:32:20: error: bstack.c: No such file or directory
In file included from dwm.c:274:
config.h:38: error: 'bstack' undeclared here (not in a function)
config.h:46: error: expected identifier or '(' before '<<' token
config.h:46: error: expected identifier or '(' before '}' token
config.h:46: error: expected identifier or '(' before ',' token
config.h:48: error: expected identifier or '(' before ',' token
config.h:50: error: expected identifier or '(' before ',' token
config.h:52: error: expected identifier or '(' before ',' token
config.h:113: error: expected '}' before '{' token
config.h:158:10: warning: character constant too long for its type
config.h:159:10: warning: character constant too long for its type
config.h:160:10: warning: character constant too long for its type
make: *** [dwm.o] Error 1
==> ERROR: Build Failed.
    Aborting...

With this config file. No matter what's the config.h, package will not build... sad

Offline

#140 2010-03-13 22:58:26

simongmzlj
Member
From: Canada
Registered: 2008-11-06
Posts: 135

Re: Show off your Dwm configuration!

@gtklocker try redownloading bstack.c, that might be the problem.

Offline

#141 2010-03-13 22:59:37

gtklocker
Member
Registered: 2009-09-01
Posts: 460

Re: Show off your Dwm configuration!

It isn't anywhere, not even in the abs folder :S

Offline

#142 2010-03-13 23:02:36

simongmzlj
Member
From: Canada
Registered: 2008-11-06
Posts: 135

Re: Show off your Dwm configuration!

gtklocker wrote:

It isn't anywhere, not even in the abs folder :S

Thats because its a modification to vanilla dwm. You can find bstack here: http://dwm.suckless.org/patches/bottom_stack. You then need to add the file to your PKGBUILD and rebuild. Just ask if you need more help.

Offline

#143 2010-03-13 23:32:24

gtklocker
Member
Registered: 2009-09-01
Posts: 460

Re: Show off your Dwm configuration!

Oh... so many patches needed, should someone consider making a package with all patches and upload it to AUR ?

Offline

#144 2010-03-14 08:20:03

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

Re: Show off your Dwm configuration!

Actually, dwm doesn't need any patches to work - you may choose to add extra layouts etc through patching, but the vanilla version runs just fine. Why don't you start with that and then work out what additional functionality you need?


Arch + dwm   •   Mercurial repos  •   Github

Registered Linux User #482438

Offline

#145 2010-03-14 08:48:56

gtklocker
Member
Registered: 2009-09-01
Posts: 460

Re: Show off your Dwm configuration!

Well, I need your help in a big grade big_smile

Offline

#146 2010-03-14 08:55:01

gtklocker
Member
Registered: 2009-09-01
Posts: 460

Re: Show off your Dwm configuration!

Hm, I tried the vanilla package but I can't start any program... sad

Offline

#147 2010-03-14 08:59:04

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

Re: Show off your Dwm configuration!

As this is part of the Artwork & Screenshots forum, I suggest that you start a new thread in a more appropriate forum and tell us what you mean by "can't start any program."

You should also read the tutorial http://dwm.suckless.org/tutorial


Arch + dwm   •   Mercurial repos  •   Github

Registered Linux User #482438

Offline

#148 2010-03-14 09:02:42

simongmzlj
Member
From: Canada
Registered: 2008-11-06
Posts: 135

Re: Show off your Dwm configuration!

gtklocker wrote:

Hm, I tried the vanilla package but I can't start any program... sad

Install dmenu, press Alt+p. And yes, this is getting offtopic

Last edited by simongmzlj (2010-03-14 09:03:07)

Offline

#149 2010-03-14 09:08:58

gtklocker
Member
Registered: 2009-09-01
Posts: 460

Re: Show off your Dwm configuration!

Offline

#150 2010-04-19 07:49:13

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: Show off your Dwm configuration!

Hello guys,

does umlauts in statusbar and dmenu work on your system?

Is there any special configuration needed?

It can't be a problem of the gohufont I use because it completely supports unicode characters.

Any tips?

Offline

Board footer

Powered by FluxBB