You are not logged in.

#401 2011-10-21 18:30:57

ivoarch
Member
Registered: 2011-03-31
Posts: 436

Re: Show off your Dwm configuration!

tYXhydw

Patches:
wm-5.9-centred-floating.diff - http://hg.punctweb.ro/dwm/src/c40f3544f … ating.diff

dwm-5.9-xbm_layout_icons.diff - https://github.com/ok100/dwm/blob/maste … icons.diff (edit for use whit statuscolours)

defaultlayout.diff - https://github.com/mjheagle8/dwm/blob/m … ayout.diff

attachaside.diff - http://dwm.suckless.org/patches/attachaside

uselessgap.diff - http://dwm.suckless.org/patches/uselessgap

statuscolors.diff - http://lists.suckless.org/dev/1011/6445.html

op.menu.patch - https://gist.github.com/1293166  edit for use whit status colours

cycle.diff - 

cyclelayouts.diff - 

bstack.diff  -

gridmode.diff -  https://raw.github.com/qbbr/dwm/master/ … dmode.diff

 /* See LICENSE file for copyright and license details. */
/* All Patches                                         */ 
/* bstack.diff                                         */
/* attachaside.diff                                    */
/* cycle.diff                                          */
/* cyclelayouts.diff                                   */
/* defaultlayout.diff                                  */
/* dwm-5.8.2-pertag.diff                               */
/* statuscolors.diff                                   */
/* uselessgap.diff                                     */ 
/* op.menu.patch                                       */
/* gridmode.diff                                       */
/* dwm-5.9-centred-floating.diff                       */
/* dwm-5.9-xbm_layout_icons.diff                       */
/* add bottom space for Dzen2 and Trayer               */
   
/* appearance */
#define NUMCOLORS 8 // need at least 3
static const char colors[NUMCOLORS][ColLast][8] = { 
 // border foreground background
   { "#111111", "#676767", "#333333" }, // 0 = normal
   { "#395573", "#C0C0C0", "#333333" }, // 1 = selected
   { "#000000", "#8C4665", "#333333" }, // 2 = red
   { "#000000", "#000000", "#287373" }, // 3 = green 
   { "#000000", "#333333", "#395573" }, // 4 = blue
   { "#000000", "#333333", "#8C4665" }, // 5 = normal
   { "#000000", "#000000", "#333333" }, // 6 = cyan
   { "#000000", "#000000", "#333333" }, // 7 = blue
}; 

static const char font[] = "-*-terminus-medium-r-*-*-14-*-*-*-*-*-*-*";
// static const char font[]   = "-*-tamsyn-medium-*-*-*-14-*-*-*-*-*-iso8859-*";
static const unsigned int borderpx = 1;        /* border pixel of windows */ 
static const unsigned int gappx    = 4;       /* gap pixel between 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 */
static Bool useicons               = True;// False means use ascii symbols 

/* tagging */
static const char *tags[] = { "null", "web", "misc", "code", "media"};
static const int taglayouts[] = {1, 1, 1, 4, 4};

/* tag definitions for rules */
#define WEB 1 << 1
#define MISC 1 << 2 
#define CODE 1 << 3 
#define MEDIA 1 << 4 

/* rules */
static const Rule rules[] = {
/* class               instance       title       tags     isfloating  monitor */
{ "Chromium",            NULL,        NULL,       WEB,      False,      -1 }, 
{ "surf",                NULL,        NULL,       WEB,      False,      -1 },
{ "Gimp",                NULL,        NULL,       MISC,     False,      -1 }, 
{ "Tabbed",              NULL,        NULL,       WEB,      False,      -1 }, 
{ "Skype",               NULL,        NULL,       MISC,     False,      -1 }, 
{ "Geany",               NULL,        NULL,       CODE,     False,      -1 }, 
{ "Wicd",                NULL,        NULL,       0,        False,      -1 }, 
{ "Trayer",              NULL,        NULL,       ~0,       True,       -1 },     
{ "Audacious",           NULL,        NULL,       MEDIA,    False,      -1 }, 
{ "Xfburn",              NULL,        NULL,       MEDIA,    False,      -1 }, 
{ "Vlc",                 NULL,        NULL,       MEDIA,    False,      -1 }, 
};
 
/* layout(s) */
static const float mfact = 0.50; /* factor of master area size [0.05..0.95] */
static const Bool resizehints = False; /* True means respect size hints in tiled resizals */ 
 
/* PATHS */ 
#define HOME "/home/ivo" 
#define ICONS HOME"/.dwm/icons"
static const Layout layouts[] = {
    // icon symbol arrange function
{ ICONS"/tile.xbm", "[]=", tile },
{ ICONS"/bstack.xbm", "[b]", bstack },
{ ICONS"/monocle.xbm", "[M]", monocle },
{ ICONS"/float.xbm", "><>", NULL }, 
{ ICONS"/grid.xbm", "[G]", grid },
{ .symbol = NULL, .arrange = NULL },
};

