Increased font size for status bar and dmenu.
authorAaron Taylor <ataylor@subgeniuskitty.com>
Fri, 3 Feb 2023 05:35:29 +0000 (21:35 -0800)
committerAaron Taylor <ataylor@subgeniuskitty.com>
Fri, 3 Feb 2023 05:35:29 +0000 (21:35 -0800)
config.h
dwm.c

index 0eb4373..5ea2ecc 100644 (file)
--- a/config.h
+++ b/config.h
@@ -6,8 +6,11 @@ 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 int startontag         = 1;        /* 0 means no tag active on start */
 static const int showbar            = 1;        /* 0 means no bar */
 static const int topbar             = 1;        /* 0 means bottom bar */
 static const int startontag         = 1;        /* 0 means no tag active on start */
-static const char *fonts[]          = { "monospace:size=10" };
-static const char dmenufont[]       = "monospace:size=10";
+static const char *fonts[]          = { "monospace:size=14" };
+// TODO: Make this central definition of the dmenufont apply everywhere. For
+// example, at the moment it does not apply to the dmenu invocations found in
+// quitprompt() and nametag().
+static const char dmenufont[]       = "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_gray1[]       = "#222222";
 static const char col_gray2[]       = "#444444";
 static const char col_gray3[]       = "#bbbbbb";
diff --git a/dwm.c b/dwm.c
index 47237ea..f20ee79 100644 (file)
--- a/dwm.c
+++ b/dwm.c
@@ -1277,7 +1277,9 @@ nametag(const Arg *arg) {
        int i;
 
        errno = 0; // popen(3p) says on failure it "may" set errno
        int i;
 
        errno = 0; // popen(3p) says on failure it "may" set errno
-       if(!(f = popen("dmenu < /dev/null", "r"))) {
+    // TODO: Create a central location for the dmenu font specification.
+    // It should not be hardcoded in multiple locations.
+       if(!(f = popen("dmenu -fn monospace:size=14 < /dev/null", "r"))) {
                fprintf(stderr, "dwm: popen 'dmenu < /dev/null' failed%s%s\n", errno ? ": " : "", errno ? strerror(errno) : "");
                return;
        }
                fprintf(stderr, "dwm: popen 'dmenu < /dev/null' failed%s%s\n", errno ? ": " : "", errno ? strerror(errno) : "");
                return;
        }
@@ -1358,7 +1360,9 @@ quit(const Arg *arg)
 void
 quitprompt(const Arg *arg)
 {
 void
 quitprompt(const Arg *arg)
 {
-       FILE *pp = popen("echo -e \"no\nrestart\nyes\" | dmenu -i -sb red -p \"Quit DWM?\"", "r");
+    // TODO: Create a central location for the dmenu font specification.
+    // It should not be hardcoded in multiple locations.
+       FILE *pp = popen("echo -e \"no\nrestart\nyes\" | dmenu -fn monospace:size=14 -i -sb red -p \"Quit DWM?\"", "r");
        if(pp != NULL) {
                char buf[1024];
                if (fgets(buf, sizeof(buf), pp) == NULL) {
        if(pp != NULL) {
                char buf[1024];
                if (fgets(buf, sizeof(buf), pp) == NULL) {