]> git.armaanb.net Git - bin.git/commitdiff
tmuxt: new script
authorArmaan Bhojwani <me@armaanb.net>
Fri, 18 Jun 2021 22:02:36 +0000 (18:02 -0400)
committerArmaan Bhojwani <me@armaanb.net>
Fri, 18 Jun 2021 22:03:46 +0000 (18:03 -0400)
man/tmuxt.1.scd [new file with mode: 0644]
tmuxt [new file with mode: 0755]

diff --git a/man/tmuxt.1.scd b/man/tmuxt.1.scd
new file mode 100644 (file)
index 0000000..c9d9b97
--- /dev/null
@@ -0,0 +1,16 @@
+tmuxt(1)
+
+# NAME
+tmuxt - launch tmux and close the session when you are complete
+
+# SYNOPSIS
+*tmuxt* [tmux options]
+
+# DESCRIPTION
+Wrapper script around tmux to prevent sessions from piling up. Creates a new
+session named the pid of the tmuxt process, and kills it when the process emits
+the EXIT signal. All command line arguments are passed directly to tmux.
+
+# COPYRIGHT
+This is free and unencumbered software released into the public domain. For more
+information, please refer to <https://unlicense.org/>.
\ No newline at end of file
diff --git a/tmuxt b/tmuxt
new file mode 100755 (executable)
index 0000000..17e8a72
--- /dev/null
+++ b/tmuxt
@@ -0,0 +1,4 @@
+#!/usr/bin/env sh
+
+trap "tmux kill-session -t $$" EXIT
+st -e tmux new-session -s $$ $@