bvn13

Untitled

Oct 26th, 2012
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.78 KB | None | 0 0
  1. /* See LICENSE file for copyright and license details. */
  2.  
  3. /* appearance */
  4. static const char font[] = "-*-terminus-medium-r-*-*-16-*-*-*-*-*-*-*";
  5. static const char normbordercolor[] = "#444444";
  6. static const char normbgcolor[] = "#222222";
  7. static const char normfgcolor[] = "#bbbbbb";
  8. static const char selbordercolor[] = "#005577";
  9. static const char selbgcolor[] = "#005577";
  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 unsigned int systrayspacing = 2; /* systray spacing */
  14. static const Bool showsystray = True; /* False means no systray */
  15. static const Bool showbar = True; /* False means no bar */
  16. static const Bool topbar = True; /* False means bottom bar */
  17.  
  18. /* tagging */
  19. //static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
  20. static const char *tags[] = { "main", "term", "www", "im", "email", "skype", "mocp", "video", "VBox", "Qt" };
  21.  
  22. //static const Rule rules[] = {
  23. /* class instance title tags mask isfloating monitor */
  24. // { "Gimp", NULL, NULL, 0, True, -1 },
  25. // { "Firefox", NULL, NULL, 1 << 8, False, -1 },
  26. //};
  27.  
  28. static const Rule rules[] = {
  29. /* class:instance:title regex tags regex isfloating */
  30. { "Gimp", NULL, NULL, 0, True, -1 },
  31. { "MPlayer", NULL, NULL, 1 << 7, True, True }, /* True }, \ */
  32. { "vlc", NULL, NULL, 1 << 7, True, True }, /* True }, \ */
  33. { "stalonetray", NULL, NULL, ~0, False, -1 },
  34. { "Firefox", NULL, NULL, 1 << 2, False, -1 },
  35. { "Roxterm", NULL, NULL, 1 << 1, False, -1 },
  36. { "Thunderbird", NULL, NULL, 1 << 4, False, -1 },
  37. { "Pidgin", NULL, NULL, 1 << 3, False, -1 },
  38. { "Vacuum", NULL, NULL, 1 << 3, False, -1 },
  39. { "Skype", NULL, NULL, 1 << 5, False, -1 },
  40. { "mocp", NULL, NULL, 1 << 6, False, -1 },
  41. { "virtualbox", NULL, NULL, 1 << 8, True, -1 },
  42. { "qtcreator", NULL, NULL, 1 << 9, False, -1 },
  43. };
  44.  
  45. /* layout(s) */
  46. static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */
  47. static const int nmaster = 1; /* number of clients in master area */
  48. static const Bool resizehints = True; /* True means respect size hints in tiled resizals */
  49.  
  50. static const Layout layouts[] = {
  51. /* symbol arrange function */
  52. { "><>", NULL }, /* no layout function means floating behavior */
  53. { "[]=", tile }, /* first entry is default */
  54. { "[M]", monocle },
  55. };
  56.  
  57. /* key definitions */
  58. #define MODKEY Mod4Mask
  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. /* helper for spawning shell commands in the pre dwm-5.0 fashion */
  66. #define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
  67.  
  68. /* commands */
  69. static const char *dmenucmd[] = { "dmenu_run", "-fn", font, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor, NULL };
  70. static const char *termcmd[] = { "roxterm", NULL };
  71. static const char *apluscmd[] = { "amixer", "sset", "Front", "1+", NULL };
  72. static const char *aminuscmd[] = { "amixer", "sset", "Front", "1-", NULL };
  73. static const char *scrshoot_window[] = { "xfce4-screenshooter", "-x" , NULL };
  74. static const char *scrshoot_display[] = { "xfce4-screenshooter", NULL };
  75. static const char *scrshoot_region[] = { "xfce4-screenshooter", "-r", NULL };
  76.  
  77.  
  78. static Key keys[] = {
  79. /* modifier key function argument */
  80. { MODKEY, XK_p, spawn, {.v = dmenucmd } },
  81. { MODKEY|ControlMask, XK_Return, spawn, {.v = termcmd } },
  82. { MODKEY, XK_Print, spawn, {.v = scrshoot_display } },
  83. { ShiftMask, XK_Print, spawn, {.v = scrshoot_window } },
  84. { ControlMask, XK_Print, spawn, {.v = scrshoot_region } },
  85. { MODKEY, XK_b, togglebar, {0} },
  86. { MODKEY, XK_j, focusstack, {.i = +1 } },
  87. { MODKEY, XK_k, focusstack, {.i = -1 } },
  88. { MODKEY, XK_i, incnmaster, {.i = +1 } },
  89. { MODKEY, XK_d, incnmaster, {.i = -1 } },
  90. { MODKEY, XK_h, setmfact, {.f = -0.05} },
  91. { MODKEY, XK_l, setmfact, {.f = +0.05} },
  92. { MODKEY, XK_Return, zoom, {0} },
  93. { MODKEY, XK_Tab, view, {0} },
  94. { MODKEY|ShiftMask, XK_c, killclient, {0} },
  95. { MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
  96. { MODKEY, XK_f, setlayout, {.v = &layouts[1]} },
  97. { MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
  98. { MODKEY, XK_space, setlayout, {0} },
  99. { MODKEY|ShiftMask, XK_space, togglefloating, {0} },
  100. { MODKEY, XK_0, view, {.ui = ~0 } },
  101. { MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
  102. { MODKEY, XK_comma, focusmon, {.i = -1 } },
  103. { MODKEY, XK_period, focusmon, {.i = +1 } },
  104. { MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
  105. { MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
  106. TAGKEYS( XK_1, 0)
  107. TAGKEYS( XK_2, 1)
  108. TAGKEYS( XK_3, 2)
  109. TAGKEYS( XK_4, 3)
  110. TAGKEYS( XK_5, 4)
  111. TAGKEYS( XK_6, 5)
  112. TAGKEYS( XK_7, 6)
  113. TAGKEYS( XK_8, 7)
  114. TAGKEYS( XK_9, 8)
  115. { MODKEY|ControlMask, XK_q, quit, {0} },
  116. };
  117.  
  118. /* button definitions */
  119. /* click can be ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
  120. static Button buttons[] = {
  121. /* click event mask button function argument */
  122. { ClkLtSymbol, 0, Button1, setlayout, {0} },
  123. { ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} },
  124. { ClkWinTitle, 0, Button2, zoom, {0} },
  125. { ClkStatusText, 0, Button2, spawn, {.v = termcmd } },
  126. { ClkClientWin, MODKEY, Button1, movemouse, {0} },
  127. { ClkClientWin, MODKEY, Button2, togglefloating, {0} },
  128. { ClkClientWin, MODKEY, Button3, resizemouse, {0} },
  129. { ClkTagBar, 0, Button1, view, {0} },
  130. { ClkTagBar, 0, Button3, toggleview, {0} },
  131. { ClkTagBar, MODKEY, Button1, tag, {0} },
  132. { ClkTagBar, MODKEY, Button3, toggletag, {0} },
  133. };
Advertisement
Add Comment
Please, Sign In to add comment