1
0
mirror of https://github.com/tiyn/dmenu.git synced 2025-10-18 22:01:20 +02:00

3 Commits

Author SHA1 Message Date
da58be345f making tab and shift tab cycle suggestions 2023-11-06 00:52:48 +01:00
d600a9c974 updated repository title in readme 2023-10-24 06:10:20 +02:00
b5b811e19e removed unneeded config.h file 2023-10-24 03:37:31 +02:00
3 changed files with 20 additions and 57 deletions

View File

@@ -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`

View File

@@ -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
View File

@@ -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: