aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2023-06-19 08:27:58 +0200
committerSebastiano Tronto <sebastiano@tronto.net>2023-06-19 08:27:58 +0200
commit2c065927ff405b2d8b2eec6fc1fbee9c4f93e0a8 (patch)
tree5b71550334110d98e70dc19a95386ea97ef9d129
parentdc98cba24cb5f1f3e260c49fc61add4a113a1df0 (diff)
parent518fd1dd0ec5f3dd4019e868ea2ec5a2009f24ad (diff)
downloadscripts-2c065927ff405b2d8b2eec6fc1fbee9c4f93e0a8.tar.gz
scripts-2c065927ff405b2d8b2eec6fc1fbee9c4f93e0a8.zip
Merge branch 'master' of tronto.net:scripts
Diffstat (limited to '')
-rw-r--r--Makefile1
-rwxr-xr-xexperiments/edit-menu25
-rwxr-xr-xold/theme (renamed from theme)0
-rwxr-xr-xvirename4
4 files changed, 2 insertions, 28 deletions
diff --git a/Makefile b/Makefile
index b4872ac..939db4a 100644
--- a/Makefile
+++ b/Makefile
@@ -32,7 +32,6 @@ SCRIPTS = addressgrep \
32 status \ 32 status \
33 templess \ 33 templess \
34 terminal \ 34 terminal \
35 theme \
36 translate \ 35 translate \
37 trash \ 36 trash \
38 urlgrep \ 37 urlgrep \
diff --git a/experiments/edit-menu b/experiments/edit-menu
deleted file mode 100755
index ed180a2..0000000
--- a/experiments/edit-menu
+++ /dev/null
@@ -1,25 +0,0 @@
1#!/bin/sh
2
3# A "filter", based on your favorite editor.
4# It reads lines from stdin, opens a file containing these lines
5# with your favorite editor, and then prints the content of the file
6# $EDITMENU to stdout. I have configured my editor to write the
7# current line to $EDITMENU when pressing ;; (semicolon twice) like this
8# map ;; !!tee -a $EDITMENU^M " For nvi
9
10# It can be used to replace dmenu or similar menu applications in
11# constrained environment. It works even without any (n)curses library,
12# assuming you use a suitable editor (like ed).
13
14editor=${EDITOR:-vi}
15
16export EDITMENU=$(mktemp)
17in=$(mktemp)
18
19cat > "$in"
20
21# This is a dirty trick to "help" the editor (vi) understand that it can
22# take over the tty to get its input.
23$editor "$in" < /dev/tty
24
25cat $EDITMENU
diff --git a/theme b/old/theme
index 7e0107a..7e0107a 100755
--- a/theme
+++ b/old/theme
diff --git a/virename b/virename
index e0d23bd..137091d 100755
--- a/virename
+++ b/virename
@@ -15,8 +15,8 @@ if [ "$(wc -l $file | awk '{print $1}')" != \
15 echo "Error reading new file names" 15 echo "Error reading new file names"
16else 16else
17 paste "$file" "$file2" | while read f; do 17 paste "$file" "$file2" | while read f; do
18 fold=$(echo "$f" | sed 's/\t.*//') 18 fold=$(echo "$f" | sed 's/ .*//')
19 fnew=$(echo "$f" | sed 's/.*\t//') 19 fnew=$(echo "$f" | sed 's/.* //')
20 if [ "$fold" != "$fnew" ]; then 20 if [ "$fold" != "$fnew" ]; then
21 mv "$fold" "$fnew" \ 21 mv "$fold" "$fnew" \
22 || echo "Error renaming $fold to $fnew" 22 || echo "Error renaming $fold to $fnew"

Generated with cgit - Back to sebastiano.tronto.net