commit 28f2864a18618e4f8f8ebe7f7538e0e541a095c6
parent e30868384246de263a8e2be5ec4144cb9c8494ba
Author: Bastien Dejean <nihilhill@gmail.com>
Date: Tue, 28 Jan 2014 17:16:04 +0100
Add background shell example
Diffstat:
4 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/examples/background_shell/profile b/examples/background_shell/profile
@@ -0,0 +1 @@
+export SXHKD_SHELL=shell
diff --git a/examples/background_shell/shell b/examples/background_shell/shell
@@ -0,0 +1,4 @@
+#! /bin/sh
+
+printf "%s\n" "$2" | tmux load-buffer -
+tmux paste-buffer -t sxhkd
diff --git a/examples/background_shell/sxhkdrc b/examples/background_shell/sxhkdrc
@@ -0,0 +1,3 @@
+# Reload functions
+super + Escape
+ . "$XDG_CONFIG_HOME"/sxhkd/functions
diff --git a/examples/background_shell/xinitrc b/examples/background_shell/xinitrc
@@ -0,0 +1,5 @@
+if ! tmux has-session -t sxhkd 2> /dev/null ; then
+ tmux new-session -s sxhkd -d
+ printf '%s\n' '. "$XDG_CONFIG_HOME"/sxhkd/functions' | tmux load-buffer -
+ tmux paste-buffer -t sxhkd
+fi