mirror of
https://github.com/tiyn/dmenu.git
synced 2025-10-18 13:51:21 +02:00
Compare commits
3 Commits
8399539551
...
master
Author | SHA1 | Date | |
---|---|---|---|
da58be345f | |||
d600a9c974 | |||
b5b811e19e |
10
README.md
10
README.md
@@ -14,16 +14,6 @@ The list below shows the currently applied patches to this build.
|
||||
|
||||
## Installation
|
||||
|
||||
To install this package you can run several commands.
|
||||
|
||||
### AUR
|
||||
|
||||
Or you can clone it and run it by makepkg.
|
||||
- `git clone https://aur.archlinux.org/dmenu-tiyn-git.git`
|
||||
- `makepkg -sirc`
|
||||
|
||||
### MAKE
|
||||
|
||||
The most basic way is to clone the repository and then invoke make.
|
||||
- `git clone https://github.com/tiyn/dmenu`
|
||||
- `make clean install`
|
||||
|
29
config.h
29
config.h
@@ -1,29 +0,0 @@
|
||||
/* See LICENSE file for copyright and license details. */
|
||||
/* Default settings; can be overriden by command line. */
|
||||
|
||||
static int topbar = 1; /* -b option; if 0, dmenu appears at bottom */
|
||||
static int centered = 0; /* -c option; centers dmenu on screen */
|
||||
static int min_width = 500; /* minimum width when centered */
|
||||
static int fuzzy = 1; /* -F option; if 0, dmenu doesn't use fuzzy matching */
|
||||
/* -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 */
|
||||
static const char *colors[SchemeLast][2] = {
|
||||
/* fg bg */
|
||||
[SchemeNorm] = { "#dfdfdf", "#0e0f14" },
|
||||
[SchemeSel] = { "#eeeeee", "#282828" },
|
||||
[SchemeOut] = { "#eeeeee", "#282828" },
|
||||
};
|
||||
/* -l option; if nonzero, dmenu uses vertical list with given number of lines */
|
||||
static unsigned int lines = 0;
|
||||
|
||||
/*
|
||||
* Characters not considered part of a word while deleting words
|
||||
* for example: " /?\"&[]"
|
||||
*/
|
||||
static const char worddelimiters[] = " ";
|
||||
|
||||
/* Size of the window border */
|
||||
static const unsigned int border_width = 2;
|
38
dmenu.c
38
dmenu.c
@@ -546,7 +546,8 @@ insert:
|
||||
if (lines > 0)
|
||||
return;
|
||||
/* fallthrough */
|
||||
case XK_Up:
|
||||
// case XK_Up:
|
||||
case XK_ISO_Left_Tab:
|
||||
if (sel && sel->left && (sel = sel->left)->right == curr) {
|
||||
curr = prev;
|
||||
calcoffsets();
|
||||
@@ -574,28 +575,29 @@ insert:
|
||||
if (sel)
|
||||
sel->out = 1;
|
||||
break;
|
||||
case XK_Right:
|
||||
if (text[cursor] != '\0') {
|
||||
cursor = nextrune(+1);
|
||||
break;
|
||||
}
|
||||
if (lines > 0)
|
||||
return;
|
||||
/* fallthrough */
|
||||
case XK_Down:
|
||||
// case XK_Right:
|
||||
// if (text[cursor] != '\0') {
|
||||
// cursor = nextrune(+1);
|
||||
// break;
|
||||
// }
|
||||
// if (lines > 0)
|
||||
// return;
|
||||
// /* fallthrough */
|
||||
// case XK_Down:
|
||||
case XK_Tab:
|
||||
if (sel && sel->right && (sel = sel->right) == next) {
|
||||
curr = next;
|
||||
calcoffsets();
|
||||
}
|
||||
break;
|
||||
case XK_Tab:
|
||||
if (!sel)
|
||||
return;
|
||||
strncpy(text, sel->text, sizeof text - 1);
|
||||
text[sizeof text - 1] = '\0';
|
||||
cursor = strlen(text);
|
||||
match();
|
||||
break;
|
||||
// case XK_Tab:
|
||||
// if (!sel)
|
||||
// return;
|
||||
// strncpy(text, sel->text, sizeof text - 1);
|
||||
// text[sizeof text - 1] = '\0';
|
||||
// cursor = strlen(text);
|
||||
// match();
|
||||
// break;
|
||||
}
|
||||
|
||||
draw:
|
||||
|
Reference in New Issue
Block a user