Better wl-clipedit and rbw-fzf

This commit is contained in:
Filippo Berto 2026-02-05 09:41:18 +01:00
parent ca4e245fd0
commit 1deb75a769
No known key found for this signature in database
GPG key ID: F1D17F9BCEC62FBC
6 changed files with 95 additions and 3 deletions

View file

@ -3,7 +3,6 @@
, wl-clipboard
, coreutils
, editor ? "hx"
, terminal-command ? "kitty -e"
,
}:
# 64 │ function clipcopy() { xclip -in -selection clipboard < "${1:-/dev/stdin}"; }
@ -17,7 +16,7 @@ writeShellScriptBin "wl-clipedit" ''
}"
tmp_file=$(mktemp)
wl-paste -t 'text/plain;charset=utf-8' -n > "$tmp_file"
${terminal-command} ''${VISUAL:-''${EDITOR:-${editor}}} "$tmp_file"
''${VISUAL:-''${EDITOR:-${editor}}} "$tmp_file"
wl-copy -t 'text/plain;charset=utf-8' -n < "$tmp_file"
rm "$tmp_file"
''