summary refs log tree commit diff stats
path: root/examples
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2012-12-03 23:00:23 +0100
committerhut <hut@lavabit.com>2012-12-04 23:32:21 +0100
commitca1a5d21e6564c022b810c4f52daf61fc4f3ea30 (patch)
tree06a7779a2ed348eb93b71ca84f0b36bad1fcbabd /examples
parent7836af4f970a8f2b7782dc21e16540da57279c69 (diff)
downloadranger-ca1a5d21e6564c022b810c4f52daf61fc4f3ea30.tar.gz
updated man page, improved hooks
Diffstat (limited to 'examples')
-rw-r--r--examples/plugin_chmod_keybindings.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/plugin_chmod_keybindings.py b/examples/plugin_chmod_keybindings.py
index c04cc492..62ca6c58 100644
--- a/examples/plugin_chmod_keybindings.py
+++ b/examples/plugin_chmod_keybindings.py
@@ -2,11 +2,11 @@
 # It could replace the ten lines in the rc.conf that create the key bindings
 # for the "chmod" command.
 
-import ranger.core.fm
-old_init_hook = ranger.core.fm.init_hook
+import ranger.api
+old_hook_init = ranger.api.hook_init
 
-def init_hook(fm):
-	old_init_hook(fm)
+def hook_init(fm):
+	old_hook_init(fm)
 
 	# Generate key bindings for the chmod command
 	command = "map {0}{1}{2} shell -d chmod {1}{0}{2} %s"
@@ -15,4 +15,4 @@ def init_hook(fm):
 			fm.execute_console(command.format('-', mode, perm))
 			fm.execute_console(command.format('+', mode, perm))
 
-ranger.core.fm.init_hook = init_hook
+ranger.api.hook_init = hook_init