From 1d9208a014057e3716c3a5f451076437d0b35cde Mon Sep 17 00:00:00 2001 From: _N0x Date: Fri, 22 Jan 2021 16:16:08 +0100 Subject: [PATCH 1/2] Removed the battery status from dwmblocks. not needed on desktop systems --- dwmblocks/blocks.def.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dwmblocks/blocks.def.h b/dwmblocks/blocks.def.h index 03fb861..b95eb77 100644 --- a/dwmblocks/blocks.def.h +++ b/dwmblocks/blocks.def.h @@ -2,7 +2,7 @@ static const Block blocks[] = { /*Icon*/ /*Command*/ /*Update Interval*/ /*Update Signal*/ {"  ", "freememory", 30, 0}, - {"  ", "batstatus", 30, 0}, +/* Battery not needed on desktop system {"  ", "batstatus", 30, 0}, */ {"", "date '+%b %d %H:%M'", 5, 0}, }; From 19cee57db5c3e4fc047cab2f5a1f14341c375be1 Mon Sep 17 00:00:00 2001 From: _N0x Date: Fri, 29 Jan 2021 01:22:03 +0100 Subject: [PATCH 2/2] Modified dwmblocks, added delkey patch to st, played with dwm --- dwm-6.2/config.def.h | 5 +++++ dwm-6.2/config.h | 5 +++++ dwmblocks/blocks.def.h | 11 +++++++---- st-0.8.4/config.def.h | 4 ++-- st-0.8.4/config.def.h.orig | 4 +++- st-0.8.4/config.h | 4 ++-- st-0.8.4/st-delkey-20201112-4ef0cbd.diff | 20 ++++++++++++++++++++ 7 files changed, 44 insertions(+), 9 deletions(-) create mode 100644 st-0.8.4/st-delkey-20201112-4ef0cbd.diff diff --git a/dwm-6.2/config.def.h b/dwm-6.2/config.def.h index 789d379..1a81eb9 100644 --- a/dwm-6.2/config.def.h +++ b/dwm-6.2/config.def.h @@ -64,6 +64,10 @@ 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_teal, "-sf", col_gray4, NULL }; static const char *termcmd[] = { "st", NULL }; +/* Own commands */ +static const char *screenshot[] = { "makescreenshot", NULL }; + + static Key keys[] = { /* modifier key function argument */ { MODKEY, XK_p, spawn, {.v = dmenucmd } }, @@ -92,6 +96,7 @@ static Key keys[] = { { MODKEY, XK_minus, setgaps, {.i = -1 } }, { MODKEY, XK_equal, setgaps, {.i = +1 } }, { MODKEY|ShiftMask, XK_equal, setgaps, {.i = 0 } }, + { MODKEY|ShiftMask, XK_s, spawn, {.v = screenshot } }, TAGKEYS( XK_1, 0) TAGKEYS( XK_2, 1) TAGKEYS( XK_3, 2) diff --git a/dwm-6.2/config.h b/dwm-6.2/config.h index 789d379..1a81eb9 100644 --- a/dwm-6.2/config.h +++ b/dwm-6.2/config.h @@ -64,6 +64,10 @@ 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_teal, "-sf", col_gray4, NULL }; static const char *termcmd[] = { "st", NULL }; +/* Own commands */ +static const char *screenshot[] = { "makescreenshot", NULL }; + + static Key keys[] = { /* modifier key function argument */ { MODKEY, XK_p, spawn, {.v = dmenucmd } }, @@ -92,6 +96,7 @@ static Key keys[] = { { MODKEY, XK_minus, setgaps, {.i = -1 } }, { MODKEY, XK_equal, setgaps, {.i = +1 } }, { MODKEY|ShiftMask, XK_equal, setgaps, {.i = 0 } }, + { MODKEY|ShiftMask, XK_s, spawn, {.v = screenshot } }, TAGKEYS( XK_1, 0) TAGKEYS( XK_2, 1) TAGKEYS( XK_3, 2) diff --git a/dwmblocks/blocks.def.h b/dwmblocks/blocks.def.h index b95eb77..ee9da68 100644 --- a/dwmblocks/blocks.def.h +++ b/dwmblocks/blocks.def.h @@ -1,11 +1,14 @@ //Modify this file to change what commands output to your statusbar, and recompile using the make command. static const Block blocks[] = { /*Icon*/ /*Command*/ /*Update Interval*/ /*Update Signal*/ - {"  ", "freememory", 30, 0}, -/* Battery not needed on desktop system {"  ", "batstatus", 30, 0}, */ - {"", "date '+%b %d %H:%M'", 5, 0}, + {"", "dwmmemory", 10, 0}, + {"", "dwmcpu", 5, 0}, + {"", "dwmnetwork", 5, 0}, + {"", "dwmdisk", 600, 0}, +/* Battery not needed on desktop system {"", "dwmbatterdwmbattery, 0}, */ + {" ", "date '+%b %d %H:%M'", 5, 0}, }; //sets delimeter between status commands. NULL character ('\0') means no delimeter. -static char delim[] = "  "; +static char delim[] = "  "; static unsigned int delimLen = 5; diff --git a/st-0.8.4/config.def.h b/st-0.8.4/config.def.h index 327406d..95c1087 100644 --- a/st-0.8.4/config.def.h +++ b/st-0.8.4/config.def.h @@ -283,7 +283,7 @@ static Key key[] = { { XK_KP_Delete, ControlMask, "\033[3;5~", +1, 0}, { XK_KP_Delete, ShiftMask, "\033[2K", -1, 0}, { XK_KP_Delete, ShiftMask, "\033[3;2~", +1, 0}, - { XK_KP_Delete, XK_ANY_MOD, "\033[P", -1, 0}, + { XK_KP_Delete, XK_ANY_MOD, "\033[3~", -1, 0}, { XK_KP_Delete, XK_ANY_MOD, "\033[3~", +1, 0}, { XK_KP_Multiply, XK_ANY_MOD, "\033Oj", +2, 0}, { XK_KP_Add, XK_ANY_MOD, "\033Ok", +2, 0}, @@ -351,7 +351,7 @@ static Key key[] = { { XK_Delete, ControlMask, "\033[3;5~", +1, 0}, { XK_Delete, ShiftMask, "\033[2K", -1, 0}, { XK_Delete, ShiftMask, "\033[3;2~", +1, 0}, - { XK_Delete, XK_ANY_MOD, "\033[P", -1, 0}, + { XK_Delete, XK_ANY_MOD, "\033[3~", -1, 0}, { XK_Delete, XK_ANY_MOD, "\033[3~", +1, 0}, { XK_BackSpace, XK_NO_MOD, "\177", 0, 0}, { XK_BackSpace, Mod1Mask, "\033\177", 0, 0}, diff --git a/st-0.8.4/config.def.h.orig b/st-0.8.4/config.def.h.orig index a125158..327406d 100644 --- a/st-0.8.4/config.def.h.orig +++ b/st-0.8.4/config.def.h.orig @@ -94,7 +94,7 @@ char *termname = "st-256color"; unsigned int tabspaces = 8; /* bg opacity */ -float alpha = 0.9; +float alpha = 0.95; /* Terminal colors (16 first used in escape sequence) */ static const char *colorname[] = { @@ -177,6 +177,8 @@ static uint forcemousemod = ShiftMask; */ static MouseShortcut mshortcuts[] = { /* mask button function argument release */ + { ShiftMask, Button4, kscrollup, {.i = 1} }, + { ShiftMask, Button5, kscrolldown, {.i = 1} }, { XK_ANY_MOD, Button2, selpaste, {.i = 0}, 1 }, { ShiftMask, Button4, ttysend, {.s = "\033[5;2~"} }, { XK_ANY_MOD, Button4, ttysend, {.s = "\031"} }, diff --git a/st-0.8.4/config.h b/st-0.8.4/config.h index 327406d..95c1087 100644 --- a/st-0.8.4/config.h +++ b/st-0.8.4/config.h @@ -283,7 +283,7 @@ static Key key[] = { { XK_KP_Delete, ControlMask, "\033[3;5~", +1, 0}, { XK_KP_Delete, ShiftMask, "\033[2K", -1, 0}, { XK_KP_Delete, ShiftMask, "\033[3;2~", +1, 0}, - { XK_KP_Delete, XK_ANY_MOD, "\033[P", -1, 0}, + { XK_KP_Delete, XK_ANY_MOD, "\033[3~", -1, 0}, { XK_KP_Delete, XK_ANY_MOD, "\033[3~", +1, 0}, { XK_KP_Multiply, XK_ANY_MOD, "\033Oj", +2, 0}, { XK_KP_Add, XK_ANY_MOD, "\033Ok", +2, 0}, @@ -351,7 +351,7 @@ static Key key[] = { { XK_Delete, ControlMask, "\033[3;5~", +1, 0}, { XK_Delete, ShiftMask, "\033[2K", -1, 0}, { XK_Delete, ShiftMask, "\033[3;2~", +1, 0}, - { XK_Delete, XK_ANY_MOD, "\033[P", -1, 0}, + { XK_Delete, XK_ANY_MOD, "\033[3~", -1, 0}, { XK_Delete, XK_ANY_MOD, "\033[3~", +1, 0}, { XK_BackSpace, XK_NO_MOD, "\177", 0, 0}, { XK_BackSpace, Mod1Mask, "\033\177", 0, 0}, diff --git a/st-0.8.4/st-delkey-20201112-4ef0cbd.diff b/st-0.8.4/st-delkey-20201112-4ef0cbd.diff new file mode 100644 index 0000000..c334b0d --- /dev/null +++ b/st-0.8.4/st-delkey-20201112-4ef0cbd.diff @@ -0,0 +1,20 @@ +--- config.def.h.orig 2020-11-12 20:23:48.867954750 +0100 ++++ config.def.h 2020-11-12 20:21:15.055922720 +0100 +@@ -276,7 +276,7 @@ + { XK_KP_Delete, ControlMask, "\033[3;5~", +1, 0}, + { XK_KP_Delete, ShiftMask, "\033[2K", -1, 0}, + { XK_KP_Delete, ShiftMask, "\033[3;2~", +1, 0}, +- { XK_KP_Delete, XK_ANY_MOD, "\033[P", -1, 0}, ++ { XK_KP_Delete, XK_ANY_MOD, "\033[3~", -1, 0}, + { XK_KP_Delete, XK_ANY_MOD, "\033[3~", +1, 0}, + { XK_KP_Multiply, XK_ANY_MOD, "\033Oj", +2, 0}, + { XK_KP_Add, XK_ANY_MOD, "\033Ok", +2, 0}, +@@ -344,7 +344,7 @@ + { XK_Delete, ControlMask, "\033[3;5~", +1, 0}, + { XK_Delete, ShiftMask, "\033[2K", -1, 0}, + { XK_Delete, ShiftMask, "\033[3;2~", +1, 0}, +- { XK_Delete, XK_ANY_MOD, "\033[P", -1, 0}, ++ { XK_Delete, XK_ANY_MOD, "\033[3~", -1, 0}, + { XK_Delete, XK_ANY_MOD, "\033[3~", +1, 0}, + { XK_BackSpace, XK_NO_MOD, "\177", 0, 0}, + { XK_BackSpace, Mod1Mask, "\033\177", 0, 0},