My patched version of suckless' dwm.
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.

127 lines
6.7 KiB

9 months ago
9 months ago
9 months ago
7 months ago
9 months ago
7 months ago
9 months ago
7 months ago
9 months ago
7 months ago
9 months ago
7 months ago
9 months ago
9 months ago
7 months ago
7 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
8 months ago
9 months ago
9 months ago
9 months ago
9 months ago
7 months ago
9 months ago
  1. /* See LICENSE file for copyright and license details. */
  2. /* for media keys */
  3. #include <X11/XF86keysym.h>
  4. /* appearance */
  5. static const unsigned int borderpx = 1; /* border pixel of windows */
  6. static const unsigned int snap = 32; /* snap pixel */
  7. static const int showbar = 1; /* 0 means no bar */
  8. static const int topbar = 1; /* 0 means bottom bar */
  9. static const char *fonts[] = { "monospace:size=10" };
  10. static const char dmenufont[] = "monospace:size=10";
  11. static const char normbgcolor[] = "#0e0f14";
  12. static const char normbordercolor[] = "#363b47";
  13. static const char normfgcolor[] = "#dfdfdf";
  14. static const char selfgcolor[] = "#eeeeee";
  15. static const char selbordercolor[] = "#555a63";
  16. static const char selbgcolor[] = "#282828";
  17. static const char *colors[][3] = {
  18. /* fg bg border */
  19. [SchemeNorm] = { normfgcolor, normbgcolor, normbordercolor },
  20. [SchemeSel] = { selfgcolor, selbgcolor, selbordercolor },
  21. };
  22. /* tagging */
  23. static const char *tags[] = { "", "", "", "", "", "", "", "", "" };
  24. static const char *alttags[] = { "", "", "", "", "", "", "", "", "" };
  25. static const Rule rules[] = {
  26. /* xprop(1):
  27. * WM_CLASS(STRING) = instance, class
  28. * WM_NAME(STRING) = title
  29. */
  30. /* class instance title tags mask iscentered isfloating monitor */
  31. { NULL, "de.uol.swp.client.ClientApp", NULL, 0, 0, 1, -1 },
  32. };
  33. /* layout(s) */
  34. static const float mfact = 0.5; /* factor of master area size [0.05..0.95] */
  35. static const int nmaster = 1; /* number of clients in master area */
  36. static const int resizehints = 1; /* 1 means respect size hints in tiled resizals */
  37. static const Layout layouts[] = {
  38. /* symbol arrange function */
  39. { "M", monocle },
  40. { "T", tile }, /* first entry is default */
  41. { "D", deck },
  42. { "B", bstack },
  43. { "=", bstackhoriz },
  44. { "F", NULL }, /* no layout function means floating behavior */
  45. };
  46. /* key definitions */
  47. #define MODKEY Mod4Mask
  48. #define TAGKEYS(KEY,TAG) \
  49. { MODKEY, KEY, view, {.ui = 1 << TAG} }, \
  50. { MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
  51. { MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \
  52. { MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} },
  53. /* helper for spawning shell commands in the pre dwm-5.0 fashion */
  54. #define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
  55. /* commands */
  56. static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
  57. static const char *dmenucmd[] = { "dmenu_run", "-c", "-l", "20", NULL };
  58. static Key keys[] = {
  59. /* modifier key function argument */
  60. { MODKEY|ShiftMask, XK_Escape, quit, {0} },
  61. { MODKEY|ShiftMask, XK_b, togglebar, {0} },
  62. { MODKEY|ShiftMask, XK_c, setlayout, {.v = &layouts[2]} },
  63. { MODKEY|ShiftMask, XK_d, togglefloating, {0} },
  64. { MODKEY|ShiftMask, XK_f, togglefullscr, {0} },
  65. { MODKEY, XK_h, focusstack, {.i = -1 } },
  66. { MODKEY|ShiftMask, XK_h, zoom, {0} },
  67. { MODKEY, XK_j, focusstack, {.i = +1 } },
  68. { MODKEY|ShiftMask, XK_j, zoom, {0} },
  69. { MODKEY, XK_k, focusstack, {.i = -1 } },
  70. { MODKEY|ShiftMask, XK_k, zoom, {0} },
  71. { MODKEY, XK_l, focusstack, {.i = +1 } },
  72. { MODKEY|ShiftMask, XK_m, setlayout, {.v = &layouts[0]} },
  73. { MODKEY|ShiftMask, XK_o, setmfact, {.f = +0.05} },
  74. { MODKEY, XK_q, killclient, {0} },
  75. { MODKEY|ShiftMask, XK_t, setlayout, {.v = &layouts[1]} },
  76. { MODKEY|ShiftMask, XK_u, setlayout, {.v = &layouts[3]} },
  77. { MODKEY|ShiftMask, XK_v, setlayout, {.v = &layouts[4]} },
  78. { MODKEY|ShiftMask, XK_z, setmfact, {.f = -0.05} },
  79. { MODKEY, XK_0, view, {.ui = ~0 } },
  80. { MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
  81. { MODKEY, XK_comma, focusmon, {.i = -1 } },
  82. { MODKEY, XK_period, focusmon, {.i = +1 } },
  83. { MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
  84. { MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
  85. //{ MODKEY|ShiftMask, XK_o, incnmaster, {.i = +1 } },
  86. //{ MODKEY|ShiftMask, XK_z, incnmaster, {.i = -1 } },
  87. //{ MODKEY, XK_space, setlayout, {0} },
  88. TAGKEYS( XK_1, 0)
  89. TAGKEYS( XK_2, 1)
  90. TAGKEYS( XK_3, 2)
  91. TAGKEYS( XK_4, 3)
  92. TAGKEYS( XK_5, 4)
  93. TAGKEYS( XK_6, 5)
  94. TAGKEYS( XK_7, 6)
  95. TAGKEYS( XK_8, 7)
  96. TAGKEYS( XK_9, 8)
  97. };
  98. /* button definitions */
  99. /* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
  100. static Button buttons[] = {
  101. /* click event mask button function argument */
  102. { ClkLtSymbol, 0, Button1, setlayout, {0} },
  103. { ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} },
  104. { ClkWinTitle, 0, Button2, zoom, {0} },
  105. { ClkStatusText, 0, Button1, sigdwmblocks, {.i = 1} },
  106. { ClkStatusText, 0, Button2, sigdwmblocks, {.i = 2} },
  107. { ClkStatusText, 0, Button3, sigdwmblocks, {.i = 3} },
  108. { ClkClientWin, MODKEY, Button1, movemouse, {0} },
  109. { ClkClientWin, MODKEY, Button2, togglefloating, {0} },
  110. { ClkClientWin, MODKEY, Button3, resizemouse, {0} },
  111. { ClkTagBar, 0, Button1, view, {0} },
  112. { ClkTagBar, 0, Button3, toggleview, {0} },
  113. { ClkTagBar, MODKEY, Button1, tag, {0} },
  114. { ClkTagBar, MODKEY, Button3, toggletag, {0} },
  115. };