dotfiles

config files for my linux setup
git clone git://edryd.org/dotfiles
Log | Files | Refs | README

tabbed.h (2872B)


      1 /* See LICENSE file for copyright and license details. */
      2 
      3 /* appearance */
      4 static const char font[]        = "FantasqueSansMono:pixelsize=18:antialias=true:autohint=false";
      5 static const char* normbgcolor  = "#073642";
      6 static const char* normfgcolor  = "#657B83";
      7 static const char* selbgcolor   = "#EEE8D5";
      8 static const char* selfgcolor   = "#657B83";
      9 static const char* urgbgcolor   = "#B58900";
     10 static const char* urgfgcolor   = "#657B83";
     11 static const char before[]      = "<";
     12 static const char after[]       = ">";
     13 static const char titletrim[]   = "...";
     14 static const int  tabwidth      = 125;
     15 static const Bool foreground    = True;
     16 static       Bool urgentswitch  = False;
     17 
     18 /*
     19  * Where to place a new tab when it is opened. When npisrelative is True,
     20  * then the current position is changed + newposition. If npisrelative
     21  * is False, then newposition is an absolute position.
     22  */
     23 static int  newposition   = 1;
     24 static Bool npisrelative  = True;
     25 
     26 #define SETPROP(p) { \
     27         .v = (char *[]){ "/bin/sh", "-c", \
     28                 "prop=\"`xwininfo -children -id $1 | grep '^     0x' |" \
     29                 "sed -e's@^ *\\(0x[0-9a-f]*\\) \"\\([^\"]*\\)\".*@\\1 \\2@' |" \
     30                 "xargs -0 printf %b | dmenu -i -l 10`\" &&" \
     31                 "xprop -id $1 -f $0 8s -set $0 \"$prop\"", \
     32                 p, winid, NULL \
     33         } \
     34 }
     35 
     36 #define MODKEY ControlMask
     37 static Key keys[] = {
     38 	/* modifier             key        function     argument */
     39 	{ MODKEY|ShiftMask,     XK_Return, focusonce,   { 0 } },
     40 	{ MODKEY|ShiftMask,     XK_Return, spawn,       { 0 } },
     41 	{ MODKEY|ShiftMask,     XK_t,      spawn,       SETPROP("_TABBED_SELECT_TAB") },
     42 
     43 	{ MODKEY|ShiftMask,     XK_l,      rotate,      { .i = +1 } },
     44 	{ MODKEY|ShiftMask,     XK_h,      rotate,      { .i = -1 } },
     45 	{ MODKEY|ShiftMask,     XK_j,      movetab,     { .i = -1 } },
     46 	{ MODKEY|ShiftMask,     XK_k,      movetab,     { .i = +1 } },
     47 	{ MODKEY,               XK_Tab,    rotate,      { .i = 0 } },
     48 
     49 	{ MODKEY,               XK_1,      move,        { .i = 0 } },
     50 	{ MODKEY,               XK_2,      move,        { .i = 1 } },
     51 	{ MODKEY,               XK_3,      move,        { .i = 2 } },
     52 	{ MODKEY,               XK_4,      move,        { .i = 3 } },
     53 	{ MODKEY,               XK_5,      move,        { .i = 4 } },
     54 	{ MODKEY,               XK_6,      move,        { .i = 5 } },
     55 	{ MODKEY,               XK_7,      move,        { .i = 6 } },
     56 	{ MODKEY,               XK_8,      move,        { .i = 7 } },
     57 	{ MODKEY,               XK_9,      move,        { .i = 8 } },
     58 	{ MODKEY,               XK_0,      move,        { .i = 9 } },
     59 
     60 	{ MODKEY|ShiftMask,     XK_q,      killclient,  { 0 } },
     61 
     62 	{ MODKEY|ShiftMask,     XK_u,      focusurgent, { 0 } },
     63 	{ MODKEY|Mod1Mask,      XK_u,      toggle,      { .v = (void*) &urgentswitch } },
     64 
     65 	{ 0,                    XK_F11,    fullscreen,  { 0 } },
     66 };