[SOLVED] DWM+pertag+bstack error

hi
i'm trying to compile dwm with pertag diff patch and bstack.c
i get an error while compiling it:
CC dwm.c
In file included from config.h:42,
from dwm.c:254:
bstack.c: En la función 'bstack':
bstack.c:7: error: puntero deferenciado a tipo de dato incompletoº
bstack.c:11:error:puntero..
make: *** [dwm.o] Error 1
==> ERROR: Falló la compilación.ª
Abortando...
º means: dereference pointer to incomplete data type
ª means: Compilation failed.
it sucks 'cos i want to read pdf on top of my 10" screen and write documents at bottom, without the problem of change to another desktop and have to move to another layout, i.e., floating for gimp
another thing: for write this post i must to write the code manually, 'cos a don't know how to copy from urxvt and paste it to firefox.. yep, that's a newbie question
Edit: solved here
Last edited by kismet010 (2010-02-08 05:51:09)

Looks like this workaround isn't enough to get it to compile on the latest hg clone.
dwm build options:
CFLAGS = -std=c99 -pedantic -Wall -Os -I. -I/usr/include -I/usr/include/X11 -DVERSION="5.8" -DXINERAMA
LDFLAGS = -s -L/usr/lib -lc -L/usr/lib/X11 -lX11 -L/usr/lib/X11 -lXinerama
CC = cc
CC dwm.c
dwm.c: In function 'gaplessgrid':
dwm.c:262: error: dereferencing pointer to incomplete type
dwm.c:276: error: dereferencing pointer to incomplete type
dwm.c:276: error: dereferencing pointer to incomplete type
dwm.c:279: error: dereferencing pointer to incomplete type
dwm.c:282: error: dereferencing pointer to incomplete type
dwm.c:282: error: dereferencing pointer to incomplete type
dwm.c:283: error: dereferencing pointer to incomplete type
dwm.c:284: error: dereferencing pointer to incomplete type
make: *** [dwm.o] Error 1
Line 262 for me is:
for(n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next))
I've tried many things and maybe i'm missing something very simple here.

