From f116d6663137e00342d47d2ca7aefc5198403297 Mon Sep 17 00:00:00 2001 From: Tama McGlinn Date: Mon, 3 Oct 2022 10:48:40 +0200 Subject: [PATCH] Make new tab on RogueConnect optional, non-default Fixes #75 --- wemux | 5 ++++- wemux.conf.example | 6 ++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/wemux b/wemux index c575455..f33dfb1 100755 --- a/wemux +++ b/wemux @@ -53,6 +53,7 @@ socket_prefix="/tmp/wemux" options="-u" allow_pair_mode="true" allow_rogue_mode="true" +spawn_window_on_rogue_connect="false" default_client_mode="mirror" allow_kick_user="true" allow_server_change="false" @@ -550,7 +551,9 @@ client_mode() { $wemux attach -t $client_session elif session_exists; then $wemux new-session -d -t $server -s $client_session - $wemux new-window -n $username + if [ "$spawn_window_on_rogue_connect" == "true" ]; then + $wemux new-window -n $username + fi $wemux send-keys -t $client_session $@ $wemux attach -t $client_session else diff --git a/wemux.conf.example b/wemux.conf.example index 981495d..0a95b29 100644 --- a/wemux.conf.example +++ b/wemux.conf.example @@ -26,6 +26,12 @@ ## Defaults to "true" # allow_rogue_mode="false" +## When new users connect using `wemux rogue`, give them +## a new window. This can be disorienting for new users, especially when +## you asked them to connect to your session to show them something. +## Defaults to "false" +# spawn_window_on_rogue_connect="true" + ## When clients enter 'wemux' with no arguments by default it will attempt to ## join an existing pair mode session, if there is no pair session it will start ## a mirror mode session.