aboutsummaryrefslogtreecommitdiff
path: root/xplumb
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano.tronto@gmail.com>2022-02-10 18:38:59 +0100
committerSebastiano Tronto <sebastiano.tronto@gmail.com>2022-02-10 18:38:59 +0100
commitcb8f9102498eddb8cd3cb907a2d64dd344a92910 (patch)
tree91dca7118da7bcf34a146a155ea8a7faa8b7a9a6 /xplumb
parent53f313bbdc7fb7d6af99d3e7f91c3c5a3bc66538 (diff)
downloadscripts-cb8f9102498eddb8cd3cb907a2d64dd344a92910.tar.gz
scripts-cb8f9102498eddb8cd3cb907a2d64dd344a92910.zip
Removed environment variables for default programs. Some have been replaced by their own script.
Diffstat (limited to '')
-rwxr-xr-xxplumb9
1 files changed, 4 insertions, 5 deletions
diff --git a/xplumb b/xplumb
index 68b8cda..8fec4ac 100755
--- a/xplumb
+++ b/xplumb
@@ -5,7 +5,8 @@
5# some possibilities (open file, open url, man page...). If none is matched, 5# some possibilities (open file, open url, man page...). If none is matched,
6# a choice is prompted. 6# a choice is prompted.
7 7
8# Requires: dmenu (or similar), mail-compose, open-file, websearch, xsel 8# Requires: dmenu (or similar), mail-compose, open-file, terminal, websearch,
9# xedit, xsel
9 10
10# TODO: 11# TODO:
11# send mail to email address; 12# send mail to email address;
@@ -13,8 +14,6 @@
13# choice: pipe to another program 14# choice: pipe to another program
14 15
15browser=${BROWSER:-firefox} 16browser=${BROWSER:-firefox}
16terminal=${TERMINAL:-xterm}
17xeditor=${XEDITOR:-gedit}
18menu=${MENU:-dmenu} 17menu=${MENU:-dmenu}
19menuopts="-l 10" 18menuopts="-l 10"
20 19
@@ -34,7 +33,7 @@ choice() {
34 elif [ "$chosen" = "edit" ]; then 33 elif [ "$chosen" = "edit" ]; then
35 f=$(mktemp) 34 f=$(mktemp)
36 xsel > "$f" 35 xsel > "$f"
37 $xeditor "$f" 36 xedit "$f"
38 fi 37 fi
39} 38}
40 39
@@ -47,7 +46,7 @@ tryman() {
47 number=$(echo "$1" | sed 's/[^1-8]//g') 46 number=$(echo "$1" | sed 's/[^1-8]//g')
48 name=$(echo "$1" | sed 's/([1-8])//g' | sed 's/ //g') 47 name=$(echo "$1" | sed 's/([1-8])//g' | sed 's/ //g')
49 if [ $(man -w "$number" "$name" | wc -l) = 1 ]; then 48 if [ $(man -w "$number" "$name" | wc -l) = 1 ]; then
50 $terminal -e man "$number" "$name" 49 terminal -e man "$number" "$name"
51 return 0 50 return 0
52 else 51 else
53 return 1 52 return 1

Generated with cgit - Back to sebastiano.tronto.net