WL-Clipedit: fixed wrong number of parameters
This commit is contained in:
parent
f68a45dfd4
commit
91fb78e143
1 changed files with 5 additions and 4 deletions
|
|
@ -2,6 +2,7 @@
|
||||||
, lib
|
, lib
|
||||||
, wl-clipboard
|
, wl-clipboard
|
||||||
, coreutils
|
, coreutils
|
||||||
|
, editor ? "hx"
|
||||||
, terminal-command ? "kitty -e"
|
, terminal-command ? "kitty -e"
|
||||||
}:
|
}:
|
||||||
# 64 │ function clipcopy() { xclip -in -selection clipboard < "${1:-/dev/stdin}"; }
|
# 64 │ function clipcopy() { xclip -in -selection clipboard < "${1:-/dev/stdin}"; }
|
||||||
|
|
@ -9,10 +10,10 @@
|
||||||
writeShellScriptBin "wl-clipedit" ''
|
writeShellScriptBin "wl-clipedit" ''
|
||||||
PATH=$PATH:"${lib.makeBinPath [ coreutils wl-clipboard ]}"
|
PATH=$PATH:"${lib.makeBinPath [ coreutils wl-clipboard ]}"
|
||||||
tmp_file=$(mktemp)
|
tmp_file=$(mktemp)
|
||||||
wl-paste -pn > $tmp_file
|
wl-paste -t 'text/plain;charset=utf-8' -n > "$tmp_file"
|
||||||
${terminal-command} $VISUAL $tmp_file || ${terminal-command} $EDITOR $tmp_file
|
${terminal-command} ''${VISUAL:-''${EDITOR:-${editor}}} "$tmp_file"
|
||||||
wl-copy -pn < $tmp_file
|
wl-copy -t 'text/plain;charset=utf-8' -n < "$tmp_file"
|
||||||
rm $tmp_file
|
rm "$tmp_file"
|
||||||
''
|
''
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue