This repository has been archived on 2022-02-18. You can view files and clone it, but cannot push or open issues or pull requests.
lemondwm/lemondwm/config.def.h

202 lines
10 KiB
C
Raw Permalink Normal View History

2021-08-30 06:47:11 -05:00
/* See LICENSE file for copyright and license details. */
2021-10-31 17:48:34 -05:00
// appearance
2021-12-08 12:13:09 -06:00
static const unsigned int borderpx = 1; /* border pixel of windows */
2021-10-31 17:48:34 -05:00
static const unsigned int default_border = 0; /* to switch back to default border after dynamic border resizing via keybinds */
2021-12-08 12:13:09 -06:00
static const unsigned int snap = 16; /* snap pixel */
2021-10-31 17:48:34 -05:00
static const unsigned int gappih = 5; /* horiz inner gap between windows */
static const unsigned int gappiv = 5; /* vert inner gap between windows */
static const unsigned int gappoh = 15; /* horiz outer gap between windows and screen edge */
static const unsigned int gappov = 15; /* vert outer gap between windows and screen edge */
static int smartgaps = 0; /* 1 means no outer gap when there is only one window */
static const unsigned int systraypinning = 0; /* 0: sloppy systray follows selected monitor, >0: pin systray to monitor X */
static const unsigned int systrayspacing = 5; /* systray spacing */
static const int systraypinningfailfirst = 1; /* 1: if pinning fails,display systray on the 1st monitor,False: display systray on last monitor*/
static const int showsystray = 1; /* 0 means no systray */
static const int showbar = 1; /* 0 means no bar */
enum showtab_modes { showtab_never, showtab_auto, showtab_nmodes, showtab_always };
static const int showtab = showtab_auto;
static const int toptab = 1;
2022-02-18 15:05:24 -06:00
static const int topbar = 1; /* 0 means bottom bar */
2021-10-31 17:48:34 -05:00
static const int horizpadbar = 15;
2021-12-08 12:13:09 -06:00
static const int vertpadbar = 4;
2021-10-31 17:48:34 -05:00
static const int vertpadtab = 10;
static const int horizpadtabi = 15;
static const int horizpadtabo = 15;
static const int scalepreview = 4;
static int tag_preview = 1; /* 1 means enable, 0 is off */
static const int colorfultag = 1; /* 0 means use SchemeSel for selected non-vacant tag */
2022-02-18 15:05:24 -06:00
static const char *fonts[] = {"CozetteVector:size=9"};
static const char dmenufont[] = "Cozette:style:regular:size=9";
2021-08-30 06:47:11 -05:00
// theme
2021-10-31 17:48:34 -05:00
#include "themes/reallydark.h"
2021-08-30 06:47:11 -05:00
static const char *colors[][3] = {
2021-10-31 17:48:34 -05:00
/* fg, bg, border */
2021-08-30 06:47:11 -05:00
[SchemeNorm] = {gray3, black, gray2},
[SchemeSel] = {gray4, blue, blue},
[TabSel] = {blue, gray2, black},
[TabNorm] = {gray3, black, black},
[SchemeTag] = {gray3, black, black},
[SchemeTag1] = {blue, black, black},
[SchemeTag2] = {red, black, black},
[SchemeTag3] = {orange, black, black},
[SchemeTag4] = {green, black, black},
[SchemeTag5] = {pink, black, black},
[SchemeLayout] = {green, black, black},
[SchemeBtnPrev] = {green, black, black},
[SchemeBtnNext] = {yellow, black, black},
[SchemeBtnClose] = {red, black, black},
};
/* tagging */
2021-09-29 11:09:56 -05:00
static const char *tags[] = {"a", "b", "c", "d", "e", "f", "g", "h"};
static const int tagschemes[] = {SchemeTag1, SchemeTag2, SchemeTag3, SchemeTag4,
SchemeTag5, SchemeTag4, SchemeTag2, SchemeTag3
2021-08-30 06:47:11 -05:00
};
2021-10-31 17:48:34 -05:00
static const unsigned int ulinepad = 5; /* horizontal padding between the underline and tag */
2021-08-30 06:47:11 -05:00
static const unsigned int ulinestroke = 2; /* thickness / height of the underline */
static const unsigned int ulinevoffset = 0; /* how far above the bottom of the bar the line should appear */
static const int ulineall = 0; /* 1 to show underline on all tags, 0 for just the active ones */
2021-08-30 09:18:04 -05:00
static const Rule rules[] = {{ "X", NULL, NULL, 0, 0, -1 }};
2021-08-30 06:47:11 -05:00
/* layout(s) */
static const float mfact = 0.50; /* factor of master area size [0.05..0.95] */
static const int nmaster = 1; /* number of clients in master area */
static const int resizehints = 0; /* 1 means respect size hints in tiled resizals */
static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */
#define FORCE_VSPLIT 1 /* nrowgrid layout: force two clients to always split vertically */
#include "functions.h"
static const Layout layouts[] = {
2021-10-31 17:48:34 -05:00
/* symbol arrange function */
{ "[]=", tile }, /* first entry is default */
{ "[M]", monocle },
{ "[@]", spiral },
{ "[\\]", dwindle },
{ "H[]", deck },
{ "TTT", bstack },
{ "===", bstackhoriz },
{ "HHH", grid },
{ "###", nrowgrid },
{ "---", horizgrid },
{ ":::", gaplessgrid },
{ "|M|", centeredmaster },
{ ">M>", centeredfloatingmaster },
{ "><>", NULL }, /* no layout function means floating behavior */
2021-08-30 06:47:11 -05:00
};
/* key definitions */
#define MODKEY Mod4Mask
2021-10-31 17:48:34 -05:00
#define TAGKEYS(KEY,TAG) \
2021-08-30 06:47:11 -05:00
{ MODKEY, KEY, view, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
{ MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} },
/* commands */
2021-10-31 17:48:34 -05:00
static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
2021-08-30 06:47:11 -05:00
static const char *dmenucmd[] = {"dmenu_run", NULL};
2021-11-29 10:54:00 -06:00
static const char *termcmd[] = {"urxvtc", NULL}; // change this to your term
2021-09-29 11:34:35 -05:00
static const char *rofi[] = {"rofi", "-show", "drun", NULL};
2021-11-01 04:54:05 -05:00
static const char *togglepicom[] = {"/bin/bash", "-c", "pidcom=$(pidof picom);if [ -z \"$pidcom\" ];then picom --config ~/.config/picom.conf -b;else kill \"$pidcom\";fi", NULL};
2021-08-30 06:47:11 -05:00
2021-08-31 15:37:38 -05:00
// media commands
static const char *pctlplaycmd[] = { "playerctl", "play-pause", NULL };
static const char *pctlpausecmd[] = { "playerctl", "pause", NULL };
static const char *pctlpreviouscmd[] = { "playerctl", "previous", NULL };
static const char *pctlnextcmd[] = { "playerctl", "next", NULL };
static const char *raisevolumecmd[] = { "amixer", "-D", "pulse", "sset", "Master", "5%+", NULL };
static const char *lowervolumecmd[] = { "amixer", "-D", "pulse", "sset", "Master", "5%-", NULL };
static const char *mutecmd[] = { "amixer", "-D", "pulse", "sset", "Master", "toggle-mute", NULL };
2021-10-16 17:50:37 -05:00
// backlight commands
static const char *raisebacklight[] = { "xbacklight", "-inc", "5", NULL };
static const char *lowerbacklight[] = { "xbacklight", "-dec", "5", NULL };
2021-08-31 15:37:38 -05:00
#include <X11/XF86keysym.h>
2021-08-30 06:47:11 -05:00
static Key keys[] = {
2021-08-31 15:37:38 -05:00
// general stuff
{MODKEY, XK_d, spawn, {.v = rofi}},
2021-08-30 06:47:11 -05:00
{MODKEY, XK_Return, spawn, {.v = termcmd }},
2021-11-01 04:54:05 -05:00
{MODKEY, XK_b, spawn, {.v = togglepicom}},
2021-08-30 06:47:11 -05:00
{MODKEY, XK_j, focusstack, {.i = +1}},
{MODKEY, XK_k, focusstack, {.i = -1}},
{MODKEY, XK_i, incnmaster, {.i = +1}},
{MODKEY, XK_c, incnmaster, {.i = -1}},
2021-08-30 06:47:11 -05:00
{MODKEY, XK_h, setmfact, {.f = -0.05}},
{MODKEY, XK_l, setmfact, {.f = +0.05}},
{MODKEY | ShiftMask, XK_h, setcfact, {.f = +0.25}},
{MODKEY | ShiftMask, XK_l, setcfact, {.f = -0.25}},
{MODKEY | ShiftMask, XK_o, setcfact, {.f = 0.00}},
{MODKEY | ShiftMask, XK_j, movestack, {.i = +1}},
{MODKEY | ShiftMask, XK_k, movestack, {.i = -1}},
{MODKEY | ShiftMask, XK_Return, zoom, {0}},
{MODKEY, XK_Tab, view, {0}},
{MODKEY | ControlMask, XK_t, togglegaps, {0}},
{MODKEY, XK_q, killclient, {0}},
{MODKEY, XK_t, setlayout, {.v = &layouts[0]}},
{MODKEY | ControlMask, XK_comma, cyclelayout, {.i = -1}},
{MODKEY | ControlMask, XK_period, cyclelayout, {.i = +1}},
{MODKEY | ShiftMask, XK_space, togglefloating, {0}},
{MODKEY, XK_f, togglefullscr, {0}},
{MODKEY, XK_0, view, {.ui = ~0}},
{MODKEY | ShiftMask, XK_comma, tagmon, {.i = -1}},
{MODKEY | ShiftMask, XK_period, tagmon, {.i = +1}},
2021-08-31 15:37:38 -05:00
{MODKEY | ControlMask, XK_q, quit, {0}},
{MODKEY, XK_e, hidewin, {0}},
{MODKEY | ShiftMask, XK_e, restorewin, {0}},
2021-08-30 06:47:11 -05:00
2021-08-31 15:37:38 -05:00
// media keys
{ 0, XF86XK_AudioPlay, spawn, {.v = pctlplaycmd } },
{ 0, XF86XK_AudioPause, spawn, {.v = pctlpausecmd } },
{ 0, XF86XK_AudioNext, spawn, {.v = pctlnextcmd } },
{ 0, XF86XK_AudioPrev, spawn, {.v = pctlpreviouscmd } },
{ 0, XF86XK_AudioRaiseVolume, spawn, {.v = raisevolumecmd } },
{ 0, XF86XK_AudioLowerVolume, spawn, {.v = lowervolumecmd } },
{ 0, XF86XK_AudioMute, spawn, {.v = mutecmd } },
2021-10-16 17:50:37 -05:00
// backlight keys
{ 0, XF86XK_MonBrightnessUp, spawn, {.v = raisebacklight } },
{ 0, XF86XK_MonBrightnessDown, spawn, {.v = lowerbacklight } },
2021-08-31 15:37:38 -05:00
// tags
2021-08-30 06:47:11 -05:00
TAGKEYS(XK_1, 0)
TAGKEYS(XK_2, 1)
TAGKEYS(XK_3, 2)
TAGKEYS(XK_4, 3)
TAGKEYS(XK_5, 4)
TAGKEYS(XK_6, 5)
TAGKEYS(XK_7, 6)
TAGKEYS(XK_8, 7)
};
/* button definitions */
/* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
static Button buttons[] = {
/* click event mask button function argument */
{ClkLtSymbol, 0, Button1, setlayout, {0}},
{ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]}},
{ClkWinTitle, 0, Button2, zoom, {0}},
{ClkStatusText, 0, Button2, spawn, {.v = termcmd}},
{ClkClientWin, MODKEY, Button1, moveorplace, {.i = 0}},
{ClkClientWin, MODKEY, Button2, togglefloating, {0}},
{ClkClientWin, MODKEY, Button3, resizemouse, {0}},
2021-10-04 14:51:35 -05:00
{ClkClientWin, ControlMask | ShiftMask, Button1, dragmfact, {0}},
{ClkClientWin, ControlMask | ShiftMask, Button3, dragcfact, {0}},
2021-08-30 06:47:11 -05:00
{ClkTagBar, 0, Button1, view, {0}},
{ClkTagBar, 0, Button3, toggleview, {0}},
{ClkTagBar, MODKEY, Button1, tag, {0}},
{ClkTagBar, MODKEY, Button3, toggletag, {0}},
{ClkTabBar, 0, Button1, focuswin, {0}},
{ClkTabBar, 0, Button1, focuswin, {0}},
{ClkTabPrev, 0, Button1, movestack, {.i = -1}},
{ClkTabNext, 0, Button1, movestack, {.i = +1}},
{ClkTabClose, 0, Button1, killclient, {0}},
};