Debian Codegraph @

obvious/keymap_switch/readme.md

raw symbols SCIP
1 Keymap Widget
2 =============
3
4 This widget shows the current keyboard layout.
5
6 To add this widget to your configuration, insert
7
8 ```lua
9 local keymap_switch = require("obvious.keymap_switch")
10 ```
11
12 into the top of your rc.lua and add `keymap_switch()` to your wibox.
13
14 This widget provides some options:
15 * `keymap_switch.set_layouts(layouts_table)` where `layouts_table` is
16 a simple table of input strings to setxkbmap. For example, to allow the
17 widget to switch between Qwerty and Dvorak, the call would look like:
18
19 ```lua
20 keymap_switch.set_layouts({ "us", "us(dvorak)" })
21 ```