/* key definitions */
#define MODKEY Mod4Mask 
#define CTRLKEY ControlMask
#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", colors[0][ColBG], "-nf", colors[0][ColFG], "-sb", colors[1][ColBG], "-sf", colors[1][ColFG], NULL };
static const char *termcmd[] =   { "urxvtc", NULL };
static const char *chromium[] =  { "chromium", NULL };  
static const char *skype[] =     { "skype", NULL };   
static const char *surf[] =      { "surf", NULL }; 
static const char *thunar[] =    { "thunar", NULL }; 
static const char *lxappearance[] = { "lxappearance", NULL }; 
static const char *vlc[] =       { "vlc", NULL }; 
static const char *xfburn[] =    { "xfburn", NULL }; 
static const char *gimp[] =      { "gimp", NULL };  
static const char *geany[] =     { "geany", NULL }; 
static const char *audacious[] = { "audacious", NULL }; 
static const char *guvcview[] =  { "guvcview", NULL }; 
static const char *oblogout[] =  { "oblogout", NULL };
static const char *tabcmd[] =    { "urxvt", "-e", "tabbed", NULL }; 
static const char *mancmd[] =    { "urxvt", "-e", "ranger", NULL };  
static const char *rtorrent[] =  { "urxvt", "-e", "rtorrent", NULL };      
static const char *voldown[] =   { "amixer", "-q", "-c", "0", "set", "Master", "5-", "unmute", NULL };
static const char *volup[] =     { "amixer", "-q", "-c", "0", "set", "Master", "5+", "unmute", NULL };
static const char *volmute[] =   { "amixer", "-q", "-c", "0", "set", "Master", "toggle", NULL }; 
 
/* menus */
#define MENUEND { NULL, NULL, NULL, {0} }
#define MENUSEP(x) { x, NULL, NULL, {0} }  
/* title, submenu, function, argument */ 
static const menuCtx appsMenu[] = {
   { "thunar", NULL, spawn, {.v = thunar } },  
    MENUSEP("──────────"),  
   { "geany", NULL, spawn, {.v = geany } }, 
    MENUSEP("──────────"), 
   { "Gimp", NULL, spawn, {.v = gimp } }, 
    MENUSEP("──────────"), 
   { "webcam", NULL, spawn, {.v = guvcview } },  
   MENUEND,
}; 
 
static const menuCtx internetMenu[] = {
   { "chromium", NULL, spawn, {.v = chromium } },  
    MENUSEP("──────────"), 
   { "surf", NULL, spawn, {.v = surf } }, 
    MENUSEP("──────────"),
   { "skype ", NULL, spawn, {.v = skype } }, 
    MENUSEP("──────────"),
   { "rtorrent", NULL, spawn, {.v = rtorrent } },
   MENUEND,
}; 
 
static const menuCtx musicMenu[] = {
   { "audacious", NULL, spawn, {.v = audacious } },  
    MENUSEP("──────────"),  
   { "vlc", NULL, spawn, {.v = vlc } }, 
    MENUSEP("──────────"),  
   { "xfburn", NULL, spawn, {.v = xfburn } },    
   MENUEND,
}; 
  
static const menuCtx exitMenu[] = { 
   { "lxappearance", NULL, spawn, {.v = lxappearance } }, 
    MENUSEP("────────────"),  
   { "Exit", NULL, spawn, {.v = oblogout } }, 
  
   MENUEND,
};
   
static const menuCtx rootMenu[] = {
     { "Apps »", &appsMenu[0], NULL, {0} }, 
     { "Internet »", &internetMenu[0], NULL, {0} },  
     { "Music »", &musicMenu[0], NULL, {0} }, 
     { "Exit »", &exitMenu[0], NULL, {0} },  
     MENUEND,
};
 
/* menu key bindings
* only grabbed when menu is alive. */
static Key menu_keys[] = {
   { 0, XK_Up,       menu_up,       {0} },
   { 0, XK_Down,     menu_down,     {0} },
   { 0, XK_Right,    menu_next,     {0} },
   { 0, XK_Left,     menu_prev,     {0} },
   { 0, XK_Return,   menu_accept,   {0} },
   { 0, XK_Escape,   togglemenu,    {0} }
};

