monsterwm

Personal build of monsterwm
git clone git://git.gormless.xyz/monsterwm.git
Log | Files | Refs | README | LICENSE

config.def.h (5985B)


      1 /* see LICENSE for copyright and license */
      2 
      3 #ifndef CONFIG_H
      4 #define CONFIG_H
      5 
      6 /** modifiers **/
      7 #define MOD1            Mod1Mask    /* ALT key */
      8 #define MOD4            Mod4Mask    /* Super/Windows key */
      9 #define CONTROL         ControlMask /* Control key */
     10 #define SHIFT           ShiftMask   /* Shift key */
     11 
     12 /** generic settings **/
     13 #define MASTER_SIZE     0.52
     14 #define SHOW_PANEL      True      /* show panel by default on exec */
     15 #define TOP_PANEL       True      /* False means panel is on bottom */
     16 #define PANEL_HEIGHT    18        /* 0 for no space for panel, thus no panel */
     17 #define DEFAULT_MODE    TILE      /* initial layout/mode: TILE MONOCLE BSTACK GRID FLOAT */
     18 #define ATTACH_ASIDE    True      /* False means new window is master */
     19 #define FOLLOW_WINDOW   False     /* follow the window when moved to a different desktop */
     20 #define FOLLOW_MOUSE    False     /* focus the window the mouse just entered */
     21 #define CLICK_TO_FOCUS  True      /* focus an unfocused window when clicked  */
     22 #define FOCUS_BUTTON    Button3   /* mouse button to be used along with CLICK_TO_FOCUS */
     23 #define BORDER_WIDTH    2         /* window border width */
     24 #define FOCUS           "#ff950e" /* focused window border color    */
     25 #define UNFOCUS         "#444444" /* unfocused window border color  */
     26 #define MINWSZ          50        /* minimum window size in pixels  */
     27 #define DEFAULT_DESKTOP 0         /* the desktop to focus initially */
     28 #define DESKTOPS        4         /* number of desktops - edit DESKTOPCHANGE keys to suit */
     29 #define USELESSGAP      8         /* the size of the useless gap in pixels */
     30 
     31 /**
     32  * open applications to specified desktop with specified mode.
     33  * if desktop is negative, then current is assumed
     34  */
     35 static const AppRule rules[] = { \
     36     /*  class     desktop  follow  float */
     37     { "MPlayer",     3,    True,   False },
     38     { "Gimp",        0,    False,  True  },
     39 };
     40 
     41 /* helper for spawning shell commands */
     42 #define SHCMD(cmd) {.com = (const char*[]){"/bin/sh", "-c", cmd, NULL}}
     43 
     44 /**
     45  * custom commands
     46  * must always end with ', NULL };'
     47  */
     48 static const char *termcmd[] = { "xterm",     NULL };
     49 static const char *menucmd[] = { "dmenu_run", NULL };
     50 
     51 #define DESKTOPCHANGE(K,N) \
     52     {  MOD1,             K,              change_desktop, {.i = N}}, \
     53     {  MOD1|ShiftMask,   K,              client_to_desktop, {.i = N}},
     54 
     55 /**
     56  * keyboard shortcuts
     57  */
     58 static Key keys[] = {
     59     /* modifier          key            function           argument */
     60     {  MOD1,             XK_b,          togglepanel,       {NULL}},
     61     {  MOD1,             XK_BackSpace,  focusurgent,       {NULL}},
     62     {  MOD1|SHIFT,       XK_c,          killclient,        {NULL}},
     63     {  MOD1,             XK_j,          next_win,          {NULL}},
     64     {  MOD1,             XK_k,          prev_win,          {NULL}},
     65     {  MOD1,             XK_h,          resize_master,     {.i = -10}}, /* decrease size in px */
     66     {  MOD1,             XK_l,          resize_master,     {.i = +10}}, /* increase size in px */
     67     {  MOD1,             XK_o,          resize_stack,      {.i = -10}}, /* shrink   size in px */
     68     {  MOD1,             XK_p,          resize_stack,      {.i = +10}}, /* grow     size in px */
     69     {  MOD1|CONTROL,     XK_h,          rotate,            {.i = -1}},
     70     {  MOD1|CONTROL,     XK_l,          rotate,            {.i = +1}},
     71     {  MOD1|SHIFT,       XK_h,          rotate_filled,     {.i = -1}},
     72     {  MOD1|SHIFT,       XK_l,          rotate_filled,     {.i = +1}},
     73     {  MOD1,             XK_Tab,        last_desktop,      {NULL}},
     74     {  MOD1,             XK_Return,     swap_master,       {NULL}},
     75     {  MOD1|SHIFT,       XK_j,          move_down,         {NULL}},
     76     {  MOD1|SHIFT,       XK_k,          move_up,           {NULL}},
     77     {  MOD1|SHIFT,       XK_t,          switch_mode,       {.i = TILE}},
     78     {  MOD1|SHIFT,       XK_m,          switch_mode,       {.i = MONOCLE}},
     79     {  MOD1|SHIFT,       XK_b,          switch_mode,       {.i = BSTACK}},
     80     {  MOD1|SHIFT,       XK_g,          switch_mode,       {.i = GRID}},
     81     {  MOD1|SHIFT,       XK_f,          switch_mode,       {.i = FLOAT}},
     82     {  MOD1|CONTROL,     XK_r,          quit,              {.i = 0}}, /* quit with exit value 0 */
     83     {  MOD1|CONTROL,     XK_q,          quit,              {.i = 1}}, /* quit with exit value 1 */
     84     {  MOD1|SHIFT,       XK_Return,     spawn,             {.com = termcmd}},
     85     {  MOD4,             XK_v,          spawn,             {.com = menucmd}},
     86     {  MOD4,             XK_j,          moveresize,        {.v = (int []){   0,  25,   0,   0 }}}, /* move down  */
     87     {  MOD4,             XK_k,          moveresize,        {.v = (int []){   0, -25,   0,   0 }}}, /* move up    */
     88     {  MOD4,             XK_l,          moveresize,        {.v = (int []){  25,   0,   0,   0 }}}, /* move right */
     89     {  MOD4,             XK_h,          moveresize,        {.v = (int []){ -25,   0,   0,   0 }}}, /* move left  */
     90     {  MOD4|SHIFT,       XK_j,          moveresize,        {.v = (int []){   0,   0,   0,  25 }}}, /* height grow   */
     91     {  MOD4|SHIFT,       XK_k,          moveresize,        {.v = (int []){   0,   0,   0, -25 }}}, /* height shrink */
     92     {  MOD4|SHIFT,       XK_l,          moveresize,        {.v = (int []){   0,   0,  25,   0 }}}, /* width grow    */
     93     {  MOD4|SHIFT,       XK_h,          moveresize,        {.v = (int []){   0,   0, -25,   0 }}}, /* width shrink  */
     94        DESKTOPCHANGE(    XK_F1,                             0)
     95        DESKTOPCHANGE(    XK_F2,                             1)
     96        DESKTOPCHANGE(    XK_F3,                             2)
     97        DESKTOPCHANGE(    XK_F4,                             3)
     98 };
     99 
    100 /**
    101  * mouse shortcuts
    102  */
    103 static Button buttons[] = {
    104     {  MOD1,    Button1,     mousemotion,   {.i = MOVE}},
    105     {  MOD1,    Button3,     mousemotion,   {.i = RESIZE}},
    106     {  MOD4,    Button3,     spawn,         {.com = menucmd}},
    107 };
    108 #endif
    109 
    110 /* vim: set expandtab ts=4 sts=4 sw=4 : */