diff --git a/ssh/rootfs/etc/s6-overlay/s6-rc.d/ttyd/run b/ssh/rootfs/etc/s6-overlay/s6-rc.d/ttyd/run index 41f433092..2ef13908d 100755 --- a/ssh/rootfs/etc/s6-overlay/s6-rc.d/ttyd/run +++ b/ssh/rootfs/etc/s6-overlay/s6-rc.d/ttyd/run @@ -35,5 +35,8 @@ fi # Change working directory cd /root || bashio::exit.nok 'Unable to change working directory' +# Set environment so that we know if we're running under ttyd +export TTYD=1 + # Run the ttyd daemon exec ttyd "${options[@]}" "${ttyd_command[@]}" diff --git a/ssh/rootfs/root/.tmux.conf b/ssh/rootfs/root/.tmux.conf index 42f3a1912..a55c0ab5a 100644 --- a/ssh/rootfs/root/.tmux.conf +++ b/ssh/rootfs/root/.tmux.conf @@ -8,7 +8,9 @@ set -g status-fg white set -g status-bg blue set -g status-left '' set -g status-right '%a %m-%d %H:%M' +if-shell '[ -z "$TTYD" ]' { set -g mouse on +} unbind C-b set-option -g prefix C-a bind-key C-a send-prefix