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.

107 lines
5.6 KiB

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