static Key keys[] = {
/* modifier key function argument */
{ MODKEY,                               XK_p,      spawn,              {.v = dmenucmd } },
{ MODKEY,                               XK_x,      spawn,              {.v = termcmd } }, 
{ MODKEY,		                XK_c,	   spawn,	       {.v = chromium } }, 
{ MODKEY|ShiftMask,		        XK_c,	   spawn,	       {.v = tabcmd } }, 
{ MODKEY,                               XK_e,      spawn,              {.v = mancmd } },   
{ 0,                                    0xffc7,    spawn,              {.v = voldown } }, 
{ 0,                                    0xffc8,    spawn,              {.v = volup } }, 
{ 0,                                    0xffc9,    spawn,              {.v = volmute } }, 
{ CTRLKEY,                              XK_space,  togglemenu,         {0} },
{ MODKEY|ShiftMask,                     XK_b,                          togglebar, {0} },
{ MODKEY,                               XK_q,                          killclient, {0} },
{ MODKEY|ShiftMask,                     XK_q,                          quit, {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,                               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} },
TAGKEYS( XK_1, 0)
TAGKEYS( XK_2, 1)
TAGKEYS( XK_3, 2)
TAGKEYS( XK_4, 3)
TAGKEYS( XK_5, 4)
{ MODKEY,                               XK_Tab,                        view, {0} },
{ MODKEY,                               XK_0,                          view, {.ui = ~0 } },
{ MODKEY|ShiftMask,                     XK_0,                          tag, {.ui = ~0 } },
{ MODKEY,                               XK_Left,                       cycle, {.i = -1} },
{ MODKEY,                               XK_Right,                      cycle, {.i = +1} },
{ MODKEY|ShiftMask,                     XK_Left,                       tagcycle, {.i = -1} },
{ MODKEY|ShiftMask,                     XK_Right,                      tagcycle, {.i = +1} },
{ MODKEY,                               XK_t,       setlayout,         {.v = &layouts[0]} },
{ MODKEY,                               XK_d,       setlayout,         {.v = &layouts[1]} },
{ MODKEY,                               XK_m,       setlayout,         {.v = &layouts[2]} }, 
{ MODKEY,                               XK_f,       setlayout,         {.v = &layouts[3]} },     
{ MODKEY,                               XK_g,       setlayout,         {.v = &layouts[4]} },
{ MODKEY,                               XK_space,   nextlayout,        {0} },
{ MODKEY|ShiftMask,                     XK_space,   togglefloating,    {0} },
    
};

/* mouse binds */
/* click can be ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
static Button buttons[] = {
/* click event mask button function argument */
{ ClkLtSymbol,           0,             Button1,        nextlayout,         {0} },
{ ClkLtSymbol,           0,             Button3,        prevlayout,         {0} },
{ 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} }, 
{ ClkRootWin,            0,             Button3,        togglemenu,         {0} },
}; 

Last edited by ivoarch (2011-10-23 18:34:24)


I love GnuEmacs, GnuScreen, ratpoison, and conkeror.
Github )||( Weblog

Offline

#402 2011-10-27 03:10:42

cirnOS
Member
Registered: 2010-03-01
Posts: 107

Re: Show off your Dwm configuration!

Cloudef wrote:
nixfag wrote:
Cloudef wrote:

http://ompldr.org/tYWlqcQ
Created a OpenBox styled menu for DWM today.

How did you make that?A dzen menu or something? I remember somebody made a patch that would launch a specific command when right clicking on dwm background.

No it's not a dzen, it's coded directly to dwm.
see my dwm-fork
The relevant lines range from 590-794.

My dwm is quite heavily modified, but I might create patch for vanilla dwm, since the menu is quite simple.

Also here is menu with slightly more items.
http://ompldr.org/tYWlxYg


Please do. I would love something like this. Plus can you upload your wallpaper? Also are you using Wine to run those Touhou games?

Offline

#403 2011-10-27 05:37:47

Cloudef
Member
Registered: 2010-10-12
Posts: 636

Re: Show off your Dwm configuration!

cirnOS wrote:

Please do. I would love something like this. Plus can you upload your wallpaper? Also are you using Wine to run those Touhou games?

The patch is on DWM hackers thread, it's slightly outdated from my current git, but I'll update it later.
And yes I use wine.

Offline

#404 2011-10-28 01:28:22

cirnOS
Member
Registered: 2010-03-01
Posts: 107

Re: Show off your Dwm configuration!

Cloudef wrote:
cirnOS wrote:

Please do. I would love something like this. Plus can you upload your wallpaper? Also are you using Wine to run those Touhou games?

The patch is on DWM hackers thread, it's slightly outdated from my current git, but I'll update it later.
And yes I use wine.

OK. Can I have your wallpaper? I'd like to see it.

Offline

#405 2011-11-05 08:45:53

Paul-S
Member
From: Wales
Registered: 2008-02-04
Posts: 353

Re: Show off your Dwm configuration!

Some great configs and screenshots, the patches I want to use are pango, pertag, pidgin, scratchpad, bstack, columns.
Just wanted to know if theres a known order for patches or is it trial and error and fixing the patch errors as you go along.

Cheers
Paul-S

Offline

#406 2011-11-05 08:48:46

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Show off your Dwm configuration!

Apply pertag first: it changes some of the code around enough to necessitate hand patching the others in. Other than that, it it pretty straightforward.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#407 2011-11-05 08:58:21

lutherus
Member
From: Croatia;Varaždin
Registered: 2011-03-17
Posts: 150

Re: Show off your Dwm configuration!

2011-11-05-0951051366x76.jpgsatnov50950252011.jpg

work is still in progers smile
I would like to have tag names in icons but failing every time when i try


I`m not a nerd.I`m a level 55   dwarf monk-psychic ninja ;-)

