From fa5dd5f3c014a250b1748c340255d8b4d0b7d773 Mon Sep 17 00:00:00 2001 From: "bozo.kopic" Date: Sun, 3 Oct 2021 23:21:15 +0200 Subject: . --- tmux/.tmux.conf | 2 +- tmux/paste.sh | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100755 tmux/paste.sh (limited to 'tmux') diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf index d31c1d7..17cfe5e 100644 --- a/tmux/.tmux.conf +++ b/tmux/.tmux.conf @@ -34,7 +34,7 @@ bind-key 'Up' select-pane -P 'fg=white,bg=black' bind-key 'Down' select-pane -P 'fg=black,bg=white' -bind-key ] run "xclip -o -selection clipboard | tmux load-buffer - && tmux paste-buffer" +bind-key ] run "sh ~/.dotfiles/tmux/paste.sh" set -g @plugin 'christoomey/vim-tmux-navigator' diff --git a/tmux/paste.sh b/tmux/paste.sh new file mode 100755 index 0000000..b09a794 --- /dev/null +++ b/tmux/paste.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +if [ -z "$WAYLAND_DISPLAY" ]; then + xclip -o -selection clipboard | tmux load-buffer - && tmux paste-buffer +else + wl-paste --no-newline | tmux load-buffer - && tmux paste-buffer +fi -- cgit v1.2.3-70-g09d2