about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorDavid Morgan <djm_uk@protonmail.com>2022-11-21 16:44:49 +0000
committerDavid Morgan <djm_uk@protonmail.com>2022-11-21 16:44:49 +0000
commit9632522130b2203a36dedfd65ae46b1f77729207 (patch)
treee76923848b66e68428d0626e6dac9d2307d60e64
parent3916b48eb1b80ce791107f316582a75a9e8346e7 (diff)
downloaddotfiles-9632522130b2203a36dedfd65ae46b1f77729207.tar.gz
Add darwin tmux copy config
-rw-r--r--nix-conf/home/includes/dev-common.nix4
1 files changed, 4 insertions, 0 deletions
diff --git a/nix-conf/home/includes/dev-common.nix b/nix-conf/home/includes/dev-common.nix
index aee5074..0581211 100644
--- a/nix-conf/home/includes/dev-common.nix
+++ b/nix-conf/home/includes/dev-common.nix
@@ -43,6 +43,10 @@
         bind-key -T copy-mode y send-keys -X copy-pipe-and-cancel "xsel -i -p && xsel -o -p | xsel -i -b"
         bind-key C-y run "xsel -o | tmux load-buffer - ; tmux paste-buffer"
       ''}
+      ${lib.optionalString pkgs.stdenv.isDarwin ''
+        bind-key -T copy-mode y send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
+        bind-key C-y run "reattach-to-user-namespace pbpaste | tmux load-buffer - ; tmux paste-buffer"
+      ''}
 
       set -g @open-S 'https://www.duckduckgo.com/?q='
       set -g @thumbs-reverse enabled