Advertisement
Guest User

ivanovnegro

a guest
Oct 9th, 2012
36
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.23 KB | None | 0 0
  1. /* See LICENSE file for copyright and license details. */
  2.  
  3. /* appearance */
  4. static const char font[] = "-*-terminus-medium-r-normal-*-12-120-*-*-*-*-*-*";
  5. static const char normbordercolor[] = "#888888"; /* border inactive windows */
  6. static const char normbgcolor[] = "#000000"; /* border inactive tags */
  7. static const char normfgcolor[] = "#ffffff"; /* border inactive text */
  8. static const char selbordercolor[] = "#101010"; /* border active window */
  9. static const char selbgcolor[] = "#000000"; /* border active tag */
  10. static const char selfgcolor[] = "#999999"; /* border active text */
  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[] = { "Files", "Music", "Web", "Term", "5", "6" };
  18.  
  19. static const Rule rules[] = {
  20. /* xprop(1):
  21. * WM_CLASS(STRING) = instance, class
  22. * WM_NAME(STRING) = title
  23. */
  24. /* class instance title tags mask isfloating monitor */
  25. { "Gimp", NULL, NULL, 0, True, -1 },
  26. { "Firefox", NULL, NULL, 1 << 8, False, -1 },
  27. { "Vlc", NULL, NULL, 0, True, -1 },
  28. { "Synaptic", NULL, NULL, 0, True, -1 },
  29. { "Ristretto", NULL, NULL, 0, True, -1 },
  30. { "File-roller", NULL, NULL, 0, True, -1 },
  31. { "feh", NULL, NULL, 0, True, -1 },
  32. { "mplayer2", NULL, NULL, 0, True, -1 },
  33. };
  34.  
  35. /* layout(s) */
  36. static const float mfact = 0.50; /* 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 = False; /* 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", font, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor, NULL };
  60. static const char *termcmd[] = { "urxvtc", NULL };
  61. static const char *webcmd[] = { "/home/david/firefox/firefox-bin", NULL };
  62. static const char *fmcmd[] = { "thunar", NULL };
  63. static const char *package[] = { "gksu", "synaptic", NULL };
  64. static const char *jd[] = { "/home/david/jd.sh", NULL };
  65. static const char *talk[] = { "skype", NULL };
  66. static const char *mpdpause[] = { "mpc", "-q", "pause", NULL };
  67. static const char *mpdplay[] = { "mpc", "-q", "play", NULL };
  68. static const char *vup[] = { "amixer", "sset", "Master", "2+", NULL };
  69. static const char *vdn[] = { "amixer", "sset", "Master", "2-", NULL };
  70. static const char *dead[] = { "deadbeef", NULL };
  71.  
  72. static Key keys[] = {
  73. /* modifier key function argument */
  74. { 0, 0x1008ff11, spawn, {.v = vdn } },
  75. { 0, 0x1008ff13, spawn, {.v = vup } },
  76. { MODKEY, XK_a, spawn, {.v = mpdplay } },
  77. { MODKEY, XK_y, spawn, {.v = mpdpause } },
  78. { MODKEY, XK_f, spawn, {.v = fmcmd } },
  79. { MODKEY, XK_s, spawn, {.v = package } },
  80. { MODKEY|ShiftMask, XK_j, spawn, {.v = jd } },
  81. { MODKEY|ShiftMask, XK_s, spawn, {.v = talk } },
  82. { MODKEY, XK_w, spawn, {.v = webcmd } },
  83. { MODKEY, XK_p, spawn, {.v = dmenucmd } },
  84. { MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } },
  85. { MODKEY|ShiftMask, XK_d, spawn, {.v = dead } },
  86. { MODKEY, XK_b, togglebar, {0} },
  87. { MODKEY, XK_j, focusstack, {.i = +1 } },
  88. { MODKEY, XK_k, focusstack, {.i = -1 } },
  89. { MODKEY, XK_i, incnmaster, {.i = +1 } },
  90. { MODKEY, XK_d, incnmaster, {.i = -1 } },
  91. { MODKEY, XK_h, setmfact, {.f = -0.05} },
  92. { MODKEY, XK_l, setmfact, {.f = +0.05} },
  93. { MODKEY, XK_Return, zoom, {0} },
  94. { MODKEY, XK_Tab, view, {0} },
  95. { MODKEY, XK_x, killclient, {0} },
  96. { MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
  97. { MODKEY, XK_e, setlayout, {.v = &layouts[1]} },
  98. { MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
  99. { MODKEY, XK_space, setlayout, {0} },
  100. { MODKEY|ShiftMask, XK_space, togglefloating, {0} },
  101. { MODKEY, XK_0, view, {.ui = ~0 } },
  102. { MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
  103. { MODKEY, XK_comma, focusmon, {.i = -1 } },
  104. { MODKEY, XK_period, focusmon, {.i = +1 } },
  105. { MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
  106. { MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
  107. TAGKEYS( XK_1, 0)
  108. TAGKEYS( XK_2, 1)
  109. TAGKEYS( XK_3, 2)
  110. TAGKEYS( XK_4, 3)
  111. TAGKEYS( XK_5, 4)
  112. TAGKEYS( XK_6, 5)
  113. TAGKEYS( XK_7, 6)
  114. TAGKEYS( XK_8, 7)
  115. TAGKEYS( XK_9, 8)
  116. { MODKEY|ShiftMask, XK_q, quit, {0} },
  117. };
  118.  
  119. /* button definitions */
  120. /* click can be ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
  121. static Button buttons[] = {
  122. /* click event mask button function argument */
  123. { ClkLtSymbol, 0, Button1, setlayout, {0} },
  124. { ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} },
  125. { ClkWinTitle, 0, Button2, zoom, {0} },
  126. { ClkStatusText, 0, Button2, spawn, {.v = termcmd } },
  127. { ClkClientWin, MODKEY, Button1, movemouse, {0} },
  128. { ClkClientWin, MODKEY, Button2, togglefloating, {0} },
  129. { ClkClientWin, MODKEY, Button3, resizemouse, {0} },
  130. { ClkTagBar, 0, Button1, view, {0} },
  131. { ClkTagBar, 0, Button3, toggleview, {0} },
  132. { ClkTagBar, MODKEY, Button1, tag, {0} },
  133. { ClkTagBar, MODKEY, Button3, toggletag, {0} },
  134. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement