dwm

Personal fork of DWM from suckless.org; dwm is a dynamic window manager for X.
git clone git://git.swab.dev/dwm.git
Log | Files | Refs | README | LICENSE

config.h (7695B)


      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 snap      = 32;  /* snap pixel */
      6 static const int swallowfloating    = 0;   /* 1 means swallow floating windows by default*/
      7 static const int showbar            = 1;   /* 0 means no bar */
      8 static const int topbar             = 1;   /* 0 means bottom bar */
      9 static const char *fonts[]          = { "Go Mono:size=13", "FontAwesome:size=14" };
     10 static const char dmenufont[]       = "Go Mono:size=14";
     11 /* All colors from Nord color scheme */
     12 /* Polar Night Colors */
     13 static const char nord0[]           = "#2E3440";
     14 static const char nord1[]           = "#3B4252";
     15 static const char nord2[]           = "#434C54";
     16 static const char nord3[]           = "#4C566A";
     17 /* Snow Storm Colors */
     18 static const char nord4[]           = "#D8DEE9";
     19 static const char nord5[]           = "#E5E9F0";
     20 static const char nord6[]					  = "#ECEFF4";
     21 /* Frost Colors */
     22 static const char nord7[]           = "#8FBCBB"; /* Green Blue */
     23 static const char nord8[]           = "#88C0D0"; /* light Blue */
     24 static const char nord9[]           = "#81A1C1"; /* Grey Blue */
     25 static const char nord10[]          = "#5E81AC"; /* Dark Blue */
     26 /* */
     27 static const char nord11[]          = "#BF616A"; /* Red */
     28 static const char nord12[]          = "#D08770"; /* Orange */
     29 static const char nord13[]          = "#EBCB8B"; /* Yellow */
     30 static const char nord14[]          = "#A3BE8C"; /* Green */
     31 static const char nord15[]          = "#B48EAD"; /* Purple */
     32 static const char *colors[][3]      = {
     33 	/*               fg      bg    border   */
     34 	[SchemeNorm] = { nord3, nord1, nord2 },
     35 	[SchemeSel]  = { nord9, nord1, nord7 },
     36 };
     37 
     38 /* tagging */
     39 static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
     40 
     41 static const Rule rules[] = {
     42 	/* xprop(1):
     43 	 *	WM_CLASS(STRING) = instance, class
     44 	 *	WM_NAME(STRING) = title
     45 	 */
     46 	/* class      instance    title       tags mask  isfloating  isterminal  noswallow  monitor */
     47 	{ "st",      NULL,       NULL,         0,        0,          1,           0,           -1 },
     48 	{ NULL,      NULL,     "Event Tester", 0,        0,          0,           1,           -1 }, /* xev */
     49 };
     50 
     51 /* layout(s) */
     52 static const float mfact     = 0.60; /* factor of master area size [0.05..0.95] */
     53 static const int nmaster     = 1;    /* number of clients in master area */
     54 static const int resizehints = 1;    /* 1 means respect size hints in tiled resizals */
     55 
     56 static const Layout layouts[] = {
     57 	/* symbol     arrange function */
     58 	{ "[]=",      tile },    /* first entry is default */
     59 	{ "><>",      NULL },    /* no layout function means floating behavior */
     60 	{ "[M]",      monocle },
     61 };
     62 
     63 /* key definitions */
     64 #define MODKEY Mod1Mask /* Super = Mod4Mask*/
     65 #define TAGKEYS(KEY,TAG) \
     66 	{ MODKEY,                       KEY,      view,           {.ui = 1 << TAG} }, \
     67 	{ MODKEY|ControlMask,           KEY,      toggleview,     {.ui = 1 << TAG} }, \
     68 	{ MODKEY|ShiftMask,             KEY,      tag,            {.ui = 1 << TAG} }, \
     69 	{ MODKEY|ControlMask|ShiftMask, KEY,      toggletag,      {.ui = 1 << TAG} },
     70 
     71 /* helper for spawning shell commands in the pre dwm-5.0 fashion */
     72 #define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
     73 
     74 /* commands */
     75 static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
     76 static const char *dmenucmd[] = {  "/home/jaron/git/dmenu/dmenu_run", "-m", dmenumon, 
     77 	"-fn", dmenufont, "-nb", nord1, "-nf", nord3, "-sb", nord10, "-sf", nord1, NULL };
     78 // user added
     79 static const char *termcmd[]  = { "/home/jaron/git/st/st", NULL };
     80 static const char *start[] = { "/home/jaron/dotfiles/suckless/dwm/start.sh", NULL };
     81 static const char *volup[] = { "amixer -D pulse sset Master 5%+ > /dev/null", NULL };
     82 static const char *voldn[] = { "/home/jaron/dotfiles/suckles/dwm/voldn.sh", NULL };
     83 
     84 static Key keys[] = {
     85 	/* modifier                     key        function        argument */
     86 	{ MODKEY,                       XK_p,      spawn,          {.v = dmenucmd } },
     87 	{ MODKEY,             					XK_Return, spawn,          {.v = termcmd } },
     88 	{ MODKEY,                       XK_s,      spawn,          {.v = start } }, /*User Added*/
     89 	{ MODKEY|ShiftMask,							XK_v,			 spawn, 				 {.v = volup } }, /*User Added*/
     90 	{ MODKEY,												XK_v,			 spawn, 				 {.v = voldn } }, /*User Added*/
     91 	{ MODKEY,                       XK_b,      togglebar,      {0} },
     92 	{ MODKEY,                       XK_j,      focusstack,     {.i = +1 } },
     93 	{ MODKEY,                       XK_k,      focusstack,     {.i = -1 } },
     94 	{ MODKEY,                       XK_i,      incnmaster,     {.i = +1 } },
     95 	{ MODKEY,                       XK_d,      incnmaster,     {.i = -1 } },
     96 	{ MODKEY,                       XK_h,      setmfact,       {.f = -0.05} },
     97 	{ MODKEY,                       XK_l,      setmfact,       {.f = +0.05} },
     98 	{ MODKEY|ShiftMask,             XK_Return, zoom,           {0} },
     99 	{ MODKEY,                       XK_Tab,    view,           {0} },
    100 	{ MODKEY|ShiftMask,             XK_c,      killclient,     {0} },
    101 	{ MODKEY,                       XK_t,      setlayout,      {.v = &layouts[0]} },
    102 	{ MODKEY,                       XK_f,      setlayout,      {.v = &layouts[1]} },
    103 	{ MODKEY,                       XK_m,      setlayout,      {.v = &layouts[2]} },
    104 	/*{ MODKEY,                       XK_space,  setlayout,      {0} },
    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,                      1)
    113 	TAGKEYS(                        XK_2,                      2)
    114 	TAGKEYS(                        XK_3,                      3)
    115 	TAGKEYS(                        XK_4,                      4)
    116 	TAGKEYS(                        XK_5,                      5)
    117 	TAGKEYS(                        XK_6,                      6)
    118 	TAGKEYS(                        XK_7,                      7)
    119 	TAGKEYS(                        XK_8,                      8)
    120 	{ MODKEY|ShiftMask,             XK_q,      quit,           {0} },
    121 };
    122 
    123 /* button definitions */
    124 /* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
    125 static Button buttons[] = {
    126 	/* click                event mask      button          function        argument */
    127 	{ ClkLtSymbol,          0,              Button1,        setlayout,      {0} },
    128 	{ ClkLtSymbol,          0,              Button3,        setlayout,      {.v = &layouts[2]} },
    129 	{ ClkWinTitle,          0,              Button2,        zoom,           {0} },
    130 	{ ClkStatusText,        0,              Button2,        spawn,          {.v = termcmd } },
    131 	{ ClkClientWin,         MODKEY,         Button1,        movemouse,      {0} },
    132 	{ ClkClientWin,         MODKEY,         Button2,        togglefloating, {0} },
    133 	{ ClkClientWin,         MODKEY,         Button3,        resizemouse,    {0} },
    134 	{ ClkTagBar,            0,              Button1,        view,           {0} },
    135 	{ ClkTagBar,            0,              Button3,        toggleview,     {0} },
    136 	{ ClkTagBar,            MODKEY,         Button1,        tag,            {0} },
    137 	{ ClkTagBar,            MODKEY,         Button3,        toggletag,      {0} },
    138 };
    139