tv editor-input: init
This commit is contained in:
parent
5022ddc71b
commit
64c99a011f
18
tv/5pkgs/simple/editor-input.nix
Normal file
18
tv/5pkgs/simple/editor-input.nix
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
{ pkgs }:
|
||||||
|
pkgs.writeDashBin "editor-input" ''
|
||||||
|
exec \
|
||||||
|
${pkgs.utillinux}/bin/setsid -f \
|
||||||
|
${pkgs.with-tmpdir}/bin/with-tmpdir -t editor-input.XXXXXXXX \
|
||||||
|
${pkgs.writeDash "editor-input.sh" ''
|
||||||
|
f=$TMPDIR/input
|
||||||
|
${pkgs.rxvt_unicode}/bin/urxvt -name editor-input-urxvt -e \
|
||||||
|
${pkgs.vim}/bin/vim --cmd ':set noeol binary' -c startinsert "$f"
|
||||||
|
if test -e "$f"; then
|
||||||
|
${pkgs.xsel}/bin/xsel -ip < "$f"
|
||||||
|
${pkgs.xsel}/bin/xsel -ib < "$f"
|
||||||
|
${pkgs.xdotool}/bin/xdotool key --clearmodifiers shift+Insert
|
||||||
|
${pkgs.xsel}/bin/xsel -dp
|
||||||
|
${pkgs.xsel}/bin/xsel -db
|
||||||
|
fi
|
||||||
|
''}
|
||||||
|
''
|
Loading…
Reference in New Issue
Block a user