my github

Offline

#408 2011-11-06 16:57:28

ZoR3oL
Member
Registered: 2011-11-06
Posts: 3

Re: Show off your Dwm configuration!

ivoarch wrote:

http://ompldr.org/tYXhydw

Patches:
wm-5.9-centred-floating.diff - http://hg.punctweb.ro/dwm/src/c40f3544f … ating.diff

dwm-5.9-xbm_layout_icons.diff - https://github.com/ok100/dwm/blob/maste … icons.diff (edit for use whit statuscolours)

defaultlayout.diff - https://github.com/mjheagle8/dwm/blob/m … ayout.diff

attachaside.diff - http://dwm.suckless.org/patches/attachaside

uselessgap.diff - http://dwm.suckless.org/patches/uselessgap

statuscolors.diff - http://lists.suckless.org/dev/1011/6445.html

op.menu.patch - https://gist.github.com/1293166  edit for use whit status colours

cycle.diff - 

cyclelayouts.diff - 

bstack.diff  -

gridmode.diff -  https://raw.github.com/qbbr/dwm/master/ … dmode.diff

 /* See LICENSE file for copyright and license details. */
/* All Patches                                         */ 
/* bstack.diff                                         */
/* attachaside.diff                                    */
/* cycle.diff                                          */
/* cyclelayouts.diff                                   */
/* defaultlayout.diff                                  */
/* dwm-5.8.2-pertag.diff                               */
/* statuscolors.diff                                   */
/* uselessgap.diff                                     */ 
/* op.menu.patch                                       */
/* gridmode.diff                                       */
/* dwm-5.9-centred-floating.diff                       */
/* dwm-5.9-xbm_layout_icons.diff                       */
/* add bottom space for Dzen2 and Trayer               */
   
/* appearance */
#define NUMCOLORS 8 // need at least 3
static const char colors[NUMCOLORS][ColLast][8] = { 
 // border foreground background
   { "#111111", "#676767", "#333333" }, // 0 = normal
   { "#395573", "#C0C0C0", "#333333" }, // 1 = selected
   { "#000000", "#8C4665", "#333333" }, // 2 = red
   { "#000000", "#000000", "#287373" }, // 3 = green 
   { "#000000", "#333333", "#395573" }, // 4 = blue
   { "#000000", "#333333", "#8C4665" }, // 5 = normal
   { "#000000", "#000000", "#333333" }, // 6 = cyan
   { "#000000", "#000000", "#333333" }, // 7 = blue
}; 

static const char font[] = "-*-terminus-medium-r-*-*-14-*-*-*-*-*-*-*";
// static const char font[]   = "-*-tamsyn-medium-*-*-*-14-*-*-*-*-*-iso8859-*";
static const unsigned int borderpx = 1;        /* border pixel of windows */ 
static const unsigned int gappx    = 4;       /* gap pixel between 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 */
static Bool useicons               = True;// False means use ascii symbols 

/* tagging */
static const char *tags[] = { "null", "web", "misc", "code", "media"};
static const int taglayouts[] = {1, 1, 1, 4, 4};

/* tag definitions for rules */
#define WEB 1 << 1
#define MISC 1 << 2 
#define CODE 1 << 3 
#define MEDIA 1 << 4 

/* rules */
static const Rule rules[] = {
/* class               instance       title       tags     isfloating  monitor */
{ "Chromium",            NULL,        NULL,       WEB,      False,      -1 }, 
{ "surf",                NULL,        NULL,       WEB,      False,      -1 },
{ "Gimp",                NULL,        NULL,       MISC,     False,      -1 }, 
{ "Tabbed",              NULL,        NULL,       WEB,      False,      -1 }, 
{ "Skype",               NULL,        NULL,       MISC,     False,      -1 }, 
{ "Geany",               NULL,        NULL,       CODE,     False,      -1 }, 
{ "Wicd",                NULL,        NULL,       0,        False,      -1 }, 
{ "Trayer",              NULL,        NULL,       ~0,       True,       -1 },     
{ "Audacious",           NULL,        NULL,       MEDIA,    False,      -1 }, 
{ "Xfburn",              NULL,        NULL,       MEDIA,    False,      -1 }, 
{ "Vlc",                 NULL,        NULL,       MEDIA,    False,      -1 }, 
};
 
