From 451e67e609d2ab73f8dcb87ab3a4a028e1aabb43 Mon Sep 17 00:00:00 2001 From: Huck Boles Date: Fri, 12 May 2023 22:08:20 -0500 Subject: [PATCH] update to 2.0 --- README | 18 ++++++++++++++++++ zshmux.zsh => zshmux.sh | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 README rename zshmux.zsh => zshmux.sh (99%) diff --git a/README b/README new file mode 100644 index 0000000..a10c5f6 --- /dev/null +++ b/README @@ -0,0 +1,18 @@ +## zshmux 2.0 + +### about +when a new shell is launched zshmux checks if there are any tmux sessions. +if you are not already in a tmux session zshmux will list all currently active sessions, +then ask if you want to attach a currently running session, or make a new session in the shell. +if there is only one tmux session running and not attached to any clients, zshmux +will just automatically attach the session to the current shell. + +### using +- add `[[ -d PATH/TO/ZSHMUX ]] && source PATH/TO/ZSHMUX/zshmux.sh` in your .zshrc +- open a new shell + +### other shells +zshmux should work with any bash compliant shell, as it no longer implements any zsh specific functions. + +### installation +download or clone this repo and move `zshmux.zsh` to desired directory. then source in your `.shellrc` diff --git a/zshmux.zsh b/zshmux.sh similarity index 99% rename from zshmux.zsh rename to zshmux.sh index f82c848..072b591 100644 --- a/zshmux.zsh +++ b/zshmux.sh @@ -1,4 +1,4 @@ -#!/bin/zsh +#!/bin/bash # start tmux server if it's not already running [[ ! $(pgrep tmux) ]] && tmux start -- 2.44.2