From bd5eff8bce621eb2538056637d7f2a95de41ee54 Mon Sep 17 00:00:00 2001 From: Ismo Vuorinen Date: Mon, 29 Dec 2025 10:53:56 +0200 Subject: [PATCH] chore(tmux): switch to gum based sesh filter --- config/asdf/golang-packages | 2 ++ config/tmux/sesh-gum.sh | 18 ++++++++++++++++++ config/tmux/tmux.conf | 15 +++------------ 3 files changed, 23 insertions(+), 12 deletions(-) create mode 100755 config/tmux/sesh-gum.sh diff --git a/config/asdf/golang-packages b/config/asdf/golang-packages index 55d6919..7954aef 100644 --- a/config/asdf/golang-packages +++ b/config/asdf/golang-packages @@ -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 diff --git a/config/tmux/sesh-gum.sh b/config/tmux/sesh-gum.sh new file mode 100755 index 0000000..7a9db65 --- /dev/null +++ b/config/tmux/sesh-gum.sh @@ -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 diff --git a/config/tmux/tmux.conf b/config/tmux/tmux.conf index cc2323d..58d067a 100644 --- a/config/tmux/tmux.conf +++ b/config/tmux/tmux.conf @@ -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"