paulo@0: /* (C)opyright MMVI-MMVII Anselm R. Garbe paulo@0: * See LICENSE file for license details. paulo@0: */ paulo@0: paulo@0: /* appearance */ paulo@0: #define BORDERPX 1 paulo@0: #define FONT "6x9" paulo@0: #define NORMBORDERCOLOR "#aaaaaa" paulo@0: #define NORMBGCOLOR "#222222" paulo@0: #define NORMFGCOLOR "#eeeeee" paulo@0: #define SELBORDERCOLOR "#ff0000" paulo@0: #define SELBGCOLOR "#222222" paulo@0: #define SELFGCOLOR "#00ff00" paulo@0: #define TOPBAR True /* False */ paulo@3: #define TASKBAR True /* False */ paulo@3: #define CLICK_TO_FOCUS True /* False */ paulo@0: paulo@0: /* behavior */ paulo@0: #define SNAP 10 /* pixel */ paulo@0: #define TAGS \ paulo@0: const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", NULL }; paulo@0: /* Query class:instance:title for regex matching info with following command: paulo@0: * xprop | awk -F '"' '/^WM_CLASS/ { printf("%s:%s:",$4,$2) }; /^WM_NAME/ { printf("%s\n",$2) }' */ paulo@0: #define RULES \ paulo@0: static Rule rule[] = { \ paulo@0: /* class:instance:title regex tags regex isversatile */ \ paulo@0: { "Gimp", NULL, False }, \ paulo@0: { "MPlayer", NULL, False }, \ paulo@0: { "Acroread", NULL, False }, \ paulo@0: }; paulo@0: paulo@0: /* layout(s) */ paulo@0: #define LAYOUTS \ paulo@0: static Layout layout[] = { \ paulo@0: /* symbol function */ \ paulo@0: { " ", versatile }, \ paulo@0: { "@", spiral }, \ paulo@0: { "&", spiral_h }, \ paulo@0: { "X", monocle }, \ paulo@0: { "#", grid }, \ paulo@0: { "U", bstack }, \ paulo@0: { "!", tile }, \ paulo@0: /* first entry is default */ \ paulo@0: }; paulo@0: #define MASTER 650 /* per thousand */ paulo@0: #define NMASTER 1 /* clients in master area */ paulo@0: paulo@6: #define COMMANDMODE 1 paulo@6: #define INSERTMODE 2 paulo@6: paulo@0: /* key definitions */ paulo@0: #define MODKEY Mod4Mask paulo@0: #define KEYS \ paulo@0: static Key key[] = { \ paulo@0: /* modifier key function argument */ \ paulo@6: { MODKEY, XK_Escape, setkeymode, { .i = COMMANDMODE } }, \ paulo@0: { MODKEY, XK_h, moveresize, "-25x 0y 0w 0h" }, \ paulo@0: { MODKEY, XK_l, moveresize, "25x 0y 0w 0h" }, \ paulo@0: { MODKEY, XK_j, moveresize, "0x 25y 0w 0h" }, \ paulo@0: { MODKEY, XK_k, moveresize, "0x -25y 0w 0h" }, \ paulo@0: { MODKEY|ControlMask, XK_h, moveresize, "0X 0y 0w 0h" }, \ paulo@0: { MODKEY|ControlMask, XK_l, moveresize, "9000X 0y 0w 0h" }, \ paulo@0: { MODKEY|ControlMask, XK_j, moveresize, "0x 9000Y 0w 0h" }, \ paulo@4: { MODKEY|ControlMask, XK_k, moveresize, "0x 0Y 0w 0h" }, \ paulo@0: { MODKEY|ShiftMask, XK_h, moveresize, "0x 0y -25w 0h" }, \ paulo@0: { MODKEY|ShiftMask, XK_l, moveresize, "0x 0y 25w 0h" }, \ paulo@0: { MODKEY|ShiftMask, XK_j, moveresize, "0x 0y 0w 25h" }, \ paulo@0: { MODKEY|ShiftMask, XK_k, moveresize, "0x 0y 0w -25h" }, \ paulo@0: }; paulo@0: paulo@4: #define MAX_TASKS 13 /* max number of apps in taskbar */ paulo@6: paulo@6: #define CMDKEYS \ paulo@6: static Key cmdkeys[] = { \ paulo@6: /* modifier keys function argument */ \ paulo@6: { 0, XK_Escape, clearcmd, { 0 } }, \ paulo@6: { ControlMask, XK_c, clearcmd, { 0 } }, \ paulo@6: { MODKEY|ShiftMask, XK_x, killclient, { 0 } }, \ paulo@6: { MODKEY|ShiftMask, XK_q, quit, { 0 } }, \ paulo@6: { 0, XK_i, setkeymode, { .i = INSERTMODE } }, \ paulo@6: { 0, XK_o, spawn, { .cmd = "/home/paulo/bin/myterm.sh" } }, \ paulo@6: { ShiftMask, XK_o, spawn_insert, { .cmd = "/home/paulo/bin/myterm.sh" } }, \ paulo@6: { 0, XK_backslash, spawn, { .cmd = "/home/paulo/bin/myterm.sh -e /home/paulo/bin/viclip.sh" } }, \ paulo@6: { ShiftMask, XK_backslash, spawn_insert, { .cmd = "/home/paulo/bin/myterm.sh -e /home/paulo/bin/viclip.sh" } }, \ paulo@6: { 0, XK_n, pushdown, { 0 } }, \ paulo@6: { ShiftMask, XK_n, pushup, { 0 } }, \ paulo@6: { 0, XK_j, focusnext, { 0 } }, \ paulo@6: { 0, XK_k, focusprev, { 0 } }, \ paulo@6: { 0, XK_Return, zoom, { 0 } }, \ paulo@6: { ShiftMask, XK_Return, zoom_insert, { 0 } }, \ paulo@6: { 0, XK_m, resizemaster, { .i = 15 } }, \ paulo@6: { ShiftMask, XK_m, resizemaster, { .i = -15 } }, \ paulo@6: { 0, XK_d, incnmaster, { .i = 1 } }, \ paulo@6: { ShiftMask, XK_d, incnmaster, { .i = -1 } }, \ paulo@6: { 0, XK_v, next_view, { .i = 1 } }, \ paulo@6: { ShiftMask, XK_v, next_view, { .i = -1 } }, \ paulo@6: { 0, XK_BackSpace, last_view, { 0 } }, \ paulo@6: { 0, XK_l, setlayout, { .i = -1 } }, \ paulo@6: { ShiftMask, XK_l, setlayout, { .i = -2 } }, \ paulo@6: }; paulo@6: paulo@6: #define COMMANDS \ paulo@6: static Command commands[] = { \ paulo@6: /* modifier (4 keys) keysyms (4 keys) function argument */ \ paulo@6: { {0, 0, 0, 0}, {XK_grave, XK_v, 0, 0}, view, { .i = -1 } }, \ paulo@6: { {0, 0, 0, 0}, {XK_1, XK_v, 0, 0}, view, { .i = 0 } }, \ paulo@6: { {0, 0, 0, 0}, {XK_2, XK_v, 0, 0}, view, { .i = 1 } }, \ paulo@6: { {0, 0, 0, 0}, {XK_3, XK_v, 0, 0}, view, { .i = 2 } }, \ paulo@6: { {0, 0, 0, 0}, {XK_4, XK_v, 0, 0}, view, { .i = 3 } }, \ paulo@6: { {0, 0, 0, 0}, {XK_5, XK_v, 0, 0}, view, { .i = 4 } }, \ paulo@6: { {0, 0, 0, 0}, {XK_6, XK_v, 0, 0}, view, { .i = 5 } }, \ paulo@6: { {0, 0, 0, 0}, {XK_7, XK_v, 0, 0}, view, { .i = 6 } }, \ paulo@6: { {0, 0, 0, 0}, {XK_8, XK_v, 0, 0}, view, { .i = 7 } }, \ paulo@6: { {0, 0, 0, 0}, {XK_9, XK_v, 0, 0}, view, { .i = 8 } }, \ paulo@6: { {0, 0, 0, 0}, {XK_0, XK_v, 0, 0}, view, { .i = 9 } }, \ paulo@6: { {0, ShiftMask, 0, 0}, {XK_grave, XK_v, 0, 0}, toggleversatile, { 0 } }, \ paulo@6: { {0, ShiftMask, 0, 0}, {XK_1, XK_v, 0, 0}, toggleview, { .i = 0 } }, \ paulo@6: { {0, ShiftMask, 0, 0}, {XK_2, XK_v, 0, 0}, toggleview, { .i = 1 } }, \ paulo@6: { {0, ShiftMask, 0, 0}, {XK_3, XK_v, 0, 0}, toggleview, { .i = 2 } }, \ paulo@6: { {0, ShiftMask, 0, 0}, {XK_4, XK_v, 0, 0}, toggleview, { .i = 3 } }, \ paulo@6: { {0, ShiftMask, 0, 0}, {XK_5, XK_v, 0, 0}, toggleview, { .i = 4 } }, \ paulo@6: { {0, ShiftMask, 0, 0}, {XK_6, XK_v, 0, 0}, toggleview, { .i = 5 } }, \ paulo@6: { {0, ShiftMask, 0, 0}, {XK_7, XK_v, 0, 0}, toggleview, { .i = 6 } }, \ paulo@6: { {0, ShiftMask, 0, 0}, {XK_8, XK_v, 0, 0}, toggleview, { .i = 7 } }, \ paulo@6: { {0, ShiftMask, 0, 0}, {XK_9, XK_v, 0, 0}, toggleview, { .i = 8 } }, \ paulo@6: { {0, ShiftMask, 0, 0}, {XK_0, XK_v, 0, 0}, toggleview, { .i = 9 } }, \ paulo@6: { {0, 0, 0, 0}, {XK_1, XK_l, 0, 0}, setlayout, { .i = 0 } }, \ paulo@6: { {0, 0, 0, 0}, {XK_2, XK_l, 0, 0}, setlayout, { .i = 1 } }, \ paulo@6: { {0, 0, 0, 0}, {XK_3, XK_l, 0, 0}, setlayout, { .i = 2 } }, \ paulo@6: { {0, 0, 0, 0}, {XK_4, XK_l, 0, 0}, setlayout, { .i = 3 } }, \ paulo@6: { {0, 0, 0, 0}, {XK_5, XK_l, 0, 0}, setlayout, { .i = 4 } }, \ paulo@6: { {0, 0, 0, 0}, {XK_6, XK_l, 0, 0}, setlayout, { .i = 5 } }, \ paulo@6: { {0, 0, 0, 0}, {XK_7, XK_l, 0, 0}, setlayout, { .i = 6 } }, \ paulo@6: { {0, 0, 0, 0}, {XK_grave, XK_t, 0, 0}, tag, { .i = -1 } }, \ paulo@6: { {0, 0, 0, 0}, {XK_1, XK_t, 0, 0}, tag, { .i = 0 } }, \ paulo@6: { {0, 0, 0, 0}, {XK_2, XK_t, 0, 0}, tag, { .i = 1 } }, \ paulo@6: { {0, 0, 0, 0}, {XK_3, XK_t, 0, 0}, tag, { .i = 2 } }, \ paulo@6: { {0, 0, 0, 0}, {XK_4, XK_t, 0, 0}, tag, { .i = 3 } }, \ paulo@6: { {0, 0, 0, 0}, {XK_5, XK_t, 0, 0}, tag, { .i = 4 } }, \ paulo@6: { {0, 0, 0, 0}, {XK_6, XK_t, 0, 0}, tag, { .i = 5 } }, \ paulo@6: { {0, 0, 0, 0}, {XK_7, XK_t, 0, 0}, tag, { .i = 6 } }, \ paulo@6: { {0, 0, 0, 0}, {XK_8, XK_t, 0, 0}, tag, { .i = 7 } }, \ paulo@6: { {0, 0, 0, 0}, {XK_9, XK_t, 0, 0}, tag, { .i = 8 } }, \ paulo@6: { {0, 0, 0, 0}, {XK_0, XK_t, 0, 0}, tag, { .i = 9 } }, \ paulo@6: { {0, ShiftMask, 0, 0}, {XK_1, XK_t, 0, 0}, toggletag, { .i = 0 } }, \ paulo@6: { {0, ShiftMask, 0, 0}, {XK_2, XK_t, 0, 0}, toggletag, { .i = 1 } }, \ paulo@6: { {0, ShiftMask, 0, 0}, {XK_3, XK_t, 0, 0}, toggletag, { .i = 2 } }, \ paulo@6: { {0, ShiftMask, 0, 0}, {XK_4, XK_t, 0, 0}, toggletag, { .i = 3 } }, \ paulo@6: { {0, ShiftMask, 0, 0}, {XK_5, XK_t, 0, 0}, toggletag, { .i = 4 } }, \ paulo@6: { {0, ShiftMask, 0, 0}, {XK_6, XK_t, 0, 0}, toggletag, { .i = 5 } }, \ paulo@6: { {0, ShiftMask, 0, 0}, {XK_7, XK_t, 0, 0}, toggletag, { .i = 6 } }, \ paulo@6: { {0, ShiftMask, 0, 0}, {XK_8, XK_t, 0, 0}, toggletag, { .i = 7 } }, \ paulo@6: { {0, ShiftMask, 0, 0}, {XK_9, XK_t, 0, 0}, toggletag, { .i = 8 } }, \ paulo@6: { {0, ShiftMask, 0, 0}, {XK_0, XK_t, 0, 0}, toggletag, { .i = 9 } }, \ paulo@8: { {0, 0, 0, 0}, {XK_1, XK_s, 0, 0}, tag_n_view, { .i = 0 } }, \ paulo@8: { {0, 0, 0, 0}, {XK_2, XK_s, 0, 0}, tag_n_view, { .i = 1 } }, \ paulo@8: { {0, 0, 0, 0}, {XK_3, XK_s, 0, 0}, tag_n_view, { .i = 2 } }, \ paulo@8: { {0, 0, 0, 0}, {XK_4, XK_s, 0, 0}, tag_n_view, { .i = 3 } }, \ paulo@8: { {0, 0, 0, 0}, {XK_5, XK_s, 0, 0}, tag_n_view, { .i = 4 } }, \ paulo@8: { {0, 0, 0, 0}, {XK_6, XK_s, 0, 0}, tag_n_view, { .i = 5 } }, \ paulo@8: { {0, 0, 0, 0}, {XK_7, XK_s, 0, 0}, tag_n_view, { .i = 6 } }, \ paulo@8: { {0, 0, 0, 0}, {XK_8, XK_s, 0, 0}, tag_n_view, { .i = 7 } }, \ paulo@8: { {0, 0, 0, 0}, {XK_9, XK_s, 0, 0}, tag_n_view, { .i = 8 } }, \ paulo@8: { {0, 0, 0, 0}, {XK_0, XK_s, 0, 0}, tag_n_view, { .i = 9 } }, \ paulo@6: };