/* layout(s) */
static const float mfact = 0.50; /* factor of master area size [0.05..0.95] */
static const Bool resizehints = False; /* True means respect size hints in tiled resizals */ 
 
/* PATHS */ 
#define HOME "/home/ivo" 
#define ICONS HOME"/.dwm/icons"
static const Layout layouts[] = {
    // icon symbol arrange function
{ ICONS"/tile.xbm", "[]=", tile },
{ ICONS"/bstack.xbm", "[b]", bstack },
{ ICONS"/monocle.xbm", "[M]", monocle },
{ ICONS"/float.xbm", "><>", NULL }, 
{ ICONS"/grid.xbm", "[G]", grid },
{ .symbol = NULL, .arrange = NULL },
};

/* key definitions */
#define MODKEY Mod4Mask 
#define CTRLKEY ControlMask
#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", colors[0][ColBG], "-nf", colors[0][ColFG], "-sb", colors[1][ColBG], "-sf", colors[1][ColFG], NULL };
static const char *termcmd[] =   { "urxvtc", NULL };
static const char *chromium[] =  { "chromium", NULL };  
static const char *skype[] =     { "skype", NULL };   
static const char *surf[] =      { "surf", NULL }; 
static const char *thunar[] =    { "thunar", NULL }; 
static const char *lxappearance[] = { "lxappearance", NULL }; 
static const char *vlc[] =       { "vlc", NULL }; 
static const char *xfburn[] =    { "xfburn", NULL }; 
static const char *gimp[] =      { "gimp", NULL };  
static const char *geany[] =     { "geany", NULL }; 
static const char *audacious[] = { "audacious", NULL }; 
static const char *guvcview[] =  { "guvcview", NULL }; 
static const char *oblogout[] =  { "oblogout", NULL };
static const char *tabcmd[] =    { "urxvt", "-e", "tabbed", NULL }; 
static const char *mancmd[] =    { "urxvt", "-e", "ranger", NULL };  
static const char *rtorrent[] =  { "urxvt", "-e", "rtorrent", NULL };      
static const char *voldown[] =   { "amixer", "-q", "-c", "0", "set", "Master", "5-", "unmute", NULL };
static const char *volup[] =     { "amixer", "-q", "-c", "0", "set", "Master", "5+", "unmute", NULL };
static const char *volmute[] =   { "amixer", "-q", "-c", "0", "set", "Master", "toggle", NULL }; 
 
/* menus */
#define MENUEND { NULL, NULL, NULL, {0} }
#define MENUSEP(x) { x, NULL, NULL, {0} }  
/* title, submenu, function, argument */ 
static const menuCtx appsMenu[] = {
   { "thunar", NULL, spawn, {.v = thunar } },  
    MENUSEP("──────────"),  
   { "geany", NULL, spawn, {.v = geany } }, 
    MENUSEP("──────────"), 
   { "Gimp", NULL, spawn, {.v = gimp } }, 
    MENUSEP("──────────"), 
   { "webcam", NULL, spawn, {.v = guvcview } },  
   MENUEND,
}; 
 
static const menuCtx internetMenu[] = {
   { "chromium", NULL, spawn, {.v = chromium } },  
    MENUSEP("──────────"), 
   { "surf", NULL, spawn, {.v = surf } }, 
    MENUSEP("──────────"),
   { "skype ", NULL, spawn, {.v = skype } }, 
    MENUSEP("──────────"),
   { "rtorrent", NULL, spawn, {.v = rtorrent } },
   MENUEND,
}; 
 
static const menuCtx musicMenu[] = {
   { "audacious", NULL, spawn, {.v = audacious } },  
    MENUSEP("──────────"),  
   { "vlc", NULL, spawn, {.v = vlc } }, 
    MENUSEP("──────────"),  
   { "xfburn", NULL, spawn, {.v = xfburn } },    
   MENUEND,
}; 
  
static const menuCtx exitMenu[] = { 
   { "lxappearance", NULL, spawn, {.v = lxappearance } }, 
    MENUSEP("────────────"),  
   { "Exit", NULL, spawn, {.v = oblogout } }, 
  
   MENUEND,
};
   
static const menuCtx rootMenu[] = {
     { "Apps »", &appsMenu[0], NULL, {0} }, 
     { "Internet »", &internetMenu[0], NULL, {0} },  
     { "Music »", &musicMenu[0], NULL, {0} }, 
     { "Exit »", &exitMenu[0], NULL, {0} },  
     MENUEND,
};
 
