From 64f07491cc43ebcd9e5991edb119f73ff3aeea93 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Thu, 20 Jul 2023 19:55:35 -0500 Subject: changing terminals to wezterm --- config.def.h | 40 ++++++++++++++++++---------------------- 1 file changed, 18 insertions(+), 22 deletions(-) diff --git a/config.def.h b/config.def.h index 81fc9ff..4225cc9 100644 --- a/config.def.h +++ b/config.def.h @@ -38,31 +38,27 @@ typedef struct { const void *cmd; } Sp; -/* - Kitty does not take the -g flag, so geometry has to be set by - overriding the config file settings. Example below: -const char *spcmd1[] = {"kitty", "--class", "spaudio", "-o", "initial_window_width=120c", "-o", "initial_window_height=35c", "-e", "pulsemixer", NULL }; -const char *spcmd2[] = {"kitty", "--class", "spnet", "-o", "initial_window_width=120c", "-o", "initial_window_height=35c", "-e", "nmtui", NULL }; -const char *spcmd3[] = {"kitty", "--class", "spmp", "-o", "initial_window_width=120c", "-o", "initial_window_height=35c", "-e", "ncmpcpp", NULL }; -const char *spcmd4[] = {"kitty", "--class", "spbt", "-o", "initial_window_width=120c", "-o", "initial_window_height=35c", "-e", "tremc", NULL }; -const char *spcmd5[] = {"kitty", "--class", "spterm", "-o", "initial_window_width=120c", "-o", "initial_window_height=35c", "-e", "tmux", NULL }; -const char *spcmd6[] = {"kitty", "--class", "spfm", "-o", "initial_window_width=120c", "-o", "initial_window_height=35c", "-e", "lf", NULL }; -const char *spcmd6[] = {"kitty", "--class", "spmon", "-o", "initial_window_width=120c", "-o", "initial_window_height=35c", "-e", "htop", NULL }; -*/ +const char *spcmd1[] = {"wezterm", "start", "--class", "spaudio", "-e", "mixertui", NULL }; +const char *spcmd2[] = {"wezterm", "start", "--class", "spmon", "-e", "htop", NULL }; +const char *spcmd3[] = {"wezterm", "start", "--class", "spmp", "-e", "ncmpcpp", NULL }; +const char *spcmd4[] = {"wezterm", "start", "--class", "spbt", "-e", "tremc", NULL }; +const char *spcmd5[] = {"wezterm", "start", "--class", "spterm", "-e", "tmux", NULL }; +const char *spcmd6[] = {"wezterm", "start", "--class", "spfm", "-e", "lf", NULL }; +const char *spcmd7[] = {"wezterm", "start", "--class", "spnet", "-e", "nmtui", NULL }; /* - St and terminals which take a -g flag should take this format: -*/ + St and Xterm take a -g flag: const char *spcmd1[] = {"st", "-n", "spaudio", "-g", "120x35", "-e", "mixertui", NULL }; -const char *spcmd2[] = {"st", "-n", "spnet", "-g", "80x40", "-e", "nmtui", NULL }; +const char *spcmd2[] = {"st", "-n", "spmon", "-g", "120x35", "-e", "htop", NULL }; const char *spcmd3[] = {"st", "-n", "spmp", "-g", "120x35", "-e", "ncmpcpp", NULL }; const char *spcmd4[] = {"st", "-n", "spbt", "-g", "120x35", "-e", "tremc", NULL }; const char *spcmd5[] = {"st", "-n", "spterm", "-g", "120x35", "-e", "tmux", NULL }; const char *spcmd6[] = {"st", "-n", "spfm", "-g", "120x35", "-e", "lf", NULL }; -const char *spcmd7[] = {"st", "-n", "spmon", "-g", "120x35", "-e", "htop", NULL }; +const char *spcmd7[] = {"st", "-n", "spnet", "-g", "80x40", "-e", "nmtui", NULL }; +*/ /*...and this is how to add a gui app to a scratchpad const char *spcmd5[] = {"keepassxc", NULL }; @@ -71,12 +67,12 @@ const char *spcmd7[] = {"st", "-n", "spmon", "-g", "120x35", "-e", "htop", static Sp scratchpads[] = { /* name cmd */ {"spaudio", spcmd1}, - {"spnet", spcmd2}, + {"spmon", spcmd2}, {"spmp", spcmd3}, {"spbt", spcmd4}, {"spterm", spcmd5}, {"spfm", spcmd6}, - {"spmon", spcmd7}, + {"spnet", spcmd7}, /* {"keepassxc", spcmd3}, */ }; @@ -102,8 +98,8 @@ static const Rule rules[] = { { "Alarm-clock-applet", NULL, NULL, 0, 1, 0, 0, -1 }, { "Firefox", NULL, NULL, 0, 0, 0, -1, -1 }, { "st", NULL, NULL, 0, 0, 1, 0, -1 }, - { "kitty", NULL, NULL, 0, 0, 1, 0, -1 }, { "XTerm", NULL, NULL, 0, 0, 1, 0, -1 }, + { "wezterm", NULL, NULL, 0, 0, 1, 0, -1 }, { NULL, "spaudio", NULL, SPTAG(0), 1, 0, 0, -1 }, { NULL, "spnet", NULL, SPTAG(1), 1, 0, 0, -1 }, { NULL, "spmp", NULL, SPTAG(2), 1, 0, 0, -1 }, @@ -147,8 +143,8 @@ static const Layout layouts[] = { 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 *termcmd[] = { "st", NULL }; -static const char *editorcmd[] = { "emacs", NULL }; +static const char *termcmd[] = { "wezterm", NULL }; +static const char *editorcmd[] = { "em", NULL }; static const char *browsercmd[] = { "firefox", NULL }; static const char *calccmd[] = { "gnome-calculator", NULL }; @@ -195,12 +191,12 @@ static Key keys[] = { { MODKEY, XK_equal, setgaps, {.i = +5 } }, { MODKEY|ShiftMask, XK_equal, setgaps, {.i = 0 } }, { MODKEY, XK_a, togglescratch, {.ui = 0 } }, - { MODKEY, XK_n, togglescratch, {.ui = 1 } }, + { MODKEY, XK_m, togglescratch, {.ui = 1 } }, { MODKEY, XK_slash, togglescratch, {.ui = 2 } }, { MODKEY|ShiftMask, XK_b, togglescratch, {.ui = 3 } }, { MODKEY|ShiftMask, XK_Return, togglescratch, {.ui = 4 } }, { MODKEY, XK_f, togglescratch, {.ui = 5 } }, - { MODKEY, XK_m, togglescratch, {.ui = 6 } }, + { MODKEY, XK_n, togglescratch, {.ui = 6 } }, TAGKEYS( XK_1, 0) TAGKEYS( XK_2, 1) TAGKEYS( XK_3, 2) -- cgit v1.2.3 From 053e56878e188f1e9266feb0972b4e8bd8d84c52 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Thu, 20 Jul 2023 20:16:53 -0500 Subject: removed nmtui scratchpad 1) not using it on linux with applet 2) doesn't exist on freebsd 3) can easily type nmtui in spterm scratchpad --- config.def.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/config.def.h b/config.def.h index 4225cc9..f6acbb4 100644 --- a/config.def.h +++ b/config.def.h @@ -46,7 +46,6 @@ const char *spcmd3[] = {"wezterm", "start", "--class", "spmp", "-e", "ncmpcpp const char *spcmd4[] = {"wezterm", "start", "--class", "spbt", "-e", "tremc", NULL }; const char *spcmd5[] = {"wezterm", "start", "--class", "spterm", "-e", "tmux", NULL }; const char *spcmd6[] = {"wezterm", "start", "--class", "spfm", "-e", "lf", NULL }; -const char *spcmd7[] = {"wezterm", "start", "--class", "spnet", "-e", "nmtui", NULL }; /* St and Xterm take a -g flag: @@ -57,7 +56,6 @@ const char *spcmd3[] = {"st", "-n", "spmp", "-g", "120x35", "-e", "ncmpcpp", const char *spcmd4[] = {"st", "-n", "spbt", "-g", "120x35", "-e", "tremc", NULL }; const char *spcmd5[] = {"st", "-n", "spterm", "-g", "120x35", "-e", "tmux", NULL }; const char *spcmd6[] = {"st", "-n", "spfm", "-g", "120x35", "-e", "lf", NULL }; -const char *spcmd7[] = {"st", "-n", "spnet", "-g", "80x40", "-e", "nmtui", NULL }; */ /*...and this is how to add a gui app to a scratchpad @@ -72,7 +70,6 @@ static Sp scratchpads[] = { {"spbt", spcmd4}, {"spterm", spcmd5}, {"spfm", spcmd6}, - {"spnet", spcmd7}, /* {"keepassxc", spcmd3}, */ }; @@ -196,7 +193,6 @@ static Key keys[] = { { MODKEY|ShiftMask, XK_b, togglescratch, {.ui = 3 } }, { MODKEY|ShiftMask, XK_Return, togglescratch, {.ui = 4 } }, { MODKEY, XK_f, togglescratch, {.ui = 5 } }, - { MODKEY, XK_n, togglescratch, {.ui = 6 } }, TAGKEYS( XK_1, 0) TAGKEYS( XK_2, 1) TAGKEYS( XK_3, 2) -- cgit v1.2.3 From fcf6a61216cdac69074f791bf591aca51d48b404 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sat, 22 Jul 2023 14:33:29 -0500 Subject: applied alwayscentered patch for floating windows --- dwm-alwayscenter-20200625-f04cac6.diff | 12 +++++ dwm-cemter-6.2.diff | 90 ---------------------------------- dwm.c | 2 + 3 files changed, 14 insertions(+), 90 deletions(-) create mode 100644 dwm-alwayscenter-20200625-f04cac6.diff delete mode 100644 dwm-cemter-6.2.diff diff --git a/dwm-alwayscenter-20200625-f04cac6.diff b/dwm-alwayscenter-20200625-f04cac6.diff new file mode 100644 index 0000000..03ea9ef --- /dev/null +++ b/dwm-alwayscenter-20200625-f04cac6.diff @@ -0,0 +1,12 @@ +diff -up dwm/dwm.c dwmmod/dwm.c +--- dwm/dwm.c 2020-06-25 00:21:30.383692180 -0300 ++++ dwmmod/dwm.c 2020-06-25 00:20:35.643692330 -0300 +@@ -1057,6 +1057,8 @@ manage(Window w, XWindowAttributes *wa) + updatewindowtype(c); + updatesizehints(c); + updatewmhints(c); ++ c->x = c->mon->mx + (c->mon->mw - WIDTH(c)) / 2; ++ c->y = c->mon->my + (c->mon->mh - HEIGHT(c)) / 2; + XSelectInput(dpy, w, EnterWindowMask|FocusChangeMask|PropertyChangeMask|StructureNotifyMask); + grabbuttons(c, 0); + if (!c->isfloating) diff --git a/dwm-cemter-6.2.diff b/dwm-cemter-6.2.diff deleted file mode 100644 index 0dfe156..0000000 --- a/dwm-cemter-6.2.diff +++ /dev/null @@ -1,90 +0,0 @@ -From 69f91089d9248fa9695eb925956e255a215171b8 Mon Sep 17 00:00:00 2001 -From: bakkeby -Date: Tue, 7 Apr 2020 12:29:08 +0200 -Subject: [PATCH] Adding 6.2 center patch with multi-monitor fix and - auto-centering of floating popup windows ---- - config.def.h | 6 +++--- - dwm.c | 13 +++++++++++-- - 2 files changed, 14 insertions(+), 5 deletions(-) - -diff --git a/config.def.h b/config.def.h -index 1c0b587..44b46e5 100644 ---- a/config.def.h -+++ b/config.def.h -@@ -26,9 +26,9 @@ static const Rule rules[] = { - * WM_CLASS(STRING) = instance, class - * WM_NAME(STRING) = title - */ -- /* class instance title tags mask isfloating monitor */ -- { "Gimp", NULL, NULL, 0, 1, -1 }, -- { "Firefox", NULL, NULL, 1 << 8, 0, -1 }, -+ /* class instance title tags mask iscentered isfloating monitor */ -+ { "Gimp", NULL, NULL, 0, 0, 1, -1 }, -+ { "Firefox", NULL, NULL, 1 << 8, 0, 0, -1 }, - }; - - /* layout(s) */ -diff --git a/dwm.c b/dwm.c -index 4465af1..ab33757 100644 ---- a/dwm.c -+++ b/dwm.c -@@ -92,7 +92,7 @@ struct Client { - int basew, baseh, incw, inch, maxw, maxh, minw, minh; - int bw, oldbw; - unsigned int tags; -- int isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen; -+ int isfixed, iscentered, isfloating, isurgent, neverfocus, oldstate, isfullscreen; - Client *next; - Client *snext; - Monitor *mon; -@@ -137,6 +137,7 @@ typedef struct { - const char *instance; - const char *title; - unsigned int tags; -+ int iscentered; - int isfloating; - int monitor; - } Rule; -@@ -285,6 +286,7 @@ applyrules(Client *c) - XClassHint ch = { NULL, NULL }; - - /* rule matching */ -+ c->iscentered = 0; - c->isfloating = 0; - c->tags = 0; - XGetClassHint(dpy, c->win, &ch); -@@ -297,6 +299,7 @@ applyrules(Client *c) - && (!r->class || strstr(class, r->class)) - && (!r->instance || strstr(instance, r->instance))) - { -+ c->iscentered = r->iscentered; - c->isfloating = r->isfloating; - c->tags |= r->tags; - for (m = mons; m && m->num != r->monitor; m = m->next); -@@ -1056,6 +1059,10 @@ manage(Window w, XWindowAttributes *wa) - updatewindowtype(c); - updatesizehints(c); - updatewmhints(c); -+ if (c->iscentered) { -+ c->x = c->mon->mx + (c->mon->mw - WIDTH(c)) / 2; -+ c->y = c->mon->my + (c->mon->mh - HEIGHT(c)) / 2; -+ } - XSelectInput(dpy, w, EnterWindowMask|FocusChangeMask|PropertyChangeMask|StructureNotifyMask); - grabbuttons(c, 0); - if (!c->isfloating) -@@ -2009,8 +2016,10 @@ updatewindowtype(Client *c) - - if (state == netatom[NetWMFullscreen]) - setfullscreen(c, 1); -- if (wtype == netatom[NetWMWindowTypeDialog]) -+ if (wtype == netatom[NetWMWindowTypeDialog]) { -+ c->iscentered = 1; - c->isfloating = 1; -+ } - } - - void --- -2.17.1 - diff --git a/dwm.c b/dwm.c index 32277e1..b48b6e5 100644 --- a/dwm.c +++ b/dwm.c @@ -1358,6 +1358,8 @@ manage(Window w, XWindowAttributes *wa) updatewindowtype(c); updatesizehints(c); updatewmhints(c); + c->x = c->mon->mx + (c->mon->mw - WIDTH(c)) / 2; + c->y = c->mon->my + (c->mon->mh - HEIGHT(c)) / 2; XSelectInput(dpy, w, EnterWindowMask|FocusChangeMask|PropertyChangeMask|StructureNotifyMask); grabbuttons(c, 0); if (!c->isfloating) -- cgit v1.2.3 From 49dd3cde1a957cf554fa1f36c72ba3227888c24c Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sat, 22 Jul 2023 14:35:37 -0500 Subject: removing font modifications; renamed to freebsd_compile.diff --- freebsd+fontsize.patch | 41 ----------------------------------------- freebsd_compile.diff | 24 ++++++++++++++++++++++++ 2 files changed, 24 insertions(+), 41 deletions(-) delete mode 100644 freebsd+fontsize.patch create mode 100644 freebsd_compile.diff diff --git a/freebsd+fontsize.patch b/freebsd+fontsize.patch deleted file mode 100644 index a5fd923..0000000 --- a/freebsd+fontsize.patch +++ /dev/null @@ -1,41 +0,0 @@ -diff --git a/config.def.h b/config.def.h -index 38952c5..262e5a1 100644 ---- a/config.def.h -+++ b/config.def.h -@@ -14,9 +14,9 @@ static const int showbar = 1; /* 0 means no bar */ - static const int topbar = 1; /* 0 means bottom bar */ - static const int focusonwheel = 0; - static const char *fonts[] = -- { "FiraCode Nerd Font Mono:pixelsize=18:antialias=true:autohint:true", -- "Noto Color Emoji:pixelsize=18:antialias=true:autohint=true" }; --static const char dmenufont[] = "FiraCode Nerd Font Mono:pixelsize=18:antialias=true:autohint:true"; -+ { "FiraCode Nerd Font Mono:pixelsize=24:antialias=true:autohint:true", -+ "Noto Color Emoji:pixelsize=24:antialias=true:autohint=true" }; -+static const char dmenufont[] = "FiraCode Nerd Font Mono:pixelsize=24:antialias=true:autohint:true"; - static const char col_gray1[] = "#222222"; - static const char col_gray2[] = "#444444"; - static const char col_gray3[] = "#bbbbbb"; -diff --git a/config.mk b/config.mk -index ff9e508..2bd91ef 100644 ---- a/config.mk -+++ b/config.mk -@@ -7,8 +7,8 @@ VERSION = 6.2 - PREFIX = /usr/local - MANPREFIX = ${PREFIX}/share/man - --X11INC = /usr/X11R6/include --X11LIB = /usr/X11R6/lib -+X11INC = /usr/local/include -+X11LIB = /usr/local/lib - - # Xinerama, comment if you don't want it - XINERAMALIBS = -lXinerama -@@ -16,7 +16,7 @@ XINERAMAFLAGS = -DXINERAMA - - # freetype - FREETYPELIBS = -lfontconfig -lXft --FREETYPEINC = /usr/include/freetype2 -+FREETYPEINC = /usr/local/include/freetype2 - # OpenBSD (uncomment) - #FREETYPEINC = ${X11INC}/freetype2 - #KVMLIB = -lkvm diff --git a/freebsd_compile.diff b/freebsd_compile.diff new file mode 100644 index 0000000..a3eed6c --- /dev/null +++ b/freebsd_compile.diff @@ -0,0 +1,24 @@ +diff --git a/config.mk b/config.mk +index ff9e508..2bd91ef 100644 +--- a/config.mk ++++ b/config.mk +@@ -7,8 +7,8 @@ VERSION = 6.2 + PREFIX = /usr/local + MANPREFIX = ${PREFIX}/share/man + +-X11INC = /usr/X11R6/include +-X11LIB = /usr/X11R6/lib ++X11INC = /usr/local/include ++X11LIB = /usr/local/lib + + # Xinerama, comment if you don't want it + XINERAMALIBS = -lXinerama +@@ -16,7 +16,7 @@ XINERAMAFLAGS = -DXINERAMA + + # freetype + FREETYPELIBS = -lfontconfig -lXft +-FREETYPEINC = /usr/include/freetype2 ++FREETYPEINC = /usr/local/include/freetype2 + # OpenBSD (uncomment) + #FREETYPEINC = ${X11INC}/freetype2 + #KVMLIB = -lkvm -- cgit v1.2.3