From 443af22e38d99ec6c18e4af4816a053de2f1964c Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Mon, 16 Mar 2026 22:34:58 +0100 Subject: Update popup tmux --- .config/tmux/popup.sh | 14 ++------------ .config/tmux/tmux.conf | 10 +++++----- 2 files changed, 7 insertions(+), 17 deletions(-) (limited to '.config') diff --git a/.config/tmux/popup.sh b/.config/tmux/popup.sh index 15eed1a..7017cad 100755 --- a/.config/tmux/popup.sh +++ b/.config/tmux/popup.sh @@ -1,13 +1,3 @@ #!/bin/sh -parent=$(tmux display-message -p "#{session_name}") -popup="popup-$parent" - -if tmux has-session -t "$popup" 2>/dev/null; then - tmux attach-session -t "$popup" -else - tmux new-session -s "$popup" \; \ - rename-window "build" \; \ - new-window -n "test" \; \ - new-window -n "repl" \; \ - select-window -t 1 -fi +parent=$(tmux display-message -p '#S') +tmux attach -t "popup-${parent}" 2>/dev/null || tmux new-session -s "popup-${parent}" diff --git a/.config/tmux/tmux.conf b/.config/tmux/tmux.conf index 04618aa..859e56c 100644 --- a/.config/tmux/tmux.conf +++ b/.config/tmux/tmux.conf @@ -105,14 +105,14 @@ set -g detach-on-destroy off bind -N "last-session (via sesh)" L run-shell "sesh last" bind-key T run-shell "sesh connect \"$( - sesh list --icons | grep -v '^popup-' | fzf-tmux -p 80%,70% \ + sesh list --icons | grep -v 'popup-' | fzf-tmux -p 80%,70% \ --no-sort --ansi --border-label ' sesh ' --prompt '⚡ ' \ --header ' ^a all ^t tmux ^g configs ^x zoxide ^d kill ^f find' \ --bind 'tab:down,btab:up' \ - --bind 'ctrl-a:change-prompt(\uf0e7 )+reload(sesh list --icons)' \ - --bind 'ctrl-t:change-prompt(\uf2d2 )+reload(sesh list -t --icons)' \ - --bind 'ctrl-x:change-prompt(\uf013 )+reload(sesh list -z --icons)' \ - --bind 'ctrl-d:execute(tmux kill-session -t {2..})+change-prompt(\uf1f8 )+reload(sesh list --icons)' \ + --bind 'ctrl-a:change-prompt(\uf0e7 )+reload(sesh list --icons | grep -v popup-)' \ + --bind 'ctrl-t:change-prompt(\uf2d2 )+reload(sesh list -t --icons | grep -v popup-)' \ + --bind 'ctrl-x:change-prompt(\uf013 )+reload(sesh list -z --icons | grep -v popup-)' \ + --bind 'ctrl-d:execute(tmux kill-session -t {2..})+change-prompt(\uf1f8 )+reload(sesh list --icons | grep -v popup-)' \ --bind 'ctrl-f:change-prompt(\uf002 )+reload(fd -H -d 2 -t d . ~)' \ --preview 'sesh preview {}' \ --preview-window 'right:55%' -- cgit v1.2.3-70-g09d2