My build of dwm
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

config.maintainer.h 6.6 KiB

pirms 3 gadiem
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. /* See LICENSE file for copyright and license details. */
  2. /* appearance */
  3. static const char *fonts[] = {
  4. "-*-lucidabright-medium-r-*-*-*-100-*-*-*-*-*-*"
  5. };
  6. static const char dmenufont[] = "-*-lucidabright-medium-r-*-*-*-100-*-*-*-*-*-*";
  7. static const char normbordercolor[] = "#444444";
  8. static const char normbgcolor[] = "#222222";
  9. static const char normfgcolor[] = "#bbbbbb";
  10. static const char selbordercolor[] = "#005577";
  11. static const char selbgcolor[] = "#005577";
  12. static const char selfgcolor[] = "#eeeeee";
  13. static const unsigned int borderpx = 1; /* border pixel of windows */
  14. static const unsigned int snap = 32; /* snap pixel */
  15. static const int showbar = 1; /* 0 means no bar */
  16. static const int topbar = 1; /* 0 means bottom bar */
  17. /* tagging */
  18. static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
  19. static const Rule rules[] = {
  20. /* xprop(1):
  21. * WM_CLASS(STRING) = instance, class
  22. * WM_NAME(STRING) = title
  23. */
  24. /* class instance title tags mask isfloating monitor */
  25. { "xfce4-terminal", NULL, NULL, 0, 0, -1 },
  26. { "Iceweasel", NULL, NULL, 1 << 1, 0, -1 },
  27. { "Firefox-bin", NULL, NULL, 1 << 1, 0, -1 },
  28. { "Pidgin", NULL, NULL, 1 << 2, 1, 1 },
  29. { "Skype", NULL, NULL, 1 << 2, 1, 1 },
  30. { "Vlc", NULL, NULL, 1 << 5, 0, -1 },
  31. { "Emacs", NULL, NULL, 1 << 3, 0, -1 },
  32. { "Evince", NULL, NULL, 1 << 4, 0, -1 },
  33. { "Gimp", NULL, NULL, 1 << 6, 1, -1 },
  34. };
  35. /* layout(s) */
  36. static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */
  37. static const int nmaster = 1; /* number of clients in master area */
  38. static const int resizehints = 1; /* 1 means respect size hints in tiled resizals */
  39. static const Layout layouts[] = {
  40. /* symbol arrange function */
  41. { "[]=", tile }, /* first entry is default */
  42. { "><>", NULL }, /* no layout function means floating behavior */
  43. { "[M]", monocle },
  44. };
  45. /* key definitions */
  46. #define MODKEY Mod4Mask
  47. #define TAGKEYS(KEY,TAG) \
  48. { MODKEY, KEY, view, {.ui = 1 << TAG} }, \
  49. { MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
  50. { MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \
  51. { MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} },
  52. /* helper for spawning shell commands in the pre dwm-5.0 fashion */
  53. #define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
  54. /* commands */
  55. static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
  56. static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor, NULL };
  57. static const char *termcmd[] = { "x-terminal-emulator", NULL };
  58. static Key keys[] = {
  59. /* modifier key function argument */
  60. { MODKEY, XK_p, spawn, {.v = dmenucmd } },
  61. { MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } },
  62. { MODKEY, XK_b, togglebar, {0} },
  63. { MODKEY, XK_j, focusstack, {.i = +1 } },
  64. { MODKEY, XK_k, focusstack, {.i = -1 } },
  65. { MODKEY, XK_i, incnmaster, {.i = +1 } },
  66. { MODKEY, XK_d, incnmaster, {.i = -1 } },
  67. { MODKEY, XK_h, setmfact, {.f = -0.05} },
  68. { MODKEY, XK_l, setmfact, {.f = +0.05} },
  69. { MODKEY, XK_Return, zoom, {0} },
  70. { MODKEY, XK_Tab, view, {0} },
  71. { MODKEY|ShiftMask, XK_c, killclient, {0} },
  72. { MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
  73. { MODKEY, XK_f, setlayout, {.v = &layouts[1]} },
  74. { MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
  75. { MODKEY, XK_space, setlayout, {0} },
  76. { MODKEY|ShiftMask, XK_space, togglefloating, {0} },
  77. { MODKEY, XK_0, view, {.ui = ~0 } },
  78. { MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
  79. { MODKEY, XK_comma, focusmon, {.i = -1 } },
  80. { MODKEY, XK_period, focusmon, {.i = +1 } },
  81. { MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
  82. { MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
  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. { MODKEY|ShiftMask, XK_q, quit, {0} },
  93. };
  94. /* button definitions */
  95. /* click can be ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
  96. static Button buttons[] = {
  97. /* click event mask button function argument */
  98. { ClkLtSymbol, 0, Button1, setlayout, {0} },
  99. { ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} },
  100. { ClkWinTitle, 0, Button2, zoom, {0} },
  101. { ClkStatusText, 0, Button2, spawn, {.v = termcmd } },
  102. { ClkClientWin, MODKEY, Button1, movemouse, {0} },
  103. { ClkClientWin, MODKEY, Button2, togglefloating, {0} },
  104. { ClkClientWin, MODKEY, Button3, resizemouse, {0} },
  105. { ClkTagBar, 0, Button1, view, {0} },
  106. { ClkTagBar, 0, Button3, toggleview, {0} },
  107. { ClkTagBar, MODKEY, Button1, tag, {0} },
  108. { ClkTagBar, MODKEY, Button3, toggletag, {0} },
  109. };