dwm

my build of dwm
git clone git://git.ckyln.com/~cem/dwm.git
Log | Files | Refs | README | LICENSE

config.def.h (7808B)


      1 /* See LICENSE file for copyright and license details. */
      2 
      3 /* appearance */
      4 static const unsigned int borderpx  = 0;        /* border pixel of windows */
      5 static const unsigned int gappx     = 10;        /* gaps between windows */
      6 static const unsigned int snap      = 32;       /* snap pixel */
      7 static const int showbar            = 1;        /* 0 means no bar */
      8 static const int topbar             = 1;        /* 0 means bottom bar */
      9 static const char statussep         = ';';      /* separator between status bars */
     10 static const char *fonts[]          = { "monospace:size=10" };
     11 static const char dmenufont[]       = "monospace:size=10";
     12 static const char col_gray1[]       = "#222222";
     13 static const char col_gray2[]       = "#444444";
     14 static const char col_gray3[]       = "#bbbbbb";
     15 static const char col_gray4[]       = "#eeeeee";
     16 static const char col_cyan[]        = "#005577";
     17 static char normbgcolor[]           = "#282A36";
     18 static char normbordercolor[]       = "#444444";
     19 static char normfgcolor[]           = "#BFBFBF";
     20 static char selfgcolor[]            = "#F8F8F2";
     21 static char selbordercolor[]        = "#9D638A";
     22 static char selbgcolor[]            = "#9D638A";
     23 static const char col_black[]       = "#000000";
     24 static const char col_red[]         = "#ff0000";
     25 static const char col_yellow[]      = "#ffff00";
     26 static const char col_white[]       = "#ffffff";
     27 static const char col_green[]       = "#52d017";
     28 static const char *colors[][3]      = {
     29 	/*                              fg         bg         border   */
     30 	[SchemeNorm] =           { normfgcolor, normbgcolor, normbordercolor},
     31 	[SchemeSel]  =           { selfgcolor, selbgcolor,  selbordercolor},
     32 	[SchemeWarn] =	         { col_black, col_yellow, col_red },
     33 	[SchemeUrgent]=	         { col_white, col_red,    col_red },
     34 	[SchemeSuccess]=	 { col_white, col_green,    col_green },
     35 };
     36 
     37 /* tagging */
     38 static const char *tags[] = { "I", "II", "III", "IV", "V" };
     39 
     40 static const Rule rules[] = {
     41 	/* xprop(1):
     42 	 *	WM_CLASS(STRING) = instance, class
     43 	 *	WM_NAME(STRING) = title
     44 	 */
     45 	/* class         instance    title       tags mask     isfloating   monitor */
     46 	{ "Gimp",        NULL,       NULL,       0,            1,           -1 },
     47 };
     48 
     49 /* layout(s) */
     50 static const float mfact     = 0.55; /* factor of master area size [0.05..0.95] */
     51 static const int nmaster     = 1;    /* number of clients in master area */
     52 static const int resizehints = 1;    /* 1 means respect size hints in tiled resizals */
     53 
     54 #include "fibonacci.c"
     55 static const Layout layouts[] = {
     56 	/* symbol     arrange function */
     57 	{ "[]=",      tile },    /* first entry is default */
     58 	{ "><>",      NULL },    /* no layout function means floating behavior */
     59 	{ "[M]",      monocle },
     60 	{ "[@]",      spiral },
     61 	{ "[\\]",     dwindle },
     62 };
     63 
     64 /* key definitions */
     65 #define MODKEY Mod1Mask
     66 #define WINKEY Mod4Mask
     67 #define TAGKEYS(KEY,TAG) \
     68 	{ MODKEY,                       KEY,      view,           {.ui = 1 << TAG} }, \
     69 	{ MODKEY|ControlMask,           KEY,      toggleview,     {.ui = 1 << TAG} }, \
     70 	{ MODKEY|ShiftMask,             KEY,      tag,            {.ui = 1 << TAG} }, \
     71 	{ MODKEY|ControlMask|ShiftMask, KEY,      toggletag,      {.ui = 1 << TAG} },
     72 
     73 /* helper for spawning shell commands in the pre dwm-5.0 fashion */
     74 #define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
     75 
     76 #include <X11/XF86keysym.h>
     77 /* commands */
     78 static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
     79 static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbordercolor, "-sf", selfgcolor, NULL };
     80 static const char *termcmd[]  = { "st", NULL };
     81 
     82 static Key keys[] = {
     83 	/* modifier                     key        function        argument */
     84 	{ MODKEY,                       XK_u,      		  spawn,           {.v = dmenucmd } },
     85 	{ MODKEY,                       XK_b,      		  togglebar,       {0} },
     86 	{ MODKEY,                       XK_j,      		  focusstack,      {.i = +1 } },
     87 	{ MODKEY,                       XK_k,      		  focusstack,      {.i = -1 } },
     88 	{ MODKEY,                       XK_h,      		  setmfact,        {.f = -0.05} },
     89 	{ MODKEY,                       XK_l,      		  setmfact,        {.f = +0.05} },
     90 	{ MODKEY|ShiftMask,             XK_Return, 		  zoom,            {0} },
     91 	{ MODKEY,                       XK_Tab,    		  view,            {0} },
     92 	{ MODKEY|ShiftMask,             XK_q,      		  killclient,      {0} },
     93 	{ WINKEY,                       XK_t,      		  setlayout,       {.v = &layouts[0]} },
     94 	{ WINKEY,                       XK_f,      		  setlayout,       {.v = &layouts[1]} },
     95 	{ WINKEY,                       XK_m,      		  setlayout,       {.v = &layouts[2]} },
     96 	{ WINKEY,			XK_s,      		  setlayout,       {.v = &layouts[3]} },
     97 	{ WINKEY,			XK_d,      		  setlayout,       {.v = &layouts[4]} },
     98 	{ WINKEY|ShiftMask,		XK_f,			  fullscreen,      {0} },
     99 	{ MODKEY,                       XK_space,  		  setlayout,       {0} },
    100 	{ MODKEY|ShiftMask,             XK_space,  		  togglefloating,  {0} },
    101 	{ MODKEY,                       XK_0,      		  view,            {.ui = ~0 } },
    102 	{ MODKEY|ShiftMask,             XK_0,      		  tag,             {.ui = ~0 } },
    103 	{ MODKEY|ControlMask,           XK_u,      		  focusmon,        {.i = -1 } },
    104 	{ MODKEY|ControlMask,           XK_d,      		  focusmon,        {.i = +1 } },
    105 	{ MODKEY|ShiftMask,             XK_comma,  		  tagmon,          {.i = -1 } },
    106 	{ MODKEY|ShiftMask,             XK_period,                tagmon,          {.i = +1 } },
    107 	{ WINKEY,			XK_j,                     setgaps,         {.i = +1 } },
    108 	{ WINKEY,			XK_k,                     setgaps,         {.i = -1 } },
    109 	{ WINKEY,              		XK_h,                     setgaps,         {.i = 0 } },
    110 	{ WINKEY,                       XK_i,       		  incnmaster,      {.i = +1 } },
    111 	{ WINKEY,                       XK_l,                     incnmaster,      {.i = -1 } },
    112 	{ MODKEY|ControlMask|ShiftMask, XK_q,                     quit,            {1} }, 
    113 	{ WINKEY,			XK_5,			  xrdb,            {.v = NULL } },
    114 	TAGKEYS(                        XK_1,                      0)
    115 	TAGKEYS(                        XK_2,                      1)
    116 	TAGKEYS(                        XK_3,                      2)
    117 	TAGKEYS(                        XK_4,                      3)
    118 	TAGKEYS(                        XK_5,                      4)
    119 	TAGKEYS(                        XK_6,                      5)
    120 	TAGKEYS(                        XK_7,                      6)
    121 	TAGKEYS(                        XK_8,                      7)
    122 	TAGKEYS(                        XK_9,                      8)
    123 };
    124 
    125 /* button definitions */
    126 /* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
    127 static Button buttons[] = {
    128 	/* click                event mask      button          function        argument */
    129 	{ ClkLtSymbol,          0,              Button1,        setlayout,      {0} },
    130 	{ ClkLtSymbol,          0,              Button3,        setlayout,      {.v = &layouts[2]} },
    131 	{ ClkWinTitle,          0,              Button2,        zoom,           {0} },
    132 	{ ClkStatusText,        0,              Button2,        spawn,          {.v = termcmd } },
    133 	{ ClkClientWin,         MODKEY,         Button1,        movemouse,      {0} },
    134 	{ ClkClientWin,         MODKEY,         Button2,        togglefloating, {0} },
    135 	{ ClkClientWin,         MODKEY,         Button3,        resizemouse,    {0} },
    136 	{ ClkTagBar,            0,              Button1,        view,           {0} },
    137 	{ ClkTagBar,            0,              Button3,        toggleview,     {0} },
    138 	{ ClkTagBar,            MODKEY,         Button1,        tag,            {0} },
    139 	{ ClkTagBar,            MODKEY,         Button3,        toggletag,      {0} },
    140 };