recipes

packages recipes for the <noname> package manager
Log | Files | Refs

config.h (8166B)


      1 /* See LICENSE file for copyright and license details. */
      2 
      3 /* appearance */
      4 static const unsigned int borderpx  = 1;        /* border pixel of windows */
      5 static const unsigned int snap      = 32;       /* snap pixel */
      6 static const int showbar            = 1;        /* 0 means no bar */
      7 static const int topbar             = 1;        /* 0 means bottom bar */
      8 static const char *fonts[]          = { "terminus:pixelsize=16" };
      9 static const char dmenufont[]       = "terminus:pixelsize=16";
     10 static const char termfont[]        = "terminus:pixelsize=16";
     11 static const char col_light[]       = "#dddddd";
     12 static const char col_shade[]       = "#333333";
     13 static const char col_black[]       = "#000000";
     14 static const char col_tint[]        = "#00ff99";
     15 static const char *colors[][3]      = {
     16 	/*               fg         bg         border   */
     17 	[SchemeNorm] = { col_light, col_black, col_shade },
     18 	[SchemeSel]  = { col_shade, col_light, col_tint  },
     19 };
     20 
     21 /* tagging */
     22 static const char *tags[] = { "1:term", "2:web", "3:media", "4:chat" };
     23 
     24 static const Rule rules[] = {
     25 	/* xprop(1):
     26 	 *	WM_CLASS(STRING) = instance, class
     27 	 *	WM_NAME(STRING) = title
     28 	 */
     29 	/* class      instance    title       tags mask     isfloating   monitor */
     30 	{ "acme",      NULL,          NULL, 1 << 0,    0,         -1 },
     31 	{ "Chrome",    NULL,          NULL, 1 << 1,    0,         -1 },
     32 	{ "Iceweasel", NULL,          NULL, 1 << 1,    0,         -1 },
     33 	{ "Firefox",   NULL,          NULL, 1 << 1,    0,         -1 },
     34 	{ "Surf",      NULL,          NULL, 1 << 1,    0,         -1 },
     35 	{ "Midori",    NULL,          NULL, 1 << 1,    0,         -1 },
     36 	{ "Zathura",   NULL,          NULL, 1 << 2,    0,         -1 },
     37 	{ "MuPDF",     NULL,          NULL, 1 << 2,    0,         -1 },
     38 	{ "ffplay",    NULL,          NULL, 1 << 2,    0,         -1 },
     39 	{ "avplay",    NULL,          NULL, 1 << 2,    0,         -1 },
     40 	{ "SDL_App",   NULL,          NULL, 1 << 2,    0,         -1 },
     41 	{ "MPlayer",   NULL,          NULL, 1 << 2,    0,         -1 },
     42 	{ NULL,        "libreoffice", NULL, 1 << 2,    0,         -1 },
     43 	{ "Blender",   NULL,          NULL, 1 << 2,    0,         -1 },
     44 	{ "Gimp",      NULL,          NULL, 1 << 2,    0,         -1 },
     45 	{ "sent",      NULL,          NULL, 1 << 2,    0,         -1 },
     46 };
     47 
     48 /* layout(s) */
     49 static const float mfact     = 0.50; /* factor of master area size [0.05..0.95] */
     50 static const int nmaster     = 1;    /* number of clients in master area */
     51 static const int resizehints = 0;    /* 1 means respect size hints in tiled resizals */
     52 
     53 static const Layout layouts[] = {
     54 	/* symbol     arrange function */
     55 	{ "[t]",      tile },    /* first entry is default */
     56 	{ "[f]",      NULL },    /* no layout function means floating behavior */
     57 	{ "[m]",      monocle },
     58 };
     59 
     60 /* key definitions */
     61 #define MODKEY Mod4Mask
     62 #define TAGKEYS(KEY,TAG) \
     63 	{ MODKEY,                       KEY,      view,           {.ui = 1 << TAG} }, \
     64 	{ MODKEY|ControlMask,           KEY,      toggleview,     {.ui = 1 << TAG} }, \
     65 	{ MODKEY|ShiftMask,             KEY,      tag,            {.ui = 1 << TAG} }, \
     66 	{ MODKEY|ControlMask|ShiftMask, KEY,      toggletag,      {.ui = 1 << TAG} },
     67 
     68 /* helper for spawning shell commands in the pre dwm-5.0 fashion */
     69 #define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
     70 
     71 /* commands */
     72 static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
     73 static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_shade, "-nf", col_light, "-sb", col_light, "-sf", col_shade, NULL };
     74 static const char *termcmd[]  = { "st", "-f", termfont, NULL };
     75 static const char *shortcut_u[]  = { "st", "-f", termfont, "-e", "shortcut", "u", NULL };
     76 static const char *shortcut_s[]  = { "st", "-f", termfont, "-e", "shortcut", "s", NULL };
     77 static const char *shortcut_m[]  = { "st", "-f", termfont, "-e", "shortcut", "m", NULL };
     78 static const char *shortcut_o[]  = { "st", "-f", termfont, "-e", "shortcut", "o", NULL };
     79 static const char *shortcut_p[]  = { "st", "-f", termfont, "-e", "shortcut", "p", NULL };
     80 static const char *shortcut_x[]  = { "st", "-f", termfont, "-e", "shortcut", "x", NULL };
     81 
     82 static Key keys[] = {
     83 	/* modifier                     key        function        argument */
     84 	{ MODKEY|ShiftMask,             XK_u,      spawn,          {.v = shortcut_u } },
     85 	{ MODKEY|ShiftMask,             XK_s,      spawn,          {.v = shortcut_s } },
     86 	{ MODKEY|ShiftMask,             XK_m,      spawn,          {.v = shortcut_m } },
     87 	{ MODKEY|ShiftMask,             XK_o,      spawn,          {.v = shortcut_o } },
     88 	{ MODKEY|ShiftMask,             XK_p,      spawn,          {.v = shortcut_p } },
     89 	{ MODKEY|ShiftMask,             XK_x,      spawn,          {.v = shortcut_x } },
     90 	{ MODKEY,                       XK_space,  spawn,          {.v = dmenucmd } },
     91 	{ MODKEY|ShiftMask,             XK_Return, spawn,          {.v = termcmd } },
     92 	{ MODKEY,                       XK_b,      togglebar,      {0} },
     93 	{ MODKEY,                       XK_j,      focusstack,     {.i = +1 } },
     94 	{ MODKEY,                       XK_k,      focusstack,     {.i = -1 } },
     95 	{ MODKEY,                       XK_i,      incnmaster,     {.i = +1 } },
     96 	{ MODKEY,                       XK_d,      incnmaster,     {.i = -1 } },
     97 	{ MODKEY,                       XK_h,      setmfact,       {.f = -0.02} },
     98 	{ MODKEY,                       XK_l,      setmfact,       {.f = +0.02} },
     99 	{ MODKEY,                       XK_Return, zoom,           {0} },
    100 	{ MODKEY,                       XK_Tab,    view,           {0} },
    101 	{ MODKEY,                       XK_BackSpace, killclient,  {0} },
    102 	{ MODKEY,                       XK_t,      setlayout,      {.v = &layouts[0]} },
    103 	{ MODKEY,                       XK_f,      setlayout,      {.v = &layouts[1]} },
    104 	{ MODKEY,                       XK_m,      setlayout,      {.v = &layouts[2]} },
    105 	{ MODKEY|ShiftMask,             XK_space,  togglefloating, {0} },
    106 	{ MODKEY,                       XK_0,      view,           {.ui = ~0 } },
    107 	{ MODKEY|ShiftMask,             XK_0,      tag,            {.ui = ~0 } },
    108 	{ MODKEY,                       XK_comma,  focusmon,       {.i = -1 } },
    109 	{ MODKEY,                       XK_period, focusmon,       {.i = +1 } },
    110 	{ MODKEY|ShiftMask,             XK_comma,  tagmon,         {.i = -1 } },
    111 	{ MODKEY|ShiftMask,             XK_period, tagmon,         {.i = +1 } },
    112 	TAGKEYS(                        XK_1,                      0)
    113 	TAGKEYS(                        XK_2,                      1)
    114 	TAGKEYS(                        XK_3,                      2)
    115 	TAGKEYS(                        XK_4,                      3)
    116 	TAGKEYS(                        XK_5,                      4)
    117 	TAGKEYS(                        XK_6,                      5)
    118 	TAGKEYS(                        XK_7,                      6)
    119 	TAGKEYS(                        XK_8,                      7)
    120 	TAGKEYS(                        XK_9,                      8)
    121 	{ MODKEY,                       XK_Escape, quit,           {0} },
    122 };
    123 
    124 /* button definitions */
    125 /* click can be ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
    126 static Button buttons[] = {
    127 	/* click                event mask      button          function        argument */
    128 	{ ClkLtSymbol,          0,              Button1,        setlayout,      {0} },
    129 	{ ClkLtSymbol,          0,              Button3,        setlayout,      {.v = &layouts[2]} },
    130 	{ ClkWinTitle,          0,              Button2,        zoom,           {0} },
    131 	{ ClkStatusText,        0,              Button2,        spawn,          {.v = termcmd } },
    132 	{ ClkClientWin,         MODKEY,         Button1,        movemouse,      {0} },
    133 	{ ClkClientWin,         MODKEY,         Button2,        togglefloating, {0} },
    134 	{ ClkClientWin,         MODKEY,         Button3,        resizemouse,    {0} },
    135 	{ ClkTagBar,            0,              Button1,        view,           {0} },
    136 	{ ClkTagBar,            0,              Button3,        toggleview,     {0} },
    137 	{ ClkTagBar,            MODKEY,         Button1,        tag,            {0} },
    138 	{ ClkTagBar,            MODKEY,         Button3,        toggletag,      {0} },
    139 };