diff options
author | lassulus <lassulus@lassul.us> | 2020-12-30 13:00:28 +0100 |
---|---|---|
committer | lassulus <lassulus@lassul.us> | 2020-12-30 13:00:28 +0100 |
commit | 50a3903825c8932b87b3fb6be77245688be76534 (patch) | |
tree | 7cafca39fc1d805259afc5f52dbad51f21e81932 /tv/5pkgs/simple/editor-input.nix | |
parent | 053044834c1af30a90ced1338ae4342a445a2946 (diff) | |
parent | 9c2529b2910bdb3b73bcd69ed958d82e01bf7943 (diff) |
Merge remote-tracking branch 'ni/master'
Diffstat (limited to 'tv/5pkgs/simple/editor-input.nix')
-rw-r--r-- | tv/5pkgs/simple/editor-input.nix | 18 |
1 files changed, 18 insertions, 0 deletions
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 + ''} +'' |