From 36a382d2e635a7eff6445279bcd0f8c14a7a842f Mon Sep 17 00:00:00 2001 From: Piotr Domagalski Date: Thu, 9 Jan 2025 11:44:56 +0100 Subject: [PATCH] my config --- config.def.h | 115 ++++++++++++++++++++++++++++++--------------------- 1 file changed, 67 insertions(+), 48 deletions(-) diff --git a/config.def.h b/config.def.h index d7ed7c7..0414336 100644 --- a/config.def.h +++ b/config.def.h @@ -1,23 +1,30 @@ /* See LICENSE file for copyright and license details. */ /* appearance */ -static const unsigned int borderpx = 1; /* border pixel of windows */ -static const unsigned int gappx = 1; /* gap pixel between windows */ +static const unsigned int borderpx = 4; /* border pixel of windows */ //1->3 +static const unsigned int gappx = 8; /* gap pixel between windows */ static const unsigned int snap = 32; /* snap pixel */ static const int swallowfloating = 0; /* 1 means swallow floating windows by default */ static const int showbar = 1; /* 0 means no bar */ static const int topbar = 1; /* 0 means bottom bar */ -static const char *fonts[] = { "monospace:size=10" }; -static const char dmenufont[] = "monospace:size=10"; +static const char *fonts[] = { "Liberation Mono:pixelsize=14:antialias=true:autohint=true" };// "monospace:size=14" }; //size=10->14 +static const char dmenufont[] = "Liberation Mono:pixelsize=14:antialias=true:autohint=true"; //"monospace:size=14"; static const char col_gray1[] = "#222222"; static const char col_gray2[] = "#444444"; static const char col_gray3[] = "#bbbbbb"; static const char col_gray4[] = "#eeeeee"; static const char col_cyan[] = "#005577"; +//my colours +static const char col_burgundy[] = "#692137"; //"af0000"; +static const char col_darkred[] = "#330000"; +static const char col_white[] = "#ffffff"; + static const char *colors[][3] = { /* fg bg border */ - [SchemeNorm] = { col_gray3, col_gray1, col_gray2 }, - [SchemeSel] = { col_gray4, col_cyan, col_cyan }, + //[SchemeNorm] = { col_gray3, col_gray1, col_gray2 }, + //[SchemeSel] = { col_gray4, col_cyan, col_cyan }, + [SchemeNorm] = { col_gray4, col_darkred, col_darkred }, + [SchemeSel] = { col_white, col_burgundy, col_burgundy }, }; /* tagging */ @@ -28,15 +35,18 @@ static const Rule rules[] = { * WM_CLASS(STRING) = instance, class * WM_NAME(STRING) = title */ - /* class instance title tags mask isfloating isterminal noswallow monitor */ - { "Gimp", NULL, NULL, 0, 1, 0, 0, -1 }, - { "Firefox", NULL, NULL, 1 << 8, 0, 0, -1, -1 }, - { "St", NULL, NULL, 0, 0, 1, 0, -1 }, - { NULL, NULL, "Event Tester", 0, 0, 0, 1, -1 }, /* xev */ + /* class instance title tags mask isfloating isterminal noswallow monitor */ + { NULL, NULL, NULL, 0, 0, 0, 0, -1 }, + { "discord", NULL, NULL, 1<<8, 0, 0, 0, -1 }, + //{ "Gimp", NULL, NULL, 0, 1, 0, 0, -1 }, + { "firefox", NULL, NULL, 1, 0, 0, -1, -1 }, + { "st-256color", NULL, NULL, 0, 0, 1, 0, -1 }, + { NULL, NULL, "Event Tester", 0, 0, 0, 1, -1 }, /* xev */ + }; /* layout(s) */ -static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */ +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 = 1; /* 1 means respect size hints in tiled resizals */ static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */ @@ -50,7 +60,7 @@ static const Layout layouts[] = { }; /* key definitions */ -#define MODKEY Mod1Mask +#define MODKEY Mod4Mask //Mod4Mask - super, Mod1Mask - alt, 2&3 - shift&ctrl #define TAGKEYS(KEY,TAG) \ { MODKEY, KEY, view, {.ui = 1 << TAG} }, \ { MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \ @@ -62,44 +72,53 @@ static const Layout layouts[] = { /* commands */ static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */ -static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL }; +static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_darkred, "-nf", col_gray4, "-sb", col_burgundy, "-sf", col_white, NULL }; static const char *termcmd[] = { "st", NULL }; +static const char *screenshotwholecmd[] = { "/home/piotr/scripts/screenshotterhacksawshotgun.sh", "whole", NULL }; +static const char *screenshothacksawcmd[] = { "/home/piotr/scripts/screenshotterhacksawshotgun.sh", "hacksaw", NULL }; +static const float setmfactvalue = 0.05f; +//static const float setmfactvalue = 256.0f/1600.0f; //change by 64 pixels + +static const char *webbrowsercmd[] = { "firefox", NULL }; static const Key keys[] = { - /* modifier key function argument */ - { MODKEY, XK_p, spawn, {.v = dmenucmd } }, - { MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } }, - { MODKEY, XK_b, togglebar, {0} }, - { MODKEY, XK_j, focusstack, {.i = +1 } }, - { MODKEY, XK_k, focusstack, {.i = -1 } }, - { MODKEY, XK_i, incnmaster, {.i = +1 } }, - { MODKEY, XK_d, incnmaster, {.i = -1 } }, - { MODKEY, XK_h, setmfact, {.f = -0.05} }, - { MODKEY, XK_l, setmfact, {.f = +0.05} }, - { MODKEY, XK_Return, zoom, {0} }, - { MODKEY, XK_Tab, view, {0} }, - { MODKEY|ShiftMask, XK_c, killclient, {0} }, - { MODKEY, XK_t, setlayout, {.v = &layouts[0]} }, - { MODKEY, XK_f, setlayout, {.v = &layouts[1]} }, - { MODKEY, XK_m, setlayout, {.v = &layouts[2]} }, - { MODKEY, XK_space, setlayout, {0} }, - { MODKEY|ShiftMask, XK_space, togglefloating, {0} }, - { MODKEY, XK_0, view, {.ui = ~0 } }, - { MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } }, - { MODKEY, XK_comma, focusmon, {.i = -1 } }, - { MODKEY, XK_period, focusmon, {.i = +1 } }, - { MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } }, - { MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } }, - 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) - TAGKEYS( XK_9, 8) - { MODKEY|ShiftMask, XK_q, quit, {0} }, + /* modifier key function argument */ + { MODKEY, XK_p, spawn, {.v = screenshothacksawcmd } }, //XK_Print doesn't work with alt+shift + { MODKEY, XK_Print, spawn, {.v = screenshotwholecmd } }, + { MODKEY, XK_d, spawn, {.v = dmenucmd } }, //XK_p -> XK_d to match i3 + { MODKEY/*|ShiftMask*/, XK_Return, spawn, {.v = termcmd } }, //shiftmask removed to match i3 + { MODKEY, XK_b, spawn, {.v = webbrowsercmd} }, + { MODKEY, XK_s, togglebar, {0} }, + { MODKEY, XK_l, focusstack, {.i = +1 } }, + { MODKEY, XK_k, focusstack, {.i = -1 } }, + //{ MODKEY, XK_i, incnmaster, {.i = +1 } }, //increment number of clients in master + //{ MODKEY, XK_d, incnmaster, {.i = -1 } }, //never useful, so commented out + { MODKEY, XK_j, setmfact, {.f = -setmfactvalue} }, + { MODKEY, XK_semicolon, setmfact, {.f = +setmfactvalue} }, + { MODKEY|ShiftMask, XK_Return, zoom, {0} }, //+shiftmask (deconfl with term) + { MODKEY, XK_Tab, view, {0} }, + { MODKEY|ShiftMask, XK_q, killclient, {0} }, //XK_c -> XK_q to match i3 + { MODKEY, XK_t, setlayout, {.v = &layouts[0]} }, + { MODKEY, XK_f, setlayout, {.v = &layouts[1]} }, + { MODKEY, XK_m, setlayout, {.v = &layouts[2]} }, + { MODKEY, XK_space, setlayout, {0} }, + { MODKEY|ShiftMask, XK_space, togglefloating, {0} }, + { MODKEY, XK_0, view, {.ui = ~0 } }, + { MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } }, + { MODKEY, XK_comma, focusmon, {.i = -1 } }, + { MODKEY, XK_period, focusmon, {.i = +1 } }, + { MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } }, + { MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } }, + 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) + TAGKEYS( XK_9, 8) + { MODKEY|ShiftMask, XK_e, quit, {0} }, //XK_q to XK_e to match i3 }; /* button definitions */