Reattach tmux sessions on alacritty start

This commit is contained in:
Fabian Ising committed 2022-10-24 12:53:54 +02:00
1 parent b4d81ec06a
commit ebd8e331d6
2 files changed
+19 -2

No files matched your search

+13
View File
@@ -0,0 +1,13 @@
#!/bin/bash
#
# tmux-attach - attach to first unattached session or
# create new session if none are found
#
N=$(tmux ls | grep -v attached | head -1 | cut -d: -f1)
if [[ ! -z $N ]]
then
ATTACH_OPTS="attach -t $N"
fi
exec tmux $ATTACH_OPTS