guest@dotshare [~/groups/wms/dwm] $ ls eeepc/ | cat

eeepc (scrot, raw, dl) (+5 likes)

jasonwryan Jun 23, 2011 (wms/dwm)

SCROT

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
/* MIT/X Consortium License */

/* appearance */
static const char font[]   = "-*-tamsyn-medium-*-*-*-17-*-*-*-*-*-iso8859-*";
#define NUMCOLORS 8 
static const char colors[NUMCOLORS][ColLast][8] = {
// border foreground background
{ "#212121", "#696969", "#121212" }, // 0 = normal
{ "#696969", "#E0E0E0", "#121212" }, // 1 = selected
{ "#212121", "#CF4F88", "#121212" }, // 2 = red
{ "#212121", "#53A6A6", "#121212" }, // 3 = green
{ "#212121", "#914E89", "#121212" }, // 4 = yellow
{ "#212121", "#47959E", "#121212" }, // 5 = cyan
{ "#212121", "#7E62B3", "#121212" }, // 6 = magenta
{ "#212121", "#C0C0C0", "#121212" }, // 7 = white
};

static const unsigned int borderpx  = 1;        /* border pixel of windows */
static const unsigned int snap      = 4;        /* snap pixel */
static const Bool showbar           = True;     /* False means no bar */
static const Bool topbar            = True;     /* False means bottom bar */

static const Rule rules[] = {
	/* class         instance    title       tags mask     isfloating   monitor */
        { "Vimprobable", NULL,       NULL,       1 << 0,       False,       -1 },
        { "Tabbed",      NULL,       NULL,       1 << 0,       False,       -1 },
        { "Skype",       NULL,       NULL,       1 << 3,       True,        -1 },
        { "Filezilla",   NULL,       NULL,       1 << 3,       True,        -1 },
        { "MPlayer",     NULL,       NULL,       1 << 3,       True,        -1 },
        { "Truecrypt",   NULL,       NULL,       1 << 3,       True,        -1 },
        { "Zenity",      NULL,       NULL,            0,       True,        -1 },
        { "Keepassx",    NULL,       NULL,       1 << 3,       True,        -1 },
        {  NULL,         NULL,      "mutt",      1 << 2,       False,       -1 },
        {  NULL,         NULL,      "tmux",      1 << 1,       False,       -1 },
        {  NULL,         NULL,      "scratchpad",     0,       True,        -1 },
};

/* tags & layouts */
static const char      *tags[] = { "web", "term", "mail", "misc" };
static const int initlayouts[] = { 0, 0, 1, 0, 2 }; 

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   */
	{ "[M]",      monocle },        /* first entry is default */
	{ "[T]",      tile },   
	{ "[F]",      NULL },    };

/*  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} },

#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  *xtermcmd[] = { "xterm",  NULL };
static const char   *passcmd[] = { "keepassx", NULL};
static const char   *mailcmd[] = { "urxvtc", "-title", "mutt", "-e", "mutt", NULL };
static const char   *tmuxcmd[] = { "urxvtc", "-title", "tmux", "-e", "tmux", "-f", "/home/jason/.tmux/conf", NULL };
static const char    *padcmd[] = { "urxvtc", "-title", "scratchpad", "-geometry", "54x10+504+12", NULL };
static const char   *lockcmd[] = { "slock", NULL };
static const char *rebootcmd[] = { "sudo", "shutdown", "-r", "now", NULL };
static const char   *shutcmd[] = { "sudo", "shutdown", "-h", "now", NULL };

static Key keys[] = {
	/*   modifier                   key        function        argument        */
	{ 0,                            XK_Menu,   spawn,          {.v = dmenucmd } },
	{ MODKEY|ShiftMask,             XK_Return, spawn,          {.v = termcmd } },
	{ ControlMask|Mod1Mask,         XK_m,      spawn,          {.v = mailcmd } },
	{ ControlMask|Mod1Mask,         XK_x,      spawn,          {.v = xtermcmd } },
	{ ControlMask|Mod1Mask,         XK_t,      spawn,          {.v = tmuxcmd } },
	{ ControlMask|Mod1Mask,         XK_c,      spawn,          {.v = passcmd } },
	{ ControlMask|Mod1Mask,         XK_l,      spawn,          {.v = lockcmd } },
	{ ControlMask|Mod1Mask,         XK_p,      spawn,          {.v = padcmd } },
	{ ControlMask|Mod1Mask,         XK_r,      spawn,          {.v = rebootcmd } },
	{ ControlMask|Mod1Mask,         XK_q,      spawn,          {.v = shutcmd } },
	{ ControlMask|Mod1Mask,         XK_w,      spawn,          SHCMD("TID=`tabbed -d 2>/dev/null`; vimprobable2 -e $TID") },
	{ MODKEY,                       XK_b,      togglebar,      {0} },
	{ MODKEY,                       XK_j,      focusstack,     {.i = +1 } },
	{ MODKEY,                       XK_k,      focusstack,     {.i = -1 } },
	{ MODKEY|ControlMask,           XK_j,      pushdown,       {0} },
	{ MODKEY|ControlMask,           XK_k,      pushup,         {0} },
	{ 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|ShiftMask,             XK_c,      killclient,     {0} },
	{ MODKEY,                       XK_m,      setlayout,      {.v = &layouts[0]} },
	{ MODKEY,                       XK_t,      setlayout,      {.v = &layouts[1]} },
	{ MODKEY,                       XK_f,      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,                       XK_Left,   cycle,          {.i = -1 } },
	{ MODKEY,                       XK_Right,  cycle,          {.i = +1 } },
	{ MODKEY|ControlMask,           XK_Left,   tagcycle,       {.i = -1 } },
	{ MODKEY|ControlMask,           XK_Right,  tagcycle,       {.i = +1 } },
	  TAGKEYS(                        XK_1,                      0)
	  TAGKEYS(                        XK_2,                      1)
	  TAGKEYS(                        XK_3,                      2)
	  TAGKEYS(                        XK_4,                      3)
	  TAGKEYS(                        XK_5,                      4)
	{ 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} },
};

CLICK TO VIEW

x

Comments

davidkrauser said about 12 years ago

Which version of dwm are you running? I couldn’t get 5.8.2 to compile with your config.h. I’m running Debian Squeeze if that matters.

Also, what script are you running to get the info-bar in the top right? It looks great!

jasonwryan said about 12 years ago

5.8.2-2: it is reasonably well patched. I have a dwm.c.diff you can look at -as well as the status bar script- in my intuxcation repo here:

http://beta.intuxication.org/jasonwryan/archer/browse/tip/