mirror of
https://codeberg.org/adnano/wmenu.git
synced 2025-11-02 09:01:43 -05:00
Add possibility to use alternative path
This commit is contained in:
parent
fc69aa6e2b
commit
5fa012f9ad
4 changed files with 13 additions and 3 deletions
|
|
@ -10,7 +10,7 @@
|
|||
#include "xdg-activation-v1-client-protocol.h"
|
||||
|
||||
static void read_items(struct menu *menu) {
|
||||
char *path = strdup(getenv("PATH"));
|
||||
char *path = menu->path ? strdup(menu->path) : strdup(getenv("PATH"));
|
||||
for (char *p = strtok(path, ":"); p != NULL; p = strtok(NULL, ":")) {
|
||||
DIR *dir = opendir(p);
|
||||
if (dir == NULL) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue