Guest User

config.h

a guest
Aug 8th, 2015
276
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 7.44 KB | None | 0 0
  1. /* See LICENSE file for copyright and license details. */
  2.  
  3. /* appearance */
  4. static const char font[]            = "Open Sans:size=10.5";
  5. static const char normbordercolor[] = "#444444";
  6. static const char normbgcolor[]     = "#222222";
  7. static const char normfgcolor[]     = "#bbbbbb";
  8. static const char selbordercolor[]  = "#537485";
  9. static const char selbgcolor[]      = "#537485";
  10. static const char selfgcolor[]      = "#eeeeee";
  11. static const unsigned int borderpx  = 1;        /* border pixel of windows */
  12. static const unsigned int snap      = 32;       /* snap pixel */
  13. static const Bool showbar           = True;     /* False means no bar */
  14. static const Bool topbar            = True;     /* False means bottom bar */
  15.  
  16. /* tagging */
  17. static const char *tags[] = { "web", "file", "gimp", "code", "jack", "drum", "mix", "rack", "misc" };
  18.  
  19. static const Rule rules[] = {
  20.     /* class    instance    title   tags mask   isfloating  monitor */
  21.     { "Gimp",               NULL,   NULL,   1 << 2, True,   -1 },
  22.     { "Chromium-browser",   NULL,   NULL,   1 << 0, False,  -1 },
  23.     { "Nautilus",           NULL,   NULL,   1 << 1, False,  -1 },
  24.     { "Geany",              NULL,   NULL,   1 << 3, False,  -1 },
  25.     { "Qjackctl.real",      NULL,   NULL,   1 << 4, True,   -1 },
  26.     { "Hydrogen",           NULL,   NULL,   1 << 5, False,  -1 },
  27.     { "Rakarrack",          NULL,   NULL,   1 << 7, False,  -1 },
  28.     { "Audacity",           NULL,   NULL,   1 << 6, False,  -1 },
  29.     { "Nautilus",           NULL,   NULL,   1 << 1, False,  -1 },
  30.     { "Gmtp",               NULL,   NULL,   1 << 8, True,   -1 },
  31.     { "Skype",              NULL,   NULL,   1 << 8, True,   -1 },
  32.     { "Pantheon-terminal"NULL,   NULL,   1 << 8, True,   -1 },
  33. };
  34.  
  35. /* layout(s) */
  36. static const float mfact      = 0.55; /* factor of master area size [0.05..0.95] */
  37. static const int nmaster      = 1;    /* number of clients in master area */
  38. static const Bool resizehints = True; /* True means respect size hints in tiled resizals */
  39.  
  40. static const Layout layouts[] = {
  41.     /* symbol     arrange function */
  42.     { "[]=",      tile },    /* first entry is default */
  43.     { "><>",      NULL },    /* no layout function means floating behavior */
  44.     { "[M]",      monocle },
  45. };
  46.  
  47. /* key definitions */
  48. #define MODKEY Mod4Mask
  49. #define TAGKEYS(KEY,TAG) \
  50.     { MODKEY,                       KEY,      view,           {.ui = 1 << TAG} }, \
  51.     { MODKEY|ControlMask,           KEY,      toggleview,     {.ui = 1 << TAG} }, \
  52.     { MODKEY|ShiftMask,             KEY,      tag,            {.ui = 1 << TAG} }, \
  53.     { MODKEY|ControlMask|ShiftMask, KEY,      toggletag,      {.ui = 1 << TAG} },
  54.  
  55. /* helper for spawning shell commands in the pre dwm-5.0 fashion */
  56. #define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
  57.  
  58. /* commands */
  59. static const char *dmenucmd[] = { "dmenu_run", "-fn", "-*-clean-r-*-*-12-*-*-*-*-*-*-*", "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor, "-b", NULL };
  60. static const char *termcmd[]  = { "pantheon-terminal", NULL };
  61. static const char *chromecmd[]  = { "chromium-browser", NULL };
  62. static const char *nautiluscmd[]  = { "nautilus", NULL };
  63. static const char *gimpcmd[]  = { "gimp", NULL };
  64. static const char *geanycmd[]  = { "geany", NULL };
  65. static const char *qjackctlcmd[]  = { "qjackctl", NULL };
  66. static const char *hydrogencmd[]  = { "hydrogen", NULL };
  67. static const char *audacitycmd[]  = { "audacity", NULL };
  68. static const char *rakarrackcmd[]  = { "rakarrack", NULL };
  69.  
  70. static Key keys[] = {
  71.     /* modifier                     key        function        argument */
  72.     { MODKEY,                       XK_w,      spawn,          {.v = dmenucmd } },
  73.     { MODKEY,                       XK_F1,     spawn,          {.v = chromecmd } },
  74.     { MODKEY,                       XK_F2,     spawn,          {.v = nautiluscmd } },
  75.     { MODKEY,                       XK_F3,     spawn,          {.v = gimpcmd } },
  76.     { MODKEY,                       XK_F4,     spawn,          {.v = geanycmd } },
  77.     { MODKEY,                       XK_F5,     spawn,          {.v = qjackctlcmd } },
  78.     { MODKEY,                       XK_F6,     spawn,          {.v = hydrogencmd } },
  79.     { MODKEY,                       XK_F7,     spawn,          {.v = audacitycmd } },
  80.     { MODKEY,                       XK_F8,     spawn,          {.v = rakarrackcmd } },
  81.     { MODKEY,             XK_r, spawn,          {.v = termcmd } },
  82.     { MODKEY,                       XK_b,      togglebar,      {0} },
  83.     { MODKEY,                       XK_j,      focusstack,     {.i = +1 } },
  84.     { MODKEY,                       XK_k,      focusstack,     {.i = -1 } },
  85.     { MODKEY,                       XK_i,      incnmaster,     {.i = +1 } },
  86.     { MODKEY,                       XK_d,      incnmaster,     {.i = -1 } },
  87.     { MODKEY,                       XK_h,      setmfact,       {.f = -0.05} },
  88.     { MODKEY,                       XK_l,      setmfact,       {.f = +0.05} },
  89.     { MODKEY,                       XK_Return, zoom,           {0} },
  90.     { MODKEY,                       XK_Tab,    view,           {0} },
  91.     { MODKEY,             XK_q,      killclient,     {0} },
  92.     { MODKEY,                       XK_t,      setlayout,      {.v = &layouts[0]} },
  93.     { MODKEY,                       XK_f,      setlayout,      {.v = &layouts[1]} },
  94.     { MODKEY,                       XK_m,      setlayout,      {.v = &layouts[2]} },
  95.     { MODKEY,                       XK_space,  setlayout,      {0} },
  96.     { MODKEY|ShiftMask,             XK_space,  togglefloating, {0} },
  97.     { MODKEY,                       XK_0,      view,           {.ui = ~0 } },
  98.     { MODKEY|ShiftMask,             XK_0,      tag,            {.ui = ~0 } },
  99.     { MODKEY,                       XK_comma,  focusmon,       {.i = -1 } },
  100.     { MODKEY,                       XK_period, focusmon,       {.i = +1 } },
  101.     { MODKEY|ShiftMask,             XK_comma,  tagmon,         {.i = -1 } },
  102.     { MODKEY|ShiftMask,             XK_period, tagmon,         {.i = +1 } },
  103.     TAGKEYS(                        XK_1,                      0)
  104.     TAGKEYS(                        XK_2,                      1)
  105.     TAGKEYS(                        XK_3,                      2)
  106.     TAGKEYS(                        XK_4,                      3)
  107.     TAGKEYS(                        XK_5,                      4)
  108.     TAGKEYS(                        XK_6,                      5)
  109.     TAGKEYS(                        XK_7,                      6)
  110.     TAGKEYS(                        XK_8,                      7)
  111.     TAGKEYS(                        XK_9,                      8)
  112.     { MODKEY|ShiftMask,             XK_q,      quit,           {0} },
  113. };
  114.  
  115. /* button definitions */
  116. /* click can be ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
  117. static Button buttons[] = {
  118.     /* click                event mask      button          function        argument */
  119.     { ClkLtSymbol,          0,              Button1,        setlayout,      {0} },
  120.     { ClkLtSymbol,          0,              Button3,        setlayout,      {.v = &layouts[2]} },
  121.     { ClkWinTitle,          0,              Button2,        zoom,           {0} },
  122.     { ClkStatusText,        0,              Button2,        spawn,          {.v = termcmd } },
  123.     { ClkClientWin,         MODKEY,         Button1,        movemouse,      {0} },
  124.     { ClkClientWin,         MODKEY,         Button2,        togglefloating, {0} },
  125.     { ClkClientWin,         MODKEY,         Button3,        resizemouse,    {0} },
  126.     { ClkTagBar,            0,              Button1,        view,           {0} },
  127.     { ClkTagBar,            0,              Button3,        toggleview,     {0} },
  128.     { ClkTagBar,            MODKEY,         Button1,        tag,            {0} },
  129.     { ClkTagBar,            MODKEY,         Button3,        toggletag,      {0} },
  130. };
Advertisement
Add Comment
Please, Sign In to add comment