Configuration file for DWM on MacBook Air
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.

114 lines
5.6 KiB

16 years ago
16 years ago
16 years ago
16 years ago
16 years ago
  1. /* See LICENSE file for copyright and license details. */
  2. /* appearance */
  3. static const char font[] = "-*-terminus-medium-r-normal-*-14-*-*-*-*-*-*-*";
  4. static const char normbordercolor[] = "#cccccc";
  5. static const char normbgcolor[] = "#cccccc";
  6. static const char normfgcolor[] = "#000000";
  7. static const char selbordercolor[] = "#0066ff";
  8. static const char selbgcolor[] = "#0066ff";
  9. static const char selfgcolor[] = "#ffffff";
  10. static uint borderpx = 1; /* border pixel of windows */
  11. static uint snap = 32; /* snap pixel */
  12. static Bool showbar = True; /* False means no bar */
  13. static Bool topbar = True; /* False means bottom bar */
  14. #ifdef XINERAMA
  15. static uint xidx = 0; /* Xinerama screen index to use */
  16. #endif
  17. /* tagging */
  18. static const char tags[][MAXTAGLEN] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
  19. static Rule rules[] = {
  20. /* class instance title tags mask isfloating */
  21. { "Gimp", NULL, NULL, 0, True },
  22. { "Firefox", NULL, NULL, 1 << 8, True },
  23. };
  24. /* layout(s) */
  25. static float mfact = 0.55;
  26. static Bool resizehints = True; /* False means respect size hints in tiled resizals */
  27. static Layout layouts[] = {
  28. /* symbol arrange function */
  29. { "[]=", tile }, /* first entry is default */
  30. { "><>", NULL }, /* no layout function means floating behavior */
  31. { "[M]", monocle }, /* first entry is default */
  32. };
  33. /* key definitions */
  34. #define MODKEY Mod1Mask
  35. #define TAGKEYS(KEY,TAG) \
  36. { MODKEY, KEY, view, {.ui = 1 << TAG} }, \
  37. { MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
  38. { MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \
  39. { MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} },
  40. /* helper for spawning shell commands in the pre dwm-5.0 fashion */
  41. #define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
  42. /* commands */
  43. static const char *dmenucmd[] = { "dmenu_run", "-fn", font, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor, NULL };
  44. static const char *termcmd[] = { "uxterm", NULL };
  45. static Key keys[] = {
  46. /* modifier key function argument */
  47. { MODKEY, XK_p, spawn, {.v = dmenucmd } },
  48. { MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } },
  49. { MODKEY, XK_b, togglebar, {0} },
  50. { MODKEY, XK_j, focusstack, {.i = +1 } },
  51. { MODKEY, XK_k, focusstack, {.i = -1 } },
  52. { MODKEY, XK_h, setmfact, {.f = -0.05} },
  53. { MODKEY, XK_l, setmfact, {.f = +0.05} },
  54. { MODKEY, XK_Return, zoom, {0} },
  55. { MODKEY, XK_Tab, view, {0} },
  56. { MODKEY|ShiftMask, XK_c, killclient, {0} },
  57. { MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
  58. { MODKEY, XK_f, setlayout, {.v = &layouts[1]} },
  59. { MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
  60. { MODKEY, XK_space, setlayout, {0} },
  61. { MODKEY|ShiftMask, XK_space, togglefloating, {0} },
  62. { MODKEY, XK_0, view, {.ui = ~0 } },
  63. { MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
  64. TAGKEYS( XK_1, 0)
  65. TAGKEYS( XK_2, 1)
  66. TAGKEYS( XK_3, 2)
  67. TAGKEYS( XK_4, 3)
  68. TAGKEYS( XK_5, 4)
  69. TAGKEYS( XK_6, 5)
  70. TAGKEYS( XK_7, 6)
  71. TAGKEYS( XK_8, 7)
  72. TAGKEYS( XK_9, 8)
  73. { MODKEY|ShiftMask, XK_q, quit, {0} },
  74. };
  75. /* button definitions */
  76. #define TAGBUTTONS(TAG) \
  77. { TAG, 0, Button1, view, {.ui = 1 << TAG} }, \
  78. { TAG, 0, Button3, toggleview, {.ui = 1 << TAG} }, \
  79. { TAG, MODKEY, Button1, tag, {.ui = 1 << TAG} }, \
  80. { TAG, MODKEY, Button3, toggletag, {.ui = 1 << TAG} },
  81. /* click can be a tag number (starting at 0),
  82. * ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
  83. static Button buttons[] = {
  84. /* click event mask button function argument */
  85. { ClkLtSymbol, 0, Button1, setlayout, {0} },
  86. { ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} },
  87. { ClkWinTitle, 0, Button2, zoom, {0} },
  88. { ClkStatusText, 0, Button2, spawn, {.v = termcmd } },
  89. { ClkClientWin, MODKEY, Button1, movemouse, {0} },
  90. { ClkClientWin, MODKEY, Button2, togglefloating, {0} },
  91. { ClkClientWin, MODKEY, Button3, resizemouse, {0} },
  92. TAGBUTTONS(0)
  93. TAGBUTTONS(1)
  94. TAGBUTTONS(2)
  95. TAGBUTTONS(3)
  96. TAGBUTTONS(4)
  97. TAGBUTTONS(5)
  98. TAGBUTTONS(6)
  99. TAGBUTTONS(7)
  100. TAGBUTTONS(8)
  101. };