tabbed

Mahdi's build of tabbed
git clone git://mahdi.pw/tabbed.git
Log | Files | Refs | README | LICENSE

config.h (3591B)


      1 /* See LICENSE file for copyright and license details. */
      2 
      3 /* appearance */
      4 #define HIDE_TABS 0
      5 
      6 static const int bottom_tabs    = 0;
      7 
      8 static const char* font         = "monospace:size=10";
      9 static const char* normbgcolor  = "#222222";
     10 static const char* normfgcolor  = "#cccccc";
     11 static const char* selbgcolor   = "#555555";
     12 static const char* selfgcolor   = "#ffffff";
     13 static const char* urgbgcolor   = "#111111";
     14 static const char* urgfgcolor   = "#cc0000";
     15 static const char before[]      = "";
     16 static const char after[]       = "";
     17 static const char titletrim[]   = "...";
     18 static const int  tabwidth      = 150;
     19 static const Bool foreground    = True;
     20 static       Bool urgentswitch  = False;
     21 
     22 static const int clientNumber   = 0;
     23 static const int barHeight      = 20;
     24 
     25 /*
     26  * Where to place a new tab when it is opened. When npisrelative is True,
     27  * then the current position is changed + newposition. If npisrelative
     28  * is False, then newposition is an absolute position.
     29  */
     30 static int  newposition   = 1;
     31 static Bool npisrelative  = True;
     32 
     33 #define SETPROP(p) { \
     34         .v = (char *[]){ "/bin/sh", "-c", \
     35                 "prop=\"`xwininfo -children -id $1 | grep '^     0x' |" \
     36                 "sed -e's@^ *\\(0x[0-9a-f]*\\) \"\\([^\"]*\\)\".*@\\1 \\2@' |" \
     37                 "xargs -0 printf %b | dmenu -l 10 -w $1`\" &&" \
     38                 "xprop -id $1 -f $0 8s -set $0 \"$prop\"", \
     39                 p, winid, NULL \
     40         } \
     41 }
     42 
     43 #define MODKEY ControlMask
     44 static const Key keys[] = {
     45 	/* modifier             key           function     argument */
     46 	{ MODKEY|Mod1Mask,      XK_Return,    focusonce,   { 0 } },
     47 	{ MODKEY|Mod1Mask,      XK_Return,    spawn,       { 0 } },
     48 
     49 	{ MODKEY|Mod1Mask,      XK_l,         rotate,      { .i = +1 } },
     50 	{ MODKEY|Mod1Mask,      XK_h,         rotate,      { .i = -1 } },
     51 	{ MODKEY|Mod1Mask,      XK_j,         movetab,     { .i = -1 } },
     52 	{ MODKEY|Mod1Mask,      XK_k,         movetab,     { .i = +1 } },
     53 	{ MODKEY,               XK_Tab,       rotate,      { .i = 0 } },
     54 
     55 	{ MODKEY,               XK_grave,     spawn,       SETPROP("_TABBED_SELECT_TAB") },
     56 	{ MODKEY,               XK_1,         move,        { .i = 0 } },
     57 	{ MODKEY,               XK_2,         move,        { .i = 1 } },
     58 	{ MODKEY,               XK_3,         move,        { .i = 2 } },
     59 	{ MODKEY,               XK_4,         move,        { .i = 3 } },
     60 	{ MODKEY,               XK_5,         move,        { .i = 4 } },
     61 	{ MODKEY,               XK_6,         move,        { .i = 5 } },
     62 	{ MODKEY,               XK_7,         move,        { .i = 6 } },
     63 	{ MODKEY,               XK_8,         move,        { .i = 7 } },
     64 	{ MODKEY,               XK_9,         move,        { .i = 8 } },
     65 	{ MODKEY,               XK_0,         move,        { .i = 9 } },
     66 
     67 	{ MODKEY,               XK_q,         killclient,  { 0 } },
     68 
     69 	{ MODKEY,               XK_u,         focusurgent, { 0 } },
     70 	{ MODKEY|Mod1Mask,      XK_u,         toggle,      { .v = (void*) &urgentswitch } },
     71 
     72 	{ 0,                    XK_F11,       fullscreen,  { 0 } },
     73 
     74         #if HIDE_TABS
     75 	{ MODKEY,               XK_Alt_L,     showbar,    { .i = 1 } },
     76 	{ Mod1Mask,             XK_Control_L, showbar,    { .i = 1 } },
     77         #endif
     78 };
     79 
     80 static const Key keyreleases[] = {
     81 	/* modifier             key             function     argument */
     82         #if HIDE_TABS
     83         { MODKEY|Mod1Mask,      XK_Alt_L,       showbar,     { .i = 0 } },
     84         { MODKEY|Mod1Mask,      XK_Control_L,   showbar,     { .i = 0 } },
     85         #else
     86         { MODKEY|Mod1Mask,      XK_Control_L,   NULL,        { 0 } },
     87         #endif
     88 };
     89