Bon, je change un peu mon premier post, pour que ce sujet puisse être un endroit de partage sur nos configurations de dwm. Alors voici ce que cela donne pour moi :
voici mon config.h :
[code]/* 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[] = “#ffffff”;
static const char selbordercolor[] = “#565656”;
static const char selbgcolor[] = “#979797”;
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 */
/* tagging */
static const char *tags[] = { “1”, “2”, “3”, “4”, “5”, “6”, “7”, “8”, “9”, };
static const Rule rules[] = {
/* class instance title tags mask isfloating monitor */
{ “Gimp”, NULL, NULL, 0, True, -1 },
{ “Gajim”, NULL, NULL, 1 << 6, False, -1 },
{ “MPlayer”, NULL, NULL, 0, True, -1 },
{ “gmplayer”, NULL, NULL, 0, True, -1 },
{ “Iceweasel”, NULL, “Téléchargements”, 1 << 8, False, -1 },
{ “Transmission”, NULL, NULL, 1 << 8, False, -1 },
{ “Icedove-bin”, NULL, NULL, 1 << 7, False, -1 },
{ “Fbpanel”, NULL, NULL, ~0, True, -1 },
{ “stalonetray”, NULL, NULL, ~0, True, -1 },
};
/* layout(s) /
static const float mfact = 0.62; / factor of master area size [0.05…0.95] /
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 MONTESON 0x1008ff13
#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[] = { “urxvt”, NULL };
static const char *firefox[] = { “iceweasel”, NULL };
static const char *gajim[] = { “gajim”, NULL };
static const char *icedove[] = { “icedove”, NULL };
static const char *thunar[] = { “thunar”, NULL };
static const char *gmplayer[] = { “gmplayer”, NULL };
static const char *transmission[] = { “transmission”, NULL };
static const char *monteson[] = { “amixer”, “set”, “Master”, “2dB+”, “unmute”, NULL };
static const char *baisseson[] = { “amixer”, “set”, “Master”, “2dB-”, “unmute”, NULL };
static const char *muteson[] = { “amixer”, “-q”, “set”, “Master”, “toggle”, NULL };
static const char *mpdprev[] = { “mpc”, “prev”, NULL };
static const char *mpdnext[] = { “mpc”, “next”, NULL };
static const char *mpdtoggle[] = { “mpc”, “toggle”, NULL };
static const char *sonata[] = { “sonata”, NULL };
static Key keys[] = {
/* modifier key function argument */
{ MODKEY, XK_F2, spawn, {.v = dmenucmd } },
{ MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } },
{ MODKEY|Mod1Mask, XK_f, spawn, {.v = firefox } },
{ MODKEY|Mod1Mask, XK_m, spawn, {.v = icedove } },
{ MODKEY|Mod1Mask, XK_t, spawn, {.v = transmission } },
{ MODKEY|Mod1Mask, XK_s, spawn, {.v = sonata } },
{ MODKEY|Mod1Mask, XK_v, spawn, {.v = gmplayer } },
{ MODKEY|Mod1Mask, XK_h, spawn, {.v = thunar } },
{ MODKEY|Mod1Mask, XK_i, spawn, {.v = gajim } },
{ ControlMask, 0xff53, spawn, {.v = mpdnext } },
{ ControlMask, 0xff51, spawn, {.v = mpdprev } },
{ ControlMask, 0xff54, spawn, {.v = mpdtoggle } },
{ MODKEY, XK_F8, spawn, {.v = monteson } },
{ MODKEY , XK_F7, spawn, {.v = baisseson } },
{ MODKEY , XK_F9, spawn, {.v = muteson } },
{ 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, XK_Escape, 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( 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} },
};
[/code]
En ce qui me concerne, j’aimerais changer les raccourcis pour gérer le volume sonore, pour n’utiliser que les touches XF86AudioRaiseVolume ,XF86AudioLowerVolume, XF86AudioMute . Cependant, comme il semble essentiel d’avoir une combinaison de touches dans le config.h … Si vous avez la solutions n’hésitez pas! 


