clipedit: change terminal
This commit is contained in:
parent
74bd62f90e
commit
b4001fbfef
1 changed files with 2 additions and 3 deletions
|
|
@ -2,8 +2,7 @@
|
|||
, lib
|
||||
, xclip
|
||||
, coreutils
|
||||
, terminal-command ? "kitty sh -c"
|
||||
, editor-command ? "hx"
|
||||
, terminal-command ? "alacritty -e"
|
||||
}:
|
||||
# 64 │ function clipcopy() { xclip -in -selection clipboard < "${1:-/dev/stdin}"; }
|
||||
# 65 │ function clippaste() { xclip -out -selection clipboard; } clip
|
||||
|
|
@ -11,7 +10,7 @@ writeShellScriptBin "clipedit" ''
|
|||
PATH=$PATH:"${lib.makeBinPath [ coreutils xclip ]}"
|
||||
tmp_file=$(mktemp)
|
||||
xclip -out -selection -clipboard > $tmp_file
|
||||
${terminal-command} "${editor-command} $tmp_file"
|
||||
${terminal-command} $VISUAL $tmp_file || ${terminal-command} $EDITOR $tmp_file
|
||||
xclip -in -selection clipboard < $tmp_file
|
||||
rm $tmp_file
|
||||
''
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue