Skip to content

Instantly share code, notes, and snippets.

View gabebw's full-sized avatar

Gabe Berke-Williams gabebw

View GitHub Profile
@jyurek
jyurek / tm.sh
Last active April 25, 2025 04:13
Create and switch sessions in tmux quickly
#!/bin/sh
tm() {
if [ -z $1 ]; then
tmux switch-client -l
else
if [ -z "$TMUX" ]; then
tmux new-session -As $1
else
if ! tmux has-session -t $1 2>/dev/null; then
TMUX= tmux new-session -ds $1