70 lines
2.5 KiB
Diff
70 lines
2.5 KiB
Diff
diff --git a/config.def.h b/config.def.h
|
|
index 1edb647..81cc894 100644
|
|
--- a/config.def.h
|
|
+++ b/config.def.h
|
|
@@ -2,19 +2,23 @@
|
|
/* Default settings; can be overriden by command line. */
|
|
|
|
static int topbar = 1; /* -b option; if 0, dmenu appears at bottom */
|
|
+static int centered = 1; /* -c option; centers dmenu on screen */
|
|
+static int min_width = 500; /* minimum width when centered */
|
|
+static const float menu_height_ratio = 2.0f; /* This is the ratio used in the original calculation */
|
|
/* -fn option overrides fonts[0]; default X11 font or font set */
|
|
-static const char *fonts[] = {
|
|
- "monospace:size=10"
|
|
-};
|
|
-static const char *prompt = NULL; /* -p option; prompt to the left of input field */
|
|
+#define MAIN_FONT "JetBainsMono Nerd Font Mono:size=14"
|
|
+static const char *fonts[] = { MAIN_FONT };
|
|
+static const char *prompt = NULL; /* -p option; prompt to the left of input field */
|
|
static const char *colors[SchemeLast][2] = {
|
|
/* fg bg */
|
|
[SchemeNorm] = { "#bbbbbb", "#222222" },
|
|
[SchemeSel] = { "#eeeeee", "#005577" },
|
|
[SchemeOut] = { "#000000", "#00ffff" },
|
|
+ [SchemePrompt] = { "#444444", "#222222" },
|
|
};
|
|
-/* -l option; if nonzero, dmenu uses vertical list with given number of lines */
|
|
+/* -l and -g options; controls number of lines and columns in grid if > 0 */
|
|
static unsigned int lines = 0;
|
|
+static unsigned int columns = 0;
|
|
|
|
/*
|
|
* Characters not considered part of a word while deleting words
|
|
diff --git a/dmenu.1 b/dmenu.1
|
|
index ed0e442..7568fa7 100644
|
|
--- a/dmenu.1
|
|
+++ b/dmenu.1
|
|
@@ -4,6 +4,8 @@ dmenu \- dynamic menu
|
|
.SH SYNOPSIS
|
|
.B dmenu
|
|
.RB [ \-bfiv ]
|
|
+.RB [ \-g
|
|
+.IR columns ]
|
|
.RB [ \-l
|
|
.IR lines ]
|
|
.RB [ \-m
|
|
@@ -44,6 +46,9 @@ which lists programs in the user's $PATH and runs the result in their $SHELL.
|
|
.B \-b
|
|
dmenu appears at the bottom of the screen.
|
|
.TP
|
|
+.B \-c
|
|
+dmenu appears centered on the screen.
|
|
+.TP
|
|
.B \-f
|
|
dmenu grabs the keyboard before reading stdin if not reading from a tty. This
|
|
is faster, but will lock up X until stdin reaches end\-of\-file.
|
|
@@ -51,8 +56,11 @@ is faster, but will lock up X until stdin reaches end\-of\-file.
|
|
.B \-i
|
|
dmenu matches menu items case insensitively.
|
|
.TP
|
|
+.BI \-g " columns"
|
|
+dmenu lists items in a grid with the given number of columns.
|
|
+.TP
|
|
.BI \-l " lines"
|
|
-dmenu lists items vertically, with the given number of lines.
|
|
+dmenu lists items in a grid with the given number of lines.
|
|
.TP
|
|
.BI \-m " monitor"
|
|
dmenu is displayed on the monitor number supplied. Monitor numbers are starting
|