Attachment 'config.h'

Download

   1 /* See LICENSE file for copyright and license details. */
   2 
   3 /* appearance */
   4 static const char font[]            = "-*-Zekton-*-14-*-*-*-*-*-*-*";
   5 static const char normbordercolor[] = "#CCCCCC";
   6 static const char normbgcolor[]     = "#000000";
   7 static const char normfgcolor[]     = "#ffffff";
   8 static const char selbordercolor[]  = "#0066FF";
   9 static const char selbgcolor[]      = "#000000";
  10 static const char selfgcolor[]      = "#ffffff";
  11 static unsigned int borderpx        = 1;        /* border pixel of windows */
  12 static unsigned int snap            = 32;       /* snap pixel */
  13 static Bool showbar                 = True;     /* False means no bar */
  14 static Bool topbar                  = True;     /* False means bottom bar */
  15 
  16 /* tagging */
  17 static const char tags[][MAXTAGLEN] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
  18 static unsigned int tagset[] = {1, 1}; /* after start, first tag is selected */
  19 
  20 static Rule rules[] = {
  21 	/* class      instance    title       tags mask     isfloating */
  22 	{ "Gimp",     NULL,       NULL,       0,            True },
  23 	{ "MPlayer",  NULL,       NULL,       0,       True },
  24 };
  25 
  26 /* layout(s) */
  27 static float mfact      = 0.55; /* factor of master area size [0.05..0.95] */
  28 static Bool resizehints = True; /* False means respect size hints in tiled resizals */
  29 
  30 static Layout layouts[] = {
  31 	/* symbol     arrange function */
  32 	{ "[]=",      tile },    /* first entry is default */
  33 	{ "><>",      NULL },    /* no layout function means floating behavior */
  34 	{ "[M]",      monocle },
  35 };
  36 
  37 /* key definitions */
  38 #define MODKEY Mod4Mask
  39 #define TAGKEYS(KEY,TAG) \
  40 	{ MODKEY,                       KEY,      view,           {.ui = 1 << TAG} }, \
  41 	{ MODKEY|ControlMask,           KEY,      toggleview,     {.ui = 1 << TAG} }, \
  42 	{ MODKEY|ShiftMask,             KEY,      tag,            {.ui = 1 << TAG} }, \
  43 	{ MODKEY|ControlMask|ShiftMask, KEY,      toggletag,      {.ui = 1 << TAG} },
  44 
  45 /* helper for spawning shell commands in the pre dwm-5.0 fashion */
  46 #define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
  47 
  48 /* commands */
  49 static const char *dmenucmd[] = { "dmenu_run", "-fn", font, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor, NULL };
  50 static const char *iceweasel[]  = { "iceweasel", NULL };
  51 static const char *termcmd[]  = { "urxvt", NULL };
  52 static const char *icedove[]  = { "icedove", NULL };
  53 static const char *thunar[]  = { "thunar", NULL };
  54 static const char *transmission[]  = { "transmission", NULL };
  55 static const char *pidgin[]  = { "pidgin", NULL };
  56 static const char *sonata[]  = { "sonata", NULL };
  57 static const char *gmplayer[]  = { "gmplayer", NULL };
  58 static const char *sonplus[]  = { "amixer", "set", "Master", "2dB+", "unmute", NULL };
  59 static const char *sonmoins[]  = { "amixer", "set", "Master", "2dB-", "unmute", NULL };
  60 static const char *sontoggle[]  = { "amixer", "-q", "set", "Master", "toggle", NULL };
  61 static const char *veille[]  = { "xscreensaver-command", "-activate", NULL };
  62 static const char *fondecran[]  = { "/home/xavier/sauvegarde/wallpaper.sh", NULL };
  63 static const char *mpcnext[]  = { "mpc", "next", NULL };
  64 static const char *mpcprev[]  = { "mpc", "prev", NULL };
  65 static const char *mpctoggle[]  = { "mpc", "toggle", NULL };
  66 static const char *scrot[]  = { "scrot", NULL };
  67 
  68 
  69 static Key keys[] = {
  70 	/* modifier                     key        function        argument */
  71 	{ Mod1Mask,                       XK_F2,      spawn,          {.v = dmenucmd } },
  72 	{ MODKEY|ShiftMask,             XK_Return, spawn,          {.v = termcmd } },
  73 	{ MODKEY,                       XK_b,      togglebar,      {0} },
  74 	{ MODKEY,                       XK_j,      focusstack,     {.i = +1 } },
  75 	{ MODKEY,                       XK_k,      focusstack,     {.i = -1 } },
  76 	{ MODKEY,                       XK_h,      setmfact,       {.f = -0.05} },
  77 	{ MODKEY,                       XK_l,      setmfact,       {.f = +0.05} },
  78 	{ MODKEY,                       XK_Return, zoom,           {0} },
  79 	{ MODKEY,                       XK_Tab,    view,           {0} },
  80 	{ MODKEY|Mod1Mask,               XK_f,      spawn,          {.v = iceweasel } },
  81 	{ MODKEY|Mod1Mask,               XK_m,      spawn,          {.v = icedove } },
  82 	{ MODKEY|Mod1Mask,               XK_i,      spawn,          {.v = pidgin } },
  83 	{ MODKEY|Mod1Mask,               XK_h,      spawn,          {.v = thunar } },
  84 	{ MODKEY|Mod1Mask,               XK_s,      spawn,          {.v = sonata } },
  85 	{ MODKEY|Mod1Mask,               XK_v,      spawn,          {.v = gmplayer } },
  86 	{ MODKEY,               XK_F8,      spawn,          {.v = sonplus } },
  87 	{ MODKEY,               XK_F7,      spawn,          {.v = sonmoins } },
  88 	{ MODKEY,               XK_F9,      spawn,          {.v = sontoggle } },
  89 	{ MODKEY|Mod1Mask,               XK_t,      spawn,          {.v = transmission } },
  90 	{ MODKEY,             XK_F12,      spawn,          {.v = veille } },
  91 	{ MODKEY|Mod1Mask,               XK_n,      spawn,          {.v = fondecran } },
  92 	{ MODKEY, XK_Print,      spawn,          {.v = scrot } },
  93 	{ ControlMask,               0xff53,      spawn,          {.v = mpcnext } },
  94 	{ ControlMask,              0xff51,      spawn,          {.v = mpcprev } },
  95 	{ ControlMask,              0xff54,      spawn,          {.v = mpctoggle } },
  96 	{ Mod1Mask,            	    XK_F4,     killclient,     {0} },
  97 	{ MODKEY,                       XK_t,      setlayout,      {.v = &layouts[0]} },
  98 	{ MODKEY,                       XK_f,      setlayout,      {.v = &layouts[1]} },
  99 	{ MODKEY,                       XK_m,      setlayout,      {.v = &layouts[2]} },
 100 	{ MODKEY,                       XK_space,  setlayout,      {0} },
 101 	{ MODKEY|ShiftMask,             XK_space,  togglefloating, {0} },
 102 	{ MODKEY,                       0xe0,      view,           {.ui = ~0 } },
 103 	{ MODKEY|ShiftMask,             0xe0,      tag,            {.ui = ~0 } },
 104 	TAGKEYS(                        0x26,                      0)
 105 	TAGKEYS(                        0xe9,                      1)
 106 	TAGKEYS(                        0x22,                      2)
 107 	TAGKEYS(                        0x27,                      3)
 108 	TAGKEYS(                        0x28,                      4)
 109 	TAGKEYS(                        0x2d,                      5)
 110 	TAGKEYS(                        0xe8,                      6)
 111 	TAGKEYS(                        0x5f,                      7)
 112 	TAGKEYS(                        0xe7,                      8)
 113 	{ MODKEY|ShiftMask,             XK_q,      quit,           {0} },
 114 	
 115 
 116 
 117 };
 118 
 119 /* button definitions */
 120 /* click can be a tag number (starting at 0),
 121  * ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
 122 static Button buttons[] = {
 123 	/* click                event mask      button          function        argument */
 124 	{ ClkLtSymbol,          0,              Button1,        setlayout,      {0} },
 125 	{ ClkLtSymbol,          0,              Button3,        setlayout,      {.v = &layouts[2]} },
 126 	{ ClkWinTitle,          0,              Button2,        zoom,           {0} },
 127 	{ ClkStatusText,        0,              Button2,        spawn,          {.v = termcmd } },
 128 	{ ClkClientWin,         MODKEY,         Button1,        movemouse,      {0} },
 129 	{ ClkClientWin,         MODKEY,         Button2,        togglefloating, {0} },
 130 	{ ClkClientWin,         MODKEY,         Button3,        resizemouse,    {0} },
 131 	{ ClkTagBar,            0,              Button1,        view,           {0} },
 132 	{ ClkTagBar,            0,              Button3,        toggleview,     {0} },
 133 	{ ClkTagBar,            MODKEY,         Button1,        tag,            {0} },
 134 	{ ClkTagBar,            MODKEY,         Button3,        toggletag,      {0} },
 135 };

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.
  • [get | view] (2009-05-22 10:26:32, 7.5 KB) [[attachment:config.h]]
 All files | Selected Files: delete move to page copy to page

You are not allowed to attach a file to this page.