[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.

Similar Messages

  • [Solved] was getting errors with wine, but found patched linux version

    Installed wine for the first time, following the wiki and reading most of the things linked there (such as the winehq faq for disabling winemenubuilder), made separate WINEPREFIXs for 32 and 64 bit, then unzipped a program (Meritous) into the 32 bit prefix's "Program Files" and--
    [solitudesands@TheEntireBracadaDesert Meritousness]$ WINEPREFIX=~/w32 wine Meritous.exe
    wine: cannot find L"C:\\windows\\system32\\winemenubuilder.exe"
    err:wineboot:ProcessRunKeys Error running cmd L"C:\\windows\\system32\\winemenubuilder.exe -a -r" (2)
    fixme:keyboard:X11DRV_LoadKeyboardLayout L"00000409", 0080: stub!
    fixme:keyboard:X11DRV_LoadKeyboardLayout L"00000409", 0001: stub!
    wine: Unhandled page fault on read access to 0x00000034 at address 0x7bc3c8a1 (thread 0009), starting debugger...
    At which point the bug reporting wine function pops up offering this:
    Unhandled exception: page fault on read access to 0x00000034 in 32-bit code (0x7bc3c8a1).
    Register dump:
    CS:0023 SS:002b DS:002b ES:002b FS:0063 GS:006b
    EIP:7bc3c8a1 ESP:005533c0 EBP:005533d8 EFLAGS:00010206( R- -- I - -P- )
    EAX:7e64c301 EBX:7bcc7000 ECX:005533f0 EDX:7e6d7280
    ESI:00000020 EDI:00000000
    Stack dump:
    0x005533c0: 00682af8 7bc3c896 005533f0 7e6cf000
    0x005533d0: 0067fb40 00000000 00553408 7e65e39c
    0x005533e0: 00553438 7e663856 7e64c301 7e65e39c
    0x005533f0: 00000020 00553410 00553448 7e65e374
    0x00553400: 00553420 7e6cf000 00553468 7e663e7f
    0x00553410: 00682af8 00682af8 00000040 7e663e7f
    000c: sel=0067 base=00000000 limit=00000000 16-bit r-x
    Backtrace:
    =>0 0x7bc3c8a1 RtlEnterCriticalSection+0x21() in ntdll (0x005533d8)
    1 0x7e65e39c MSVCRT__lock_file+0x3b() in msvcrt (0x00553408)
    2 0x7e663e7f MSVCRT_fread+0x5e() in msvcrt (0x00553468)
    3 0x00401b28 in meritous (+0x1b27) (0x0067fbd8)
    4 0x004213f6 in meritous (+0x213f5) (0x0067fc08)
    5 0x004215b7 in meritous (+0x215b6) (0x0067fd88)
    6 0x00420f0b in meritous (+0x20f0a) (0x0067fe00)
    7 0x0040122d in meritous (+0x122c) (0x0067fe20)
    8 0x00401258 in meritous (+0x1257) (0x0067fe30)
    9 0x7b85c48c call_process_entry+0xb() in kernel32 (0x0067fe48)
    10 0x7b85d54a in kernel32 (+0x4d549) (0x0067fe78)
    11 0x7bc7c610 call_thread_func_wrapper+0xb() in ntdll (0x0067fe98)
    12 0x7bc7f50f call_thread_func+0xde() in ntdll (0x0067ff88)
    13 0x7bc7c5ee RtlRaiseException+0x21() in ntdll (0x0067ffb8)
    14 0x7bc51441 call_dll_entry_point+0x440() in ntdll (0x0067ffd8)
    15 0xf7553a8d wine_call_on_stack+0x1c() in libwine.so.1 (0x00000000)
    16 0xf7553c0a wine_switch_to_stack+0x29() in libwine.so.1 (0xff90b0a8)
    17 0x7bc56bd5 LdrInitializeThunk+0x1f4() in ntdll (0xff90b0f8)
    18 0x7b8634f2 __wine_kernel_init+0x871() in kernel32 (0xff90c268)
    19 0x7bc57a33 __wine_process_init+0x162() in ntdll (0xff90c2d8)
    20 0xf7551643 wine_init+0x2f2() in libwine.so.1 (0xff90c348)
    21 0x7bf00db2 main+0x81() in <wine-loader> (0xff90c7a8)
    22 0xf738de5e __libc_start_main+0xdd() in libc.so.6 (0x00000000)
    0x7bc3c8a1 RtlEnterCriticalSection+0x21 in ntdll: movl 0x14(%esi),%eax
    Modules:
    Module Address Debug info Name (68 modules)
    PE 230000- 24a000 Deferred sdl_image
    PE 400000- 473000 Export meritous
    PE 10000000-10046000 Deferred sdl
    PE 60400000-60475000 Deferred sdl_mixer
    ELF 7b800000-7ba5a000 Dwarf kernel32<elf>
    \-PE 7b810000-7ba5a000 \ kernel32
    ELF 7bc00000-7bce4000 Dwarf ntdll<elf>
    \-PE 7bc10000-7bce4000 \ ntdll
    ELF 7bf00000-7bf04000 Dwarf <wine-loader>
    ELF 7dcbc000-7dce0000 Deferred imm32<elf>
    \-PE 7dcc0000-7dce0000 \ imm32
    ELF 7dd02000-7dd08000 Deferred libxfixes.so.3
    ELF 7dd08000-7dd13000 Deferred libxcursor.so.1
    ELF 7dd13000-7dd26000 Deferred libxi.so.6
    ELF 7dd26000-7dd2a000 Deferred libxcomposite.so.1
    ELF 7dd2a000-7dd35000 Deferred libxrandr.so.2
    ELF 7dd35000-7dd40000 Deferred libxrender.so.1
    ELF 7dd40000-7dd46000 Deferred libxxf86vm.so.1
    ELF 7dd46000-7dd4a000 Deferred libxinerama.so.1
    ELF 7dd4a000-7dd70000 Deferred libxcb.so.1
    ELF 7dd70000-7dea7000 Deferred libx11.so.6
    ELF 7dea7000-7debc000 Deferred libxext.so.6
    ELF 7dee0000-7df72000 Deferred winex11<elf>
    \-PE 7def0000-7df72000 \ winex11
    ELF 7df72000-7e090000 Deferred opengl32<elf>
    \-PE 7df90000-7e090000 \ opengl32
    ELF 7e090000-7e1cc000 Deferred wined3d<elf>
    \-PE 7e0a0000-7e1cc000 \ wined3d
    ELF 7e1cc000-7e240000 Deferred ddraw<elf>
    \-PE 7e1d0000-7e240000 \ ddraw
    ELF 7e253000-7e27c000 Deferred libexpat.so.1
    ELF 7e27c000-7e2b8000 Deferred libfontconfig.so.1
    ELF 7e2b8000-7e32b000 Deferred libpcre.so.1
    ELF 7e32b000-7e436000 Deferred libglib-2.0.so.0
    ELF 7e436000-7e492000 Deferred libharfbuzz.so.0
    ELF 7e492000-7e4d0000 Deferred libpng16.so.16
    ELF 7e4d0000-7e4e1000 Deferred libbz2.so.1.0
    ELF 7e4e1000-7e4f8000 Deferred libz.so.1
    ELF 7e4f8000-7e59c000 Deferred libfreetype.so.6
    ELF 7e59c000-7e601000 Deferred libncursesw.so.5
    ELF 7e625000-7e6d9000 Dwarf msvcrt<elf>
    \-PE 7e640000-7e6d9000 \ msvcrt
    ELF 7e6d9000-7e704000 Deferred msacm32<elf>
    \-PE 7e6e0000-7e704000 \ msacm32
    ELF 7e704000-7e786000 Deferred rpcrt4<elf>
    \-PE 7e710000-7e786000 \ rpcrt4
    ELF 7e786000-7e8bf000 Deferred ole32<elf>
    \-PE 7e7a0000-7e8bf000 \ ole32
    ELF 7e8bf000-7e930000 Deferred advapi32<elf>
    \-PE 7e8d0000-7e930000 \ advapi32
    ELF 7e930000-7ea51000 Deferred gdi32<elf>
    \-PE 7e940000-7ea51000 \ gdi32
    ELF 7ea51000-7eba7000 Deferred user32<elf>
    \-PE 7ea60000-7eba7000 \ user32
    ELF 7eba7000-7ec5e000 Deferred winmm<elf>
    \-PE 7ebb0000-7ec5e000 \ winmm
    ELF 7ef8f000-7efdc000 Deferred libm.so.6
    ELF 7efdf000-7efe6000 Deferred libxdmcp.so.6
    ELF 7efe6000-7f000000 Deferred version<elf>
    \-PE 7eff0000-7f000000 \ version
    ELF f734d000-f7352000 Deferred libdl.so.2
    ELF f7352000-f7360000 Deferred libnss_files.so.2
    ELF f7372000-f7376000 Deferred libxau.so.6
    ELF f7376000-f752e000 Dwarf libc.so.6
    ELF f752e000-f754a000 Deferred libpthread.so.0
    ELF f754a000-f7703000 Dwarf libwine.so.1
    ELF f7704000-f7728000 Deferred ld-linux.so.2
    ELF f7728000-f7729000 Deferred [vdso].so
    Threads:
    process tid prio (all id:s are in hex)
    00000008 (D) C:\Program Files\Meritousness\Meritous.exe
    00000009 0 <==
    0000000e services.exe
    0000001d 0
    0000001c 0
    00000016 0
    00000014 0
    00000010 0
    0000000f 0
    00000012 winedevice.exe
    0000001b 0
    00000018 0
    00000017 0
    00000013 0
    00000019 plugplay.exe
    0000001f 0
    0000001e 0
    0000001a 0
    00000020 explorer.exe
    00000021 0
    System information:
    Wine build: wine-1.7.28
    Platform: i386
    Host system: Linux
    Host version: 3.16.3-1-ARCH
    However, unlike the few dozen other threads also including "Unhandled page fault on read access", I don't have any other errors to work with, and my backtrace is 23 lines instead of the usual 2-3. I've tried 'pacman -Ss'  for various libraries and drivers like in the other threads, but there doesn't appear to be anything I'm missing. Also, the game isn't in the appdb, so I can't look there for help.
    I'm figuratively flying blind, from newbiness and from lack of understandable, so any more experience with random failures like this would be appreciated.
    Help?
    Edit: Oh, and if you're wondering why I don't just compile from source, it's because that version always crashes halfway through the game; I'll be copying my saves from that version to this one if I get it running.
    Last edited by Torignit (2014-10-15 11:04:00)

    You'd better choose to build it from the AUR with makepkg and install it with pacman:
    https://wiki.archlinux.org/index.php/AU … Guidelines
    But nice that you could now play with it.
    Concerning Wine: I didn't see this game in the WineHQ - Wine Application Database
    Maybe it doesn't work with Wine.
    Last edited by berbae (2014-10-16 09:52:19)

  • [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.

  • [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 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] wrong encoding

    Hi,
    I have a few questions related to dwm:
    1.
    The titlebar of dwm gives me problems with umlauts (öäü). Its a fresh 2009.08-installation with dwm (5.6.1) as windowmanager.  Instead of umlauts funny symbols and letters are shown. I have the same problem with elinks, but I dont know if that is related.
    2.
    Is there a possibility to add the pertag-patch in 5.6.1? As far as I understand the patches are versionspecific and therefore I would have to wait for a 5.6.1 pertag-patch?
    3.
    Where do I have to put the programnames for autostarting programms in dwm? I want firefox, thunderbird, pcmanfm, geany a.s.o. to autostart everytime I invoke X and appear within their special tagspace, so I changed config.h accordingly.
    It would be cool, if anybody could help me
    Last edited by inknoir (2009-11-23 12:13:26)

    1. You either have a font that doesn't have such characters, or you have the wrong encoding. I'm using the standard "fixed" font in its "7x14" variant with a UTF-8 encoding, and umlauts look fine.
    2. Someone posted a current version of the pertag patch on the "dev" mailing list at suckless. I applied it. I'll post it as it applied for me, but I have other patches, so it might not apply cleanly for you, in which case, go search the mailing list archives.
    --- a/dwm.c Sat Aug 01 20:15:03 2009 -0400
    +++ b/dwm.c Sun Aug 02 17:26:12 2009 -0400
    @@ -120,25 +120,6 @@
    void (*arrange)(Monitor *);
    } Layout;
    -struct Monitor {
    - float mfact;
    - int num;
    - int by; /* bar geometry */
    - int mx, my, mw, mh; /* screen size */
    - int wx, wy, ww, wh; /* window area */
    - unsigned int seltags;
    - unsigned int sellt;
    - unsigned int tagset[2];
    - Bool showbar;
    - Bool topbar;
    - Client *clients;
    - Client *sel;
    - Client *stack;
    - Monitor *next;
    - Window barwin;
    - const Layout *lt[2];
    typedef struct {
    const char *class;
    const char *instance;
    @@ -270,6 +252,30 @@
    /* configuration, allows nested code to access above variables */
    #include "config.h"
    +struct Monitor {
    + float mfact;
    + int num;
    + int by; /* bar geometry */
    + int mx, my, mw, mh; /* screen size */
    + int wx, wy, ww, wh; /* window area */
    + unsigned int seltags;
    + unsigned int sellt;
    + unsigned int tagset[2];
    + Bool showbar;
    + Bool topbar;
    + Client *clients;
    + Client *sel;
    + Client *stack;
    + Monitor *next;
    + Window barwin;
    + const Layout *lt[2];
    + int curtag;
    + int prevtag;
    + const Layout *lts[LENGTH(tags) + 1];
    + double mfacts[LENGTH(tags) + 1];
    + Bool showbars[LENGTH(tags) + 1];
    +};
    +
    /* compile-time check if all tags fit into an unsigned int bit array. */
    struct NumTags { char limitexceeded[LENGTH(tags) > 31 ? -1 : 1]; };
    @@ -1401,7 +1446,7 @@
    if(!arg || !arg->v || arg->v != selmon->lt[selmon->sellt])
    selmon->sellt ^= 1;
    if(arg && arg->v)
    - selmon->lt[selmon->sellt] = (Layout *)arg->v;
    + selmon->lt[selmon->sellt] = selmon->lts[selmon->curtag] = (Layout *)arg->v;
    if(selmon->sel)
    arrange();
    else
    @@ -1418,7 +1463,7 @@
    f = arg->f < 1.0 ? arg->f + selmon->mfact : arg->f - 1.0;
    if(f < 0.1 || f > 0.9)
    return;
    - selmon->mfact = f;
    + selmon->mfact = selmon->mfacts[selmon->curtag] = f;
    arrange();
    @@ -1427,6 +1472,7 @@
    unsigned int i;
    int w;
    XSetWindowAttributes wa;
    + Monitor *m;
    /* init screen */
    screen = DefaultScreen(dpy);
    @@ -1458,11 +1504,31 @@
    XSetLineAttributes(dpy, dc.gc, 1, LineSolid, CapButt, JoinMiter);
    if(!dc.font.set)
    XSetFont(dpy, dc.gc, dc.font.xfont->fid);
    + /* init tags */
    + for(m = mons; m; m = m->next)
    + m->curtag = m->prevtag = 1;
    + /* init mfacts */
    + for(m = mons; m; m = m->next) {
    + for(i=0; i < LENGTH(tags) + 1 ; i++) {
    + m->mfacts[i] = m->mfact;
    + }
    + }
    + /* init layouts */
    + for(m = mons; m; m = m->next) {
    + for(i=0; i < LENGTH(tags) + 1; i++) {
    + m->lts[i] = &layouts[0];
    + }
    + }
    /* init bars */
    for(blw = i = 0; LENGTH(layouts) > 1 && i < LENGTH(layouts); i++) {
    w = TEXTW(layouts[i].symbol);
    blw = MAX(blw, w);
    + for(m = mons; m; m = m->next) {
    + for(i=0; i < LENGTH(tags) + 1; i++) {
    + m->showbars[i] = m->showbar;
    + }
    + }
    updatebars();
    updatestatus();
    /* EWMH support per view */
    @@ -1572,7 +1638,7 @@
    void
    togglebar(const Arg *arg) {
    - selmon->showbar = !selmon->showbar;
    + selmon->showbar = selmon->showbars[selmon->curtag] = !selmon->showbar;
    updatebarpos(selmon);
    XMoveResizeWindow(dpy, selmon->barwin, selmon->wx, selmon->by, selmon->ww, bh);
    arrange();
    @@ -1592,12 +1658,26 @@
    void
    toggletag(const Arg *arg) {
    unsigned int mask;
    + unsigned int i;
    if(!selmon->sel)
    return;
    mask = selmon->sel->tags ^ (arg->ui & TAGMASK);
    if(mask) {
    - selmon->sel->tags = mask;
    + if(mask == ~0) {
    + selmon->prevtag = selmon->curtag;
    + selmon->curtag = 0;
    + }
    + if(!(mask & 1 << (selmon->curtag - 1))) {
    + selmon->prevtag = selmon->curtag;
    + for (i=0; !(mask & 1 << i); i++);
    + selmon->curtag = i + 1;
    + }
    + selmon->sel->tags = mask;
    + selmon->lt[selmon->sellt] = selmon->lts[selmon->curtag];
    + selmon->mfact = selmon->mfacts[selmon->curtag];
    + if (selmon->showbar != selmon->showbars[selmon->curtag])
    + togglebar(NULL);
    arrange();
    @@ -1854,11 +1934,28 @@
    void
    view(const Arg *arg) {
    + unsigned int i;
    if((arg->ui & TAGMASK) == selmon->tagset[selmon->seltags])
    return;
    selmon->seltags ^= 1; /* toggle sel tagset */
    - if(arg->ui & TAGMASK)
    - selmon->tagset[selmon->seltags] = arg->ui & TAGMASK;
    + if(arg->ui & TAGMASK) {
    + selmon->tagset[selmon->seltags] = arg->ui & TAGMASK;
    + selmon->prevtag = selmon->curtag;
    + if(arg->ui == ~0)
    + selmon->curtag = 0;
    + else {
    + for (i=0; !(arg->ui & 1 << i); i++);
    + selmon->curtag = i + 1;
    + }
    + } else {
    + selmon->prevtag= selmon->curtag ^ selmon->prevtag;
    + selmon->curtag^= selmon->prevtag;
    + selmon->prevtag= selmon->curtag ^ selmon->prevtag;
    + }
    + selmon->lt[selmon->sellt]= selmon->lts[selmon->curtag];
    + selmon->mfact = selmon->mfacts[selmon->curtag];
    + if(selmon->showbar != selmon->showbars[selmon->curtag])
    + togglebar(NULL);
    arrange();

  • Upload a flat file to BPS layout with hierarchy: is it possible?

    Hello, BPS people!
    I used a known "HowTo...using SAPGUI" to load a flat file to BPS layout. Finally I need to use a predefined layout with several variables and hierarchical representation of characteristic values in the key field ( I can't use a special layout for file uploading!). The procedure works fine if I use a flat structure of characteristic in the key field (no hierarchy). But once I choose a hierarchical representation of key characteristic in the level (but nonhierarchical model in the first screen of layout builder!) the layout data after uploading is absolutely wrong!
           1) whether is it possible to perform that without ABAP coding?
           2) If not, how can I change the function modules to use hierarchy?
    Thank you!
    Yurij

    Sorry again!
    I have solved it.
    Probably nobody understood my question. First, I have tried to attach file upload function (see "How To..load a flat file into BW-BPS using SAPGUI") to the same planning level where original planning layout with hierarchical structure in the key field already existed. But now I realized that it's impossible!
    SOLUTION: It is necessary to build the file upload function at the separated planning level with the same structure as that in the uploaded file. No hierarchies allowed in the "Selection" tab of planning level !!
    Such upload function operates perfectly in the planning folder where original layout with the hierarchical structure of key characteristic is presented. After the file upload you can perform all further activities in the planning folder (including that with uploaded data).
    Thanks,
    Yurij

  • How to Specify/Associate a layout with a content

    I have created a new site, I have created few contents and few templates. During creation of content/page i did not find any option to associate a template or layout with the content/page. When i am trying to preview the content or try to open in web mode, I gets the following error.
    "A content layout must be specified to render this asset in web mode. Please specify a default layout."
    Need help me in resolving this issue.

    @Rodney: Thanks for the pointer. I did not choose that option. Problem solved after using that option.

  • [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)

  • Line Layout with Reference Key in F-03

    Dear all,
    Iu2019m facing the following problem.
    I modified the line layouts for F-03 through O7Z4S. In particular I created a line layouts with the field Reference key 1. The problem is that in F-03, using this variant, the field XREF1 appeared always blank. The same thing happens for XREF2 while for XREF3  everthing is ok.
    Is something that I forgot in customizing?
    Thanks in advance

    Dear Alberto,
    I created the same - Reference Key in IDES it works if you create with text and then insert Reference key as part of Field with this.
    Hope this would surely help...
    Deven.

  • How do I create a crystal report layout with a table and borders

    My crystal report is a signin sheet. The sign in sheet has an ID column, Name column, Institution column, Place to signin column, and Weekday columns with checkboxes in each column for the visitor to checkoff.
    How do I display the data that is being used int he crystal report in a table layout with borders around each cell? And is it possible to center vertical alignment of the data within eacvh cell like Excel?

    Blahahaha! Great answer Deb!
    Seriously though... There is no vertical alignment in CR. There have been several past threads related to this issue and all of them have various workarounds. None of them are very elegant.
    The best workaround I've found (especially if you are grid or borders) is to turn off the boarders for the field itself and drawl a rectangle around the field(s). Now you can place the field in the lower portion of the rectangle and adjust the rectangles height to place the field text in the center of the rectangle.
    This will give you more control over the height of your elements than using a carriage return before the text.
    Jason

  • How to display 2 layouts with 2 different Header and Footer in a template.

    Hi,
    I am using XML Publisher 5.5. I have created one template which is having two layouts. I am using <?Start: Body?> and <?end body?> for displaying Headers and footers. Now my problem is, I need to display first layout with it's associated Header and footer and then second layout with other header and footer. But the two layouts should come in single template file. How is it possible?. Is there any work around? Please help me as this is the urgent requirement to my client.
    Thanks.
    Siva.

    No problem. Select Insert -> Break from the menu bar. Then select a "Section Break" - Next page.
    Header 1
    <?start:body?>
    Page 1
    <?end: body?>
    Footer 1
    ==================Section Break (Next Page)=================
    Header 2
    <?start:body?>
    Page 2
    <?end: body?>
    Footer 2
    Worked like a charm.
    Klaus

  • Lightroom 4 crashes when trying to open the slideshow module. I spent over three hours with both Adobe and Apple tech support and we know it is a permission issue but have not been able to get it solved.  It started with the last upgrade to 10.8

    Lightroom 4 crashes when trying to open the slideshow module. I spent over three hours with both Adobe and Apple tech support and we know it is a permission issue but have not been able to get it solved.  It started with the last upgrade to 10.8

    Back up all data.
    This procedure will unlock all your user files (not system files) and reset their ownership and access-control lists to the default. If you've set special values for those attributes on any of your files, they will be reverted. In that case, either stop here, or be prepared to recreate the settings if necessary. Do so only after verifying that those settings didn't cause the problem. If none of this is meaningful to you, you don't need to worry about it.
    Step 1
    If you have more than one user account, and the one in question is not an administrator account, then temporarily promote it to administrator status in the Users & Groups preference pane. To do that, unlock the preference pane using the credentials of an administrator, check the box marked Allow user to administer this computer, then reboot. You can demote the problem account back to standard status when this step has been completed.
    Triple-click the following line to select it. Copy the selected text to the Clipboard (command-C):
    { sudo chflags -R nouchg,nouappnd ~ $TMPDIR.. ; sudo chown -Rh $UID:staff ~ $_ ; sudo chmod -R u+rwX ~ $_ ; chmod -R -N ~ $_ ; } 2> /dev/null
    Launch the Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
    Paste into the Terminal window (command-V). You'll be prompted for your login password, which won't be displayed when you type it. You may get a one-time warning not to screw up. If you don’t have a login password, you’ll need to set one before you can run the command. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator.
    The command will take a noticeable amount of time to run. Wait for a new line ending in a dollar sign (“$”) to appear, then quit Terminal.
    Step 2 (optional)
    The first step should give you usable permissions in your home folder. This step will restore special attributes set by OS X on some user folders to protect them from unintended deletion or renaming. You can skip this step if you don't consider that protection to be necessary.
    Boot into Recovery by holding down the key combination command-R at startup. Release the keys when you see a gray screen with a spinning dial.
    When the OS X Utilities screen appears, select
    Utilities ▹ Terminal
    from the menu bar. A Terminal window will open.
    In the Terminal window, type this:
    resetpassword
    That's one word, all lower case, with no spaces. Then press return. A Reset Password window will open. You’re not  going to reset a password.
    Select your boot volume ("Macintosh HD," unless you gave it a different name) if not already selected.
    Select your username from the menu labeled Select the user account if not already selected.
    Under Reset Home Directory Permissions and ACLs, click the Reset button.
    Select
     ▹ Restart
    from the menu bar.

  • The background behind my pages has turned black, how do i get it to go back to grey? i have switched between preview, normal, bleed, slug and presentation and closed and opened in design and it is still black. I can't imagine layouts with the black backgr

    the background behind my pages has turned black, how do i get it to go back to grey? i have switched between preview, normal, bleed, slug and presentation and closed and opened in design and it is still black. I can't imagine layouts with the black background please help!

    or maybe the interface has been set to Dark?
    Go to Preferences > Interface tab, choose Light from Color Theme dropdown on Apearance section (upper part of the window)

  • COPA Report Layout with Object List (ALV)

    Hi,
    I have question about the COPA report layout with object list (ALV). Everytime I executed the report with ALV format, the amount for quantity column always shows with 3 decimal number, menwhile for amount column always follow by 2 decimal number.
    Can anyone help me regarding this matter? I do not know how to turn off the decimal number to be 0 in this type of layout, although in the form itself I already put 0 decimal number.
    Thanks.

    Hi,
    Better to raise this issue in CO Forum. You can expect some solution.
    regards

Maybe you are looking for