From 8aefadda196f2763a16b8c2dc4f12a5c4467e233 Mon Sep 17 00:00:00 2001 From: yeti Date: Wed, 14 May 2025 07:35:20 +0100 Subject: [PATCH] feat: set EDITOR=nvim before tmux starts inside podman --- home/.config/tmux/tmux.conf.local | 1 - home/start.sh | 2 +- ssh_router.sh | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/home/.config/tmux/tmux.conf.local b/home/.config/tmux/tmux.conf.local index 994c256..62e56c4 100644 --- a/home/.config/tmux/tmux.conf.local +++ b/home/.config/tmux/tmux.conf.local @@ -450,7 +450,6 @@ set -g status-right "#{E:@catppuccin_status_session}" set -g set-clipboard on set -g allow-passthrough on -setw -g mode-keys vi # -- custom variables ---------------------------------------------------------- diff --git a/home/start.sh b/home/start.sh index 4c70220..275bf60 100644 --- a/home/start.sh +++ b/home/start.sh @@ -1,2 +1,2 @@ #!/bin/bash -tmux new-session -s "$1" +EDITOR=nvim tmux new-session -s "$1" diff --git a/ssh_router.sh b/ssh_router.sh index b2245bf..bbb1655 100755 --- a/ssh_router.sh +++ b/ssh_router.sh @@ -150,7 +150,7 @@ rw) # Run tmux session inside the container if ! podman exec -it --user "$DEV_USER" "$WORKSPACE" tmux has-session -t "$TMUX_SESSION" >/dev/null 2>&1; then - if ! podman exec -it --user "$DEV_USER" "$WORKSPACE" tmux new-session -d -s "$TMUX_SESSION" >/dev/null 2>&1; then + if ! podman exec -it -e EDITOR=nvim --user "$DEV_USER" "$WORKSPACE" tmux new-session -d -s "$TMUX_SESSION" >/dev/null 2>&1; then log "❌ Could not create new tmux session. Please contact admin or try again later." exit 1 fi