diff options
| author | Sebastiano Tronto <sebastiano.tronto@gmail.com> | 2022-02-10 18:38:59 +0100 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano.tronto@gmail.com> | 2022-02-10 18:38:59 +0100 |
| commit | cb8f9102498eddb8cd3cb907a2d64dd344a92910 (patch) | |
| tree | 91dca7118da7bcf34a146a155ea8a7faa8b7a9a6 /xplumb | |
| parent | 53f313bbdc7fb7d6af99d3e7f91c3c5a3bc66538 (diff) | |
| download | scripts-cb8f9102498eddb8cd3cb907a2d64dd344a92910.tar.gz scripts-cb8f9102498eddb8cd3cb907a2d64dd344a92910.zip | |
Removed environment variables for default programs. Some have been replaced by their own script.
Diffstat (limited to 'xplumb')
| -rwxr-xr-x | xplumb | 9 |
1 files changed, 4 insertions, 5 deletions
| @@ -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 | ||
| 15 | browser=${BROWSER:-firefox} | 16 | browser=${BROWSER:-firefox} |
| 16 | terminal=${TERMINAL:-xterm} | ||
| 17 | xeditor=${XEDITOR:-gedit} | ||
| 18 | menu=${MENU:-dmenu} | 17 | menu=${MENU:-dmenu} |
| 19 | menuopts="-l 10" | 18 | menuopts="-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 |
