Debian Codegraph @

lib/awful/hotkeys_popup/keys/termite.lua

raw
1 ---------------------------------------------------------------------------
2 --- Termite hotkeys for awful.hotkeys_widget
3 --
4 -- @author ikselven
5 -- @copyright 2017 ikselven
6 -- @submodule awful.hotkeys_popup
7 ---------------------------------------------------------------------------
8
9 local hotkeys_popup = require("awful.hotkeys_popup.widget")
10
11 local termite_rule = { class = "Termite" }
12 for group_name, group_data in pairs({
13 ["termite: Insert Mode"] = { color = "#35A91E", rule = termite_rule },
14 ["termite: Selection Mode"] = { color = "#35A91E", rule = termite_rule },
15 }) do
16 hotkeys_popup.add_group_rules(group_name, group_data)
17 end
18
19 local termite_keys = {
20
21 ["termite: Insert Mode"] = {{
22 modifiers = { "Ctrl" },
23 keys = {
24 Tab = "start scrollback completion",
25 ["+"] = "increase font size",
26 ["-"] = "decrease font size",
27 ["="] = "reset font size to default"
28 }
29 }, {
30 modifiers = { "Shift" },
31 keys = {
32 PageUp = "scroll up a page",
33 PageDown = "scroll down a page"
34 }
35 },{
36 modifiers = { "Ctrl", "Shift" },
37 keys = {
38 x = "activate url hints mode",
39 r = "reload configuration file",
40 c = "copy to CLIPBOARD",
41 v = "paste from CLIPBOARD",
42 u = "unicode input (standard GTK binding)",
43 Space = "enter selection mode",
44 t = "open a new terminal in the current directory",
45 Up = "scroll up a line",
46 Down = "scroll down a line"
47 }
48 }},
49
50 ["termite: Selection Mode"] = {{
51 modifiers = {},
52 keys = {
53 q = "enter insert mode",
54 Esc = "enter insert mode",
55 x = "activate url hints mode",
56 v = "visual mode",
57 hjkl = "move cursor left/down/up/right",
58 w = "forward word",
59 e = "forward to end of word",
60 b = "backward word",
61 ["0"] = "move cursor to first column in the row",
62 Home = "move cursor to first column in the row",
63 ["^"] = "beginning-of-line (first non-blank character)",
64 ["$"] = "end-of-line",
65 End = "end-of-line",
66 g = "jump to start of first row",
67 y = "copy to CLIPBOARD",
68 ["/"] = "forward search",
69 ["?"] = "reverse search",
70 u = "forward url search",
71 o = "open the current selection as a url",
72 Return = "open the current selection as a url and enter insert mode",
73 n = "next search match"
74 }
75 }, {
76 modifiers = { "Shift" },
77 keys = {
78 v = "visual line mode",
79 Right = "forward word",
80 Left = "backward word",
81 w = "forward WORD (non-whitespace)",
82 e = "forward to end of WORD (non-whitespace)",
83 b = "backward WORD (non-whitespace)",
84 h = "jump to the top of the screen",
85 m = "jump to the middle of the screen",
86 l = "jump to the bottom of the screen",
87 g = "jump to start of last row",
88 u = "reverse url search",
89 n = "previous search match"
90 }
91 }, {
92 modifiers = { "Ctrl" },
93 keys = {
94 ["["] = "enter insert mode",
95 v = "visual block mode",
96 Right = "forward WORD (non-whitespace)",
97 Left = "backward WORD (non-whitespace)",
98 u = "move cursor a half screen up",
99 d = "move cursor a half screen down",
100 b = "move cursor a full screen up (back)",
101 f = "move cursor a full screen down (forward)"
102 }
103 }}
104 }
105
106 hotkeys_popup.add_hotkeys(termite_keys)
107
108 -- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80