Similar Messages

  • [SOLVED] dwm pertag patch no working properly

    Hello everybody! I recently had to redo my system.
    Before this change I was using the DWM 6.0 with patches NMaster and pertag.
    link to the source code used - https://github.com/abara/config/tree/master/dwm-pertag
    But now, after having reinstalled the base system, I realized that the same code that I used before is no longer behaving as it should.
    He is working as if there is no patch applied in dwm.c
    I wonder what would be the possible reasons.
    P.S. will not use sprinkles fork
    Last edited by abarahc (2013-07-11 23:14:07)

    ANOKNUSA wrote:NMaster patch is now part of the base code, so applying a patch for it is superfluous.
    Yeah, that's what I meant ;P http://dwm.suckless.org/patches/nmaster
    I'm using dwm with pertag patch and things are working as expected.

  • [SOLVED]Dwm.exe - Application error

    Everytime i start my computer to log in Dwm,exe - application error, before that this other message showed up (dll something) But i got rid of that manually (as in looked for it and delted it) now i'm getting this pop up error, What can i do to get rid of this? I've already tired Maleware software...HELP 

    Satellite L505D-S5903
    You don't make it easy. I don't see that anywhere. Maybe one of these?
    Satellite L505D-S5963
    Satellite L505D-S5983
    I'll assume you have either Windows Vista or Windows 7.
    It's easy to prevent the message during Windows startup. But we're dealing with a system file. There may be other problems. Best to run a file check (sfc /scannow at an elevated command prompt) first.
       Use the System File Checker tool to troubleshoot missing or corrupted system files on Windows Vista ...
    -Jerry

  • [SOLVED] DWM patch error

    Hi. I want to apply the Bottom Stack patch to my dwm. I did for 5.6 but i don't know how
    This is my PKGBUILD
    # $Id: PKGBUILD 3133 2009-09-28 09:01:18Z spupykin $
    # Maintainer: Sergej Pupykin <[email protected]>
    # Contributor: Dag Odenhall <[email protected]>
    # Contributor: Grigorios Bouzakis <[email protected]>
    pkgname=dwm
    pkgver=5.7.2
    pkgrel=1
    pkgdesc="A dynamic window manager for X"
    url="http://dwm.suckless.org"
    arch=('i686' 'x86_64')
    license=('MIT')
    options=(zipman)
    depends=('libx11')
    install=dwm.install
    source=(http://code.suckless.org/dl/dwm/dwm-$pkgver.tar.gz \
    config.h bstack.c)
    md5sums=()
    build() {
    cd $srcdir/$pkgname-$pkgver
    cp $srcdir/config.h config.h
    patch -p0 -i /home/kismet/.dwm/patch/bstack.c
    make X11INC=/usr/include/X11 X11LIB=/usr/lib/X11 || return 1
    make PREFIX=/usr DESTDIR=$pkgdir install || return 1
    install -m644 -D LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE && \
    install -m644 -D README $pkgdir/usr/share/doc/$pkgname/README
    I don't how exactly put the patch.. this is the error i get
    ~/.dwm makepkg -efi
    ==> Creando el paquete: dwm 5.7.2-1 i686 (mié dic 16 18:02:39 CET 2009)
    ==> Comprobando Dependencias en tiempo de Ejecución...
    ==> Comprobando Dependencias en tiempo de Compilación...
    ==> PRECAUCIÓN: Saltando obtención de fuentes -- usando el arbol src/ existente
    ==> PRECAUCIÓN: saltando pruebas de integridad -- usando el arbol src/ existente
    ==> PRECAUCIÓN: Saltando extracción de las fuentes -- usando src/tree existente
    ==> Eliminando directorio pkg/ existente...
    ==> Entrando a un ambiente fakeroot...
    ==> Comenzando build()...
    patch: **** Only garbage was found in the patch input.
    dwm build options:
    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
    CC dwm.c
    En el fichero incluído de dwm.c:274:
    config.h:37:20: error: bstack.c: No existe el fichero o el directorio
    In file included from dwm.c:274:
    config.h:44: error: 'bstack' no se declaró aquí (no en una función)
    make: *** [dwm.o] Error 1
    ==> ERROR: Falló la compilación.
    Abortando...
    ~/.dwm
    What's happen?
    Last edited by kismet010 (2010-02-08 05:51:28)

    well, new error..
    applying another patch:
    patch -i ~/.dwm/src/dwm-5.7.2/bstack.c
    patch -i ~/.dwm/src/dwm-5.7.2/dwm-5.7.2-pertag.diff
    get this:
    ~/.dwm makepkg -efi
    ==> Creando el paquete: dwm 5.7.2-1 i686 (mié dic 16 19:28:13 CET 2009)
    ==> Comprobando Dependencias en tiempo de Ejecución...
    ==> Comprobando Dependencias en tiempo de Compilación...
    ==> PRECAUCIÓN: Saltando obtención de fuentes -- usando el arbol src/ existente
    ==> PRECAUCIÓN: saltando pruebas de integridad -- usando el arbol src/ existente
    ==> PRECAUCIÓN: Saltando extracción de las fuentes -- usando src/tree existente
    ==> Eliminando directorio pkg/ existente...
    ==> Entrando a un ambiente fakeroot...
    ==> Comenzando build()...
    patch: **** Only garbage was found in the patch input.
    patching file dwm.c
    Reversed (or previously applied) patch detected! Assume -R? [n]
    Apply anyway? [n] y
    Hunk #1 FAILED at 120.
    Hunk #2 succeeded at 303 with fuzz 2 (offset 30 lines).
    Hunk #3 FAILED at 1475.
    Hunk #4 FAILED at 1493.
    Hunk #5 FAILED at 1534.
    Hunk #6 FAILED at 1645.
    Hunk #7 FAILED at 1665.
    Hunk #8 FAILED at 1937.
    7 out of 8 hunks FAILED -- saving rejects to file dwm.c.rej
    dwm build options:
    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
    CC dwm.c
    In file included from config.h:37,
    from dwm.c:254:
    bstack.c: En la función 'bstack':
    bstack.c:7: error: puntero deferenciado a tipo de dato incompleto
    bstack.c:11: error: puntero deferenciado a tipo de dato incompleto
    bstack.c:12: error: puntero deferenciado a tipo de dato incompleto
    bstack.c:12: error: puntero deferenciado a tipo de dato incompleto
    bstack.c:13: error: puntero deferenciado a tipo de dato incompleto
    bstack.c:13: error: puntero deferenciado a tipo de dato incompleto
    bstack.c:13: error: puntero deferenciado a tipo de dato incompleto
    bstack.c:13: error: puntero deferenciado a tipo de dato incompleto
    bstack.c:17: error: puntero deferenciado a tipo de dato incompleto
    bstack.c:18: error: puntero deferenciado a tipo de dato incompleto
    bstack.c:18: error: puntero deferenciado a tipo de dato incompleto
    bstack.c:19: error: puntero deferenciado a tipo de dato incompleto
    bstack.c:20: error: puntero deferenciado a tipo de dato incompleto
    bstack.c:20: error: puntero deferenciado a tipo de dato incompleto
    bstack.c:20: error: puntero deferenciado a tipo de dato incompleto
    bstack.c:20: error: puntero deferenciado a tipo de dato incompleto
    bstack.c:22: error: puntero deferenciado a tipo de dato incompleto
    bstack.c:25: error: puntero deferenciado a tipo de dato incompleto
    bstack.c:25: error: puntero deferenciado a tipo de dato incompleto
    bstack.c:26: error: puntero deferenciado a tipo de dato incompleto
    dwm.c: En el nivel principal:
    dwm.c:281: error: redefinición de 'struct Monitor'
    dwm.c:306: error: redefinición de 'struct Monitor'
    make: *** [dwm.o] Error 1
    ==> ERROR: Falló la compilación.
    Abortando...
    ~/.dwm
    Edit: same error (without hunks) althought not patching for bstack.c
    Last edited by kismet010 (2009-12-16 18:36:13)

  • [Solved] DWM and extra key's.

    Hello.
    I'm using DWM and now I have new keyboard with extra kyes Audio Mute, Raise or Lower volume you know
    I tried:
    showkey
    And I have my key in .Xmodmap , I typed:
    /path/to/.Xmodmap
    and all was ok
    And typed xmodmap and my keys was in mod4 section , this is the output of xmodmap:
    xmodmap: up to 4 keys per modifier, (keycodes in parentheses):
    shift Shift_L (0x32), Shift_R (0x3e)
    lock Caps_Lock (0x42)
    control Control_L (0x25), Control_R (0x6d)
    mod1 Alt_L (0x40), Meta_L (0x9c)
    mod2 Num_Lock (0x4d)
    mod3
    mod4 XF86AudioRaiseVolume (0x73), XF86AudioRaiseVolume (0x74), Super_L (0x7f), Hyper_L (0x80)
    mod5 Mode_switch (0x5d), ISO_Level3_Shift (0x71), ISO_Level3_Shift (0x7c)
    Now I care to play with config.h of my DWM.
    Here is part of it:
    { MODKEY, XF86AudioRaiseVolume, spawn, SHCMD("exec mpc volume -5")}
    And when I tried to compile it with that config I got following errors:
    In file included from dwm.c:271:
    config.h:41: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Key'
    config.h:65: warning: ISO C does not allow extra ';' outside of a function
    config.h:69: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Button'
    config.h:80: warning: ISO C does not allow extra ';' outside of a function
    dwm.c: In function 'buttonpress':
    dwm.c:440: error: 'buttons' undeclared (first use in this function)
    dwm.c:440: error: (Each undeclared identifier is reported only once
    dwm.c:440: error: for each function it appears in.)
    dwm.c: In function 'grabbuttons':
    dwm.c:929: error: 'buttons' undeclared (first use in this function)
    dwm.c: In function 'grabkeys':
    dwm.c:952: error: 'keys' undeclared (first use in this function)
    dwm.c: In function 'keypress':
    dwm.c:1020: error: 'keys' undeclared (first use in this function)
    make: *** [dwm.o] Errpr 1
    And building stop's :(
    Is someone use extra keys with DWM.
    Thanks for any help
    Last edited by SpeedVin (2009-08-12 18:33:25)

    SpeedVin wrote:
    Tillotson wrote:/* See LICENSE file for copyright and license details. */
    /* appearance */
    static const char font[] = "-*-fixed-medium-r-*-*-18-*-*-*-*-*-iso8859-*";
    static const char normbordercolor[] = "#C7C7C7";
    static const char normbgcolor[] = "#000000";
    static const char normfgcolor[] = "#888888";
    static const char selbordercolor[] = "#1793D1";
    static const char selbgcolor[] = "#000000";
    static const char selfgcolor[] = "#FFFFFF";
    static unsigned int borderpx = 1; /* border pixel of windows */
    static unsigned int snap = 32; /* snap pixel */
    static Bool showbar = True; /* False means no bar */
    static Bool topbar = True; /* False means bottom bar */
    /* tagging */
    static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
    static Rule rules[] = {
    /* class instance title tags mask isfloating */
    { "Thunar", NULL, NULL, 0, True },
    { "VirtualBox", NULL, NULL, 0, True },
    { "MPlayer", NULL, NULL, 0, True },
    { "Vlc", NULL, NULL, 0, True },
    { "XCalc", NULL, NULL, 0, True },
    /* layout(s) */
    static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */
    static const Bool resizehints = True; /* False means respect size hints in tiled resizals */
    static const Layout layouts[] = {
    /* symbol arrange function */
    { "[]=", tile }, /* first entry is default */
    { "><>", NULL }, /* no layout function means floating behavior */
    { "[M]", monocle },
    /* key definitions */
    #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} },
    /* helper for spawning shell commands in the pre dwm-5.0 fashion */
    #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[] = { "urxvtc", NULL };
    static const char *browsercmd[] = { "firefox", NULL };
    static const char *musiccmd[] = { "urxvtc", "-e", "ncmpcpp", NULL };
    static const char *talkcmd[] = { "urxvtc", "-e", "weechat-curses", NULL };
    static const char *shutcmd[] = { "sudo", "shutdown", "-h", "now", NULL };
    static const char *filebrowse[] = { "thunar", NULL };
    static const char *mutecmd[] = { "amixer", "-q", "sset", "Master", "toggle", NULL };
    static const char *volupcmd[] = { "amixer", "-q", "sset", "PCM", "5-", "unmute", NULL };
    static const char *voldowncmd[] = { "amixer", "-q", "sset", "PCM", "5+", "unmute", NULL };
    static const char *calccmd[] = { "xcalc", NULL };
    static Key keys[] = {
    /* modifier key function argument */
    { 0, 0x1008ff12, spawn, {.v = mutecmd } },
    { 0, 0x1008ff11, spawn, {.v = volupcmd } },
    { 0, 0x1008ff13, spawn, {.v = voldowncmd } },
    { 0, 0x1008ff1d, spawn, {.v = calccmd } },
    { MODKEY, XK_p, spawn, {.v = dmenucmd } },
    { MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } },
    { MODKEY|ShiftMask, XK_b, spawn, {.v = browsercmd } },
    { MODKEY|ShiftMask, XK_m, spawn, {.v = musiccmd } },
    { MODKEY|ShiftMask, XK_f, spawn, {.v = filebrowse } },
    { MODKEY|ShiftMask, XK_t, spawn, {.v = talkcmd } },
    { MODKEY|ShiftMask, XK_Delete, spawn, {.v = shutcmd } },
    { 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_m, 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} },
    /* button definitions */
    /* click can be a tag number (starting at 0),
    * ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
    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} },
    Thank you very much I will see what I can do .
    Sadly still no reaction

  • How to solve  when we get error sid missing?

    how to solve  when we get error sid missing?

    Hi,
      If you get  SID error means, There is no reference for the particular data in the Master data of that characteristic.
        so, Load that value in the Master data of the characteristic you wont get that sid error.
    Ex: When loading data to ods if it is giving sid for country withvalue ('india'), so india is not there in the master data of the characteristic Country. You need to enter the value India in mster data table of the characteristic.
    Otherwise you can choose option ' Update without master data' or something similar to that in infpackage or dtp.
    rgrds,
    v.sen.

  • Cannot run the macro SOLVER.XLAM!MainEx error message

    Ive had this problem for awhile but am now needing to use solver for my schoolwork. 
    Anytime i try to use the solver function under the data tab this error message pops up. 
    I have tried taking off and readding the add-in under options. 
    when i try to access solver in the visual basic panel it asks for a password which i have never set
    Im running excel 2013 on windows 7
    I have tried many things and am exhausted. No solution has been posted to this problem on the site or anywhere on the web 
    THIS IS NOT WHEN IM TYPING MACRO CODE IN VBA. its just when i try to use solver for simple spreadsheet calculations. 
    when i click solver i get the error cannot run module: SolverCode
    when i try to access the solver code in vba a password is required 

    Hi,
    As far as I know,  the Solver add-in code has the password by design, it is protected on purpose and copyrighted. They are designed for use from the spreadsheet only. 
    Then, as the error message:" Cannot run the macro SOLVER.XLAM!MainEx error message." Please try to do the following methods to fix the issue:
    1. Open VBE (Alt+F11)>Click Tools> References>set to SOLVER>Show immediate code pane (Ctrl+G)>Copy/paste (or write): application.run "solver.xlam!auto_open"
    2. Disable the other Excel add-ins, such as
    Adobe PDFMaker.
    3. Repair Office 2013.
    Regards,
    George Zhao
    TechNet Community Support

  • [SOLVED] DWM Compile Errors

    Hey guys,
    I'm new to arch linux, and newish to linux in general. I'm trying to compile dwm and keep running into the same error. I have been trying to follow the wiki entry on dwm to a T but have not had success thus far.
    Currently what I've done is:
    1. update abs
    2. copy makepkg files to ~/dwm
    3. edit config.h, save
    4. makepkg -f >> PKGFILE
    5. makepkg -efi
    Then I get this
    Any suggestions would be greatly appreciate
    thanks
    Last edited by raidicus (2010-05-29 23:43:57)

    Well, its definitely possible that I misunderstood the process of compiling. i thought you needed to edit dwm's config.h before you compiled it...
    IE you get a bunch of config files, edit them, then make an installable package out of them.
    in other words i thought I *was* following the wiki...but now I see that I mixed up the steps a little bit..
    So basically config.h doesn't have to be messed with then compiled...

  • [SOLVED] dwm Compiling Error

    Hello,
    I am running dwm, and I love how simple and light it is. I edited my config.h few times and compiled it and it was fine. The last time I tried, it gave me an error. I could not figure that out. I tried to use a valid config.h from the internet in case I missed my config.h up, and I tried to re-install it. Nothing worked. This is the error that I get when I run the command makepkg -efi --noconfirm:
    dwm build options:
    CFLAGS = -std=c99 -pedantic -Wall -Os -I. -I/usr/include -I/usr/include/X11 -D_FORTIFY_SOURCE=2 -DVERSION="6.0" -DXINERAMA
    LDFLAGS = -s -L/usr/lib -lc -L/usr/lib/X11 -lX11 -L/usr/lib/X11 -lXinerama
    CC = cc
    CC dwm.c
    In file included from dwm.c:288:0:
    config.h:18:19: error: ‘MAXTAGLEN’ undeclared here (not in a function)
    const char tags[][MAXTAGLEN] = { "1", "2", "3", "4", "5", "w" };
    ^
    In file included from dwm.c:288:0:
    config.h: In function ‘focusstackf’:
    config.h:132:9: error: ‘sel’ undeclared (first use in this function)
    if(!sel)
    ^
    config.h:132:9: note: each undeclared identifier is reported only once for each function it appears in
    config.h:134:8: error: ‘lt’ undeclared (first use in this function)
    if(lt[sellt]->arrange) {
    ^
    config.h:134:11: error: ‘sellt’ undeclared (first use in this function)
    if(lt[sellt]->arrange) {
    ^
    config.h:138:25: error: ‘clients’ undeclared (first use in this function)
    for(c = clients; c && (!ISVISIBLE(c) || c->isfloating == sel->isfloating); c = c->next);
    ^
    config.h:152:9: error: too few arguments to function ‘restack’
    restack();
    ^
    dwm.c:213:13: note: declared here
    static void restack(Monitor *m);
    ^
    In file included from dwm.c:288:0:
    config.h: In function ‘setltor1’:
    config.h:162:16: error: ‘lt’ undeclared (first use in this function)
    setlayout((lt[sellt] == arg->v) ? &a : arg);
    ^
    config.h:162:19: error: ‘sellt’ undeclared (first use in this function)
    setlayout((lt[sellt] == arg->v) ? &a : arg);
    ^
    config.h: In function ‘toggletorall’:
    config.h:169:8: error: ‘sel’ undeclared (first use in this function)
    if(sel && ((arg->ui & TAGMASK) == sel->tags)) {
    ^
    config.h: In function ‘togglevorall’:
    config.h:181:8: error: ‘sel’ undeclared (first use in this function)
    if(sel && ((arg->ui & TAGMASK) == tagset[seltags])) {
    ^
    config.h:181:39: error: ‘tagset’ undeclared (first use in this function)
    if(sel && ((arg->ui & TAGMASK) == tagset[seltags])) {
    ^
    config.h:181:46: error: ‘seltags’ undeclared (first use in this function)
    if(sel && ((arg->ui & TAGMASK) == tagset[seltags])) {
    ^
    config.h: In function ‘vieworprev’:
    config.h:193:34: error: ‘tagset’ undeclared (first use in this function)
    view(((arg->ui & TAGMASK) == tagset[seltags]) ? &a : arg);
    ^
    config.h:193:41: error: ‘seltags’ undeclared (first use in this function)
    view(((arg->ui & TAGMASK) == tagset[seltags]) ? &a : arg);
    ^
    config.h: In function ‘warptosel’:
    config.h:200:8: error: ‘sel’ undeclared (first use in this function)
    if(sel)
    ^
    config.h: In function ‘zoomf’:
    config.h:208:8: error: ‘sel’ undeclared (first use in this function)
    if(sel && (lt[sellt]->arrange != tile || sel->isfloating))
    ^
    config.h:208:16: error: ‘lt’ undeclared (first use in this function)
    if(sel && (lt[sellt]->arrange != tile || sel->isfloating))
    ^
    config.h:208:19: error: ‘sellt’ undeclared (first use in this function)
    if(sel && (lt[sellt]->arrange != tile || sel->isfloating))
    ^
    config.h: At top level:
    config.h:213:2: error: expected identifier or ‘(’ before ‘{’ token
    { MODKEY, KEY, view, {.ui = 1 << TAG} }, \
    ^
    config.h:213:78: error: expected identifier or ‘(’ before ‘,’ token
    { MODKEY, KEY, view, {.ui = 1 << TAG} }, \
    ^
    config.h:214:78: error: expected identifier or ‘(’ before ‘,’ token
    { MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
    ^
    config.h:215:78: error: expected identifier or ‘(’ before ‘,’ token
    { MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \
    ^
    config.h:216:78: error: expected identifier or ‘(’ before ‘,’ token
    { MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} },
    ^
    config.h:222:145: warning: ISO C does not allow extra ‘;’ outside of a function [-Wpedantic]
    static const char *dmenucmd[] = { "dmenu_run", "-fn", font, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor, NULL };
    ^
    config.h:223:20: error: redefinition of ‘termcmd’
    static const char *termcmd[] = { "uxterm", NULL };
    ^
    config.h:63:20: note: previous definition of ‘termcmd’ was here
    static const char *termcmd[] = { "uxterm", NULL };
    ^
    config.h:225:12: error: redefinition of ‘keys’
    static Key keys[] = {
    ^
    config.h:65:12: note: previous definition of ‘keys’ was here
    static Key keys[] = {
    ^
    config.h:264:15: error: redefinition of ‘buttons’
    static Button buttons[] = {
    ^
    config.h:96:15: note: previous definition of ‘buttons’ was here
    static Button buttons[] = {
    ^
    dwm.c: In function ‘createmon’:
    dwm.c:654:15: error: ‘nmaster’ undeclared (first use in this function)
    m->nmaster = nmaster;
    ^
    dwm.c: In function ‘keypress’:
    dwm.c:1087:2: warning: ‘XKeycodeToKeysym’ is deprecated (declared at /usr/include/X11/Xlib.h:1695) [-Wdeprecated-declarations]
    keysym = XKeycodeToKeysym(dpy, (KeyCode)ev->keycode, 0);
    ^
    In file included from dwm.c:288:0:
    dwm.c: At top level:
    config.h:15:13: warning: ‘readin’ defined but not used [-Wunused-variable]
    static Bool readin = True; /* False means do not read stdin */
    ^
    In file included from dwm.c:288:0:
    config.h:65:12: warning: ‘keys’ defined but not used [-Wunused-variable]
    static Key keys[] = {
    ^
    config.h:96:15: warning: ‘buttons’ defined but not used [-Wunused-variable]
    static Button buttons[] = {
    ^
    make: *** [dwm.o] Error 1
    ==> ERROR: A failure occurred in build().
    Aborting...
    And this is my config.h
    /* See LICENSE file for copyright and license details. */
    /* appearance */
    static const char font[] = "-*-terminus-bold-r-normal-*-14-*-*-*-*-*-*-*";
    static const char normbordercolor[] = "#cccccc";
    static const char normbgcolor[] = "#eeeeee";
    static const char normfgcolor[] = "#000000";
    static const char selbordercolor[] = "#0066ff";
    static const char selbgcolor[] = "#eeeeee";
    static const char selfgcolor[] = "#0066ff";
    static unsigned int borderpx = 3; /* border pixel of windows */
    static unsigned int snap = 32; /* snap pixel */
    static Bool showbar = True; /* False means no bar */
    static Bool topbar = True; /* False means bottom bar */
    static Bool readin = True; /* False means do not read stdin */
    /* tagging */
    const char tags[][MAXTAGLEN] = { "1", "2", "3", "4", "5", "w" };
    static Rule rules[] = {
    /* class instance title tags mask isfloating monitor */
    { "acme", NULL, NULL, 1 << 2, False, -1 },
    { "Acroread", NULL, NULL, 0, True, -1 },
    { "Gimp", NULL, NULL, 0, True, -1 },
    { "GQview", NULL, NULL, 0, True, -1 },
    { "MPlayer", NULL, NULL, 0, True, -1 },
    { "Navigator", NULL, NULL, 1 << 5, False, -1 },
    /* layout(s) */
    static float mfact = 0.65;
    static Bool resizehints = False; /* False means respect size hints in tiled resizals */
    static Layout layouts[] = {
    /* symbol arrange function */
    { "[]=", tile }, /* first entry is default */
    { "< >", NULL }, /* no layout function means floating behavior */
    { "[ ]", monocle },
    /* custom functions declarations */
    static void focusstackf(const Arg *arg);
    static void setltor1(const Arg *arg);
    static void toggletorall(const Arg *arg);
    static void togglevorall(const Arg *arg);
    static void vieworprev(const Arg *arg);
    static void warptosel(const Arg *arg);
    static void zoomf(const Arg *arg);
    /* key definitions */
    #define MODKEY Mod1Mask
    #define TAGKEYS(KEY,TAG) \
    { MODKEY, KEY, vieworprev, {.ui = 1 << TAG} }, \
    { MODKEY|ControlMask, KEY, togglevorall, {.ui = 1 << TAG} }, \
    { MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \
    { MODKEY|ControlMask|ShiftMask, KEY, toggletorall, {.ui = 1 << TAG} },
    /* helper for spawning shell commands in the pre dwm-5.0 fashion */
    #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[] = { "uxterm", NULL };
    static Key keys[] = {
    /* modifier key function argument */
    { MODKEY, XK_p, spawn, {.v = dmenucmd } },
    { MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } },
    { MODKEY, XK_b, togglebar, {0} },
    { MODKEY, XK_j, focusstackf, {.i = +1 } },
    { MODKEY, XK_j, warptosel, {0} },
    { MODKEY, XK_k, focusstackf, {.i = -1 } },
    { MODKEY, XK_k, warptosel, {0} },
    { MODKEY, XK_h, setmfact, {.f = -0.05} },
    { MODKEY, XK_l, setmfact, {.f = +0.05} },
    { MODKEY, XK_Return, zoomf, {0} },
    { MODKEY, XK_Return, warptosel, {0} },
    { MODKEY, XK_Tab, view, {0} },
    { MODKEY|ShiftMask, XK_c, killclient, {0} },
    { MODKEY, XK_space, setltor1, {.v = &layouts[0]} },
    { MODKEY|ShiftMask, XK_space, setltor1, {.v = &layouts[2]} },
    { MODKEY, XK_0, vieworprev, {.ui = ~0 } },
    { MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
    TAGKEYS( XK_1, 0)
    TAGKEYS( XK_2, 1)
    TAGKEYS( XK_3, 2)
    TAGKEYS( XK_4, 3)
    TAGKEYS( XK_5, 4)
    TAGKEYS( XK_w, 5)
    { MODKEY|ShiftMask, XK_q, quit, {0} },
    /* button definitions */
    /* click can ClkTagBar, ClkTagButton,
    * ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
    static Button buttons[] = {
    /* click event mask button function argument */
    { ClkLtSymbol, 0, Button1, setltor1, {.v = &layouts[0]} },
    { ClkLtSymbol, 0, Button2, setmfact, {.f = 1.65} },
    { ClkLtSymbol, 0, Button3, setltor1, {.v = &layouts[2]} },
    { ClkLtSymbol, 0, Button4, setmfact, {.f = +0.05} },
    { ClkLtSymbol, 0, Button5, setmfact, {.f = -0.05} },
    { ClkStatusText, 0, Button2, spawn, {.v = termcmd } },
    { ClkStatusText, Button3Mask, Button1, killclient, {0} },
    { ClkWinTitle, 0, Button1, warptosel, {0} },
    { ClkWinTitle, 0, Button1, movemouse, {0} },
    { ClkWinTitle, 0, Button2, zoomf, {0} },
    { ClkWinTitle, 0, Button3, resizemouse, {0} },
    { ClkWinTitle, 0, Button4, focusstackf, {.i = -1 } },
    { ClkWinTitle, 0, Button5, focusstackf, {.i = +1 } },
    { ClkRootWin, 0, Button1, warptosel, {0} },
    { ClkRootWin, 0, Button1, movemouse, {0} },
    { ClkRootWin, 0, Button3, resizemouse, {0} },
    { ClkRootWin, 0, Button4, focusstackf, {.i = -1 } },
    { ClkRootWin, 0, Button5, focusstackf, {.i = +1 } },
    { ClkClientWin, MODKEY, Button1, movemouse, {0} },
    { ClkClientWin, MODKEY, Button2, zoomf, {0} },
    { ClkClientWin, MODKEY, Button3, resizemouse, {0} },
    { ClkTagBar, 0, Button1, vieworprev, {0} },
    { ClkTagBar, 0, Button3, togglevorall, {0} },
    { ClkTagBar, 0, Button4, focusstackf, {.i = -1 } },
    { ClkTagBar, 0, Button5, focusstackf, {.i = +1 } },
    { ClkTagBar, Button2Mask, Button1, tag, {0} },
    { ClkTagBar, Button2Mask, Button3, toggletorall, {0} },
    /* custom functions */
    void
    focusstackf(const Arg *arg) {
    Client *c = NULL, *i;
    if(!sel)
    return;
    if(lt[sellt]->arrange) {
    if (arg->i > 0) {
    for(c = sel->next; c && (!ISVISIBLE(c) || c->isfloating != sel->isfloating); c = c->next);
    if(!c)
    for(c = clients; c && (!ISVISIBLE(c) || c->isfloating == sel->isfloating); c = c->next);
    else {
    for(i = clients; i != sel; i = i->next)
    if(ISVISIBLE(i) && i->isfloating == sel->isfloating)
    c = i;
    if(!c)
    for(i = sel; i; i = i->next)
    if(ISVISIBLE(i) && i->isfloating != sel->isfloating)
    c = i;
    if(c) {
    focus(c);
    restack();
    else
    focusstack(arg);
    void
    setltor1(const Arg *arg) {
    Arg a = {.v = &layouts[1]};
    setlayout((lt[sellt] == arg->v) ? &a : arg);
    void
    toggletorall(const Arg *arg) {
    Arg a;
    if(sel && ((arg->ui & TAGMASK) == sel->tags)) {
    a.ui = ~0;
    tag(&a);
    else
    toggletag(arg);
    void
    togglevorall(const Arg *arg) {
    Arg a;
    if(sel && ((arg->ui & TAGMASK) == tagset[seltags])) {
    a.ui = ~0;
    view(&a);
    else
    toggleview(arg);
    void
    vieworprev(const Arg *arg) {
    Arg a = {0};
    view(((arg->ui & TAGMASK) == tagset[seltags]) ? &a : arg);
    void
    warptosel(const Arg *arg) {
    XEvent ev;
    if(sel)
    XWarpPointer(dpy, None, sel->win, 0, 0, 0, 0, 0, 0);
    XSync(dpy, False);
    while(XCheckMaskEvent(dpy, EnterWindowMask, &ev));
    void
    zoomf(const Arg *arg) {
    if(sel && (lt[sellt]->arrange != tile || sel->isfloating))
    togglefloating(NULL);
    else
    zoom(NULL);
    { 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} },
    /* helper for spawning shell commands in the pre dwm-5.0 fashion */
    #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[] = { "uxterm", NULL };
    static Key keys[] = {
    /* modifier key function argument */
    { MODKEY, XK_p, spawn, {.v = dmenucmd } },
    { MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } },
    { MODKEY, XK_b, togglebar, {0} },
    { MODKEY, XK_j, focusstack, {.i = +1 } },
    { MODKEY, XK_k, focusstack, {.i = -1 } },
    { MODKEY, XK_i, incnmaster, {.i = +1 } },
    { MODKEY, XK_d, incnmaster, {.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_m, 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} },
    /* button definitions */
    /* click can be ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
    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} },
    Any suggestions?
    Last edited by husainaloos (2013-05-07 16:31:16)

    No, you were not missing "some graphical libraries that you didn't incluce in the config.h file". It looks like, as jasonwryan said, you copied functions into your config.h without checking how they work. Thus, you ended up having functions that use variables you never define in config.h (and there's alot of those!)
    Next time, either stick to already working patches found at suckless.org, or give some effort and at least try to figure out what is wrong with the code you randomly copied.

  • [SOLVED] dwm react strangely - azerty keycodes error

    Hi,
    I'm trying dwm after some time on Spectrwm, but i'm facing a strange behaviour it is impossible at all to switch to n tag with ModKey + n or put client to desired tag.
    Also dmenu wont spawn with ModKey + p. It spawn perfectly with  "$: dmenu_run" in a terminal but not with dwm shortcut.
    Other things seems to works fine.
    is anyone already had the same behaviour ?
    here is my config.h the only things that have changed from the config.def.h template is the termcmd (st replaced with terminology) and the modkey which I have change from "Alt" to "WindowsKey"
    /* See LICENSE file for copyright and license details. */
    /* appearance */
    static const char font[] = "-*-terminus-medium-r-*-*-16-*-*-*-*-*-*-*";
    static const char normbordercolor[] = "#444444";
    static const char normbgcolor[] = "#222222";
    static const char normfgcolor[] = "#bbbbbb";
    static const char selbordercolor[] = "#005577";
    static const char selbgcolor[] = "#005577";
    static const char selfgcolor[] = "#eeeeee";
    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", "2", "3", "4", "5", "6", "7", "8", "9" };
    static const Rule rules[] = {
    /* xprop(1):
    * WM_CLASS(STRING) = instance, class
    * WM_NAME(STRING) = title
    /* class instance title tags mask isfloating monitor */
    { "Gimp", NULL, NULL, 0, True, -1 },
    { "Firefox", NULL, NULL, 1 << 8, False, -1 },
    /* layout(s) */
    static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */
    static const int nmaster = 1; /* number of clients in master area */
    static const Bool resizehints = True; /* True means respect size hints in tiled resizals */
    static const Layout layouts[] = {
    /* symbol arrange function */
    { "[]=", tile }, /* first entry is default */
    { "><>", NULL }, /* no layout function means floating behavior */
    { "[M]", monocle },
    /* key definitions */
    #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} },
    /* helper for spawning shell commands in the pre dwm-5.0 fashion */
    #define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
    /* commands */
    static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
    static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", font, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor, NULL };
    static const char *termcmd[] = { "terminology", NULL };
    static Key keys[] = {
    /* modifier key function argument */
    { MODKEY, XK_p, spawn, {.v = dmenucmd } },
    { MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } },
    { MODKEY, XK_b, togglebar, {0} },
    { MODKEY, XK_j, focusstack, {.i = +1 } },
    { MODKEY, XK_k, focusstack, {.i = -1 } },
    { MODKEY, XK_i, incnmaster, {.i = +1 } },
    { MODKEY, XK_d, incnmaster, {.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_m, 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} },
    /* button definitions */
    /* click can be ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
    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} },
    Last edited by core_sum (2013-10-03 18:23:05)

    It was in fact the 6.0.1 so I presum this the 6.0 version.
    I have try to recompile with and without modification in config.h switching tags or sending clien to specified tag still not working.
    Also I have try with 
    #define MODKEY Mod4
    but it wont compile.
    All others keybiding works well like toggling the status bar with ModKey4 + b, increase client size, switching layout...but not the dmenu and tags functions.
    I have try on my laptop and on my workstation and it does the same behaviour so it should be an error from me
    Last edited by core_sum (2013-09-30 18:59:51)

  • [SOLVED] DWM: Init Layouts with Pertag-6.1 patch

    I'm trying to add the init layout to dwm 6.1 (Xft).
    I'm going according to the pertag patch here:
    http://dwm.suckless.org/patches/dwm-6.1-pertag.diff
    I would like the tags to initialize with a predefined layout {0, 1, 2}.
    I don't know if this feature is already built-in into this new pertag patch but the main function involved here is:
    Monitor *
    createmon(void) {
    Monitor *m;
    int i;
    if(!(m = (Monitor *)calloc(1, sizeof(Monitor))))
    die("fatal: could not malloc() %u bytes\n", sizeof(Monitor));
    m->tagset[0] = m->tagset[1] = 1;
    m->mfact = mfact;
    m->nmaster = nmaster;
    m->showbar = showbar;
    m->topbar = topbar;
    m->lt[0] = &layouts[0];
    m->lt[1] = &layouts[1 % LENGTH(layouts)];
    strncpy(m->ltsymbol, layouts[0].symbol, sizeof m->ltsymbol);
    if(!(m->pertag = (Pertag *)calloc(1, sizeof(Pertag))))
    die("fatal: could not malloc() %u bytes\n", sizeof(Pertag));
    m->pertag->curtag = m->pertag->prevtag = 1;
    for(i=0; i <= LENGTH(tags); i++) {
    /* init nmaster */
    m->pertag->nmasters[i] = m->nmaster;
    /* init mfacts */
    m->pertag->mfacts[i] = m->mfact;
    /* init layouts */
    m->pertag->ltidxs[i][0] = m->lt[0];
    m->pertag->ltidxs[i][1] = m->lt[1];
    m->pertag->sellts[i] = m->sellt;
    /* init showbar */
    m->pertag->showbars[i] = m->showbar;
    /* swap focus and zoomswap*/
    m->pertag->prevzooms[i] = NULL;
    return m;
    There is no documentation or it's nto very clear to me. Can I initialize ltidxs with a predefined matrix in config.h?
    Last edited by wildfowl (2015-05-29 10:30:58)

    Define a new static vector/array variable say as follows:
    static const int initlayouts[] = { 0, 2, 0, 1, 1, 0, 0, 1, 1, 0, 0, 2, 2, 0 };
    Replace the two init layout assignments in the for loop in the function createmon with:
    m->pertag->ltidxs[i][0] = &layouts[initlayouts[i-1]];
    m->pertag->ltidxs[i][1] = m->lt[1];
    Initially it was not obvious to me that ltidxs is a N x 2 array where the first column of the matrix carries the actual layout {0, 1, 2} and crucially that the second column carries just the symbol.
    It's a simple hack with the minimum of fuss and so I am happy with it.

  • [solved]DWM apply systray patch

    [solved]I am trying to appply the systray6.1 patch to dwm. The "patch" goes fine but when I make I get the below errors:
        dwm build options:
        CFLAGS   = -std=c99 -pedantic -Wall -Wno-deprecated-declarations -Os -I/usr/X11R6/include -I/usr/include/freetype2 -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=2     -DVERSION="6.1" -DXINERAMA
        LDFLAGS  = -s -L/usr/X11R6/lib -lX11 -lXinerama -lfontconfig -lXft
        CC       = cc
        CC drw.c
        CC dwm.c
        dwm.c: In function ‘clientmessage’:
        dwm.c:589:26: error: incompatible types when assigning to type ‘long unsigned int’ from type ‘XftColor’
        swa.background_pixel  = scheme[SchemeNorm].bg->rgb;
                              ^
        dwm.c: In function ‘updatesystray’:
        dwm.c:2221:18: error: incompatible type for argument 9 of ‘XCreateSimpleWindow’
       systray->win = XCreateSimpleWindow(dpy, root, x, m->by, w, bh, 0, 0, scheme[SchemeSel].bg->rgb);
                      ^
        In file included from dwm.c:36:0:
        /usr/include/X11/Xlib.h:1621:15: note: expected ‘long unsigned int’ but argument is of type ‘XftColor’
        extern Window XCreateSimpleWindow(
                   ^
        dwm.c:2224:24: error: incompatible types when assigning to type ‘long unsigned int’ from type ‘XftColor’
        wa.background_pixel  = scheme[SchemeNorm].bg->rgb;
                            ^
        dwm.c:2244:24: error: incompatible types when assigning to type ‘long unsigned int’ from type ‘XftColor’
        wa.background_pixel  = scheme[SchemeNorm].bg->rgb;
                            ^
        dwm.c:2263:2: error: incompatible type for argument 3 of ‘XSetForeground’
        XSetForeground(dpy, drw->gc, scheme[SchemeNorm].bg->rgb);
        ^
        In file included from dwm.c:36:0:
        /usr/include/X11/Xlib.h:3227:12: note: expected ‘long unsigned int’ but argument is of type ‘XftColor’
         extern int XSetForeground(
                ^
        Makefile:18: recipe for target 'dwm.o' failed
        make: *** [dwm.o] Error 1
    I haven't applied any other patches. Any idea what I am doing wrong? I can go into dwm.c and see the lines the error is refering to but I am not sure what the problem is.
    Thanks
    Last edited by derrickcope (2015-05-01 02:30:45)

    I just got the latest one off of the repo at git.suckless.org/dwm. the page says 6.0 but my config.mk says version 6.1. I did try the 6.0 version but the patch had errors. I am a little confused. The other patches come back with errors too. I am using an unpatched version at the moment so I would think most patches should work.
    What should I do?

  • [SOLVED] dwm doesn't compile with moveresize function

    I'am trying to compile dwm with moveresize function but I get this error:
    dwm build options:
    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
    CC dwm.c
    In file included from dwm.c:254:0:
    config.h: In function 'moveresize':
    config.h:23:7: error: dereferencing pointer to incomplete type
    config.h:23:34: error: dereferencing pointer to incomplete type
    config.h:26:9: error: dereferencing pointer to incomplete type
    config.h:26:17: error: dereferencing pointer to incomplete type
    config.h:27:6: error: dereferencing pointer to incomplete type
    config.h:28:6: error: dereferencing pointer to incomplete type
    config.h:29:6: error: dereferencing pointer to incomplete type
    make: *** [dwm.o] Error 1
    Here's my config.h
    /* See LICENSE file for copyright and license details. */
    /* appearance */
    static const char font[] = "-*-terminus-*-*-*-*-12-*-*-*-*-*-*-*";
    static const char normbordercolor[] = "#454545";
    static const char normbgcolor[] = "#454545";
    static const char normfgcolor[] = "#C0C0C0";
    static const char selbordercolor[] = "#C0C0C0";
    static const char selbgcolor[] = "#454545";
    static const char selfgcolor[] = "#FFFFFF";
    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 */
    /* moveresize */
    static void moveresize(const Arg *arg) {
    XEvent ev;
    Monitor *m = selmon;
    if(!(m->sel && arg && arg->v && m->sel->isfloating))
    return;
    resize(m->sel, m->sel->x + ((int *)arg->v)[0],
    m->sel->y + ((int *)arg->v)[1],
    m->sel->w + ((int *)arg->v)[2],
    m->sel->h + ((int *)arg->v)[3],
    True);
    while(XCheckMaskEvent(dpy, EnterWindowMask, &ev));
    /* tagging */
    static const char *tags[] = { "term", "web", "fm", "im", "media", "float" };
    static const Rule rules[] = {
    /* class instance title tags mask isfloating monitor */
    { "Gimp", NULL, NULL, 1 << 5, True, -1 },
    { "Chromium", NULL, NULL, 1 << 1, True, -1 },
    { "MPlayer", NULL, NULL, 0, True, -1 },
    { "Wine", NULL, NULL, 1 << 5, True, -1 },
    { "Gpicview", NULL, NULL, 0, True, -1 },
    { "Pcmanfm", NULL, NULL, 1 << 2, True, -1 },
    { "Xarchiver", NULL, NULL, 0, True, -1 },
    { "Amsn", NULL, NULL, 1 << 3, True, -1 },
    /* layout(s) */
    static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */
    static const Bool resizehints = False; /* True means respect size hints in tiled resizals */
    static const Layout layouts[] = {
    /* symbol arrange function */
    { "[]=", tile }, /* first entry is default */
    { "><>", NULL }, /* no layout function means floating behavior */
    { "[M]", monocle },
    /* key definitions */
    #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} },
    /* helper for spawning shell commands in the pre dwm-5.0 fashion */
    #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 *tdmenucmd[] = { "tdmenu_run", "-fn", font, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor, NULL };
    static const char *termcmd[] = { "roxterm", 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 *bgltupcmd[] = { "xbacklight", "-inc", "15", NULL };
    static const char *bgltdowncmd[] = { "xbacklight", "-dec", "1", NULL };
    static const char *displayoff[] = { "xset", "dpms", "force", "off", NULL };
    static const char *suspend[] = { "sudo", "pm-suspend", NULL };
    static Key keys[] = {
    /* modifier key function argument */
    { 0, 0x1008ff12, spawn, {.v = mutecmd } },
    { 0, 0x1008ff11, spawn, {.v = volupcmd } },
    { 0, 0x1008ff13, spawn, {.v = voldowncmd } },
    { 0, 0x1008ff02, spawn, {.v = bgltupcmd } },
    { 0, 0x1008ff03, spawn, {.v = bgltdowncmd } },
    { 0, 0x1008ff59, spawn, {.v = displayoff } },
    { 0, 0x1008ff2f, spawn, {.v = suspend } },
    { MODKEY, XK_p, spawn, {.v = dmenucmd } },
    { MODKEY, XK_r, spawn, {.v = tdmenucmd } },
    { 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|ShiftMask, XK_Return, zoom, {0} },
    { MODKEY, XK_Tab, view, {0} },
    { MODKEY, XK_c, killclient, {0} },
    { MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
    { MODKEY, XK_f, setlayout, {.v = &layouts[1]} },
    { MODKEY, XK_m, 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 } },
    { MODKEY|ShiftMask, XK_q, quit, {0} },
    { MODKEY, XK_Down, moveresize, {.v = (int []){ 0, 25, 0, 0 }}},
    { MODKEY, XK_Up, moveresize, {.v = (int []){ 0, -25, 0, 0 }}},
    { MODKEY, XK_Right, moveresize, {.v = (int []){ 25, 0, 0, 0 }}},
    { MODKEY, XK_Left, moveresize, {.v = (int []){ -25, 0, 0, 0 }}},
    { MODKEY|ShiftMask, XK_Down, moveresize, {.v = (int []){ 0, 0, 0, 25 }}},
    { MODKEY|ShiftMask, XK_Up, moveresize, {.v = (int []){ 0, 0, 0, -25 }}},
    { MODKEY|ShiftMask, XK_Right, moveresize, {.v = (int []){ 0, 0, 25, 0 }}},
    { MODKEY|ShiftMask, XK_Left, moveresize, {.v = (int []){ 0, 0, -25, 0 }}},
    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)
    /* button definitions */
    /* click can be ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
    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|ShiftMask, Button1, resizemouse, {0} },
    { ClkTagBar, 0, Button1, view, {0} },
    { ClkTagBar, 0, Button3, toggleview, {0} },
    { ClkTagBar, MODKEY, Button1, tag, {0} },
    { ClkTagBar, MODKEY, Button3, toggletag, {0} },
    Last edited by Aakko (2010-05-30 18:21:30)

    ber_t wrote:A vanilla dwm compiles fine with your config.h. So I guess you're using other patches that rearrange the #include directive for config.h in dwm.c, e.g. pertag. If that's the case, you have to put the moveresize function in dwm.c and declare it before config.h get's included, just like any other function in dwm.c.
    Yes I had dwm.c patched with pertag. Vanilla compiles fine. Thanks!

  • [SOLVED] dwm: cannot open mixer

    I've been setting up dwm through the last hours and I had an issue with sound playback. Firstly, I can play any sound from the console or any other wm. The problem appears when I start dwm by using xinit but loading it through gdm seems to solve the problem but still I'm not satisfied with that solution. I think that gdm do something in order to grant access to the sound card but on the other hand I still have another problem with multiple running applications that playback sound, only the first opened application can.
    After starting dwm with xinit I get "amixer: Mixer attach default error: No such file or directory" and by running alsamixer I get "cannot open mixer: No such file or directory".
    Thanks in advance
    Last edited by russo (2011-06-20 04:01:15)

    Well, I checked those posts.
    /dev/mixer exists
    I tried to load the snd-pcm-oss but nothing changed.
    However I noticed that I can run alsamixer as root. I'm not sure but maybe having to run gdm as root while running xinit as user made the difference but still it doesn't make sense since I can run openbox with xinit and everything works fine. I'll keep trying
    EDIT: Finally, I tried to load openbox through xinit and had the same problem. Next I tried to reboot removing gdm from the daemons and start dwm directly with the xinitrc options. Now it seems to work fine. Maybe gdm blocked the sound card once it opened.
    Last edited by russo (2011-06-20 04:00:56)

  • [SOLVED]Dwm problem after a big update

    I have installed dwm 5.7.2 and i want to add this patch: http://dwm.suckless.org/patches/pertag
    When i applied the patch i get the following error:
    alucard@hell ~/.config/dwm/src/dwm-5.7.2 $ patch p1 < /home/alucard/.config/dwm/dwm-5.7.2-pertag.diff
    patching file p1
    Hunk #1 FAILED at 120.
    Hunk #2 FAILED at 273.
    Hunk #3 FAILED at 1450.
    Hunk #4 FAILED at 1468.
    Hunk #5 FAILED at 1509.
    Hunk #6 FAILED at 1620.
    Hunk #7 FAILED at 1640.
    Hunk #8 FAILED at 1912.
    8 out of 8 hunks FAILED -- saving rejects to file p1.rej
    Any idea!
    Last edited by n0dix (2010-02-05 00:47:27)

    tom5760 wrote:
    If the output you pasted isn't a typo, then you are using the patch command incorrectly.  You forgot the "-" before the "p1", as in:
    patch -p1 < /home/...
    Thats why it says "patching file p1 failed".
    I'm an completely idiot. I miss the - symbol.
    Sorry gyus for this.
    Admin, please delete this thread.;)

Maybe you are looking for

  • Cannot create mysites from powershell: Original XSLT List View Web Part not found

    I have a bizarre problem in my SharePoint 2013 farm. This does not occur in my test farm, only in the farm we were going to go live with. I'm on windows Server 2012, SQLServer 2012 SP1, SharePoint 2013 April CU. 1 appserver/centraladmin server, 2 web

  • Windows Update Failed Due To Services Stopped

    Generally, the Windows Update issue can be caused by one of the following factors: I. The Windows Update service has been stopped. II. Corrupted Windows Update Temporary folder. In order to narrow down the cause of this issue and resolve it, you can

  • How to install Mac OS 10.7.4 onto external USB HD

    My Imac is showing early show of serious bernel paroblems/crashing.  (For example, it has tourned it self off then on two times, the opening or new software as well as Internet seraches are dealy slow, a large black rectangle, showed up on the desk o

  • Flow of PO,SO, invoice

    Can anybody explain me flow of sales order, purchase order, and invoice

  • Flexunit failed on "command not unterstood"

    I use Ant to compile tests and generate reports, and the compile phase succeeded, but the <flexunit> failed, the error log following: java.util.concurrent.ExecutionException: command [<testcase classname="XXX", name="XXX",  time='0.000'   status='suc