diff options
| author | tv <tv@krebsco.de> | 2020-11-25 21:44:18 +0100 | 
|---|---|---|
| committer | tv <tv@krebsco.de> | 2020-11-25 21:44:18 +0100 | 
| commit | 8b4cee8fe26ed01aa0c310bfb9271ccdbf1e4363 (patch) | |
| tree | afb2d203977bc4db7821324eb987f7ffd8d65083 | |
| parent | aa4f02fe30dbbab1857dc07e1a5059a2887f4fc2 (diff) | |
tv editor-input: init
| -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 0000000..931179a --- /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 +  ''} +'' | 
