Je découvre depuis peu les joies des tillings managers, et je dois dire que je ne suis pas déçu par dwm. wmiii, en mieux.

Cependant, j'ai un petit soucis lorsqu'il s'agit d'inclure un fichier .c pour apporter de nouvelles fonctionnalités au wm. En effet, comme décrit sur le site officiel, et sur la plupart des fichiers de configuration que j'ai pu voir, il faut tout d'abord insérer un #include"file.c". Seulement, c'est ici que j'ai le problème.
etc etc...In file included from config.h:36:0,
from dwm.c:255:
nmaster.c: In function ‘incnmaster’:
nmaster.c:18:20: erreur: déréférencement d'un pointeur de type incomplet
nmaster.c:18:31: erreur: déréférencement d'un pointeur de type incomplet
nmaster.c:18:58: erreur: déréférencement d'un pointeur de type incomplet
nmaster.c:20:17: erreur: déréférencement d'un pointeur de type incomplet
nmaster.c:21:20: erreur: déréférencement d'un pointeur de type incomplet
nmaster.c:22:18: erreur: déréférencement d'un pointeur de type incomplet
nmaster.c:23:2: erreur: too few arguments to function ‘arrange’
dwm.c:135:13: note: declared here
nmaster.c: In function ‘setnmaster’:
nmaster.c:28:20: erreur: déréférencement d'un pointeur de type incomplet
nmaster.c:28:31: erreur: déréférencement d'un pointeur de type incomplet
nmaster.c:28:58: erreur: déréférencement d'un pointeur de type incomplet
nmaster.c:30:17: erreur: déréférencement d'un pointeur de type incomplet
nmaster.c:31:2: erreur: too few arguments to function ‘arrange’
dwm.c:135:13: note: declared here
nmaster.c: In function ‘ntile’:
nmaster.c:41:28: erreur: déréférencement d'un pointeur de type incomplet
nmaster.c:42:17: erreur: déréférencement d'un pointeur de type incomplet
nmaster.c:43:8: erreur: déréférencement d'un pointeur de type incomplet
nmaster.c:43:35: erreur: déréférencement d'un pointeur de type incomplet
nmaster.c:48:9: erreur: déréférencement d'un pointeur de type incomplet
nmaster.c:48:20: erreur: déréférencement d'un pointeur de type incomplet
nmaster.c:49:8: erreur: déréférencement d'un pointeur de type incomplet
nmaster.c:51:9: erreur: déréférencement d'un pointeur de type incomplet
nmaster.c:52:8: erreur: déréférencement d'un pointeur de type incomplet
Mon config.h :
Code : Tout sélectionner
/* See LICENSE file for copyright and license details. */
/* appearance */
static const char font[] = "-*-*-medium-*-*-*-10-*-*-*-*-*-*-*";
static const char normbordercolor[] = "#cccccc";
static const char normbgcolor[] = "#000000";
static const char normfgcolor[] = "#D5D5D5";
static const char selbordercolor[] = "#9B3C35";
static const char selbgcolor[] = "#000000";
static const char selfgcolor[] = "#688C57";
static const unsigned int borderpx = 2; /* border pixel of windows */
static const unsigned int snap = 32; /* snap pixel */
static const unsigned int gappx = 3; /* gap pixel between windows */
static const Bool showbar = True; /* False means no bar */
static const Bool topbar = True; /* False means bottom bar */
/* tagging */
static const char *tags[] = { "[Web]", "[Chat]", "[Sys]", "[Files]", "[Dll]", "[Film]", "[Foo]", "[Bar]" };
static const Rule rules[] = {
/* class instance title tags mask isfloating monitor */
{ "Gimp", NULL, NULL, 0, True, -1 },
{ "Firefox", NULL, NULL, 1 << 8, False, -1 },
{ "Pidgin", NULL, NULL, 2, False, -1 },
{ "Deluge", NULL, NULL, 5, False, -1 },
{ "Vlc", NULL, NULL, 0, True, -1 },
{ "Gnome-mplayer", NULL, NULL, 0, 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 int nmaster = 2; /* default number of clients in the master area */
#include "nmaster.c"
static const Layout layouts[] = {
/* symbol arrange function */
{ "[T]", tile }, /* first entry is default */
{ "[~]", NULL }, /* no layout function means floating behavior */
{ "[M]", monocle },
{ "-|=", ntile },
};
/* key definitions */
#define MODKEY Mod1Mask
#define MODKEY2 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[] = { "uxterm", "-fa", "xft:Bitstream Vera Sans Mono:style=Roman:pixelsize=12:antialias=true", NULL };
/* Programs */
static const char *navigator[] = { "firefox", NULL };
static const char *chat[] = { "pidgin", NULL };
static const char *torrent[] = { "deluge", NULL };
static const char *verbes[] = { "verbiste-gtk", NULL };
static const char *printScreen[] = { "scrot", "~/Capture/png", NULL };
static const char *printSel[] = { "scrot", "-bs", "~/Capture/png", NULL };
static const char *shutdown[] = { "sudo", "halt", NULL };
static const char *reboot[] = { "sudo", "reboot", NULL };
static const char *nextSong[] = { "mpc", "next", NULL };
static const char *prevSong[] = { "mpc", "prev", NULL };
static const char *togglePlay[] = { "mpc", "toggle", NULL };
static const char *soundUp[] = { "amixer", "sset", "PCM", "3+", "unmute", NULL };
static const char *soundDown[] = { "amixer", "sset", "PCM", "3-", "unmute", NULL };
static Key keys[] = {
/* modifier key function argument */
{ MODKEY, XK_p, spawn, {.v = dmenucmd } },
{ MODKEY, XK_Return, spawn, {.v = termcmd } },
/* Program launching */
{ MODKEY2, XK_i, spawn, {.v = navigator } },
{ MODKEY2, XK_c, spawn, {.v = chat } },
{ MODKEY2, XK_t, spawn, {.v = torrent } },
{ MODKEY2, XK_v, spawn, {.v = verbes } },
{ MODKEY2, XK_p, spawn, {.v = printScreen } },
{ MODKEY|MODKEY2, XK_v, spawn, {.v = printSel } },
/* End program launching */
/* Sound managing */
{ MODKEY|ControlMask, XK_a, spawn, {.v = nextSong } },
{ MODKEY|ControlMask, XK_z, spawn, {.v = prevSong } },
{ MODKEY|ControlMask, XK_s, spawn, {.v = togglePlay } },
{ MODKEY|ControlMask, XK_q, spawn, {.v = soundUp } },
{ MODKEY|ControlMask, XK_w, spawn, {.v = soundDown } },
/* End mpd managing */
/* Power */
{ MODKEY|ShiftMask, XK_s, spawn, {.v = shutdown } },
{ MODKEY|ShiftMask, XK_r, spawn, {.v = reboot } },
/* End power */
{ 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_BackSpace, zoom, {0} },
{ MODKEY, XK_Tab, view, {0} },
{ MODKEY|ShiftMask, XK_c, killclient, {0} },
/*Layout bindings */
{ MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
{ MODKEY, XK_f, setlayout, {.v = &layouts[1]} },
{ MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
{ MODKEY, XK_n, setlayout, {.v = &layouts[3]} },
{ MODKEY, XK_b, setlayout, {.v = &layouts[4]} },
{ MODKEY, XK_g, setlayout, {.v = &layouts[5]} },
{ MODKEY, XK_space, setlayout, {0} },
/*End layout binding */
{ 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( 0x26, 0)
TAGKEYS( 0xe9, 1)
TAGKEYS( 0x22, 2)
TAGKEYS( 0x27, 3)
TAGKEYS( 0x28, 4)
TAGKEYS( 0x2d, 5)
TAGKEYS( 0xe8, 6)
TAGKEYS( 0x5f, 7)
TAGKEYS( 0xe7, 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} },
};
Amicalement
Marzikill.
--> conflit avec le patch pertag.diff, version 5.7.2