/* menu key bindings
* only grabbed when menu is alive. */
static Key menu_keys[] = {
   { 0, XK_Up,       menu_up,       {0} },
   { 0, XK_Down,     menu_down,     {0} },
   { 0, XK_Right,    menu_next,     {0} },
   { 0, XK_Left,     menu_prev,     {0} },
   { 0, XK_Return,   menu_accept,   {0} },
   { 0, XK_Escape,   togglemenu,    {0} }
};

static Key keys[] = {
/* modifier key function argument */
{ MODKEY,                               XK_p,      spawn,              {.v = dmenucmd } },
{ MODKEY,                               XK_x,      spawn,              {.v = termcmd } }, 
{ MODKEY,		                XK_c,	   spawn,	       {.v = chromium } }, 
{ MODKEY|ShiftMask,		        XK_c,	   spawn,	       {.v = tabcmd } }, 
{ MODKEY,                               XK_e,      spawn,              {.v = mancmd } },   
{ 0,                                    0xffc7,    spawn,              {.v = voldown } }, 
{ 0,                                    0xffc8,    spawn,              {.v = volup } }, 
{ 0,                                    0xffc9,    spawn,              {.v = volmute } }, 
{ CTRLKEY,                              XK_space,  togglemenu,         {0} },
{ MODKEY|ShiftMask,                     XK_b,                          togglebar, {0} },
{ MODKEY,                               XK_q,                          killclient, {0} },
{ MODKEY|ShiftMask,                     XK_q,                          quit, {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,                               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} },
TAGKEYS( XK_1, 0)
TAGKEYS( XK_2, 1)
TAGKEYS( XK_3, 2)
TAGKEYS( XK_4, 3)
TAGKEYS( XK_5, 4)
{ MODKEY,                               XK_Tab,                        view, {0} },
{ MODKEY,                               XK_0,                          view, {.ui = ~0 } },
{ MODKEY|ShiftMask,                     XK_0,                          tag, {.ui = ~0 } },
{ MODKEY,                               XK_Left,                       cycle, {.i = -1} },
{ MODKEY,                               XK_Right,                      cycle, {.i = +1} },
{ MODKEY|ShiftMask,                     XK_Left,                       tagcycle, {.i = -1} },
{ MODKEY|ShiftMask,                     XK_Right,                      tagcycle, {.i = +1} },
{ MODKEY,                               XK_t,       setlayout,         {.v = &layouts[0]} },
{ MODKEY,                               XK_d,       setlayout,         {.v = &layouts[1]} },
{ MODKEY,                               XK_m,       setlayout,         {.v = &layouts[2]} }, 
{ MODKEY,                               XK_f,       setlayout,         {.v = &layouts[3]} },     
{ MODKEY,                               XK_g,       setlayout,         {.v = &layouts[4]} },
{ MODKEY,                               XK_space,   nextlayout,        {0} },
{ MODKEY|ShiftMask,                     XK_space,   togglefloating,    {0} },
    
};

/* mouse binds */
/* click can be ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
static Button buttons[] = {
/* click event mask button function argument */
{ ClkLtSymbol,           0,             Button1,        nextlayout,         {0} },
{ ClkLtSymbol,           0,             Button3,        prevlayout,         {0} },
{ 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} }, 
{ ClkRootWin,            0,             Button3,        togglemenu,         {0} },
}; 

Need to know how can i get the bottom bar?
Maybe could give me a link for a patch?
Nice desktop wink

Offline

#409 2011-11-06 17:05:54

OK100
Member
From: [U==]
Registered: 2010-04-26
Posts: 455

Re: Show off your Dwm configuration!

ZoR3oL wrote:

Need to know how can i get the bottom bar?

In config.h:

static const Bool topbar = False;

Last edited by OK100 (2011-11-06 17:06:20)

Offline

#410 2011-11-06 17:11:09

JokerBoy
Member
From: România
Registered: 2009-09-24
Posts: 641

Re: Show off your Dwm configuration!

the bottom bar in that screenshot is dzen2..

Offline

#411 2011-11-06 18:09:15

ZoR3oL
Member
Registered: 2011-11-06
Posts: 3

Re: Show off your Dwm configuration!

Yeah i know that, but the question is:
If i launch dzen2 as a bottom bar, the other application cover it or no?
I said that because i've this problem with conky.

Last edited by ZoR3oL (2011-11-06 18:09:24)

Offline

#412 2011-11-06 19:02:04

JokerBoy
Member
From: România
Registered: 2009-09-24
Posts: 641

Re: Show off your Dwm configuration!

Offline

#413 2011-11-06 21:01:22

ZoR3oL
Member
Registered: 2011-11-06
Posts: 3

Re: Show off your Dwm configuration!

Thanks a lot !

My desktop for this month.
DWM 5.9 patched with:
- pertag
- centered-floating
- pango (for xft font support)
- uselessgap
- azertysupport
- bottom-padding (thanks again to JokerBoy !)

