dwm

[archived] [fork] dynamic window manager
git clone https://hhvn.uk/dwm
git clone git://hhvn.uk/dwm
Log | Files | Refs | README | LICENSE

config.h (4633B)


      1 /* See LICENSE file for copyright and license details. */
      2 
      3 /* appearance */
      4 static const unsigned int borderpx  = 2;        /* border pixel of windows */
      5 static const unsigned int gappx     = 8;
      6 static const unsigned int seppx     = 1;
      7 static const unsigned int snap      = 1;        /* snap pixel */
      8 static const int showbar            = 1;        /* 0 means no bar */
      9 static const int topbar             = 1;        /* 0 means bottom bar */
     10 static const char *fonts[]          = { "monospace:size=8" };
     11 static const char *const bright     = "#dddddd";
     12 static const char *const grey       = "#777b8e";
     13 static const char *const dark       = "#050a10";
     14 static const char *const red        = "#90222b";
     15 static const char *const blue       = "#1b364b";
     16 static const char *const azure      = "#aaaaff";
     17 static const char *const green      = "#0a2126";
     18 static const char *colors[][3]      = {
     19 	/*                  fg         bg          border   */
     20 	[SchemeNorm]   = { bright, dark,  dark },
     21 	[SchemeSel]    = { bright, blue,  blue },
     22 	[SchemeStat]   = { azure,  green, dark },
     23 	[SchemeInact]  = { grey,   dark,  dark },
     24 	[SchemeUrgent] = { dark,   red,   dark },
     25 };
     26 
     27 /* tagging */
     28 static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
     29 
     30 static const Rule rules[] = {
     31 	{ "Gimp",   NULL,   NULL,   1 << 7,   0,   0 },
     32 	{ "mpv",    NULL,   NULL,   1 << 1,   0,   0 },
     33 	{ "mpvrcp", NULL,   NULL,   0,        1,   -1 },
     34 	{ "cmus",   NULL,   NULL,   1 << 2,   1,   -1 },
     35 };
     36 
     37 /* layout(s) */
     38 static const float mfact     = 0.55; /* factor of master area size [0.05..0.95] */
     39 static const int nmaster     = 1;    /* number of clients in master area */
     40 static const int resizehints = 0;    /* 1 means respect size hints in tiled resizals */
     41 
     42 static Layout layouts[] = {
     43 	{ tileicon,    tile },
     44 	{ monocleicon, monocle },
     45 };
     46 
     47 /* key definitions */
     48 #define MODKEY Mod4Mask
     49 #define AltMask Mod1Mask
     50 #define TAGKEYS(KEY,TAG) \
     51 	{ MODKEY,                       KEY,      view,           {.ui = 1 << TAG} }, \
     52 	{ MODKEY|ControlMask,           KEY,      toggleview,     {.ui = 1 << TAG} }, \
     53 	{ MODKEY|ShiftMask,             KEY,      tag,            {.ui = 1 << TAG} }, \
     54 	{ MODKEY|ControlMask|ShiftMask,	KEY,      toggletag,      {.ui = 1 << TAG} },
     55 
     56 static Key keys[] = {
     57 	/* modifier                     key        function        argument */
     58 	{ MODKEY|ShiftMask,             XK_Return, zoom,           {0}                },
     59 	{ MODKEY|ShiftMask,             XK_space,  togglefloating, {0}                },
     60 	{ MODKEY,                       XK_Tab,    view,           {0}                },
     61 	{ MODKEY,                       XK_f,      togglefullscr,  {0}                },
     62 	{ MODKEY,                       XK_h,      setmfact,       {.f = -0.05}       },
     63 	{ MODKEY,                       XK_i,      incnmaster,     {.i = +1 }         },
     64 	{ MODKEY,                       XK_j,      focusstack,     {.i = +1 }         },
     65 	{ MODKEY,                       XK_k,      focusstack,     {.i = -1 }         },
     66 	{ MODKEY,                       XK_l,      setmfact,       {.f = +0.05 }      },
     67 	{ MODKEY,                       XK_p,      incnmaster,     {.i = -1 }         },
     68 	{ MODKEY,                       XK_q,      killclient,     {0}                },
     69 	{ MODKEY|ShiftMask,             XK_q,      quit,           {.i = 1}           }, /* err value of 1 = quit    */
     70 	{ MODKEY|ControlMask,           XK_q,      quit,           {.i = 0}           }, /* err value of 0 = restart */
     71 	{ MODKEY,                       XK_0,      view,           {.ui = ~0 }        },
     72 	{ MODKEY|ShiftMask,             XK_0,      tag,            {.ui = ~0 }        },
     73 	{ MODKEY,                       XK_comma,  focusmon,       {.i = -1 }         },
     74 	{ MODKEY,                       XK_period, focusmon,       {.i = +1 }         },
     75 	{ MODKEY|ShiftMask,             XK_comma,  tagmon,         {.i = -1 }         },
     76 	{ MODKEY|ShiftMask,             XK_period, tagmon,         {.i = +1 }         },
     77 	{ MODKEY,                       XK_slash,  focuslt,        {.i = +1 }         },
     78 	/* Tags */
     79 	TAGKEYS(                        XK_1,                      0)
     80 	TAGKEYS(                        XK_2,                      1)
     81 	TAGKEYS(                        XK_3,                      2)
     82 	TAGKEYS(                        XK_4,                      3)
     83 	TAGKEYS(                        XK_5,                      4)
     84 	TAGKEYS(                        XK_6,                      5)
     85 	TAGKEYS(                        XK_7,                      6)
     86 	TAGKEYS(                        XK_8,                      7)
     87 	TAGKEYS(                        XK_9,                      8)
     88 };