summaryrefslogtreecommitdiff
path: root/mut/bin/window
diff options
context:
space:
mode:
authorMike Vink <ivi@vinkies.net>2024-01-08 17:47:39 +0100
committerMike Vink <ivi@vinkies.net>2024-01-08 17:47:39 +0100
commit514c905eae8edef22ed7b92f981bdaeaf71b1ef8 (patch)
tree046d873922e3cba49470975ac5079f4917c358cb /mut/bin/window
parente11e6e48a83f65035e1cd2a30254f2ccc24e9aa0 (diff)
some new stuff
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