Clean:
1320614021.png

Dirty:
1320613182.png

Glad to know this great WM ^^

Last edited by ZoR3oL (2011-11-06 21:14:22)

Offline

#414 2011-11-08 01:18:26

spo11
Member
From: breaking your strands
Registered: 2011-02-23
Posts: 30
Website

Re: Show off your Dwm configuration!

This is mine:
tYjZkcg

Patches & config information @github.

Offline

#415 2011-11-08 08:31:25

cirnOS
Member
Registered: 2010-03-01
Posts: 107

Re: Show off your Dwm configuration!

spo11 wrote:

This is mine:
http://ompldr.org/tYjZkcg

Patches & config information @github.


Which patch are you using for that tiling method?

Offline

#416 2011-11-08 08:51:04

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Show off your Dwm configuration!

cirnOS wrote:
spo11 wrote:

This is mine:
http://ompldr.org/tYjZkcg

Patches & config information @github.


Which patch are you using for that tiling method?

Check his github: bstack horizontal https://github.com/spo11/dwm/blob/maste … k-alt.diff


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#417 2011-11-15 22:30:12

inch
Member
Registered: 2010-12-21
Posts: 49

Re: Show off your Dwm configuration!

spo11 wrote:

This is mine:
http://ompldr.org/tYjZkcg

Patches & config information @github.

What font rendering are you using in your terminals? Is it anything special or is it just the font that looks so sharp?

Offline

#418 2011-11-16 03:09:13

DoctorSamulus
Member
Registered: 2010-11-04
Posts: 53

Re: Show off your Dwm configuration!

spo11 wrote:

This is mine:
http://ompldr.org/tYjZkcg

Patches & config information @github.

What is your vim colorscheme? Also I love Portishead! Nice.

Offline

#419 2011-11-16 23:27:45

spo11
Member
From: breaking your strands
Registered: 2011-02-23
Posts: 30
Website

Re: Show off your Dwm configuration!

inch wrote:
spo11 wrote:

This is mine:
http://ompldr.org/tYjZkcg

Patches & config information @github.

What font rendering are you using in your terminals? Is it anything special or is it just the font that looks so sharp?

I use the infinality patch for the font rendering.


DoctorSamulus wrote:
spo11 wrote:

This is mine:
http://ompldr.org/tYjZkcg

Patches & config information @github.

What is your vim colorscheme? Also I love Portishead! Nice.

I use the molokai color scheme, which is available in the AUR. Portishead is amazing. Def. one of my favourite bands.

Offline

#420 2011-11-17 02:33:23

knopwob
Member
From: Hannover, Germany
Registered: 2010-01-30
Posts: 239
Website

Re: Show off your Dwm configuration!

I use a fairly vanilla dwm with pertag and transparency patches.

Additionally I added the following to my config.h

