sucklessConfigs

configurations of the suckless.org software that I use
Log | Files | Refs

config.def.h (9264B)


      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 gappx     = 4;        /* gaps between windows */
      6 static const unsigned int snap      = 32;       /* snap pixel */
      7 static const int swallowfloating    = 0;        /* 1 means swallow floating windows by default */
      8 static const unsigned int systraypinning = 0;   /* 0: sloppy systray follows selected monitor, >0: pin systray to monitor X */
      9 static const unsigned int systrayonleft = 0;    /* 0: systray in the right corner, >0: systray on left of status text */
     10 static const unsigned int systrayspacing = 2;   /* systray spacing */
     11 static const int systraypinningfailfirst = 1;   /* 1: if pinning fails, display systray on the first monitor, False: display systray on the last monitor*/
     12 static const int showsystray        = 1;        /* 0 means no systray */
     13 static const int showbar            = 1;        /* 0 means no bar */
     14 static const int topbar             = 1;        /* 0 means bottom bar */
     15 static const char *fonts[]          = { "Atkinson Hyperlegible:size=10" };
     16 static const char dmenufont[]       = "Atkinson Hyperlegible:size=10";
     17 static const char col_gray1[]       = "#000000"; /*#222222*/
     18 static const char col_gray2[]       = "#ffffff"; /*#444444*/
     19 static const char col_gray3[]       = "#bbbbbb"; /*#bbbbbb*/
     20 static const char col_gray4[]       = "#eeeeee"; /*#eeeeee*/
     21 static const char col_cyan[]        = "#98a4ff"; /*#005577*/
     22 static const char col_cyan2[]        = "#0087ff"; 
     23 static const char col_red[]        = "#cc0000"; 
     24 static const char *colors[][3]      = {
     25 	/*               fg         bg         border   */
     26 	[SchemeNorm] = { col_gray3, col_gray1, col_gray1 },
     27 	[SchemeSel]  = { col_gray4, col_gray1,  col_red},
     28 	[SchemeStatus]  = { col_gray3, col_gray1,  "#000000"  }, 
     29         [SchemeTagsSel]  = { col_gray4, col_red,  "#000000"  }, 
     30         [SchemeTagsNorm]  = { col_gray3, col_gray1,  "#000000"  },
     31         [SchemeInfoSel]  = { col_gray4, col_gray1,  "#000000"  }, 
     32 	[SchemeInfoNorm]  = { col_gray3, col_gray1,  "#000000"  },
     33       
     34 };
     35 
     36 /* tagging */
     37 static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
     38 
     39 static const Rule rules[] = {
     40 	/* xprop(1):
     41 	 *	WM_CLASS(STRING) = instance, class
     42 	 *	WM_NAME(STRING) = title
     43 	 */
     44 	/* class       instance  title           tags mask  isfloating  isterminal  noswallow  monitor */
     45 	{ "Gimp",      NULL,     NULL,           0,         1,          0,           0,        -1 },
     46 	{ "Firefox",   NULL,     NULL,           1 << 8,    0,          0,          -1,        -1 },
     47 	{ "st",        NULL,     NULL,           0,         0,          1,           0,        -1 },
     48 	{ "Alacritty", NULL,     NULL,           0,         0,          1,           0,        -1 },
     49 	{ NULL,        NULL,     "Event Tester", 0,         0,          0,           1,        -1 }, /* xev */
     50 };
     51 
     52 /* layout(s) */
     53 static const float mfact     = 0.55; /* factor of master area size [0.05..0.95] */
     54 static const int nmaster     = 1;    /* number of clients in master area */
     55 static const int resizehints = 1;    /* 1 means respect size hints in tiled resizals */
     56 static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */
     57 
     58 static const Layout layouts[] = {
     59 	/* symbol     arrange function */
     60 	{ "[]=",      tile },    /* first entry is default */
     61 	{ "><>",      NULL },    /* no layout function means floating behavior */
     62 	{ "[M]",      monocle },
     63 };
     64 
     65 /* key definitions */
     66 #define MODKEY 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 /* commands */
     77 static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
     78 static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_red, "-sf", col_gray4, NULL };
     79 static const char *termcmd[]  = { "st", NULL };
     80 static const char *tbdsurf[]  = { "tabbed", "surf", "-e", NULL };
     81 /*Volume controll keys*/
     82 #include <X11/XF86keysym.h>
     83 
     84 /*Opening apps*/
     85 static const char *screenshot[] = { "flameshot", "gui", NULL };
     86 
     87 
     88 static const Key keys[] = {
     89 	/* modifier                     key        function        argument */
     90 	{ MODKEY|ShiftMask,             XK_d,      spawn,          {.v = dmenucmd } },
     91 	{ MODKEY|ShiftMask,             XK_Return, spawn,          {.v = termcmd } },
     92 	{ MODKEY|ShiftMask,             XK_b,      spawn,          {.v = tbdsurf} },
     93 	{ MODKEY,                       XK_b,      togglebar,      {0} },
     94 	{ MODKEY,                       XK_j,      focusstack,     {.i = +1 } },
     95 	{ MODKEY,                       XK_k,      focusstack,     {.i = -1 } },
     96 	{ MODKEY,                       XK_i,      incnmaster,     {.i = +1 } },
     97 	{ MODKEY,                       XK_d,      incnmaster,     {.i = -1 } },
     98 	{ MODKEY,                       XK_h,      setmfact,       {.f = -0.05} },
     99 	{ MODKEY,                       XK_l,      setmfact,       {.f = +0.05} },
    100 	{ MODKEY,                       XK_Return, zoom,           {0} },
    101 	{ MODKEY,                       XK_Tab,    view,           {0} },
    102 	{ MODKEY|ShiftMask,             XK_c,      killclient,     {0} },
    103 	{ MODKEY,                       XK_t,      setlayout,      {.v = &layouts[0]} },
    104 	{ MODKEY,                       XK_f,      setlayout,      {.v = &layouts[1]} },
    105 	{ MODKEY,                       XK_m,      setlayout,      {.v = &layouts[2]} },
    106         /*{ MODKEY,                       XK_space,  setlayout,      {0} },*/
    107         { MODKEY|ShiftMask,             XK_space,  togglefloating, {0} },
    108 	{ MODKEY,                       XK_0,      view,           {.ui = ~0 } },
    109 	{ MODKEY|ShiftMask,             XK_0,      tag,            {.ui = ~0 } },
    110 	{ MODKEY,                       XK_comma,  focusmon,       {.i = -1 } },
    111 	{ MODKEY,                       XK_period, focusmon,       {.i = +1 } },
    112 	{ MODKEY|ShiftMask,             XK_comma,  tagmon,         {.i = -1 } },
    113 	{ MODKEY|ShiftMask,             XK_period, tagmon,         {.i = +1 } },
    114 	/*{ MODKEY,                     XK_minus,  setgaps,        {.i = -1 } },
    115 	{ MODKEY,                       XK_equal,  setgaps,        {.i = +1 } },
    116 	{ MODKEY|ShiftMask,             XK_equal,  setgaps,        {.i = 0  } },*/
    117         { 0,              XF86XK_AudioRaiseVolume, spawn,          SHCMD("pamixer -i 5") },
    118 	{ 0,              XF86XK_AudioLowerVolume, spawn,          SHCMD("pamixer -d 5") },
    119         { 0,                     XF86XK_AudioMute, spawn,          SHCMD("pamixer --toggle-mute") },
    120         { 0,                     XF86XK_MonBrightnessUp, spawn,    SHCMD("light -A 5 ") },
    121         { 0,                     XF86XK_MonBrightnessDown, spawn,    SHCMD("light -U 5 ") },
    122         { MODKEY|ShiftMask,             XK_s,      spawn,          {.v = screenshot} },
    123         { MODKEY|ShiftMask,             XK_l,      spawn,          SHCMD("slock & systemctl suspend") },
    124         { MODKEY|ShiftMask,             XK_f,      spawn,          SHCMD("st sfeed_update ; st sfeed_curses /home/tdr/.sfeed/feeds/*") },
    125 	TAGKEYS(                        XK_1,                      0)
    126 	TAGKEYS(                        XK_2,                      1)
    127 	TAGKEYS(                        XK_3,                      2)
    128 	TAGKEYS(                        XK_4,                      3)
    129 	TAGKEYS(                        XK_5,                      4)
    130 	TAGKEYS(                        XK_6,                      5)
    131 	TAGKEYS(                        XK_7,                      6)
    132 	TAGKEYS(                        XK_8,                      7)
    133 	TAGKEYS(                        XK_9,                      8)
    134 	{ MODKEY|ShiftMask,             XK_q,       quit,          {0} },
    135 };
    136 
    137 /* button definitions */
    138 /* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
    139 static const Button buttons[] = {
    140 	/* click                event mask      button          function        argument */
    141 	{ ClkTagBar,            MODKEY,         Button1,        tag,            {0} },
    142 	{ ClkTagBar,            MODKEY,         Button3,        toggletag,      {0} },
    143 	{ ClkWinTitle,          0,              Button2,        zoom,           {0} },
    144 	{ ClkStatusText,        0,              Button2,        spawn,          {.v = termcmd } },
    145 	{ ClkClientWin,         MODKEY,         Button1,        movemouse,      {0} },
    146 	{ ClkClientWin,         MODKEY,         Button2,        togglefloating, {0} },
    147 	{ ClkClientWin,         MODKEY,         Button3,        resizemouse,    {0} },
    148 	{ ClkTagBar,            0,              Button1,        view,           {0} },
    149 	{ ClkTagBar,            0,              Button3,        toggleview,     {0} },
    150 	{ ClkTagBar,            MODKEY,         Button1,        tag,            {0} },
    151 	{ ClkTagBar,            MODKEY,         Button3,        toggletag,      {0} },
    152 };