omerxx / tmux-floax

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

Cannot copy text in floating pane #5

Open Doctor-Scott opened 4 months ago

Doctor-Scott commented 4 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 4 months ago

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

znd4 commented 4 months 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 4 months ago

i had the same issue

beatzball commented 4 months ago

+1

TimothyBesada commented 4 months ago

I have the same issue.

mohnasir-gh commented 4 months ago

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

Doctor-Scott commented 3 months 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

wojciech-kulik commented 2 months ago

I'm facing the same issue. I select the text, and it should automatically copy it, but it doesn't happen within Floax. When I switch directly to that session outside of Floax, it works correctly. I'm using kitty on macOS.

wojciech-kulik commented 1 month ago

Any chance to fix that?

DeathSy commented 2 weeks ago

i'm also facing this issue, but after i commented this following line out of my tmux config it's working now

bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel
wojciech-kulik commented 2 weeks ago

It doesn't help in my case :(

feekApp commented 2 weeks ago

still expect the issue is related to TMUX popup. In all my popups there is no clipboard available

Doctor-Scott commented 2 weeks ago

It doesn't help in my case :(

Maybe start with a empty tmux config with only what is needed for the floax plugin?

See if you can copy text with that setup

If so, add in more plugins/ config until it stops, that's mostly likely the specific cause for yourself

wojciech-kulik commented 2 weeks ago

My config is very simple. However, I removed everything, just left resurrect, continuum & floax, then I killed tmux server and opened it again. Still doesn't work.

I would say it's more likely that the issue is in integration between shell & floax than tmux & floax

that's mostly likely the specific cause for yourself

How about all the other people here :)?