aboutsummaryrefslogtreecommitdiff
path: root/autostart
diff options
context:
space:
mode:
authorMatias Linares <matiaslina@openmailbox.org>2015-11-22 04:02:19 -0300
committerMatias Linares <matiaslina@openmailbox.org>2015-11-22 04:02:19 -0300
commit13310ee7dce177a24252970f607c08f3d658e676 (patch)
tree225d8c3fff3f033cdd2584e408b19aade31affba /autostart
parent5da38341bc54f24c8cad41f1b63405d8cc955fe7 (diff)
downloaddotwm-13310ee7dce177a24252970f607c08f3d658e676.tar.gz
Add socket functionality.
Something simple, but it works pretty well. The mapping between the strings that comes from the socket and functions, modifiers, keys, etc. needs some rewrite because now there's a manual mapping. The autostart file shows some functionality on how it will work. Since the next_xevent is ticking on 1s, it's preferible to make the writes on the socket all together, otherwise will pass 1 sec between two calls.
Diffstat (limited to 'autostart')
-rwxr-xr-xautostart10
1 files changed, 8 insertions, 2 deletions
diff --git a/autostart b/autostart
index 82cc3f6..1e98405 100755
--- a/autostart
+++ b/autostart
@@ -1,4 +1,10 @@
#!/bin/mksh
-echo -n "hola" | netcat -U ./dotwm.sock
-echo -n "done" | netcat -U ./dotwm.sock
+netcat -U dotwm.sock <<EOF
+add-binding Mod4Mask p exec dmenu_run
+add-binding Mod4Mask h move_win -10 0
+add-binding Mod4Mask j move_win 0 10
+add-binding Mod4Mask k move_win 0 -10
+add-binding Mod4Mask l move_win 10 0
+add-binding Mod4Mask Return exec xterm
+EOF