Advertisement
Guest User

Untitled

a guest
Sep 29th, 2012
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.15 KB | None | 0 0
  1. /* See LICENSE file for copyright and license details. */
  2.  
  3. /* appearance */
  4. //static const char font[] = "-*-terminus-medium-r-*-*-16-*-*-*-*-*-*-*";
  5. static const char font[] = "-xos4-terminus2-*-*-*-*-*-*-*-*-*-*-*-*";
  6.  
  7. //static const char font[] = "-*-terminus2-medium-r-*-*-12-*-*-*-*-*-*-*";
  8.  
  9. #define NUMCOLORS 21
  10. static const char colors[NUMCOLORS][ColLast][21] = {
  11. /* border fg bg */
  12. { "#1A1A1A", "#808080", "#020202" }, /* 01 - normal */
  13. { "#4C4C4C", "#B3B3B3", "#020202" }, /* 02 - selected */
  14. { "#B3354C", "#B3354C", "#020202" }, /* 03 - urgent */
  15.  
  16. { "#1A1A1A", "#1A1A1A", "#020202" }, /* 04 - black */
  17. { "#802635", "#802635", "#020202" }, /* 05 - red */
  18. { "#608040", "#608040", "#020202" }, /* 06 - green */
  19. { "#877C43", "#877C43", "#020202" }, /* 07 - yellow */
  20. { "#1C678C", "#1C678C", "#020202" }, /* 08 - blue */
  21. { "#684D80", "#684D80", "#020202" }, /* 09 - magenta */
  22. { "#000000", "#000000", "#000000" }, /* unusable */
  23. { "#337373", "#337373", "#020202" }, /* 0B - cyan */
  24. { "#808080", "#808080", "#020202" }, /* 0C - light gray */
  25. { "#4C4C4C", "#4C4C4C", "#020202" }, /* 0D - gray */
  26. { "#B3354C", "#B3354C", "#020202" }, /* 0E - light red */
  27. { "#4BA65A", "#4BA65A", "#020202" }, /* 0F - light green */
  28. { "#BF9F5F", "#BF9F5F", "#020202" }, /* 10 - light yellow */
  29. { "#3995BF", "#3995BF", "#020202" }, /* 11 - light blue */
  30. { "#A64286", "#A64286", "#020202" }, /* 12 - light magenta */
  31. { "#6C98A6", "#6C98A6", "#020202" }, /* 13 - light cyan */
  32. { "#B3B3B3", "#B3B3B3", "#020202" }, /* 14 - white */
  33.  
  34. { "#802635", "#BF9F5F", "#802635" }, /* 15 - warning */
  35. };
  36.  
  37. static const char normbordercolor[] = "#444444";
  38. static const char normbgcolor[] = "#222222";
  39. static const char normfgcolor[] = "#bbbbbb";
  40. static const char selbordercolor[] = "#005577";
  41. static const char selbgcolor[] = "#005577";
  42. static const char selfgcolor[] = "#eeeeee";
  43. static const unsigned int borderpx = 1; /* border pixel of windows */
  44. static const unsigned int snap = 32; /* snap pixel */
  45. static const Bool showbar = True; /* False means no bar */
  46. static const Bool topbar = True; /* False means bottom bar */
  47. //int marginbottom = 20;
  48. int marginbottom = 0;
  49. /* tagging */
  50. static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
  51.  
  52. static const Rule rules[] = {
  53. /* class instance title tagsmask isfloating monitor dontshow*/
  54. { "Gimp", NULL, NULL, 0, True, -1, False},
  55. //{ "XTerm", "xterm", "alsamixer", NULL, True, -1, False}, /* scratchpad in its own tag (6th) */
  56. { "URxvt", "wifi-menu", "Wifi-menu", NULL, True, -1, False}, /* scratchpad in its own tag (6th) */
  57. { "Qalculate", NULL, NULL, NULL, True, -1, False},
  58. { "XTerm", NULL, NULL, NULL, True, -1, False},
  59. { "Gnuplot", NULL, NULL, NULL, True, -1, False},
  60. { "Xfce4-panel", NULL, "", ~0, False, -1, False},
  61. { "lxpanel", NULL, "", ~0, True, -1, True},
  62. { "Docky", NULL, "", ~0, False, -1, False},
  63. { "Tint2", NULL, NULL, ~0, False, -1, False},
  64. { "trayer", NULL, NULL, ~0, False, -1, False},
  65. { "Firefox", NULL, NULL, 1 << 8, False, -1, False},
  66. };
  67.  
  68. /* layout(s) */
  69. static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */
  70. static const int nmaster = 1; /* number of clients in master area */
  71. static const Bool resizehints = False; /* True means respect size hints in tiled resizals */
  72.  
  73. static const Layout layouts[] = {
  74. /* symbol arrange function */
  75. { "\u00C9 ", tile }, /* first entry is default */
  76. { "\u00CA ", NULL }, /* no layout function means floating behavior */
  77. { "\u00CB ", monocle },
  78. };
  79.  
  80. /* key definitions */
  81. #define MODKEY Mod1Mask
  82. #define TAGKEYS(KEY,TAG) \
  83. { MODKEY, KEY, view, {.ui = 1 << TAG} }, \
  84. { MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
  85. { MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \
  86. { MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} },
  87.  
  88. /* helper for spawning shell commands in the pre dwm-5.0 fashion */
  89. #define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
  90.  
  91. /* commands */
  92. static const char *dmenucmd[] = { "dmenu_run", "-fn", font, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor, NULL };
  93. static const char *termcmd[] = { "urxvt", NULL };
  94. static const char *volup[] ={"/home/nagaseiori/bin/volup.sh","","",NULL};
  95. static const char *voldwn[] = {"/home/nagaseiori/bin/voldwn.sh","","",NULL};
  96. static const char *volmute[] = {"volmute", NULL};
  97. static const char *alsamixer[] = { "xterm", "-title", "alsamixer", "-e", "alsamixer", NULL };
  98. static const char *wifimenu[] = { "xterm", "-title", "wifi-menu", "-e", "/home/nagaseiori/bin/wifi-menu-wrapper.sh", NULL };
  99.  
  100. static const char *launchChromium[] = {"chromium","","",NULL};
  101. static const char *launchGedit[] = {"gedit","--new-document","",NULL};
  102. static const char *launchFM[]={"pcmanfm","","",NULL};
  103. static const char *logout[]={"/home/nagaseiori/bin/logout-dwm.sh","","",NULL};
  104. static const char *mute[]={"/home/nagaseiori/bin/mute.sh","","",NULL};
  105. static const char *screenshot[]={"/home/nagaseiori/bin/screenshot.sh","","",NULL};
  106. static const char *screenshotrect[]={"/home/nagaseiori/bin/screenshot.sh","rectangle","",NULL};
  107. static const char *dimscreen[]={"/home/nagaseiori/bin/dimscreen.sh","","",NULL};
  108. static const char *dimscreen2[]={"/home/nagaseiori/bin/dimscreen2.sh","","",NULL};
  109. static const char *dimscreen3[]={"/home/nagaseiori/bin/dimscreen3.sh","","",NULL};
  110.  
  111. static Key keys[] = {
  112. /* modifier key function argument */
  113. { MODKEY, XK_p, spawn, {.v = dmenucmd } },
  114. { MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } },
  115. { MODKEY|ShiftMask, 0x60, spawn, {.v = logout } }, // Shift+Alt+Grave
  116. { 0, 0x1008ff14, spawn, {.v = logout } },
  117. { 0, 0x1008ff11, spawn, {.v = alsamixer } },
  118. { 0, 0x1008ff13, spawn, {.v = alsamixer } },
  119. { MODKEY, XK_b, togglebar, {0} },
  120. { MODKEY, XK_j, focusstack, {.i = +1 } },
  121. { MODKEY, XK_k, focusstack, {.i = -1 } },
  122. { MODKEY, XK_h, setmfact, {.f = -0.05} },
  123. { MODKEY, XK_l, setmfact, {.f = +0.05} },
  124. { MODKEY, XK_Return, zoom, {0} },
  125. { MODKEY, XK_Tab, view, {0} },
  126. { MODKEY|ShiftMask, XK_c, killclient, {0} },
  127. { ControlMask, 0xffbe, spawn, {.v = wifimenu} }, // Alt+F4
  128. { MODKEY, 0xffc1, killclient, {0} }, // Alt+F4
  129. { MODKEY, 0xffc3, spawn, {.v = dimscreen} },
  130. { MODKEY, 0xffc4, spawn, {.v = dimscreen2} },
  131. { MODKEY, 0xffc5, spawn, {.v = dimscreen3} },
  132. { MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
  133. { MODKEY, XK_f, setlayout, {.v = &layouts[1]} },
  134. { MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
  135. { MODKEY, XK_space, setlayout, {0} },
  136. { MODKEY|ShiftMask, XK_space, togglefloating, {0} },
  137. { MODKEY, XK_0, view, {.ui = ~0 } },
  138. { MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
  139. TAGKEYS( XK_1, 0)
  140. TAGKEYS( XK_2, 1)
  141. TAGKEYS( XK_3, 2)
  142. TAGKEYS( XK_4, 3)
  143. TAGKEYS( XK_5, 4)
  144. TAGKEYS( XK_6, 5)
  145. TAGKEYS( XK_7, 6)
  146. TAGKEYS( XK_8, 7)
  147. TAGKEYS( XK_9, 8)
  148. {MODKEY, XK_a, spawn, {.v = launchChromium} },
  149. {MODKEY, XK_e, spawn, {.v = launchGedit} },
  150. {MODKEY, XK_z, spawn, {.v = launchFM} },
  151. {0, 0x1008ff12, spawn, {.v = mute} },
  152. {0, 0xff61, spawn, {.v = screenshot} },
  153. {MODKEY, 0xff61, spawn, {.v = screenshotrect} },
  154. { MODKEY|ShiftMask, XK_q, quit, {0} }
  155. };
  156.  
  157. /* button definitions */
  158. /* click can be ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
  159. static Button buttons[] = {
  160. /* click event mask button function argument */
  161. { ClkLtSymbol, 0, Button1, setlayout, {0} },
  162. { ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} },
  163. { ClkWinTitle, 0, Button2, zoom, {0} },
  164. { ClkStatusText, 0, Button2, spawn, {.v = termcmd } },
  165. { ClkClientWin, MODKEY, Button1, movemouse, {0} },
  166. { ClkClientWin, MODKEY, Button2, togglefloating, {0} },
  167. { ClkClientWin, MODKEY, Button3, resizemouse, {0} },
  168. { ClkTagBar, 0, Button1, view, {0} },
  169. { ClkTagBar, 0, Button3, toggleview, {0} },
  170. { ClkTagBar, MODKEY, Button1, tag, {0} },
  171. { ClkTagBar, MODKEY, Button3, toggletag, {0} },
  172. };
  173.  
  174. static const Bool systray_enable = True;
  175. static const int systray_spacing = 2;
  176. Bool autohide = True;
  177. static const int status_height = 0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement