Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
b76632b9e3 | |||
f8f5b27036 | |||
d6bf35caad | |||
507c030b5b | |||
0245394e4d |
1
.hgtags
1
.hgtags
@ -17,3 +17,4 @@ dcc5427f99f51a978386a0dd770467cd911ac84b 1.6
|
|||||||
58dbef4aef3d45c7a3da6945e53c9667c0f02d5b 1.7
|
58dbef4aef3d45c7a3da6945e53c9667c0f02d5b 1.7
|
||||||
3696d77aaf02f5d15728dde3b9e35abcaf291496 1.7.1
|
3696d77aaf02f5d15728dde3b9e35abcaf291496 1.7.1
|
||||||
d3e6fa22ae45b38b1bdb0d813390365e5930360b 1.8
|
d3e6fa22ae45b38b1bdb0d813390365e5930360b 1.8
|
||||||
|
c7f5f4d543170f03d70468e98a3a0ec8d2c4161b 1.9
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# dmenu version
|
# dmenu version
|
||||||
VERSION = 1.9
|
VERSION = 2.0
|
||||||
|
|
||||||
# Customize below to fit your system
|
# Customize below to fit your system
|
||||||
|
|
||||||
|
4
dmenu.1
4
dmenu.1
@ -69,12 +69,12 @@ Select the first/last item.
|
|||||||
.B Tab (Control-i)
|
.B Tab (Control-i)
|
||||||
Copy the selected item to the input field.
|
Copy the selected item to the input field.
|
||||||
.TP
|
.TP
|
||||||
.B Return
|
.B Return (Control-j)
|
||||||
Confirm selection and quit (print the selected item to standard output). Returns
|
Confirm selection and quit (print the selected item to standard output). Returns
|
||||||
.B 0
|
.B 0
|
||||||
on termination.
|
on termination.
|
||||||
.TP
|
.TP
|
||||||
.B Shift-Return (Control-j)
|
.B Shift-Return (Control-Shift-j)
|
||||||
Confirm selection and quit (print the text in the input field to standard output).
|
Confirm selection and quit (print the text in the input field to standard output).
|
||||||
Returns
|
Returns
|
||||||
.B 0
|
.B 0
|
||||||
|
8
dmenu.h
8
dmenu.h
@ -5,10 +5,10 @@
|
|||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
|
|
||||||
#define FONT "-*-fixed-medium-r-normal-*-13-*-*-*-*-*-*-*"
|
#define FONT "-*-fixed-medium-r-normal-*-13-*-*-*-*-*-*-*"
|
||||||
#define NORMBGCOLOR "#333366"
|
#define NORMBGCOLOR "#eeeeee"
|
||||||
#define NORMFGCOLOR "#cccccc"
|
#define NORMFGCOLOR "#222222"
|
||||||
#define SELBGCOLOR "#666699"
|
#define SELBGCOLOR "#006699"
|
||||||
#define SELFGCOLOR "#eeeeee"
|
#define SELFGCOLOR "#ffffff"
|
||||||
#define SPACE 30 /* px */
|
#define SPACE 30 /* px */
|
||||||
|
|
||||||
/* color */
|
/* color */
|
||||||
|
8
main.c
8
main.c
@ -28,7 +28,7 @@ struct Item {
|
|||||||
|
|
||||||
static char text[4096];
|
static char text[4096];
|
||||||
static char *prompt = NULL;
|
static char *prompt = NULL;
|
||||||
static int mx, my, mw, mh;
|
static int mw, mh;
|
||||||
static int ret = 0;
|
static int ret = 0;
|
||||||
static int nitem = 0;
|
static int nitem = 0;
|
||||||
static unsigned int cmdw = 0;
|
static unsigned int cmdw = 0;
|
||||||
@ -350,7 +350,7 @@ main(int argc, char *argv[]) {
|
|||||||
char *selbg = SELBGCOLOR;
|
char *selbg = SELBGCOLOR;
|
||||||
char *selfg = SELFGCOLOR;
|
char *selfg = SELFGCOLOR;
|
||||||
fd_set rd;
|
fd_set rd;
|
||||||
int i, j;
|
int i, j, my;
|
||||||
struct timeval timeout;
|
struct timeval timeout;
|
||||||
Item *itm;
|
Item *itm;
|
||||||
XEvent ev;
|
XEvent ev;
|
||||||
@ -431,12 +431,12 @@ main(int argc, char *argv[]) {
|
|||||||
wa.override_redirect = 1;
|
wa.override_redirect = 1;
|
||||||
wa.background_pixmap = ParentRelative;
|
wa.background_pixmap = ParentRelative;
|
||||||
wa.event_mask = ExposureMask | ButtonPressMask | KeyPressMask;
|
wa.event_mask = ExposureMask | ButtonPressMask | KeyPressMask;
|
||||||
mx = my = 0;
|
my = 0;
|
||||||
mw = DisplayWidth(dpy, screen);
|
mw = DisplayWidth(dpy, screen);
|
||||||
mh = dc.font.height + 2;
|
mh = dc.font.height + 2;
|
||||||
if(bottom)
|
if(bottom)
|
||||||
my += DisplayHeight(dpy, screen) - mh;
|
my += DisplayHeight(dpy, screen) - mh;
|
||||||
win = XCreateWindow(dpy, root, mx, my, mw, mh, 0,
|
win = XCreateWindow(dpy, root, 0, 0, mw, mh, 0,
|
||||||
DefaultDepth(dpy, screen), CopyFromParent,
|
DefaultDepth(dpy, screen), CopyFromParent,
|
||||||
DefaultVisual(dpy, screen),
|
DefaultVisual(dpy, screen),
|
||||||
CWOverrideRedirect | CWBackPixmap | CWEventMask, &wa);
|
CWOverrideRedirect | CWBackPixmap | CWEventMask, &wa);
|
||||||
|
Reference in New Issue
Block a user