From 5ebfa20f02377ac52abb1b3b7e0937795a336c63 Mon Sep 17 00:00:00 2001 From: dabruh <11458706-dabruh@users.noreply.gitlab.com> Date: Mon, 27 Jun 2022 12:24:29 +0200 Subject: [PATCH] Tmux session creation/attaching script. --- .local/bin/t | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100755 .local/bin/t diff --git a/.local/bin/t b/.local/bin/t new file mode 100755 index 0000000..9597112 --- /dev/null +++ b/.local/bin/t @@ -0,0 +1,6 @@ +#!/bin/bash + +EXISTS=false +tmux ls | cut -d: -f1 | grep -q "^${1:?}$" && EXISTS=true +$EXISTS && tmux a -t "$1" +$EXISTS || tmux new -s "$1"