annotate config.h @ 15:85763b447d0f

add dwindle_m layout
author paulo
date Mon, 09 Apr 2018 20:08:44 -0600
parents da0e0496f75b
children c65d4f8dc8fd
rev   line source
paulo@0 1 /* (C)opyright MMVI-MMVII Anselm R. Garbe <garbeam at gmail dot com>
paulo@0 2 * See LICENSE file for license details.
paulo@0 3 */
paulo@0 4
paulo@0 5 /* appearance */
paulo@0 6 #define BORDERPX 1
paulo@0 7 #define FONT "6x9"
paulo@0 8 #define NORMBORDERCOLOR "#aaaaaa"
paulo@0 9 #define NORMBGCOLOR "#222222"
paulo@0 10 #define NORMFGCOLOR "#eeeeee"
paulo@0 11 #define SELBORDERCOLOR "#ff0000"
paulo@0 12 #define SELBGCOLOR "#222222"
paulo@0 13 #define SELFGCOLOR "#00ff00"
paulo@11 14 #define INVBORDERCOLOR "#aaaaaa"
paulo@12 15 #define INVBGCOLOR "#000099"
paulo@12 16 #define INVFGCOLOR "#eeee00"
paulo@0 17 #define TOPBAR True /* False */
paulo@3 18 #define TASKBAR True /* False */
paulo@3 19 #define CLICK_TO_FOCUS True /* False */
paulo@0 20
paulo@0 21 /* behavior */
paulo@0 22 #define SNAP 10 /* pixel */
paulo@0 23 #define TAGS \
paulo@0 24 const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", NULL };
paulo@0 25 /* Query class:instance:title for regex matching info with following command:
paulo@0 26 * xprop | awk -F '"' '/^WM_CLASS/ { printf("%s:%s:",$4,$2) }; /^WM_NAME/ { printf("%s\n",$2) }' */
paulo@0 27 #define RULES \
paulo@0 28 static Rule rule[] = { \
paulo@0 29 /* class:instance:title regex tags regex isversatile */ \
paulo@0 30 { "Gimp", NULL, False }, \
paulo@0 31 { "MPlayer", NULL, False }, \
paulo@0 32 { "Acroread", NULL, False }, \
paulo@0 33 };
paulo@0 34
paulo@0 35 /* layout(s) */
paulo@0 36 #define LAYOUTS \
paulo@0 37 static Layout layout[] = { \
paulo@0 38 /* symbol function */ \
paulo@0 39 { " ", versatile }, \
paulo@0 40 { "@", spiral }, \
paulo@0 41 { "&", spiral_h }, \
paulo@0 42 { "X", monocle }, \
paulo@0 43 { "#", grid }, \
paulo@0 44 { "U", bstack }, \
paulo@0 45 { "!", tile }, \
paulo@0 46 /* first entry is default */ \
paulo@0 47 };
paulo@0 48 #define MASTER 650 /* per thousand */
paulo@0 49 #define NMASTER 1 /* clients in master area */
paulo@0 50
paulo@6 51 #define COMMANDMODE 1
paulo@6 52 #define INSERTMODE 2
paulo@6 53
paulo@0 54 /* key definitions */
paulo@0 55 #define MODKEY Mod4Mask
paulo@0 56 #define KEYS \
paulo@0 57 static Key key[] = { \
paulo@0 58 /* modifier key function argument */ \
paulo@6 59 { MODKEY, XK_Escape, setkeymode, { .i = COMMANDMODE } }, \
paulo@0 60 { MODKEY, XK_h, moveresize, "-25x 0y 0w 0h" }, \
paulo@0 61 { MODKEY, XK_l, moveresize, "25x 0y 0w 0h" }, \
paulo@0 62 { MODKEY, XK_j, moveresize, "0x 25y 0w 0h" }, \
paulo@0 63 { MODKEY, XK_k, moveresize, "0x -25y 0w 0h" }, \
paulo@0 64 { MODKEY|ControlMask, XK_h, moveresize, "0X 0y 0w 0h" }, \
paulo@0 65 { MODKEY|ControlMask, XK_l, moveresize, "9000X 0y 0w 0h" }, \
paulo@0 66 { MODKEY|ControlMask, XK_j, moveresize, "0x 9000Y 0w 0h" }, \
paulo@4 67 { MODKEY|ControlMask, XK_k, moveresize, "0x 0Y 0w 0h" }, \
paulo@0 68 { MODKEY|ShiftMask, XK_h, moveresize, "0x 0y -25w 0h" }, \
paulo@0 69 { MODKEY|ShiftMask, XK_l, moveresize, "0x 0y 25w 0h" }, \
paulo@0 70 { MODKEY|ShiftMask, XK_j, moveresize, "0x 0y 0w 25h" }, \
paulo@0 71 { MODKEY|ShiftMask, XK_k, moveresize, "0x 0y 0w -25h" }, \
paulo@0 72 };
paulo@0 73
paulo@4 74 #define MAX_TASKS 13 /* max number of apps in taskbar */
paulo@6 75
paulo@6 76 #define CMDKEYS \
paulo@6 77 static Key cmdkeys[] = { \
paulo@6 78 /* modifier keys function argument */ \
paulo@6 79 { 0, XK_Escape, clearcmd, { 0 } }, \
paulo@6 80 { ControlMask, XK_c, clearcmd, { 0 } }, \
paulo@6 81 { MODKEY|ShiftMask, XK_x, killclient, { 0 } }, \
paulo@6 82 { MODKEY|ShiftMask, XK_q, quit, { 0 } }, \
paulo@6 83 { 0, XK_i, setkeymode, { .i = INSERTMODE } }, \
paulo@6 84 { 0, XK_o, spawn, { .cmd = "/home/paulo/bin/myterm.sh" } }, \
paulo@6 85 { ShiftMask, XK_o, spawn_insert, { .cmd = "/home/paulo/bin/myterm.sh" } }, \
paulo@6 86 { 0, XK_backslash, spawn, { .cmd = "/home/paulo/bin/myterm.sh -e /home/paulo/bin/viclip.sh" } }, \
paulo@6 87 { ShiftMask, XK_backslash, spawn_insert, { .cmd = "/home/paulo/bin/myterm.sh -e /home/paulo/bin/viclip.sh" } }, \
paulo@6 88 { 0, XK_n, pushdown, { 0 } }, \
paulo@6 89 { ShiftMask, XK_n, pushup, { 0 } }, \
paulo@6 90 { 0, XK_j, focusnext, { 0 } }, \
paulo@6 91 { 0, XK_k, focusprev, { 0 } }, \
paulo@6 92 { 0, XK_Return, zoom, { 0 } }, \
paulo@6 93 { ShiftMask, XK_Return, zoom_insert, { 0 } }, \
paulo@6 94 { 0, XK_m, resizemaster, { .i = 15 } }, \
paulo@6 95 { ShiftMask, XK_m, resizemaster, { .i = -15 } }, \
paulo@6 96 { 0, XK_d, incnmaster, { .i = 1 } }, \
paulo@6 97 { ShiftMask, XK_d, incnmaster, { .i = -1 } }, \
paulo@10 98 { 0, XK_l, next_view, { .i = 1 } }, \
paulo@10 99 { 0, XK_h, next_view, { .i = -1 } }, \
paulo@6 100 { 0, XK_BackSpace, last_view, { 0 } }, \
paulo@10 101 { 0, XK_semicolon, setlayout, { .i = -1 } }, \
paulo@10 102 { ShiftMask, XK_semicolon, setlayout, { .i = -2 } }, \
paulo@6 103 };
paulo@6 104
paulo@6 105 #define COMMANDS \
paulo@6 106 static Command commands[] = { \
paulo@6 107 /* modifier (4 keys) keysyms (4 keys) function argument */ \
paulo@10 108 { {0, 0, 0, 0}, {XK_grave, XK_g, 0, 0}, view, { .i = -1 } }, \
paulo@10 109 { {0, 0, 0, 0}, {XK_1, XK_g, 0, 0}, view, { .i = 0 } }, \
paulo@10 110 { {0, 0, 0, 0}, {XK_2, XK_g, 0, 0}, view, { .i = 1 } }, \
paulo@10 111 { {0, 0, 0, 0}, {XK_3, XK_g, 0, 0}, view, { .i = 2 } }, \
paulo@10 112 { {0, 0, 0, 0}, {XK_4, XK_g, 0, 0}, view, { .i = 3 } }, \
paulo@10 113 { {0, 0, 0, 0}, {XK_5, XK_g, 0, 0}, view, { .i = 4 } }, \
paulo@10 114 { {0, 0, 0, 0}, {XK_6, XK_g, 0, 0}, view, { .i = 5 } }, \
paulo@10 115 { {0, 0, 0, 0}, {XK_7, XK_g, 0, 0}, view, { .i = 6 } }, \
paulo@10 116 { {0, 0, 0, 0}, {XK_8, XK_g, 0, 0}, view, { .i = 7 } }, \
paulo@10 117 { {0, 0, 0, 0}, {XK_9, XK_g, 0, 0}, view, { .i = 8 } }, \
paulo@10 118 { {0, 0, 0, 0}, {XK_0, XK_g, 0, 0}, view, { .i = 9 } }, \
paulo@10 119 { {0, ShiftMask, 0, 0}, {XK_grave, XK_g, 0, 0}, toggleversatile, { 0 } }, \
paulo@10 120 { {0, ShiftMask, 0, 0}, {XK_1, XK_g, 0, 0}, toggleview, { .i = 0 } }, \
paulo@10 121 { {0, ShiftMask, 0, 0}, {XK_2, XK_g, 0, 0}, toggleview, { .i = 1 } }, \
paulo@10 122 { {0, ShiftMask, 0, 0}, {XK_3, XK_g, 0, 0}, toggleview, { .i = 2 } }, \
paulo@10 123 { {0, ShiftMask, 0, 0}, {XK_4, XK_g, 0, 0}, toggleview, { .i = 3 } }, \
paulo@10 124 { {0, ShiftMask, 0, 0}, {XK_5, XK_g, 0, 0}, toggleview, { .i = 4 } }, \
paulo@10 125 { {0, ShiftMask, 0, 0}, {XK_6, XK_g, 0, 0}, toggleview, { .i = 5 } }, \
paulo@10 126 { {0, ShiftMask, 0, 0}, {XK_7, XK_g, 0, 0}, toggleview, { .i = 6 } }, \
paulo@10 127 { {0, ShiftMask, 0, 0}, {XK_8, XK_g, 0, 0}, toggleview, { .i = 7 } }, \
paulo@10 128 { {0, ShiftMask, 0, 0}, {XK_9, XK_g, 0, 0}, toggleview, { .i = 8 } }, \
paulo@10 129 { {0, ShiftMask, 0, 0}, {XK_0, XK_g, 0, 0}, toggleview, { .i = 9 } }, \
paulo@10 130 { {0, 0, 0, 0}, {XK_1, XK_semicolon, 0, 0}, setlayout, { .i = 0 } }, \
paulo@10 131 { {0, 0, 0, 0}, {XK_2, XK_semicolon, 0, 0}, setlayout, { .i = 1 } }, \
paulo@10 132 { {0, 0, 0, 0}, {XK_3, XK_semicolon, 0, 0}, setlayout, { .i = 2 } }, \
paulo@10 133 { {0, 0, 0, 0}, {XK_4, XK_semicolon, 0, 0}, setlayout, { .i = 3 } }, \
paulo@10 134 { {0, 0, 0, 0}, {XK_5, XK_semicolon, 0, 0}, setlayout, { .i = 4 } }, \
paulo@10 135 { {0, 0, 0, 0}, {XK_6, XK_semicolon, 0, 0}, setlayout, { .i = 5 } }, \
paulo@10 136 { {0, 0, 0, 0}, {XK_7, XK_semicolon, 0, 0}, setlayout, { .i = 6 } }, \
paulo@6 137 { {0, 0, 0, 0}, {XK_grave, XK_t, 0, 0}, tag, { .i = -1 } }, \
paulo@6 138 { {0, 0, 0, 0}, {XK_1, XK_t, 0, 0}, tag, { .i = 0 } }, \
paulo@6 139 { {0, 0, 0, 0}, {XK_2, XK_t, 0, 0}, tag, { .i = 1 } }, \
paulo@6 140 { {0, 0, 0, 0}, {XK_3, XK_t, 0, 0}, tag, { .i = 2 } }, \
paulo@6 141 { {0, 0, 0, 0}, {XK_4, XK_t, 0, 0}, tag, { .i = 3 } }, \
paulo@6 142 { {0, 0, 0, 0}, {XK_5, XK_t, 0, 0}, tag, { .i = 4 } }, \
paulo@6 143 { {0, 0, 0, 0}, {XK_6, XK_t, 0, 0}, tag, { .i = 5 } }, \
paulo@6 144 { {0, 0, 0, 0}, {XK_7, XK_t, 0, 0}, tag, { .i = 6 } }, \
paulo@6 145 { {0, 0, 0, 0}, {XK_8, XK_t, 0, 0}, tag, { .i = 7 } }, \
paulo@6 146 { {0, 0, 0, 0}, {XK_9, XK_t, 0, 0}, tag, { .i = 8 } }, \
paulo@6 147 { {0, 0, 0, 0}, {XK_0, XK_t, 0, 0}, tag, { .i = 9 } }, \
paulo@6 148 { {0, ShiftMask, 0, 0}, {XK_1, XK_t, 0, 0}, toggletag, { .i = 0 } }, \
paulo@6 149 { {0, ShiftMask, 0, 0}, {XK_2, XK_t, 0, 0}, toggletag, { .i = 1 } }, \
paulo@6 150 { {0, ShiftMask, 0, 0}, {XK_3, XK_t, 0, 0}, toggletag, { .i = 2 } }, \
paulo@6 151 { {0, ShiftMask, 0, 0}, {XK_4, XK_t, 0, 0}, toggletag, { .i = 3 } }, \
paulo@6 152 { {0, ShiftMask, 0, 0}, {XK_5, XK_t, 0, 0}, toggletag, { .i = 4 } }, \
paulo@6 153 { {0, ShiftMask, 0, 0}, {XK_6, XK_t, 0, 0}, toggletag, { .i = 5 } }, \
paulo@6 154 { {0, ShiftMask, 0, 0}, {XK_7, XK_t, 0, 0}, toggletag, { .i = 6 } }, \
paulo@6 155 { {0, ShiftMask, 0, 0}, {XK_8, XK_t, 0, 0}, toggletag, { .i = 7 } }, \
paulo@6 156 { {0, ShiftMask, 0, 0}, {XK_9, XK_t, 0, 0}, toggletag, { .i = 8 } }, \
paulo@6 157 { {0, ShiftMask, 0, 0}, {XK_0, XK_t, 0, 0}, toggletag, { .i = 9 } }, \
paulo@8 158 { {0, 0, 0, 0}, {XK_1, XK_s, 0, 0}, tag_n_view, { .i = 0 } }, \
paulo@8 159 { {0, 0, 0, 0}, {XK_2, XK_s, 0, 0}, tag_n_view, { .i = 1 } }, \
paulo@8 160 { {0, 0, 0, 0}, {XK_3, XK_s, 0, 0}, tag_n_view, { .i = 2 } }, \
paulo@8 161 { {0, 0, 0, 0}, {XK_4, XK_s, 0, 0}, tag_n_view, { .i = 3 } }, \
paulo@8 162 { {0, 0, 0, 0}, {XK_5, XK_s, 0, 0}, tag_n_view, { .i = 4 } }, \
paulo@8 163 { {0, 0, 0, 0}, {XK_6, XK_s, 0, 0}, tag_n_view, { .i = 5 } }, \
paulo@8 164 { {0, 0, 0, 0}, {XK_7, XK_s, 0, 0}, tag_n_view, { .i = 6 } }, \
paulo@8 165 { {0, 0, 0, 0}, {XK_8, XK_s, 0, 0}, tag_n_view, { .i = 7 } }, \
paulo@8 166 { {0, 0, 0, 0}, {XK_9, XK_s, 0, 0}, tag_n_view, { .i = 8 } }, \
paulo@8 167 { {0, 0, 0, 0}, {XK_0, XK_s, 0, 0}, tag_n_view, { .i = 9 } }, \
paulo@6 168 };