about summary refs log tree commit diff
path: root/scripts/nsp-console.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/nsp-console.sh')
-rwxr-xr-xscripts/nsp-console.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/nsp-console.sh b/scripts/nsp-console.sh
new file mode 100755
index 0000000..5d19f46
--- /dev/null
+++ b/scripts/nsp-console.sh
@@ -0,0 +1,8 @@
+#!/usr/bin/env bash
+
+if tmux list-sessions | grep -q "scratchpad"
+then
+    tmux attach-session -t "scratchpad"
+else
+    tmux new-session -s "scratchpad" -n "scratchpad" -c "${HOME}"
+fi

Consider giving Nix/NixOS a try! <3