config.h 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. /* See LICENSE file for copyright and license details. */
  2. /* appearance */
  3. static const unsigned int borderpx = 2; /* border pixel of windows */
  4. static const unsigned int snap = 32; /* snap pixel */
  5. static const unsigned int gappih = 6; /* horiz inner gap between windows */
  6. static const unsigned int gappiv = 6; /* vert inner gap between windows */
  7. static const unsigned int gappoh = 6; /* horiz outer gap between windows and screen edge */
  8. static const unsigned int gappov = 6; /* vert outer gap between windows and screen edge */
  9. static const int smartgaps = 1; /* 1 means no outer gap when there is only one window */
  10. static const int showbar = 1; /* 0 means no bar */
  11. static const int topbar = 1; /* 0 means bottom bar */
  12. static const int usealtbar = 1; /* 1 means use non-dwm status bar */
  13. static const char *altbarclass = "Polybar"; /* Alternate bar class name */
  14. static const char *alttrayname = "tray"; /* Polybar tray instance name */
  15. static const char *altbarcmd = "$HOME/.config/polybar/launch.sh"; /* Alternate bar launch command */
  16. static const char *fonts[] = { "JetBrains Mono:size=13" };
  17. static const char dmenufont[] = "JetBrains Mono:size=13";
  18. static const char col_gray1[] = "#222222";
  19. static const char col_gray2[] = "#8181a6";
  20. static const char col_gray3[] = "#bbbbbb";
  21. static const char col_gray4[] = "#eeeeee";
  22. static const char col_cyan[] = "#8f6f8f";
  23. static const char *colors[][3] = {
  24. /* fg bg border */
  25. [SchemeNorm] = { col_gray3, col_gray1, col_gray2 },
  26. [SchemeSel] = { col_gray4, col_cyan, col_cyan },
  27. };
  28. /* tagging */
  29. static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
  30. static const Rule rules[] = {
  31. /* xprop(1):
  32. * WM_CLASS(STRING) = instance, class
  33. * WM_NAME(STRING) = title
  34. */
  35. /* class instance title tags mask isfloating monitor */
  36. { "Gimp", NULL, NULL, 0, 1, -1 },
  37. { "wired", NULL, NULL, 0, 1, -1 },
  38. { "KeePassXC", NULL, NULL, 0, 1, -1 },
  39. { NULL, NULL, "xzoom x2", 0, 1, -1}
  40. };
  41. /* layout(s) */
  42. static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */
  43. static const int nmaster = 1; /* number of clients in master area */
  44. static const int resizehints = 1; /* 1 means respect size hints in tiled resizals */
  45. static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */
  46. static const Layout layouts[] = {
  47. /* symbol arrange function */
  48. { "[]=", tile }, /* first entry is default */
  49. { "><>", NULL }, /* no layout function means floating behavior */
  50. { "[M]", monocle },
  51. };
  52. /* key definitions */
  53. #define MODKEY Mod4Mask
  54. #define TAGKEYS(KEY,TAG) \
  55. { MODKEY, KEY, view, {.ui = 1 << TAG} }, \
  56. { MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
  57. { MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \
  58. { MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} },
  59. /* helper for spawning shell commands in the pre dwm-5.0 fashion */
  60. #define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
  61. /* commands */
  62. static const char *dmenucmd[] = { "dmenu_run", NULL };
  63. static const char *termcmd[] = { "st", NULL };
  64. static const char *clipcmd[] = { "clipmenu", NULL };
  65. static const char *printcmd[] = { "/home/fuzzy/Documents/scripts/screenshotCurrentMonitor.sh", NULL };
  66. static const char *printscmd[] = { "/home/fuzzy/Documents/scripts/screenshotSelection.sh", NULL };
  67. static const char *grabccmd[] = { "/home/fuzzy/Documents/scripts/grabc.sh", NULL };
  68. static const Key keys[] = {
  69. /* modifier key function argument */
  70. { MODKEY, XK_p, spawn, {.v = dmenucmd } },
  71. { MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } },
  72. { MODKEY, XK_c, spawn, {.v = clipcmd } },
  73. { MODKEY, XK_g, spawn, {.v = grabccmd } },
  74. { ControlMask, XK_Print, spawn, {.v = printscmd } },
  75. { NULL, XK_Print, spawn, {.v = printcmd } },
  76. { MODKEY, XK_b, togglebar, {0} },
  77. { MODKEY, XK_j, focusstack, {.i = +1 } },
  78. { MODKEY, XK_k, focusstack, {.i = -1 } },
  79. { MODKEY, XK_i, incnmaster, {.i = +1 } },
  80. { MODKEY, XK_d, incnmaster, {.i = -1 } },
  81. { MODKEY, XK_h, setmfact, {.f = -0.05} },
  82. { MODKEY, XK_l, setmfact, {.f = +0.05} },
  83. { MODKEY, XK_Return, zoom, {0} },
  84. { MODKEY, XK_Tab, view, {0} },
  85. { MODKEY|ShiftMask, XK_c, killclient, {0} },
  86. { MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
  87. { MODKEY, XK_f, setlayout, {.v = &layouts[1]} },
  88. { MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
  89. { MODKEY, XK_space, setlayout, {0} },
  90. { MODKEY|ShiftMask, XK_space, togglefloating, {0} },
  91. { MODKEY, XK_0, view, {.ui = ~0 } },
  92. { MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
  93. { MODKEY, XK_comma, focusmon, {.i = -1 } },
  94. { MODKEY, XK_period, focusmon, {.i = +1 } },
  95. { MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
  96. { MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
  97. TAGKEYS( XK_1, 0)
  98. TAGKEYS( XK_2, 1)
  99. TAGKEYS( XK_3, 2)
  100. TAGKEYS( XK_4, 3)
  101. TAGKEYS( XK_5, 4)
  102. TAGKEYS( XK_6, 5)
  103. TAGKEYS( XK_7, 6)
  104. TAGKEYS( XK_8, 7)
  105. TAGKEYS( XK_9, 8)
  106. { MODKEY|ShiftMask, XK_q, quit, {0} },
  107. };
  108. /* button definitions */
  109. /* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
  110. static const Button buttons[] = {
  111. /* click event mask button function argument */
  112. { ClkLtSymbol, 0, Button1, setlayout, {0} },
  113. { ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} },
  114. { ClkWinTitle, 0, Button2, zoom, {0} },
  115. { ClkStatusText, 0, Button2, spawn, {.v = termcmd } },
  116. { ClkClientWin, MODKEY, Button1, movemouse, {0} },
  117. { ClkClientWin, MODKEY, Button2, togglefloating, {0} },
  118. { ClkClientWin, MODKEY, Button3, resizemouse, {0} },
  119. { ClkTagBar, 0, Button1, view, {0} },
  120. { ClkTagBar, 0, Button3, toggleview, {0} },
  121. { ClkTagBar, MODKEY, Button1, tag, {0} },
  122. { ClkTagBar, MODKEY, Button3, toggletag, {0} },
  123. };