unixwz0r

config.h (THL 3.2 DWM Config)

Jan 8th, 2015
457
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.52 KB | None | 0 0
  1. /* See LICENSE file for copyright and license details. */
  2. /* Tux Hat Linux v3.2 DWM Basic config.h Config. */
  3. /* So what this means you can do whatever fuck you want with it ;) */
  4.  
  5. /* appearance */
  6. static const char font[] = "-xos4-terminus-medium-*-normal-*-12-*-*-*-*-*-*-*";
  7. static const char normbordercolor[] = "#5f5740";
  8. static const char normbgcolor[] = "#151210";
  9. static const char normfgcolor[] = "#5f5740";
  10. static const char selbordercolor[] = "#3d3427";
  11. static const char selbgcolor[] = "#151210";
  12. static const char selfgcolor[] = "#f0dfaf";
  13. static const unsigned int borderpx = 4; /* border pixel of windows */
  14. static const unsigned int snap = 34; /* snap pixel */
  15. static const Bool showbar = True; /* False means no bar */
  16. static const Bool topbar = True; /* False means bottom bar */
  17.  
  18. /* tagging */
  19. static const char *tags[] = { "main »", "net »", "irc »", "term »", "edit »", "fm »", "vm »", "media »", "xmms2 »", "steam »" };
  20.  
  21. static const Rule rules[] = {
  22. /* class instance title tags mask isfloating monitor */
  23. { "Gimp", NULL, NULL, 0, True, -1 },
  24.  
  25. };
  26.  
  27. /* layout(s) */
  28. static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */
  29. static const int nmaster = 1; /* number of clients in master area */
  30. static const Bool resizehints = True; /* True means respect size hints in tiled resizals */
  31.  
  32. static const Layout layouts[] = {
  33. /* symbol arrange function */
  34. { "»«»", NULL }, /* first entry is default (floating) */
  35. { "[]=", tile }, /* no layout function means floating behavior */
  36. { "[M]", monocle },
  37. };
  38.  
  39. /* key definitions */
  40. #define MODKEY Mod1Mask /* This config is using alt key for modkey by default */
  41. #define TAGKEYS(KEY,TAG) \
  42. { MODKEY, KEY, view, {.ui = 1 << TAG} }, \
  43. { MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
  44. { MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \
  45. { MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} },
  46.  
  47. /* helper for spawning shell commands in the pre dwm-5.0 fashion */
  48. #define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
  49.  
  50. /* commands */ /* This is where you setup your commands or LABELS for your key bindings */
  51. static const char *dmenucmd[] = { "dmenu_run", "-fn", font, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor, NULL };
  52. static const char *termcmd[] = { "urxvt", "-e", "bash", NULL };
  53. static const char *irccmd[] = { "urxvt", "-e", "weechat", NULL };
  54. static const char *editcmd[] = { "geany", NULL };
  55. static const char *fmcmd[] = { "spacefm", NULL };
  56. static const char *webcmd[] = { "firefox", NULL };
  57. static const char *lxappearance[] = { "lxappearance", NULL };
  58. static const char *lxmusic[] = { "lxmusic", NULL };
  59. static const char *nitrogen[] = { "nitrogen", NULL };
  60. static const char *gimp[] = { "gimp", NULL };
  61. static const char *openshot[] = { "openshot", NULL };
  62. static const char *tmux[] = { "urxvt", "-e", "tmux", NULL };
  63. static const char *mc[] = { "urxvt", "-e", "mc", NULL };
  64. static const char *steam[] = { "steam", NULL };
  65.  
  66. /* Here is where you setup the command labels key bindings */
  67. static Key keys[] = {
  68. /* modifier key function argument */
  69. { MODKEY, XK_p, spawn, {.v = dmenucmd } }, /* launch dmenu */
  70. { MODKEY, XK_t, spawn, {.v = termcmd } }, /* launch urxvt with bash shell */
  71. { MODKEY, XK_e, spawn, {.v = editcmd } }, /* launch geany editor */
  72. { MODKEY, XK_i, spawn, {.v = irccmd } }, /* launch urxvt with weechat irc client */
  73. { MODKEY, XK_f, spawn, {.v = fmcmd } }, /* launch spacefm file manager */
  74. { MODKEY, XK_w, spawn, {.v = webcmd } }, /* launch mozilla firefox :) */
  75. { MODKEY, XK_l, spawn, {.v = lxappearance } },/* launch lxappearance */
  76. { MODKEY, XK_a, spawn, {.v = lxmusic } }, /* launch lxmusic xmms2 frontend */
  77. { MODKEY, XK_g, spawn, {.v = gimp } }, /* launch gimp image editor */
  78. { MODKEY, XK_o, spawn, {.v = openshot } }, /* launch openshot video editor */
  79. { MODKEY, XK_n, spawn, {.v = nitrogen } }, /* launch nitrogen frontend wallpaper app */
  80. { MODKEY, XK_s, spawn, {.v = steam } }, /* launch steam client */
  81. { MODKEY, XK_m, spawn, {.v = tmux } }, /* launch urxvt with tmux */
  82. { MODKEY|ShiftMask, XK_f, spawn, {.v = mc } }, /* launch urxvt with midnight commander */
  83. { MODKEY, XK_b, togglebar, {0} },
  84. { MODKEY, XK_j, focusstack, {.i = +1 } },
  85. { MODKEY, XK_k, focusstack, {.i = -1 } },
  86. { MODKEY|ShiftMask, XK_i, incnmaster, {.i = +1 } },
  87. { MODKEY, XK_d, incnmaster, {.i = -1 } },
  88. { MODKEY, XK_h, setmfact, {.f = -0.05} },
  89. { MODKEY|ShiftMask, XK_l, setmfact, {.f = +0.05} },
  90. { MODKEY, XK_Return, zoom, {0} },
  91. { MODKEY, XK_Tab, view, {0} },
  92. { MODKEY, XK_c, killclient, {0} },
  93. { MODKEY|ShiftMask, XK_f, setlayout, {.v = &layouts[0]} },
  94. { MODKEY|ShiftMask, XK_t, setlayout, {.v = &layouts[1]} },
  95. { MODKEY|ShiftMask, XK_m, setlayout, {.v = &layouts[2]} },
  96. { MODKEY, XK_space, setlayout, {0} },
  97. { MODKEY|ShiftMask, XK_space, togglefloating, {0} },
  98. { MODKEY, XK_0, view, {.ui = ~0 } },
  99. { MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
  100. { MODKEY, XK_comma, focusmon, {.i = -1 } },
  101. { MODKEY, XK_period, focusmon, {.i = +1 } },
  102. { MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
  103. { MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
  104. TAGKEYS( XK_1, 0)
  105. TAGKEYS( XK_2, 1)
  106. TAGKEYS( XK_3, 2)
  107. TAGKEYS( XK_4, 3)
  108. TAGKEYS( XK_5, 4)
  109. TAGKEYS( XK_6, 5)
  110. TAGKEYS( XK_7, 6)
  111. TAGKEYS( XK_8, 7)
  112. TAGKEYS( XK_9, 8)
  113. { MODKEY, XK_q, quit, {0} },
  114. };
  115.  
  116. /* button definitions */
  117. /* click can be ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
  118. static Button buttons[] = {
  119. /* click event mask button function argument */
  120. { ClkLtSymbol, 0, Button1, setlayout, {0} },
  121. { ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} },
  122. { ClkWinTitle, 0, Button2, zoom, {0} },
  123. { ClkStatusText, 0, Button2, spawn, {.v = termcmd } },
  124. { ClkClientWin, MODKEY, Button1, movemouse, {0} },
  125. { ClkClientWin, MODKEY, Button2, togglefloating, {0} },
  126. { ClkClientWin, MODKEY, Button3, resizemouse, {0} },
  127. { ClkTagBar, 0, Button1, view, {0} },
  128. { ClkTagBar, 0, Button3, toggleview, {0} },
  129. { ClkTagBar, MODKEY, Button1, tag, {0} },
  130. { ClkTagBar, MODKEY, Button3, toggletag, {0} },
  131. };
Advertisement
Add Comment
Please, Sign In to add comment