aboutsummaryrefslogtreecommitdiff
path: root/tmux/bin/tmux.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tmux/bin/tmux.sh')
-rw-r--r--tmux/bin/tmux.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/tmux/bin/tmux.sh b/tmux/bin/tmux.sh
new file mode 100644
index 00000000..bbe11636
--- /dev/null
+++ b/tmux/bin/tmux.sh
@@ -0,0 +1,11 @@
+#
+# Simple wrapper to force acting only as client; can't do anything if the
+# server isn't actually running. The correct way to do this is of course
+# socket activation, but Debian's version doesn't have --enable-systemd yet.
+# This will do fine in the meantime.
+#
+if ! systemctl --user is-active --quiet tmux.service ; then
+ printf >&2 'tmux: server not running\n'
+ exit
+fi
+exec /usr/bin/tmux "$@"