aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorFilipp Lepalaan <filipp@mac.com>2017-01-04 11:24:16 +0200
committerFilipp Lepalaan <filipp@mac.com>2017-01-04 11:24:16 +0200
commit532bc175b9016daff1a5465122bd8268072ee8f8 (patch)
treeedd26bae223f9445b3b1135f81115ba0601eba5f /README.md
parentdd30b337f30f226d30f6cfc533ae183b79f31844 (diff)
downloadmachammer-532bc175b9016daff1a5465122bd8268072ee8f8.tar.gz
machammer-532bc175b9016daff1a5465122bd8268072ee8f8.tar.bz2
machammer-532bc175b9016daff1a5465122bd8268072ee8f8.zip
Added hooks support
Diffstat (limited to 'README.md')
-rw-r--r--README.md16
1 files changed, 16 insertions, 0 deletions
diff --git a/README.md b/README.md
index 8e4125d..42eb8fb 100644
--- a/README.md
+++ b/README.md
@@ -107,6 +107,22 @@ if __name__ == '__main__':
$ python install.py install_autocad update_render_nodes
```
+### Login hooks and decorators
+
+`machammer` allows you to execute Python code as login hooks. Just use the `@login` decorator on your loginhook function:
+
+
+```python
+from machammer.decorators import login
+
+@login
+def sayhello():
+ import sys
+ import subprocess
+ subprocess.call(['/usr/bin/say', 'Hello ' + sys.argv[1]])
+
+sayhello()
+```
### system_profiler