static const Rule rules[] =  {
[...]
    { "URxvt",         "scratchpad",       "screen",    0,      True,   -1, -1 },
    { "URxvt",         "scratchpadtiled",  "screen",    0,      False,  -1, -1 },

[...]

static const char *scratchpadcmd[]      = { "urxvtc", "-geometry", "180x20+0+1", "-name", "scratchpad", "-e", "screen", "-D", "-R", "scratchpad", NULL };
static const char *scratchpadtiledcmd[] = { "urxvtc", "-geometry", "180x20+0+1", "-name", "scratchpadtiled", "-e", "screen", "-D", "-R", "scratchpad", NULL };

static Key keys[] = {
[...]
    { MODKEY,                       XK_F5,     spawn,          {.v = scratchpadcmd} },
    { MODKEY|ShiftMask,             XK_F5,     spawn,          {.v = scratchpadtiledcmd} },

This is my attempt to emulate guake/tilda/yakuake. Of course, it's not as pretty as the originals, but I only care for the fact, that I always have the _same_ terminal  available via shortcut.

Another thing that bothered me was the fact that on shutdown/reboot the windows aren't properly closed. For example because of this I always got the 'restore session' dialog at the startup from firefox.

To fix this, I wrote a patch for lsw, which adds a flag to not only list all windows but to send a close event to all windows.
Here's the patch

--- lsw.c	2011-11-17 03:22:54.112293519 +0100
+++ lsw.new.c	2011-11-15 23:41:45.764720827 +0100
@@ -8,9 +8,13 @@
 
 static void getname(Window win, char *buf, size_t size);
 static void lsw(Window win);
+static void sendevent(Window win, Atom proto);
 
 static Atom netwmname;
+static Atom wmdelete;
+static Atom wmprotocols;
 static Bool lflag = False;
+static Bool kflag = False;
 static Display *dpy;
 
 int
@@ -22,6 +26,8 @@ main(int argc, char *argv[]) {
 		exit(EXIT_FAILURE);
 	}
 	netwmname = XInternAtom(dpy, "_NET_WM_NAME", False);
+	wmdelete = XInternAtom(dpy, "WM_DELETE_WINDOW", False);
+	wmprotocols = XInternAtom(dpy, "WM_PROTOCOLS", False);
 
 	for(i = 1; i < argc; i++)
 		if(!strcmp(argv[i], "-v")) {
@@ -30,6 +36,8 @@ main(int argc, char *argv[]) {
 		}
 		else if(!strcmp(argv[i], "-l"))
 			lflag = True;
+		else if(!strcmp(argv[i], "-k"))
+			kflag = True;
 		else
 			break;
 
@@ -54,6 +62,8 @@ lsw(Window win) {
 	for(i = 0; i < n; i++)
 		if(XGetWindowAttributes(dpy, win, &wa) && !wa.override_redirect) {
 			getname(wins[i], buf, sizeof buf);
+			if(kflag)
+				sendevent(wins[i], wmdelete);
 			if(lflag)
 				printf("0x%lx %s\n", wins[i], buf);
 			else if(*buf)
@@ -81,3 +91,26 @@ getname(Window win, char *buf, size_t si
 	}
 	XFree(prop.value);
 }
+
+void
+sendevent(Window win, Atom proto) {
+	int n;
+	Atom *protocols;
+	Bool exists = False;
+	XEvent ev;
+
+	if(XGetWMProtocols(dpy, win, &protocols, &n)) {
+		while(!exists && n--)
+			exists = protocols[n] == proto;
+		XFree(protocols);
+	}
+	if(exists) {
+		ev.type = ClientMessage;
+		ev.xclient.window = win;
+		ev.xclient.message_type = wmprotocols;
+		ev.xclient.format = 32;
+		ev.xclient.data.l[0] = proto;
+		ev.xclient.data.l[1] = CurrentTime;
+		XSendEvent(dpy, win, False, NoEventMask, &ev);
+	}
+}

And finally, to shutdown/reboot I use the following script:

#!/bin/bash

timeout=30

if [ "$(whoami)" != "root" ]; then
    echo "you need to be root"
    exit 1
fi

# to the pseudo fork
# we need to nohup ourselves, otherwise we would get 
# killed together with the terminal-emulator this script
# is running in
# "!!!###!!!" is a random string that will hopefully
# never become a valid argument.
if [ "$1" != "!!!###!!!" ]; then
    nohup $0 "!!!###!!!" "$@" > /dev/null &
else
   shift 
fi

if $(which lsw); then
    lsw -k
    i=1
    while [ -n "$(lsw)" -a $i -lt $timeout ]; do
        i=$((i+1))
        sleep 1
    done
fi

/sbin/shutdown "$@"

Maybe this is useful to someone. And on a site note: I've got the feeling that there should be an easier way to achieve 
these things. Please let me know if you know one.

Offline

#421 2011-11-17 15:54:45

rezza
Member
From: Edinburgh, uk
Registered: 2004-07-08
Posts: 237

Re: Show off your Dwm configuration!

2011-11-17-1544_thumb.png
Fairly heavily customized dwm.c. I use fbpanel-dwm from aur for my tray icons.

Offline

#422 2011-11-26 17:29:03

OK100
Member
From: [U==]
Registered: 2010-04-26
Posts: 455

Re: Show off your Dwm configuration!

tYmdvbw
Patches:
- pertag2
- scratchpad-stay
- xbm layout icons
- urgentcolor
- apply resizehints in floating layout
- im-grid
- nbstack
- push
- tilemovemouse
- togglefullscreen

Everything is on my github.

Last edited by OK100 (2011-11-26 17:30:14)

Offline

#423 2011-11-26 18:09:29

bohoomil
Member
Registered: 2010-09-04
Posts: 2,376
Website

Re: Show off your Dwm configuration!

@OK100 -- that one looks excellent: great legibility considering the screen real estate.


:: Registered Linux User No. 223384

:: github
:: infinality-bundle+fonts: good looking fonts made easy

Offline

#424 2011-11-26 21:00:26

OK100
Member
From: [U==]
Registered: 2010-04-26
Posts: 455

Re: Show off your Dwm configuration!

bohoomil wrote:

@OK100 -- that one looks excellent: great legibility considering the screen real estate.

Thanks, the font is Tamsyn 11.

Offline

#425 2011-11-30 22:17:27

Mr Pink57
Member
From: a van down by the river
Registered: 2009-05-30
Posts: 91

Re: Show off your Dwm configuration!

th_2b4c61a4.png

Updated:
th_1d27a322.png

Last edited by Mr Pink57 (2011-12-06 07:55:21)


Even a broken clock is right twice a day.

Diplomacy without force is like music without instruments.

Offline

Board footer

Powered by FluxBB