commit 8af378f8d3805c73fe6a592e3d4a7e7dd1857caa
parent ce289c4b62a3cef77987a9f246d19caa0bd81a70
Author: Matsuda Kenji <contact2655@matsudakenji.xyz>
Date: Thu, 16 Jun 2022 11:15:32 +0900
change suckless
Diffstat:
4 files changed, 91 insertions(+), 9 deletions(-)
diff --git a/suckless/dmenu/config.diff b/suckless/dmenu/config.diff
@@ -0,0 +1,11 @@
+--- config.def.h Thu Nov 18 09:10:09 2021
++++ config.h Thu Jun 16 10:57:09 2022
+@@ -4,7 +4,7 @@
+ static int topbar = 1; /* -b option; if 0, dmenu appears at bottom */
+ /* -fn option overrides fonts[0]; default X11 font or font set */
+ static const char *fonts[] = {
+- "monospace:size=10"
++ "monospace:size=7",
+ };
+ static const char *prompt = NULL; /* -p option; prompt to the left of input field */
+ static const char *colors[SchemeLast][2] = {
diff --git a/suckless/dmenu/dmenu-password-4.7.diff b/suckless/dmenu/dmenu-password-4.7.diff
@@ -0,0 +1,66 @@
+diff -wup a/dmenu.c b/dmenu.c
+--- a/dmenu.c 2017-06-12 00:35:39.814716857 +0200
++++ b/dmenu.c 2017-06-11 23:59:18.794768196 +0200
+@@ -36,7 +36,7 @@ struct item {
+ static char text[BUFSIZ] = "";
+ static char *embed;
+ static int bh, mw, mh;
+-static int inputw = 0, promptw;
++static int inputw = 0, promptw, passwd = 0;
+ static int lrpad; /* sum of left and right padding */
+ static size_t cursor;
+ static struct item *items = NULL;
+@@ -131,6 +131,7 @@ drawmenu(void)
+ unsigned int curpos;
+ struct item *item;
+ int x = 0, y = 0, w;
++ char *censort;
+
+ drw_setscheme(drw, scheme[SchemeNorm]);
+ drw_rect(drw, 0, 0, mw, mh, 1, 1);
+@@ -142,7 +143,12 @@ drawmenu(void)
+ /* draw input field */
+ w = (lines > 0 || !matches) ? mw - x : inputw;
+ drw_setscheme(drw, scheme[SchemeNorm]);
+- drw_text(drw, x, 0, w, bh, lrpad / 2, text, 0);
++ if (passwd) {
++ censort = ecalloc(1, sizeof(text));
++ memset(censort, '.', strlen(text));
++ drw_text(drw, x, 0, w, bh, lrpad / 2, censort, 0);
++ free(censort);
++ } else drw_text(drw, x, 0, w, bh, lrpad / 2, text, 0);
+
+ drw_font_getexts(drw->fonts, text, cursor, &curpos, NULL);
+ if ((curpos += lrpad / 2 - 1) < w) {
+@@ -481,6 +487,11 @@ readstdin(void)
+ size_t i, imax = 0, size = 0;
+ unsigned int tmpmax = 0;
+
++ if (passwd) {
++ inputw = lines = 0;
++ return;
++ }
++
+ /* read each line from stdin and add it to the item list */
+ for (i = 0; fgets(buf, sizeof buf, stdin); i++) {
+ if (i + 1 >= size / sizeof *items)
+@@ -636,7 +647,7 @@ setup(void)
+ static void
+ usage(void)
+ {
+- fputs("usage: dmenu [-bfiv] [-l lines] [-p prompt] [-fn font] [-m monitor]\n"
++ fputs("usage: dmenu [-bfiPv] [-l lines] [-p prompt] [-fn font] [-m monitor]\n"
+ " [-nb color] [-nf color] [-sb color] [-sf color] [-w windowid]\n", stderr);
+ exit(1);
+ }
+@@ -659,7 +670,9 @@ main(int argc, char *argv[])
+ else if (!strcmp(argv[i], "-i")) { /* case-insensitive item matching */
+ fstrncmp = strncasecmp;
+ fstrstr = cistrstr;
+- } else if (i + 1 == argc)
++ } else if (!strcmp(argv[i], "-P")) /* is the input a password */
++ passwd = 1;
++ else if (i + 1 == argc)
+ usage();
+ /* these options take one argument */
+ else if (!strcmp(argv[i], "-l")) /* number of lines in vertical list */
diff --git a/suckless/dwm/config.diff b/suckless/dwm/config.diff
@@ -1,5 +1,5 @@
--- config.def.h Thu Nov 18 08:37:04 2021
-+++ config.h Mon May 2 16:06:58 2022
++++ config.h Tue Jun 14 08:36:53 2022
@@ -1,25 +1,25 @@
/* See LICENSE file for copyright and license details. */
@@ -11,7 +11,7 @@
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:size=7", "Font Awesome 5 Free:size=10", "Font Awesome 5 Brands:size=10", "Noto Color Emoji:size=7", "Noto Sans CJK JP:size=7" };
++static const char *fonts[] = { "DejaVu Sans Mono:size=7", "Noto Serif CJK JP:size=7", "Font Awesome 5 Free:size=7", "Noto Color Emoji:size=7"};
+static const char dmenufont[] = "monospace:size=8";
static const char col_gray1[] = "#222222";
static const char col_gray2[] = "#444444";
@@ -41,7 +41,7 @@
#define TAGKEYS(KEY,TAG) \
{ MODKEY, KEY, view, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
-@@ -57,13 +57,20 @@
+@@ -57,13 +57,21 @@
/* commands */
static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
@@ -60,12 +60,13 @@
+ { MODKEY, XK_n, spawn, SHCMD("jinput") },
{ MODKEY, XK_p, spawn, {.v = dmenucmd } },
- { MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } },
++ { MODKEY|ShiftMask, XK_p, spawn, SHCMD("pass dmenu") },
+ /*{ MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } },*/
+ { MODKEY|ShiftMask, XK_Return, spawn, SHCMD("$TERMINAL") },
{ MODKEY, XK_b, togglebar, {0} },
{ MODKEY, XK_j, focusstack, {.i = +1 } },
{ MODKEY, XK_k, focusstack, {.i = -1 } },
-@@ -95,6 +102,10 @@
+@@ -95,6 +103,10 @@
TAGKEYS( XK_8, 7)
TAGKEYS( XK_9, 8)
{ MODKEY|ShiftMask, XK_q, quit, {0} },
diff --git a/suckless/st/config.diff b/suckless/st/config.diff
@@ -1,13 +1,17 @@
--- config.def.h Mon May 2 15:31:46 2022
-+++ config.h Mon May 2 15:44:15 2022
-@@ -8,8 +8,8 @@
- static char *font = "Liberation Mono:pixelsize=12:antialias=true:autohint=true";
++++ config.h Tue Jun 14 07:22:25 2022
+@@ -5,11 +5,11 @@
+ *
+ * font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html
+ */
+-static char *font = "Liberation Mono:pixelsize=12:antialias=true:autohint=true";
++static char *font = "DejaVu Sans Mono:pixelsize=12:antialias=true:autohint=true";
/* Spare fonts */
static char *font2[] = {
-/* "Inconsolata for Powerline:pixelsize=12:antialias=true:autohint=true", */
-/* "Hack Nerd Font Mono:pixelsize=11:antialias=true:autohint=true", */
-+ "Noto Color Emoji:pixelsize=14:antialias=true:autohint=true",
-+ "Noto Serif CJK JP:pixelsize=14:antialias=true:autohint=true",
++ "Noto Color Emoji:pixelsize=12:antialias=true:autohint=true",
++ "Noto Serif CJK JP:pixelsize=12:antialias=true:autohint=true",
};
static int borderpx = 2;