1 2 3 4 5 6 7 8
#!/bin/sh if tmux list-sessions | grep "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