chore(tmux): switch to gum based sesh filter

This commit is contained in:
2025-12-29 10:53:56 +02:00
parent 2979cc6cfc
commit bd5eff8bce
3 changed files with 23 additions and 12 deletions

View File

@@ -23,5 +23,7 @@ github.com/junegunn/fzf@latest
golang.org/x/tools/gopls@latest
// A language for writing HTML user interfaces in Go.
github.com/a-h/templ/cmd/templ@latest
// A tool for glamorous shell scripts 🎀
github.com/charmbracelet/gum@latest
// A terminal session manager
github.com/joshmedeski/sesh/v2@latest

18
config/tmux/sesh-gum.sh Executable file
View File

@@ -0,0 +1,18 @@
#!/usr/bin/env bash
# Get session list and pipe it to gum for selection
SESH_LIST=$(
sesh list -i \
| gum filter \
--limit 1 \
--no-sort \
--fuzzy \
--placeholder 'Pick a sesh' \
--height 50 \
--prompt='⚡'
)
# If a session was selected, connect to it
if [ "$SESH_LIST" != "" ]; then
sesh connect "$SESH_LIST"
fi

View File

@@ -16,7 +16,6 @@
# -u : Unset the specified option.
set -ag terminal-overrides ",xterm-256color:RGB"
set -ag terminal-features 'xterm-256color:RGB'
# Enable proper color support
set -as terminal-features ",*:RGB"
@@ -30,14 +29,6 @@ set -g set-titles on # Allow tmux to set the terminal title
set -g status on # Setting status on
set -g status-keys vi # vi keys to move between panes
# Activity Monitoring (for when something happens in another pain)
set -g monitor-activity on
set -g visual-activity off
set -g visual-bell off
# A bell in another window should cause a bell in the current window
set -g bell-action any
# Keep Tmux alive when the initial command is finished
set -g remain-on-exit off
@@ -50,7 +41,8 @@ set -g renumber-windows on
# │ Theme │
# ╰──────────────────────────────────────────────────────────╯
set -g status-justify "left"
set -g status-bg default
set -g status-justify left
set -g status-left ''
set -g status-left-length "0"
set -g status-position "bottom"
@@ -60,7 +52,6 @@ set -g status-right-length "50"
#set -g window-status-format ' #I:#W '
set -g @catppuccin_status_background 'none'
set -g @catppuccin_window_flags 'icon'
set -g @catppuccin_status_connect_separator 'no'
set -g @catppuccin_window_text "#T"
set -g @catppuccin_window_current_text "#T"
@@ -97,7 +88,7 @@ unbind p
bind p paste-buffer
# global sessions
bind -N "sesh selection" t run-shell "$HOME/.dotfiles/config/tmux/sesh-tmux.fish"
bind -N "sesh selection" t display-popup -E "$HOME/.dotfiles/config/tmux/sesh-gum.sh"
bind -N "last-session (via sesh) " L run-shell "sesh last"
bind -N "sesh ui" N display-popup -E "sesh ui"