From 0976d079e48714269daef0754e2e12cb4d4f38c0 Mon Sep 17 00:00:00 2001
From: Oliver Davies <oliver@oliverdavies.dev>
Date: Thu, 9 May 2024 18:53:08 +0100
Subject: [PATCH] Fix copying from tmux to the system clipboard

---
 lib/shared/modules/tmux.nix | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/shared/modules/tmux.nix b/lib/shared/modules/tmux.nix
index 48ed516d..4aa62c38 100644
--- a/lib/shared/modules/tmux.nix
+++ b/lib/shared/modules/tmux.nix
@@ -61,7 +61,7 @@ in {
 
       # Setup 'v' to begin selection as in Vim
       bind-key -T copy-mode-vi 'v' send -X begin-selection
-      bind-key -T copy-mode-vi 'y' send -X copy-pipe "reattach-to-user-namespace pbcopy"
+      bind-key -T copy-mode-vi 'y' send -X copy-pipe wl-copy
 
       bind C-j split-window -v "tmux list-sessions | sed -E 's/:.*$//' | grep -v \"^$(tmux display-message -p '#S')\$\" | fzf --reverse | xargs tmux switch-client -t"