Advertisement
hu6

config.h

hu6
Jun 14th, 2013
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.35 KB | None | 0 0
  1. /* See LICENSE file for copyright and license details. */
  2.  
  3. /* appearance */
  4. static const char font[] = "-artwiz-cure-medium-r-normal--11-110-75-75-p-90-iso8859-1";
  5. static const char colors[MAXCOLORS][ColLast][8] = {
  6. /* border fg bg */
  7. { "#212121", "#696969", "#1b1b1b" }, /* 0 = normal old: #181818 */
  8. { "#DBDBDB", "#E0E0E0", "#1b1b1b" }, /* 1 = selected */
  9. { "#212121", "#4586de", "#1b1b1b" }, /* 2 = urgent */
  10. { "#212121", "#7bde45", "#1b1b1b" }, /* 3 = green */
  11. { "#212121", "#fedd26", "#1b1b1b" }, /* 4 = yellow */
  12. { "#212121", "#e55555", "#1b1b1b" }, /* 5 = cyan */
  13. { "#212121", "#006699", "#1b1b1b" }, /* 6 = magenta */
  14. { "#212121", "#C0C0C0", "#1b1b1b" }, /* 7 = grey */
  15. };
  16.  
  17. static const unsigned int borderpx = 1; /* border pixel of windows */
  18. static const unsigned int snap = 1; /* snap pixel */
  19. static const Bool showbar = True; /* False means no bar */
  20. static const Bool topbar = False; /* False means bottom bar */
  21. static const Bool focusonclick = False; /* Change focus only on click */
  22. static const Bool viewontag = True; /* Switch view on tag switch */
  23. static const unsigned int gappx = 1; /* gap pixel between windows */
  24.  
  25. static const Rule rules[] = {
  26. /* class instance title tags mask isfloating monitor */
  27. { "Gimp", NULL, NULL, 0, True, -1 },
  28. { "Firefox", NULL, NULL, 1 << 8, False, -1 },
  29. { NULL, NULL, "scratchpad", 0, True, -1 },
  30. };
  31.  
  32. /* layout(s) */
  33. static const float mfact = 0.5; /* factor of master area size [0.05..0.95] */
  34. static const int nmaster = 2; /* number of clients in master area */
  35. static const Bool resizehints = False; /* True means respect size hints in tiled resizals */
  36. static const Layout layouts[] = {
  37. { "| — |", pidgin },
  38. { "| … |", NULL },
  39. { "| † |", gaplessgrid},
  40. { "| ƒ |", monocle },
  41. { "| „ |", tile },
  42. { "| ‡ |", bstack },
  43. };
  44.  
  45.  
  46. /* tagging */
  47. static const Tag tags[] = {
  48. /* name layout mfact nmaster */
  49. { "‰ Term ", &layouts[4], -1, -1 },
  50. { "Š Vim ", &layouts[0], -1, -1 },
  51. { "ˆ Chat ", &layouts[2], -1, -1 },
  52. { "‘ Net ", &layouts[3], -1, -1 },
  53. { "Ž Music ", &layouts[5], -1, -1 },
  54. };
  55.  
  56. /* key definitions */
  57. #define ALTKEY Mod1Mask
  58. #define MODKEY LockMask
  59. #define TAGKEYS(KEY,TAG) \
  60. { MODKEY, KEY, view, {.ui = 1 << TAG} }, \
  61. { MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
  62. { MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \
  63. { MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} },
  64.  
  65. /* commands */
  66. static const char scratchpadname[] = { "scratchpad" };
  67. static const char *dmenucmd[] = { "dmenu_run", "-i", "-p", "Run command:", "-fn", font, "-nb", colors[0][ColBG], "-nf", colors[0][ColFG],"-sb", colors[1][ColBG], "-sf", colors[1][ColFG], NULL };
  68. static const char *termcmd[] = { "urxvt", NULL };
  69. static const char *ncmpcppcmd[] = { "urxvt", "-e", "ncmpcpp", NULL };
  70. static const char *scratchpadcmd[] = { "urxvt", "-title", "scratchpad", "-geometry", "70x20+400+220", "-bg", "0", "-fg", "white", NULL };
  71. static const char *filemancmd[] = { "thunar", NULL };
  72. static const char *firefoxcmd[] = { "firefox", NULL };
  73. static const char *volmcmd[] = { "amixer", "-q", "sset", "Master", "mute", NULL };
  74. static const char *voldcmd[] = { "amixer", "-q", "sset", "Master", "1-", "unmute", NULL };
  75. static const char *volucmd[] = { "amixer", "-q", "sset", "Master", "1+", "unmute", NULL };
  76. static const char *mpdstopcmd[] = { "ncmpcpp", "toggle", NULL };
  77. static const char *mpdprevcmd[] = { "ncmpcpp", "prev", NULL };
  78. static const char *mpdnextcmd[] = { "ncmpcpp", "next", NULL };
  79. static const char *irccmd[] = { "urxvt", "-e", "weechat", NULL };
  80. static const char *scrotcmd[] = { "scrot", "&&", "mv", "*.png", "~/pictures/", NULL };
  81. static const char *charcmd[] = { "echo |", NULL };
  82. static const char *hibernatecmd[] = { "dbus-send", "--system", "--print-reply", "--dest=org.freedesktop.UPower", "/org/freedesktop/UPower", "org.freedesktop.UPower.Hibernate", NULL };
  83. static const char *rebootcmd[] = { "dbus-send", "--system", "--print-reply", "--dest=org.freedesktop.ConsoleKit", "/org/freedesktop/ConsoleKit/Manager", "org.freedesktop.ConsoleKit.Manager.Restart", NULL };
  84. static const char *shutdowncmd[] = { "dbus-send", "--system", "--print-reply", "--dest=org.freedesktop.ConsoleKit", "/org/freedesktop/ConsoleKit/Manager", "org.freedesktop.ConsoleKit.Manager.Stop", NULL };
  85.  
  86. static Key keys[] = {
  87. /* modifier key function argument */
  88. { ALTKEY, XK_F2, spawn, {.v = dmenucmd } },
  89. { MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } },
  90. { MODKEY, XK_n, spawn, {.v = ncmpcppcmd } },
  91. { MODKEY, XK_w, spawn, {.v = irccmd } },
  92. { MODKEY|ControlMask, XK_s, spawn, {.v = scrotcmd } },
  93. { MODKEY|ShiftMask, XK_s, togglescratch, {.v = scratchpadcmd } },
  94. { MODKEY|ShiftMask, XK_t, spawn, {.v = filemancmd } },
  95. { MODKEY|ShiftMask, XK_x, spawn, {.v = firefoxcmd } },
  96. { 0, 0x1008ff12, spawn, {.v = volmcmd } },
  97. { 0, 0x1008ff11, spawn, {.v = voldcmd } },
  98. { 0, 0x1008ff13, spawn, {.v = volucmd } },
  99. { MODKEY, XK_egrave, spawn, {.v = mpdstopcmd } },
  100. { MODKEY|ShiftMask, XK_p, spawn, {.v = mpdprevcmd } },
  101. { MODKEY, XK_ccedilla,spawn, {.v = mpdnextcmd } },
  102. //{ MODKEY|ControlMask, XK_p, spawn, {.v = pipecmd } },
  103. { MODKEY|ShiftMask, XK_m, togglemax, {0} },
  104. { MODKEY|ShiftMask, XK_b, togglebar, {0} },
  105. { MODKEY, XK_j, focusstack, {.i = +1 } },
  106. { MODKEY, XK_k, focusstack, {.i = -1 } },
  107. { MODKEY, XK_a, incnmaster, {.i = +1 } },
  108. { MODKEY, XK_z, incnmaster, {.i = -1 } },
  109. { MODKEY, XK_h, setmfact, {.f = -0.01} },
  110. { MODKEY, XK_l, setmfact, {.f = +0.01} },
  111. { MODKEY|ShiftMask, XK_j, pushdown, {0} },
  112. { MODKEY|ShiftMask, XK_k, pushup, {0} },
  113. { ShiftMask, XK_Return, zoom, {0} },
  114. { MODKEY, XK_Tab, view, {0} },
  115. { MODKEY|ShiftMask, XK_Tab, focusurgent, {0} },
  116. { MODKEY|ShiftMask, XK_c, killclient, {0} },
  117. { MODKEY, XK_g, setlayout, {.v = &layouts[5]} },
  118. { MODKEY, XK_p, setlayout, {.v = &layouts[4]} },
  119. { MODKEY, XK_m, setlayout, {.v = &layouts[3]} },
  120. { MODKEY, XK_f, setlayout, {.v = &layouts[1]} },
  121. { MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
  122. { MODKEY, XK_b, setlayout, {.v = &layouts[2]} },
  123. { MODKEY, XK_space, setlayout, {0} },
  124. { MODKEY|ShiftMask, XK_space, togglefloating, {0} },
  125. { MODKEY, XK_0, view, {.ui = ~0 } },
  126. { MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
  127. { MODKEY, XK_comma, focusmon, {.i = -1 } },
  128. { MODKEY, XK_period, focusmon, {.i = +1 } },
  129. { MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
  130. { MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
  131. { MODKEY, XK_Left, cycle, {.i = -1 } },
  132. { MODKEY, XK_Right, cycle, {.i = +1 } },
  133. { MODKEY|ControlMask, XK_Left, tagcycle, {.i = -1 } },
  134. { MODKEY|ControlMask, XK_Right, tagcycle, {.i = +1 } },
  135. TAGKEYS( 0x26, 0)
  136. TAGKEYS( 0xe9, 1)
  137. TAGKEYS( 0x22, 2)
  138. TAGKEYS( 0x27, 3)
  139. TAGKEYS( 0x28, 4)
  140. { ControlMask|ALTKEY, XK_h, spawn, {.v = hibernatecmd } },
  141. { ControlMask|ALTKEY, XK_r, spawn, {.v = rebootcmd } },
  142. { MODKEY|ControlMask, XK_q, spawn, {.v = shutdowncmd } },
  143. { MODKEY|ShiftMask, XK_q, quit, {0} },
  144. };
  145.  
  146. /* Button Definitions. Click can be ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
  147. static Button buttons[] = {
  148. /* click event mask button function argument */
  149. { ClkLtSymbol, 0, Button1, setlayout, {0} },
  150. { ClkClientWin, MODKEY, Button1, movemouse, {0} },
  151. { ClkClientWin, MODKEY, Button2, togglefloating, {0} },
  152. { ClkClientWin, MODKEY, Button3, resizemouse, {0} },
  153. { ClkWinTitle, 0, Button4, focusstack, {.i = +1} },
  154. { ClkWinTitle, 0, Button5, focusstack, {.i = -1} },
  155. { ClkTagBar, 0, Button1, view, {0} },
  156. { ClkTagBar, 0, Button3, toggleview, {0} },
  157. { ClkTagBar, MODKEY, Button1, tag, {0} },
  158. { ClkTagBar, MODKEY, Button3, toggletag, {0} },
  159. { ClkTagBar, 0, Button4, cycle, {.i = -1} },
  160. { ClkTagBar, 0, Button5, cycle, {.i = +1} },
  161. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement