aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitchell Riedstra <mitch@riedstra.dev>2023-12-31 12:55:02 -0500
committerMitchell Riedstra <mitch@riedstra.dev>2023-12-31 12:55:02 -0500
commitec57c33ad66ac41626241842499638943f7bc1ef (patch)
tree7e3742363f6420b482094fc27acc9fef000401ea
parent3651d036607d8daff79da9997e88004fb5139252 (diff)
downloaddwm-ec57c33ad66ac41626241842499638943f7bc1ef.tar.gz
dwm-ec57c33ad66ac41626241842499638943f7bc1ef.tar.xz
Remove DMENU_FLAGS. Switch to a new fontHEADmaster
-rw-r--r--config.h28
-rw-r--r--dwm.c26
2 files changed, 29 insertions, 25 deletions
diff --git a/config.h b/config.h
index 1d236bb..111ce4b 100644
--- a/config.h
+++ b/config.h
@@ -1,21 +1,33 @@
/* See LICENSE file for copyright and license details. */
+#define PROFONT_XLARGE "ProFontWindows:style=Regular:size=18:autohint=false"
#define PROFONT_LARGE "ProfontOTB:pixelsize=13:antialias=false:autohint=false"
+#define PROFONT_MED "ProfontWindows:style=Regular:pixelsize=16:autohint=false"
#define PROFONT_SMALL "ProfontOTB:pixelsize=10:antialias=false:autohint=false"
#define ROBOTO_XLARGE "RobotoMono-Regular:pixelsize=18:antialias=true:autohint=true"
#define FONT_SCIENTIFICA "scientifica:style=Bold:pixelsize=10:antialias=false:autohint=false"
#define FONT_CURIE "curieMedium:pixelsize=10:antialias=false:autohint=false"
-#define TERMINUS_XLARGE "Terminus (TTF):pixelsize=18:antialias=false:autohint=false"
+#define TERMINUS_XLARGE "Terminus (TTF):pixelsize=20:antialias=false:autohint=false"
#define TERMINUS_LARGE "Terminus (TTF):pixelsize=16:antialias=false:autohint=false"
#define TERMINUS "Terminus (TTF):pixelsize=12:antialias=false:autohint=false"
+#define IBM_3270 "IBM 3270:pixelsize=17"
+#define IBM_3270_XL "IBM 3270:pixelsize=22"
+#define IBM_3270_XXL "IBM 3270:pixelsize=28"
+#define IBM_3270_XXXL "IBM 3270:pixelsize=36"
+#define IBM_3270_XXXXL "IBM 3270:pixelsize=48"
+#define IBM_PLEX_MONO "IBM Plex Mono:style=Medium,Regular:size=9"
+#define FONT_IOSEVKA_8_ITALLIC "Iosevka Term Medium:style=Medium Italic,Italic:size=8"
+#define FONT_IOSEVKA_8 "Iosevka Term:style=Regular,Regular:size=8"
+#define FONT_IOSEVKA_9 "Iosevka Term:style=Regular,Regular:size=9"
+#define FONT_IOSEVKA_10 "Iosevka Term:style=Regular,Regular:size=10"
/* appearance */
static const unsigned int borderpx = 1; /* border pixel of windows */
static const unsigned int snap = 32; /* snap pixel */
static const int showbar = 1; /* 0 means no bar */
static const int topbar = 1; /* 0 means bottom bar */
-static const char *fonts[] = { FONT_SCIENTIFICA };
-static const char dmenufont[] = FONT_SCIENTIFICA;
+static const char *fonts[] = { FONT_IOSEVKA_8_ITALLIC }; /* FONT_SCIENTIFICA */
+static const char dmenufont[] = FONT_IOSEVKA_8 ;
static const char col_gray1[] = "#3b4252";
static const char col_gray2[] = "#4c566a";
static const char col_gray3[] = "#eeeff4";
@@ -82,14 +94,17 @@ static const Layout layouts[] = {
/* helper for spawning shell commands in the pre dwm-5.0 fashion */
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
-#define DMENU_FLAGS "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4
+#define DMENU_FLAGS "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, \
+ "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4
+
/* commands */
static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
static const char *dmenucmd[] = { "dmenu_run", DMENU_FLAGS, NULL };
static const char *ddmenucmd[] = { "ddmenu", DMENU_FLAGS, NULL };
+static const char *termcmdSm[] = { "st", "-f", FONT_SCIENTIFICA, NULL };
static const char *termcmd[] = { "st", NULL };
-static const char *termcmdLarge[] = { "st", "-f", PROFONT_LARGE, NULL };
-static const char *termcmdXLarge[] = { "st", "-f", TERMINUS_XLARGE, NULL };
+static const char *termcmdLarge[] = { "st", "-f", FONT_IOSEVKA_10, NULL };
+static const char *termcmdXLarge[] = { "st", "-f", IBM_3270_XXL, NULL };
static const char *passcmd[] = { "dpw-menu", DMENU_FLAGS, NULL };
static const char *passcmd_type[] = { "dpw-menu", "--type", DMENU_FLAGS, NULL };
static const char *passcmd_otp_type[] = { "dpw-menu", "--type", "--otp", DMENU_FLAGS, NULL };
@@ -107,6 +122,7 @@ static const Key keys[] = {
{ MODKEY, XK_d, spawn, {.v = dmenucmd } },
{ MODKEY|ShiftMask, XK_d, spawn, {.v = ddmenucmd } },
{ MODKEY, XK_Return, spawn, {.v = termcmd } },
+ { MODKEY|Mod1Mask, XK_Return, spawn, {.v = termcmdSm} },
{ MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmdLarge } },
{ MODKEY|ControlMask|ShiftMask, XK_Return, spawn, {.v = termcmdXLarge } },
{ MODKEY|ShiftMask, XK_p, spawn, {.v = screenshot_cmd } },
diff --git a/dwm.c b/dwm.c
index d9ea0d7..490d703 100644
--- a/dwm.c
+++ b/dwm.c
@@ -2422,25 +2422,13 @@ zoom(const Arg *arg)
pop(c);
}
-/* Make central configuration of dmenu appearance easy by sucking it out
- * of our config.h
- */
void
-setDmenuFlags() {
- const char *dmenu_flags[] = { DMENU_FLAGS, NULL };
- char *dflags = ecalloc(1024, sizeof(char));
- char *tmp = NULL;
- for (int i = 0; i<sizeof(dmenu_flags)/sizeof(dmenu_flags[0]); i++) {
- if (dmenu_flags[i] == NULL)
- break;
- tmp = strdup(dflags);
- sprintf(dflags, "%s %s", tmp, dmenu_flags[i]);
- free(tmp);
- tmp = NULL;
- }
- setenv("DMENU_FLAGS", dflags, 1);
- free(dflags);
- dflags = NULL;
+setDmenuConf() {
+ setenv("DMENU_FONT", dmenufont, 1);
+ setenv("DMENU_NB", col_gray1, 1);
+ setenv("DMENU_NF", col_gray3, 1);
+ setenv("DMENU_SB", col_cyan, 1);
+ setenv("DMENU_SF", col_gray4, 1);
}
int
@@ -2458,7 +2446,7 @@ main(int argc, char *argv[])
FILE *fh;
if ((fh = fopen(".env", "r")))
readEnv(fh);
- setDmenuFlags();
+ setDmenuConf();
setup();
#ifdef __OpenBSD__
if (pledge("stdio rpath proc exec", NULL) == -1)