Skip to content

Commit

Permalink
feat(fzf): ctrl-y copy selection to clipboard
Browse files Browse the repository at this point in the history
  • Loading branch information
WilliamHsieh committed Jan 24, 2024
1 parent cc1ff92 commit 82a1306
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion config/zsh/autoload/true_colors
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# vim: set ft=awk:
#!/usr/bin/env bash
# Based on: https://gist.github.com/XVilka/8346728

awk -v term_cols="${width:-$(tput cols || echo 80)}" 'BEGIN{
Expand Down
2 changes: 1 addition & 1 deletion config/zsh/autoload/yank
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# vim: set ft=bash:
#!/usr/bin/env bash

seq="$(cat "$@" | base64 | tr -d "\r\n")"
seq="\ePtmux;\e\e]52;c;$seq\a\e\\"
Expand Down
4 changes: 4 additions & 0 deletions home/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,10 @@ in
"--color=marker:#f4dbd6,fg+:#cad3f5,prompt:#c6a0f6,hl+:#ed8796"
"--layout=reverse"
"--cycle"
"--bind 'ctrl-y:execute-silent(echo -n {1..} | ${dotfilesDir}/config/zsh/autoload/yank)+abort'"
];
historyWidgetOptions = [
"--bind 'ctrl-y:execute-silent(echo -n {2..} | ${dotfilesDir}/config/zsh/autoload/yank)+abort'"
];
changeDirWidgetOptions = [
"--preview 'exa --tree {} | head -200'"
Expand Down

0 comments on commit 82a1306

Please sign in to comment.