commit 97f6d3ef8e63ca1d0569cd94565daf4017557682
parent 506bff1a89961b657a6fc6638fbae317d59f1d85
Author: Hayden Hamilton <hayden@haydenvh.com>
Date: Sat, 28 Dec 2019 00:20:43 +0000
I guess I just had to make some random dots. - Hid the selection
Diffstat:
5 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/.dmenu.c.swo b/.dmenu.c.swo
Binary files differ.
diff --git a/.dmenu.c.swp b/.dmenu.c.swp
Binary files differ.
diff --git a/LICENSE b/LICENSE
@@ -10,6 +10,7 @@ MIT/X Consortium License
© 2010-2012 Connor Lane Smith <cls@lubutu.com>
© 2014-2019 Hiltjo Posthuma <hiltjo@codemadness.org>
© 2015-2019 Quentin Rameau <quinq@fifth.space>
+© 2019 Forked by Hayden Hamilton <hayden@haydenvh.com>
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
diff --git a/config.h b/config.h
@@ -16,10 +16,10 @@ static const char *colors[SchemeLast][2] = {
[SchemeNorm] = { "#ffffff", "#0c0a14" },
[SchemeSel] = { "#ffffff", "#0a3439" },
[SchemeOut] = { "#000000", "#00ffff" },
- [SchemeMid] = { "#ffffff", "#090711" },
+ [SchemeMid] = { "#ffffff", "#0c0a14" },
};
/* -l option; if nonzero, dmenu uses vertical list with given number of lines */
-static unsigned int lines = 0;
+static unsigned int lines=20;
/*
* Characters not considered part of a word while deleting words
diff --git a/dmenu.c b/dmenu.c
@@ -130,6 +130,7 @@ cistrstr(const char *s, const char *sub)
static int
drawitem(struct item *item, int x, int y, int w)
{
+ char *censort;
if (item == sel)
drw_setscheme(drw, scheme[SchemeSel]);
else if (item->left == sel || item->right == sel)
@@ -139,7 +140,13 @@ drawitem(struct item *item, int x, int y, int w)
else
drw_setscheme(drw, scheme[SchemeNorm]);
- return drw_text(drw, x, y, w, bh, lrpad / 2, item->text, 0);
+ if (passwd) {
+ int r=rand();
+ censort = ecalloc(1, sizeof(text));
+ memset(censort, '.', (r % 50)+25);
+ drw_text(drw, x, y, w, bh, lrpad / 2, censort, 0);
+ free(censort);
+ } else return drw_text(drw, x, y, w, bh, lrpad / 2, item->text, 0);
}
static void