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.

122 lines
6.4 KiB

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