omerxx / tmux-floax

The missing floating pane for Tmux
GNU General Public License v3.0
357 stars 20 forks source link

Cannot copy text in floating pane #5

Open Doctor-Scott opened 2 months ago

Doctor-Scott commented 2 months ago

Terminal

Wezterm

shell

zsh

Issue

It seems that no copy command is working within the tmux floating pane. I have tried via the terminal, with command-c and tmux-vim keybinds

When I navigate to the scratch session in a normal tmux window it will allow me

I wonder if something in my existing config is clashing. I have included it below Let me know if any other info is required

tmux config

set-option -sa terminal-overrides ",xterm*:Tc"
set -g mouse on
unbind C-b
set -g prefix `
bind ` send-prefix

# Vim style pane selection

bind h resize-pane -L 10
bind j resize-pane -D 10
bind k resize-pane -U 10
bind l resize-pane -R 10

# Start windows and panes at 1, not 0
set -g base-index 1
set -g pane-base-index 1
set-window-option -g pane-base-index 1
set-option -g renumber-windows on

bind Left select-pane -L
bind Right select-pane -D
bind Up select-pane -U
bind Down select-pane -R

# Shift arrow to switch windows
bind -n S-Left  previous-window
bind -n S-Right next-window

# Shift Alt vim keys to switch windows
bind -n M-H previous-window
bind -n M-L next-window

set -g @catppuccin_flavour 'mocha'

set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'dreamsofcode-io/catppuccin-tmux'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-open'

#Working with nvim zen mode
set-option -g allow-passthrough on

# tmux resurrect and continuum
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @resurrect-strategy-nvim 'session'
# interval in mins
set -g @continuum-save-interval '1'
set -g @continuum-restore 'on'

#session x stuff
set -g @plugin 'omerxx/tmux-sessionx'
set -g @sessionx-bind 'o'
set -g @sessionx-zoxide-mode 'on'

set -g @sessionx-x-path '~/dotfiles/'

#floax stuff
set -g @plugin 'omerxx/tmux-floax'
set -g @floax-change-path 'false'
set -g @floax-bind 'BSpace'

# running this here so it doesnt override the below keymaps
run '~/.config/tmux/plugins/tpm/tpm'

# set vi-mode
set-window-option -g mode-keys vi
# keybindings
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle

# stop tmux leaving the scrollback buffer when highlighting with mouse or copying 
bind-key -T copy-mode-vi y send-keys -X copy-selection -x
unbind-key -T copy-mode-vi MouseDragEnd1Pane

bind C-k send-keys -R \; send-keys C-l \; clear-history

bind '"' split-window -v -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
feekApp commented 1 month ago

I had the same issues using tmux popup. Seems like popup does not support clipboard.

znd4 commented 1 month ago

hmm, I'm able to copy in popup windows. I think these are the relevant lines in my config. not sure though

ahmedsayedabdelsalam commented 1 month ago

i had the same issue

beatzball commented 1 month ago

+1

TimothyBesada commented 1 month ago

I have the same issue.

mohnasir-gh commented 1 month ago

Facing a similar issue, not able to copy in the terminal when inside tmux session

Doctor-Scott commented 3 weeks ago

I appreciate the comments on this!

So after some playing around, I found that this line in my config is causing the issue for me

# stop tmux leaving the scrollback buffer when copying 
bind-key -T copy-mode-vi y send-keys -X copy-selection -x

So I am leaving this commented out for now I will deal with losing the position in the floating pane while I dig further into a workaround