From 3aa8bd8ff14cc9895c64ebd65934124bd461f239 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Jane=C5=BEi=C4=8D?= Date: Wed, 10 Dec 2025 09:08:06 +0100 Subject: [PATCH] feat(tmux): update tmux config and scripts --- tmux/tmux-ggclone | 8 +++++--- tmux/tmux-sessionizer | 8 ++------ tmux/tmux-ssher | 2 +- tmux/tmux.conf | 10 ++++++---- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/tmux/tmux-ggclone b/tmux/tmux-ggclone index 0bc6569..0e2114e 100755 --- a/tmux/tmux-ggclone +++ b/tmux/tmux-ggclone @@ -5,12 +5,14 @@ source "$XDG_CONFIG_HOME/zsh/scripts.zsh" if [[ $# -eq 1 ]]; then selected=$1 else - read -p "ssh url: " selected + read -p "url: " selected fi if [[ -z $selected ]]; then exit 0 fi -ggman clone "$selected" -ggcompile +ggman clone $selected + +echo "" +read -p "press enter to continue..." diff --git a/tmux/tmux-sessionizer b/tmux/tmux-sessionizer index 153141b..edab443 100755 --- a/tmux/tmux-sessionizer +++ b/tmux/tmux-sessionizer @@ -3,7 +3,7 @@ if [[ $# -eq 1 ]]; then selected=$1 else - selected=$(ggman exec pwd 2>&1 >/dev/null \ + selected=$(ggman ls \ | fzf --cycle \ --bind 'tab:toggle-up,btab:toggle-down' \ --header "Navigate with ARROW KEYS or TAB/S-TAB. Select with ENTER." \ @@ -18,12 +18,8 @@ if [[ -z $selected ]]; then exit 0 fi -path=$selected -while [[ "$path" != "" && ! -e "$path/.sessionizer" ]]; do - path=${path%/*} -done +selected_name="$(echo $selected | shasum -a 256 | head -c 4)_$(basename $selected | tr . _ | head -c 10)" -selected_name="$(cat $path/.sessionizer)_$(basename $selected | tr . _ | head -c 10)_$(echo $selected | shasum -a 256 | head -c 4)" tmux_running=$(pgrep tmux) if [[ -z $TMUX ]] && [[ -z $tmux_running ]]; then diff --git a/tmux/tmux-ssher b/tmux/tmux-ssher index e48dd3b..91ead86 100755 --- a/tmux/tmux-ssher +++ b/tmux/tmux-ssher @@ -44,7 +44,7 @@ function main() { if [[ $# -eq 1 ]]; then selected=$1 else - selected="$(rg -N --no-heading 'Host .*' ~/.ssh \ + selected="$(rg -N --no-heading '^Host .*' ~/.ssh \ | sed 's/Host \(.*\)/\1/' \ | SHELL=$(which bash) fzf --cycle \ --bind 'tab:toggle-up,btab:toggle-down' \ diff --git a/tmux/tmux.conf b/tmux/tmux.conf index b19603e..9c1db49 100644 --- a/tmux/tmux.conf +++ b/tmux/tmux.conf @@ -1,17 +1,19 @@ set -g default-terminal "xterm-256color" -set -ag terminal-overrides ",xterm-256color:RGB" +set -ga terminal-overrides ",xterm-256color:RGB" +set -ga terminal-features ",xterm-256color:clipboard" + +set -g allow-passthrough on +set -g set-clipboard on set -s escape-time 0 -set-option -g focus-events on - unbind C-b set-option -g prefix C-s bind r source-file "$XDG_CONFIG_HOME/tmux/tmux.conf" set -g base-index 1 -set -g status-style 'bg=#45403d fg=#d4be98' +set -g status-style 'bg=default fg=default' set -g status-left-length 20 set-window-option -g mode-keys vi