mirror of
https://github.com/mintycube/dmenu.git
synced 2024-10-22 12:05:48 +00:00
alpha: repurposing the -o option to enable or disable alpha ref. #4
This commit is contained in:
parent
c70b92c85c
commit
1d200d199b
@ -3,7 +3,7 @@
|
||||
|
||||
static int topbar = 1; /* -b option; if 0, dmenu appears at bottom */
|
||||
#if ALPHA_PATCH
|
||||
static double opacity = 1.0; /* -o option; defines alpha translucency */
|
||||
static int opacity = 1; /* -o option; if 0, then alpha is disabled */
|
||||
#endif // ALPHA_PATCH
|
||||
#if FUZZYMATCH_PATCH
|
||||
static int fuzzy = 1; /* -F option; if 0, dmenu doesn't use fuzzy matching */
|
||||
|
6
dmenu.c
6
dmenu.c
@ -1312,7 +1312,7 @@ xinitvisual()
|
||||
|
||||
XFree(infos);
|
||||
|
||||
if (! visual) {
|
||||
if (!visual || !opacity) {
|
||||
visual = DefaultVisual(dpy, screen);
|
||||
depth = DefaultDepth(dpy, screen);
|
||||
cmap = DefaultColormap(dpy, screen);
|
||||
@ -1900,8 +1900,8 @@ main(int argc, char *argv[])
|
||||
else if (!strcmp(argv[i], "-m"))
|
||||
mon = atoi(argv[++i]);
|
||||
#if ALPHA_PATCH
|
||||
else if (!strcmp(argv[i], "-o")) /* opacity */
|
||||
opacity = atof(argv[++i]);
|
||||
else if (!strcmp(argv[i], "-o")) /* opacity, pass -o 0 to disable alpha */
|
||||
opacity = atoi(argv[++i]);
|
||||
#endif // ALPHA_PATCH
|
||||
else if (!strcmp(argv[i], "-p")) /* adds prompt to left of input field */
|
||||
prompt = argv[++i];
|
||||
|
Loading…
x
Reference in New Issue
Block a user