Skip to content
This repository has been archived by the owner on Jan 26, 2024. It is now read-only.
Gean Marroquin edited this page Nov 24, 2023 · 4 revisions

Description

Implement modes, default mode is NORMAL

Example

In the example below, you declare a mode: BROWSER, which is activated when you press modkey + b. Then, you can press f to launch Firefox and return to the default NORMAL mode.

enum {
  BROWSER,
};
const char *modes_labels[] = {
  "browser",
};

static const Key keys[] = {
  // ...
  { MODKEY, XKB_KEY_b, entermode, {.i = BROWSER} },
  // ...
};

static const Modekey modekeys[] = {
  /* mode      modifier                  key                 function        argument */
  { BROWSER, { 0, XKB_KEY_f, spawn, SHCMD("firefox") } },
  { BROWSER, { 0, XKB_KEY_f, entermode, {.i = NORMAL} } },
  { BROWSER, { 0, XKB_KEY_Escape, entermode, {.i = NORMAL} } },
};

Download

Authors

Clone this wiki locally