From 133dd8180878a68845695d48af50d7f20d1bc8db Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Tue, 10 May 2022 10:58:18 +0200 Subject: Moved edit-menu to "experiments" --- Makefile | 1 - TODO | 3 +-- edit-menu | 25 ------------------------- experiments/edit-menu | 25 +++++++++++++++++++++++++ 4 files changed, 26 insertions(+), 28 deletions(-) delete mode 100755 edit-menu create mode 100755 experiments/edit-menu diff --git a/Makefile b/Makefile index 90a49d0..7a8f60d 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,6 @@ SCRIPTS = addressgrep \ dmenu-unmount \ dmenu-urlselect \ dmenu-websearch \ - edit-menu \ ffmpeg-screenrecord \ ffmpeg-facecam \ mail-checknow \ diff --git a/TODO b/TODO index 580c4ed..65e18b6 100644 --- a/TODO +++ b/TODO @@ -1,5 +1,4 @@ -* Modify all dmenu-* scripts to optionally use another menu, - like edit-menu or vis-menu (or just use environment variables?) +* Modify all dmenu-* scripts to optionally use another menu, like vis-menu (slmenu) * sfeed-browser: optionally just write link to stdout (or to xsel -i) * Refactor: review all scripts and adapt to common style diff --git a/edit-menu b/edit-menu deleted file mode 100755 index ed180a2..0000000 --- a/edit-menu +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh - -# A "filter", based on your favorite editor. -# It reads lines from stdin, opens a file containing these lines -# with your favorite editor, and then prints the content of the file -# $EDITMENU to stdout. I have configured my editor to write the -# current line to $EDITMENU when pressing ;; (semicolon twice) like this -# map ;; !!tee -a $EDITMENU^M " For nvi - -# It can be used to replace dmenu or similar menu applications in -# constrained environment. It works even without any (n)curses library, -# assuming you use a suitable editor (like ed). - -editor=${EDITOR:-vi} - -export EDITMENU=$(mktemp) -in=$(mktemp) - -cat > "$in" - -# This is a dirty trick to "help" the editor (vi) understand that it can -# take over the tty to get its input. -$editor "$in" < /dev/tty - -cat $EDITMENU diff --git a/experiments/edit-menu b/experiments/edit-menu new file mode 100755 index 0000000..ed180a2 --- /dev/null +++ b/experiments/edit-menu @@ -0,0 +1,25 @@ +#!/bin/sh + +# A "filter", based on your favorite editor. +# It reads lines from stdin, opens a file containing these lines +# with your favorite editor, and then prints the content of the file +# $EDITMENU to stdout. I have configured my editor to write the +# current line to $EDITMENU when pressing ;; (semicolon twice) like this +# map ;; !!tee -a $EDITMENU^M " For nvi + +# It can be used to replace dmenu or similar menu applications in +# constrained environment. It works even without any (n)curses library, +# assuming you use a suitable editor (like ed). + +editor=${EDITOR:-vi} + +export EDITMENU=$(mktemp) +in=$(mktemp) + +cat > "$in" + +# This is a dirty trick to "help" the editor (vi) understand that it can +# take over the tty to get its input. +$editor "$in" < /dev/tty + +cat $EDITMENU -- cgit v1.3