mirror of
https://codeberg.org/dwl/dwl.git
synced 2025-12-18 19:03:18 +00:00
Updated modes (markdown)
parent
0c80dc37d1
commit
faa0187927
8
modes.md
8
modes.md
@ -1,6 +1,10 @@
|
||||
### Description
|
||||
Implement modes, default mode is NORMAL
|
||||
|
||||
### Example
|
||||
|
||||
In the example below, you declare a mode: `BROWSER`, which is activated when you press <kbd>modkey</kbd> + <kbd>b</kbd>. Then, you can press <kbd>f</kbd> to launch `Firefox` and return to the default `NORMAL` mode.
|
||||
|
||||
```
|
||||
enum {
|
||||
BROWSER,
|
||||
@ -19,10 +23,6 @@ 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_b, spawn, SHCMD("brave") } },
|
||||
{ BROWSER, { 0, XKB_KEY_b, entermode, {.i = NORMAL} } },
|
||||
{ BROWSER, { 0, XKB_KEY_g, spawn, SHCMD("google-chrome-stable") } },
|
||||
{ BROWSER, { 0, XKB_KEY_g, entermode, {.i = NORMAL} } },
|
||||
{ BROWSER, { 0, XKB_KEY_Escape, entermode, {.i = NORMAL} } },
|
||||
};
|
||||
```
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user