From 64c99a011f3e709dae034fe1b0c3950ba4e8b57b Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 25 Nov 2020 21:44:18 +0100 Subject: tv editor-input: init --- tv/5pkgs/simple/editor-input.nix | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 tv/5pkgs/simple/editor-input.nix (limited to 'tv') diff --git a/tv/5pkgs/simple/editor-input.nix b/tv/5pkgs/simple/editor-input.nix new file mode 100644 index 00000000..931179af --- /dev/null +++ b/tv/5pkgs/simple/editor-input.nix @@ -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 + ''} +'' -- cgit v1.2.3