You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

149 lines
4.3 KiB

17 years ago
17 years ago
17 years ago
17 years ago
  1. /* See LICENSE file for copyright and license details. */
  2. /* appearance */
  3. #define BORDERPX 1
  4. #define FONT "-*-terminus-medium-r-normal-*-14-*-*-*-*-*-*-*"
  5. #define NORMBORDERCOLOR "#cccccc"
  6. #define NORMBGCOLOR "#cccccc"
  7. #define NORMFGCOLOR "#000000"
  8. #define SELBORDERCOLOR "#0066ff"
  9. #define SELBGCOLOR "#0066ff"
  10. #define SELFGCOLOR "#ffffff"
  11. /* tagging */
  12. const char tags[][MAXTAGLEN] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
  13. Rule rules[] = {
  14. /* class:instance:title substr tags ref isfloating */
  15. { "Firefox", tags[8], False },
  16. { "Gimp", NULL, True },
  17. { "MPlayer", NULL, True },
  18. { "Acroread", NULL, True },
  19. };
  20. /* layout(s) */
  21. #define RESIZEHINTS True /* False - respect size hints in tiled resizals */
  22. #define SNAP 32 /* snap pixel */
  23. Layout layouts[] = {
  24. /* symbol function isfloating */
  25. { "[]=", tilev, False }, /* first entry is default */
  26. { "[]|", tileh, False },
  27. { "><>", floating, True },
  28. { "[M]", monocle, True },
  29. };
  30. void
  31. setanselmgeoms(void) {
  32. /* screen dimensions */
  33. sx = 0;
  34. sy = 0;
  35. sw = DisplayWidth(dpy, screen);
  36. sh = DisplayHeight(dpy, screen);
  37. /* bar position */
  38. bx = sx;
  39. by = sy;
  40. bw = 1280;
  41. bh = dc.font.height + 2;
  42. /* window area */
  43. wx = sx;
  44. wy = sy + bh;
  45. ww = sw;
  46. wh = sh - bh;
  47. /* master area */
  48. mx = wx;
  49. my = wy;
  50. mw = 1280;
  51. mh = 800;
  52. /* tile area */
  53. tx = 1280;
  54. ty = 0;
  55. tw = ww - 1280;
  56. th = wh;
  57. /* monocle area */
  58. mox = mx;
  59. moy = my;
  60. mow = mw;
  61. moh = mh;
  62. updatebarpos();
  63. }
  64. void
  65. anselmgeoms(const char *arg) {
  66. setgeoms = setanselmgeoms;
  67. arrange();
  68. }
  69. void
  70. defgeoms(const char *arg) {
  71. setgeoms = setdefaultgeoms;
  72. arrange();
  73. }
  74. /* key definitions */
  75. #define MODKEY Mod1Mask
  76. Key keys[] = {
  77. /* modifier key function argument */
  78. { MODKEY, XK_p, spawn,
  79. "exec dmenu_run -fn '"FONT"' -nb '"NORMBGCOLOR"' -nf '"NORMFGCOLOR"' -sb '"SELBGCOLOR"' -sf '"SELFGCOLOR"' -x 0 -y 0 -w 1280" },
  80. { MODKEY|ShiftMask, XK_Return, spawn, "exec uxterm" },
  81. { MODKEY, XK_a, anselmgeoms, NULL },
  82. { MODKEY, XK_d, defgeoms, NULL },
  83. { MODKEY, XK_j, focusnext, NULL },
  84. { MODKEY, XK_k, focusprev, NULL },
  85. { MODKEY, XK_r, reapply, NULL },
  86. { MODKEY, XK_Return, zoom, NULL },
  87. { MODKEY, XK_Tab, viewprevtag, NULL },
  88. { MODKEY, XK_m, setlayout, "[M]" },
  89. { MODKEY, XK_f, setlayout, "><>" },
  90. { MODKEY, XK_v, setlayout, "[]=" },
  91. { MODKEY, XK_h, setlayout, "[]|" },
  92. { MODKEY|ShiftMask, XK_space, togglefloating, NULL },
  93. { MODKEY|ShiftMask, XK_c, killclient, NULL },
  94. { MODKEY, XK_0, view, NULL },
  95. { MODKEY, XK_1, view, tags[0] },
  96. { MODKEY, XK_2, view, tags[1] },
  97. { MODKEY, XK_3, view, tags[2] },
  98. { MODKEY, XK_4, view, tags[3] },
  99. { MODKEY, XK_5, view, tags[4] },
  100. { MODKEY, XK_6, view, tags[5] },
  101. { MODKEY, XK_7, view, tags[6] },
  102. { MODKEY, XK_8, view, tags[7] },
  103. { MODKEY, XK_9, view, tags[8] },
  104. { MODKEY|ControlMask, XK_1, toggleview, tags[0] },
  105. { MODKEY|ControlMask, XK_2, toggleview, tags[1] },
  106. { MODKEY|ControlMask, XK_3, toggleview, tags[2] },
  107. { MODKEY|ControlMask, XK_4, toggleview, tags[3] },
  108. { MODKEY|ControlMask, XK_5, toggleview, tags[4] },
  109. { MODKEY|ControlMask, XK_6, toggleview, tags[5] },
  110. { MODKEY|ControlMask, XK_7, toggleview, tags[6] },
  111. { MODKEY|ControlMask, XK_8, toggleview, tags[7] },
  112. { MODKEY|ControlMask, XK_9, toggleview, tags[8] },
  113. { MODKEY|ShiftMask, XK_0, tag, NULL },
  114. { MODKEY|ShiftMask, XK_1, tag, tags[0] },
  115. { MODKEY|ShiftMask, XK_2, tag, tags[1] },
  116. { MODKEY|ShiftMask, XK_3, tag, tags[2] },
  117. { MODKEY|ShiftMask, XK_4, tag, tags[3] },
  118. { MODKEY|ShiftMask, XK_5, tag, tags[4] },
  119. { MODKEY|ShiftMask, XK_6, tag, tags[5] },
  120. { MODKEY|ShiftMask, XK_7, tag, tags[6] },
  121. { MODKEY|ShiftMask, XK_8, tag, tags[7] },
  122. { MODKEY|ShiftMask, XK_9, tag, tags[8] },
  123. { MODKEY|ControlMask|ShiftMask, XK_1, toggletag, tags[0] },
  124. { MODKEY|ControlMask|ShiftMask, XK_2, toggletag, tags[1] },
  125. { MODKEY|ControlMask|ShiftMask, XK_3, toggletag, tags[2] },
  126. { MODKEY|ControlMask|ShiftMask, XK_4, toggletag, tags[3] },
  127. { MODKEY|ControlMask|ShiftMask, XK_5, toggletag, tags[4] },
  128. { MODKEY|ControlMask|ShiftMask, XK_6, toggletag, tags[5] },
  129. { MODKEY|ControlMask|ShiftMask, XK_7, toggletag, tags[6] },
  130. { MODKEY|ControlMask|ShiftMask, XK_8, toggletag, tags[7] },
  131. { MODKEY|ControlMask|ShiftMask, XK_9, toggletag, tags[8] },
  132. { MODKEY|ShiftMask, XK_q, quit, NULL },
  133. };