Mahdi Mirzadeh

Home

About

Donate

Contact

Git

tabbed

Mahdi's build of tabbed
git clone https://github.com/MahdiMirzadeh/tabbed.git
Log | Files | Refs | README | LICENSE

config.h (3537B)


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