aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples/data/plugins
diff options
context:
space:
mode:
authorGravatar keis <keijser@gmail.com>2011-01-23 16:59:49 +0100
committerGravatar keis <keijser@gmail.com>2011-01-23 16:59:49 +0100
commitf93cce44561b2475965c91419e72895bc368918e (patch)
tree0ef6146573b6c10bcff1691ac0f6c51c53a37b37 /examples/data/plugins
parent476b539f6c0513ce60bb3c2fafc64d6ca6f6899f (diff)
disable keycmd reset on mode change
* makes history search work * adds new KEYCMD_CLEAR event * configure to clear keycmd on ESCAPE event
Diffstat (limited to 'examples/data/plugins')
-rw-r--r--examples/data/plugins/bind.py3
-rw-r--r--examples/data/plugins/history.py3
-rw-r--r--examples/data/plugins/keycmd.py5
3 files changed, 9 insertions, 2 deletions
diff --git a/examples/data/plugins/bind.py b/examples/data/plugins/bind.py
index bf693b3..261dc5d 100644
--- a/examples/data/plugins/bind.py
+++ b/examples/data/plugins/bind.py
@@ -379,7 +379,6 @@ def mode_changed(uzbl, mode):
if mode != 'stack':
uzbl.bindlet.reset()
- uzbl.clear_keycmd()
def match_and_exec(uzbl, bind, depth, keylet, bindlet):
@@ -470,3 +469,5 @@ def init(uzbl):
'mode_bind': mode_bind,
'bindlet': Bindlet(uzbl),
})
+
+# vi: set et ts=4:
diff --git a/examples/data/plugins/history.py b/examples/data/plugins/history.py
index 78a94ce..2ab2ce3 100644
--- a/examples/data/plugins/history.py
+++ b/examples/data/plugins/history.py
@@ -107,6 +107,7 @@ def history_next(uzbl, _x):
def history_search(uzbl, key):
uzbl.history.search(key)
+ uzbl.send('event HISTORY_PREV')
uzbl.logger.debug('SEARCH %s %s' % (key, uzbl.history))
end_messages = ('Look behind you, A three-headed monkey!', 'error #4: static from nylon underwear.', 'error #5: static from plastic slide rules.', 'error #6: global warming.', 'error #9: doppler effect.', 'error #16: somebody was calculating pi on the server.', 'error #19: floating point processor overflow.', 'error #21: POSIX compliance problem.', 'error #25: Decreasing electron flux.', 'error #26: first Saturday after first full moon in Winter.', 'error #64: CPU needs recalibration.', 'error #116: the real ttys became pseudo ttys and vice-versa.', 'error #229: wrong polarity of neutron flow.', 'error #330: quantum decoherence.', 'error #388: Bad user karma.', 'error #407: Route flapping at the NAP.', 'error #435: Internet shut down due to maintenance.')
@@ -127,3 +128,5 @@ def init(uzbl):
# plugin after hook
def after(uzbl):
uzbl.on_set('keycmd_prompt', lambda uzbl, k, v: uzbl.history.change_prompt(v))
+
+# vi: set et ts=4:
diff --git a/examples/data/plugins/keycmd.py b/examples/data/plugins/keycmd.py
index 2fb2283..928c597 100644
--- a/examples/data/plugins/keycmd.py
+++ b/examples/data/plugins/keycmd.py
@@ -210,7 +210,7 @@ def modkey_addition_parse(uzbl, modkeys):
add_modkey_addition(uzbl, keys[:-1], keys[-1])
-def clear_keycmd(uzbl):
+def clear_keycmd(uzbl, *args):
'''Clear the keycmd for this uzbl instance.'''
k = uzbl.keylet
@@ -493,6 +493,7 @@ def init(uzbl):
'KEYCMD_DELETE': keycmd_delete,
'KEYCMD_EXEC_CURRENT': keycmd_exec_current,
'KEYCMD_STRIP_WORD': keycmd_strip_word,
+ 'KEYCMD_CLEAR': clear_keycmd,
'KEY_PRESS': key_press,
'KEY_RELEASE': key_release,
'MODKEY_ADDITION': modkey_addition_parse,
@@ -514,3 +515,5 @@ def init(uzbl):
'set_cursor_pos': set_cursor_pos,
'set_keycmd': set_keycmd,
})
+
+# vi: set et ts=4: