logo

inaban

Unnamed repository; edit this file 'description' to name the repository.
commit: 33428f55d2190748b52b1d449f2c7a5a69c00899
parent: b665cef11f506e3d60cf446290d1a5aaba84f3cd
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Mon,  1 Jul 2019 09:24:10 +0200

Add program launcher

Diffstat:

Mconfig.h2++
Minaban.c3+++
2 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/config.h b/config.h @@ -1,3 +1,5 @@ #define INABAN_BINDING_MOD WLR_MODIFIER_ALT +#define INABAN_CMD_LAUNCHER "bemenu-run" +#define INABAN_MODBIND_LAUNCHER XKB_KEY_p #define INABAN_MODBIND_SWITCH XKB_KEY_ht #define INABAN_MODBIND_TERMINATE XKB_KEY_Escape diff --git a/inaban.c b/inaban.c @@ -91,6 +91,9 @@ handle_keybinding(struct inaban_server *server, xkb_keysym_t sym) wl_list_remove(&current_view->link); wl_list_insert(server->views.prev, &current_view->link); break; + case INABAN_MODBIND_LAUNCHER: + if(fork() == 0) execl("/bin/sh", "/bin/sh", "-c", INABAN_CMD_LAUNCHER, (void *)NULL); + break; default: return false; } return true;