aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
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