Advertisement
BSDG33KCLUB

config.h - 2bwm brown theme config

Feb 12th, 2014
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.84 KB | None | 0 0
  1. ///---User configurable stuff---///
  2. ///---Modifiers---///
  3. #define MOD XCB_MOD_MASK_4 /* Super/Windows key or check xmodmap(1) with -pm*/
  4. ///--Speed---///
  5. /* Move this many pixels when moving or resizing with keyboard unless the window has hints saying otherwise.
  6. *0)move step slow 1)move step fast
  7. *2)mouse slow 3)mouse fast */
  8. static const uint16_t movements[] = {10,40,15,450};
  9. /* resize by line like in mcwm -- jjumbi */
  10. static const bool resize_by_line = true;
  11. /* the ratio used when resizing and keeping the aspect */
  12. static const float resize_keep_aspect_ratio= 1.03;
  13. ///---Offsets---///
  14. /*0)offsetx 1)offsety
  15. *2)maxwidth 3)maxheight */
  16. static const uint8_t offsets[] = {0,0,0,0};
  17. ///---Colors---///
  18. /*0)focuscol 1)unfocuscol
  19. *2)fixedcol 3)unkilcol
  20. *4)fixedunkilcol 5)outerbordercol
  21. *6)emptycol */
  22. static const char *colors[] = {"#8d886b","#9F7155","#bea492","#bea492","#9F7155","#100e0c","#181512"};
  23. /* if this is set to true the inner border and outer borders colors will be swapped */
  24. static const bool inverted_colors = false;
  25. ///---Borders---///
  26. /*0) Outer border size. If you put this negative it will be a square.
  27. *1) Full borderwidth 2) Magnet border size
  28. *3) Resize border size */
  29. static const uint8_t borders[] = {1,3,3,3};
  30. /* Windows that won't have a border.*/
  31. #define LOOK_INTO "WM_NAME"
  32. static const char *ignore_names[] = {"bar"};
  33. /*
  34. * Do we allow windows to be iconified? Set to true if you want this
  35. * behaviour to be default. Can also be set by calling mcwm with -i.
  36. */
  37. #define ALLOWICONS true
  38. ///--Menus and Programs---///
  39. static const char *menucmd[] = { "/usr/local/bin/mcmenu", NULL };
  40. static const char *iconcmd[] = { "/usr/local/bin/mcicon", NULL };
  41. static const char *dmenu[] = { "/usr/local/bin/dmenu_run",NULL};
  42. static const char *terminal[] = { "urxvt", NULL };
  43. ///--Custom foo---///
  44. static void halfandcentered(const Arg *arg)
  45. {
  46. Arg arg2 = {.i=2};
  47. maxhalf(&arg2);
  48. Arg arg3 = {.i=0};
  49. teleport(&arg3);
  50. }
  51. ///---Shortcuts---///
  52. /* Check /usr/include/X11/keysymdef.h for the list of all keys
  53. * For AZERTY keyboards XK_1...0 should be replaced by :
  54. * DESKTOPCHANGE( XK_ampersand, 0)
  55. * DESKTOPCHANGE( XK_eacute, 1)
  56. * DESKTOPCHANGE( XK_quotedbl, 2)
  57. * DESKTOPCHANGE( XK_apostrophe, 3)
  58. * DESKTOPCHANGE( XK_parenleft, 4)
  59. * DESKTOPCHANGE( XK_minus, 5)
  60. * DESKTOPCHANGE( XK_egrave, 6)
  61. * DESKTOPCHANGE( XK_underscore, 7)
  62. * DESKTOPCHANGE( XK_ccedilla, 8)
  63. * DESKTOPCHANGE( XK_agrave, 9)*
  64. */
  65. #define DESKTOPCHANGE(K,N) \
  66. { MOD , K, changeworkspace, {.i=N}}, \
  67. { MOD |SHIFT, K, sendtoworkspace, {.i=N}},
  68. static key keys[] = {
  69. /* modifier key function argument */
  70. // Focus to next/previous window
  71. { MOD , XK_Tab, focusnext, {.i=0}},
  72. { MOD |SHIFT, XK_Tab, focusnext, {.i=1}},
  73. // Kill a window
  74. { MOD , XK_q, deletewin, {.i=0}},
  75. // Resize a window
  76. { MOD |SHIFT, XK_k, resizestep, {.i=2}},
  77. { MOD |SHIFT, XK_j, resizestep, {.i=1}},
  78. { MOD |SHIFT, XK_l, resizestep, {.i=3}},
  79. { MOD |SHIFT, XK_h, resizestep, {.i=0}},
  80. // Resize a window slower
  81. { MOD |SHIFT|CONTROL,XK_k, resizestep, {.i=6}},
  82. { MOD |SHIFT|CONTROL,XK_j, resizestep, {.i=5}},
  83. { MOD |SHIFT|CONTROL,XK_l, resizestep, {.i=7}},
  84. { MOD |SHIFT|CONTROL,XK_h, resizestep, {.i=4}},
  85. // Move a window
  86. { MOD , XK_k, movestep, {.i=2}},
  87. { MOD , XK_j, movestep, {.i=1}},
  88. { MOD , XK_l, movestep, {.i=3}},
  89. { MOD , XK_h, movestep, {.i=0}},
  90. // Move a window slower
  91. { MOD |CONTROL, XK_k, movestep, {.i=6}},
  92. { MOD |CONTROL, XK_j, movestep, {.i=5}},
  93. { MOD |CONTROL, XK_l, movestep, {.i=7}},
  94. { MOD |CONTROL, XK_h, movestep, {.i=4}},
  95. // Teleport the window to an area of the screen.
  96. // Center:
  97. { MOD , XK_g, teleport, {.i=0}},
  98. // Center y:
  99. { MOD |SHIFT, XK_g, teleport, {.i=3}},
  100. // Center x:
  101. { MOD |CONTROL, XK_g, teleport, {.i=-3}},
  102. // Top left:
  103. { MOD , XK_y, teleport, {.i=2}},
  104. // Top right:
  105. { MOD , XK_u, teleport, {.i=-2}},
  106. // Bottom left:
  107. { MOD , XK_b, teleport, {.i=1}},
  108. // Bottom right:
  109. { MOD , XK_n, teleport, {.i=-1}},
  110. // Resize while keeping the window aspect
  111. { MOD , XK_Home, resizestep_aspect, {.i=0}},
  112. { MOD , XK_End, resizestep_aspect, {.i=1}},
  113. // Full screen window without borders
  114. { MOD , XK_x, maximize, {.i=0}},
  115. //Full screen window without borders overiding offsets
  116. { MOD |SHIFT , XK_x, maximize, {.i=1}},
  117. // Maximize vertically
  118. { MOD , XK_m, maxvert_hor, {.i=1}},
  119. // Maximize horizontally
  120. { MOD |SHIFT, XK_m, maxvert_hor, {.i=0}},
  121. // Maximize and move
  122. // vertically left
  123. { MOD |SHIFT, XK_y, maxhalf, {.i=2}},
  124. // vertically right
  125. { MOD |SHIFT, XK_u, maxhalf, {.i=1}},
  126. // horizontally left
  127. { MOD |SHIFT, XK_b, maxhalf, {.i=-1}},
  128. // horizontally right
  129. { MOD |SHIFT, XK_n, maxhalf, {.i=-2}},
  130. //fold half vertically
  131. { MOD |SHIFT|CONTROL,XK_y, maxhalf, {.i=4}},
  132. //fold half horizontally
  133. { MOD |SHIFT|CONTROL,XK_b, maxhalf, {.i=-4}},
  134. //unfold vertically
  135. { MOD |SHIFT|CONTROL,XK_u, maxhalf, {.i=3}},
  136. //unfold horizontally
  137. { MOD |SHIFT|CONTROL,XK_n, maxhalf, {.i=-3}},
  138. // Next/Previous screen
  139. { MOD , XK_comma, changescreen, {.i=1}},
  140. { MOD , XK_period, changescreen, {.i=0}},
  141. // Raise or lower a window
  142. { MOD , XK_r, raiseorlower, {.i=0}},
  143. // Next/Previous workspace
  144. { MOD , XK_v, nextworkspace, {.i=0}},
  145. { MOD , XK_c, prevworkspace, {.i=0}},
  146. // Iconify the window
  147. { MOD , XK_z, hide, {.i=0}},
  148. // Make the window unkillable
  149. { MOD , XK_a, unkillable, {.i=0}},
  150. // Make the window appear always on top
  151. { MOD, XK_t, always_on_top, {.i=0}},
  152. // Make the window stay on all workspaces
  153. { MOD , XK_f, fix, {.i=0}},
  154. // Move the cursor
  155. { MOD , XK_Up, cursor_move, {.i=4}},
  156. { MOD , XK_Down, cursor_move, {.i=5}},
  157. { MOD , XK_Right, cursor_move, {.i=6}},
  158. { MOD , XK_Left, cursor_move, {.i=7}},
  159. // Move the cursor faster
  160. { MOD |SHIFT, XK_Up, cursor_move, {.i=0}},
  161. { MOD |SHIFT, XK_Down, cursor_move, {.i=1}},
  162. { MOD |SHIFT, XK_Right, cursor_move, {.i=2}},
  163. { MOD |SHIFT, XK_Left, cursor_move, {.i=3}},
  164. // Start programs
  165. { MOD , XK_Return, start, {.com = terminal}},
  166. { MOD , XK_w, start, {.com = menucmd}},
  167. { MOD , XK_s, start, {.com = iconcmd}},
  168. { MOD , XK_p, start, {.com = dmenu}},
  169. // Exit or restart 2bwm
  170. { MOD |CONTROL, XK_q, twobwm_exit, {.i=0}},
  171. { MOD |CONTROL, XK_r, twobwm_restart, {.i=0}},
  172. { MOD , XK_space, halfandcentered, {.i=0}},
  173. // Change current workspace
  174. DESKTOPCHANGE( XK_1, 1)
  175. DESKTOPCHANGE( XK_2, 2)
  176. DESKTOPCHANGE( XK_3, 3)
  177. DESKTOPCHANGE( XK_4, 4)
  178. DESKTOPCHANGE( XK_5, 5)
  179. DESKTOPCHANGE( XK_6, 6)
  180. DESKTOPCHANGE( XK_7, 7)
  181. DESKTOPCHANGE( XK_8, 8)
  182. DESKTOPCHANGE( XK_9, 9)
  183. DESKTOPCHANGE( XK_0, 0)
  184. };
  185. static Button buttons[] = {
  186. { MOD ,XCB_BUTTON_INDEX_1, mousemotion, {.i=TWOBWM_MOVE}},
  187. { MOD ,XCB_BUTTON_INDEX_3, mousemotion, {.i=TWOBWM_RESIZE}},
  188. { MOD|CONTROL,XCB_BUTTON_INDEX_3, start, {.com = menucmd}},
  189. { MOD|SHIFT, XCB_BUTTON_INDEX_1, changeworkspace, {.i=0}},
  190. { MOD|SHIFT, XCB_BUTTON_INDEX_3, changeworkspace, {.i=1}},
  191. { MOD|ALT, XCB_BUTTON_INDEX_1, changescreen, {.i=1}},
  192. { MOD|ALT, XCB_BUTTON_INDEX_3, changescreen, {.i=0}}
  193. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement