summaryrefslogtreecommitdiff
path: root/mut/bin/window
diff options
context:
space:
mode:
Diffstat (limited to 'mut/bin/window')
-rwxr-xr-xmut/bin/window11
1 files changed, 11 insertions, 0 deletions
diff --git a/mut/bin/window b/mut/bin/window
new file mode 100755
index 0000000..bd40a4c
--- /dev/null
+++ b/mut/bin/window
@@ -0,0 +1,11 @@
+#!/bin/sh
+PIPE=/tmp/window-fifo
+STDIN="$(cat -)"
+rm $PIPE
+mkfifo $PIPE
+echo "$STDIN" | tee $PIPE >/dev/null &
+if command -v st >/dev/null; then
+ st -e sh -c "<$PIPE ${*}" &
+else
+ tmux splitw sh -c "<$PIPE ${*}" &
+fi