On Thu, 2008-06-05 at 14:09 +0200, Anselm R. Garbe wrote:
> On Thu, Jun 05, 2008 at 01:10:01PM +0200, pancake wrote:
> > Yay! :)
> >
> > I just applied your patch and started to play with and I'm very happy
> > with it! It's just what I was looking for :D
> >
> > The way it defines the mouse clicks is quite similar to the keys and is
> > very nice. Cool job!
> >
> > I would really like to see this in mainstream dwm :)
>
> Well not before 5.0 ;) I'm aiming to release 5.0 this weekend
> together with a new dmenu release.
Yay :) this will be awesome! :)
I have tuned my dwm 5.0 with this patch and I'm really happy with the
result! Attached is my config.h.
PD: BTW For black theme with gtk I found the clearlooks-darkorange quite
nice together with my current dwm theme.
/me happy
--pancake
/* See LICENSE file for copyright and license details. */
/* appearance */
#define FONT "-*-terminus-medium-r-normal-*-14-*-*-*-*-*-*-*"
#define orange "#f60"
#define lila "#729"
#define white "#fff"
#define gray0 "#222"
#define gray1 "#555"
#define gray2 "#999"
#define XINERAMA_IDX 1
#define NORMBORDERCOLOR gray1
#define NORMBGCOLOR gray0
#define NORMFGCOLOR white
#define SELBORDERCOLOR white
#define SELBGCOLOR gray1
#define SELFGCOLOR white
unsigned int borderpx = 4; /* border pixel of windows */
unsigned int snap = 32; /* snap pixel */
Bool showbar = True; /* False means no bar */
Bool topbar = True; /* False means bottom bar */
/* tagging */
const char tags[][MAXTAGLEN] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
Rule rules[] = {
/* class instance title tags ref isfloating */
{ "Gimp", NULL, NULL, 0, True },
{ "Firefox", NULL, NULL, 1 << 8, True },
};
/* layout(s) */
double mfact = 0.60;
Bool resizehints = False; /* False means respect size hints in tiled resizals */
Layout layouts[] = {
/* symbol arrange function */
{ "[]=", tile }, /* first entry is default */
{ "><>", NULL }, /* no layout function means floating behavior */
};
/* key definitions */
#define MODKEY Mod1Mask
#define TAGKEYS(KEY,TAG) \
{ MODKEY, KEY, view, TAG }, \
{ MODKEY|ControlMask, KEY, toggleview, TAG }, \
{ MODKEY|ShiftMask, KEY, tag, TAG }, \
{ MODKEY|ControlMask|ShiftMask, KEY, toggletag, TAG },
#define TAGBUTTONS(TAG) \
{ TAG, 0, Button1, view, (uint[]){1 << TAG} }, \
{ TAG, 0, Button3, toggleview, (uint[]){1 << TAG} }, \
{ TAG, MODKEY, Button1, tag, (uint[]){1 << TAG} }, \
{ TAG, MODKEY, Button3, toggletag, (uint[]){1 << TAG} },
#define WHEEL_ON_TAGS \
{ 0, 0, Button4, setmfact ,(double[]){-0.05}}, \
{ 0, 0, Button5, setmfact ,(double[]){+0.05}}, \
{ 1, 0, Button4, setmfact ,(double[]){-0.05}}, \
{ 1, 0, Button5, setmfact ,(double[]){+0.05}}, \
{ 2, 0, Button4, setmfact ,(double[]){-0.05}}, \
{ 2, 0, Button5, setmfact ,(double[]){+0.05}}, \
{ 3, 0, Button4, setmfact ,(double[]){-0.05}}, \
{ 3, 0, Button5, setmfact ,(double[]){+0.05}}, \
{ 4, 0, Button4, setmfact ,(double[]){-0.05}}, \
{ 4, 0, Button5, setmfact ,(double[]){+0.05}}, \
{ 5, 0, Button4, setmfact ,(double[]){-0.05}}, \
{ 5, 0, Button5, setmfact ,(double[]){+0.05}}, \
{ 6, 0, Button4, setmfact ,(double[]){-0.05}}, \
{ 6, 0, Button5, setmfact ,(double[]){+0.05}}, \
{ 7, 0, Button4, setmfact ,(double[]){-0.05}}, \
{ 7, 0, Button5, setmfact ,(double[]){+0.05}}, \
{ 8, 0, Button4, setmfact ,(double[]){-0.05}}, \
{ 8, 0, Button5, setmfact ,(double[]){+0.05}},
Button buttons[] = {
/* zone Event Mask button function argument */
{ LtSymbol, 0, Button1, togglelayout, NULL },
{ LtSymbol, 0, Button3, togglemax, NULL },
{ WinTitle, 0, Button1, zoom, NULL },
{ WinTitle, 0, Button2, spawn, (char*)"exec xterm"},
{ WinTitle, 0, Button3, killclient, NULL },
{ WinTitle, 0, Button4, focusprev, NULL },
{ WinTitle, 0, Button5, focusnext, NULL },
{ RootWin, 0, Button1, zoom, NULL },
{ RootWin, 0, Button2, spawn, (char*)"exec xterm"},
{ RootWin, 0, Button3, killclient, NULL },
{ RootWin, 0, Button4, focusprev, NULL },
{ RootWin, 0, Button5, focusnext, NULL },
{ RootWin, MODKEY, Button4, setmfact ,(double[]){-0.05}},
{ RootWin, MODKEY, Button5, setmfact ,(double[]){+0.05}},
{ ClientWin, MODKEY, Button1, movemouse, NULL },
{ ClientWin, MODKEY, Button2, zoom , NULL },
{ ClientWin, MODKEY, Button3, resizemouse, NULL },
// { RootWin, Button1Mask, Button3, spawn, (char *)"exec uxterm" },
WHEEL_ON_TAGS
TAGBUTTONS(0)
TAGBUTTONS(1)
TAGBUTTONS(2)
TAGBUTTONS(3)
TAGBUTTONS(4)
TAGBUTTONS(5)
TAGBUTTONS(6)
TAGBUTTONS(7)
TAGBUTTONS(8)
TAGBUTTONS(9)
};
Key keys[] = {
/* modifier key function argument */
{ MODKEY, XK_p, spawn, (char *)"exec dmenu_run -fn '"FONT"' -nb '"NORMBGCOLOR"' -nf '"NORMFGCOLOR"' -sb '"SELBGCOLOR"' -sf '"SELFGCOLOR"'" },
{ MODKEY|ShiftMask, XK_Return, spawn, (char *)"exec uxterm" },
{ MODKEY, XK_b, togglebar, NULL },
{ MODKEY, XK_j, focusnext, NULL },
{ MODKEY, XK_k, focusprev, NULL },
{ MODKEY, XK_h, setmfact, (double[]){-0.05} },
{ MODKEY, XK_l, setmfact, (double[]){+0.05} },
{ MODKEY, XK_m, togglemax, NULL },
{ MODKEY, XK_Return, zoom, NULL },
{ MODKEY, XK_Tab, view, NULL },
{ MODKEY|ShiftMask, XK_c, killclient, NULL },
{ MODKEY, XK_space, togglelayout, NULL },
{ MODKEY|ShiftMask, XK_space, togglefloating, NULL },
{ MODKEY, XK_0, view, (uint[]){ ~0 } },
{ MODKEY|ShiftMask, XK_0, tag, (uint[]){ ~0 } },
TAGKEYS( XK_1, (uint[]){ 1 << 0} )
TAGKEYS( XK_2, (uint[]){ 1 << 1} )
TAGKEYS( XK_3, (uint[]){ 1 << 2} )
TAGKEYS( XK_4, (uint[]){ 1 << 3} )
TAGKEYS( XK_5, (uint[]){ 1 << 4} )
TAGKEYS( XK_6, (uint[]){ 1 << 5} )
TAGKEYS( XK_7, (uint[]){ 1 << 6} )
TAGKEYS( XK_8, (uint[]){ 1 << 7} )
TAGKEYS( XK_9, (uint[]){ 1 << 8} )
TAGKEYS( XK_w, (uint[]){ 1 << 8} )
};
//{ MODKEY|ShiftMask, XK_q, quit, NULL },