diff options
Diffstat (limited to '')
| -rwxr-xr-x | open-file | 4 | ||||
| -rwxr-xr-x | open-stdin | 3 | ||||
| -rwxr-xr-x | templess | 2 |
3 files changed, 7 insertions, 2 deletions
| @@ -5,6 +5,8 @@ | |||
| 5 | # Use option -s devour to swallow or -s " " to open normally from terminal | 5 | # Use option -s devour to swallow or -s " " to open normally from terminal |
| 6 | # Use -t to specify mimetype | 6 | # Use -t to specify mimetype |
| 7 | # Requires: dmenu_path or similar (fallback) | 7 | # Requires: dmenu_path or similar (fallback) |
| 8 | # environment variables for default programs need to be set | ||
| 9 | # (I might remove this requirement at some point) | ||
| 8 | 10 | ||
| 9 | menu=${MENU:-dmenu} | 11 | menu=${MENU:-dmenu} |
| 10 | 12 | ||
| @@ -50,7 +52,7 @@ case "$mimetype" in | |||
| 50 | $launcher $SPREADSHEET "$1" | 52 | $launcher $SPREADSHEET "$1" |
| 51 | ;; | 53 | ;; |
| 52 | text/html | text/enriched) | 54 | text/html | text/enriched) |
| 53 | $launcher $BROWSER --new-window "$1" | 55 | $launcher $HTMLVIEWER "$1" |
| 54 | ;; | 56 | ;; |
| 55 | text/*) | 57 | text/*) |
| 56 | $launcher $XEDITOR "$1" | 58 | $launcher $XEDITOR "$1" |
| @@ -4,7 +4,8 @@ | |||
| 4 | # Usage: open-stdin | 4 | # Usage: open-stdin |
| 5 | # Requires: open-file | 5 | # Requires: open-file |
| 6 | 6 | ||
| 7 | folder=$HOME/Downloads/open-stdin | 7 | #folder=$HOME/Downloads/open-stdin |
| 8 | folder=${TMPDIR:-/tmp} | ||
| 8 | 9 | ||
| 9 | tempfile=$(mktemp -p "$folder") | 10 | tempfile=$(mktemp -p "$folder") |
| 10 | 11 | ||
| @@ -1,6 +1,8 @@ | |||
| 1 | #!/bin/sh | 1 | #!/bin/sh |
| 2 | 2 | ||
| 3 | # Write standard in to a temporary file and sends it to a pager. | 3 | # Write standard in to a temporary file and sends it to a pager. |
| 4 | # This is used to be able to pipe the content displayed by less to | ||
| 5 | # an external program. | ||
| 4 | 6 | ||
| 5 | pager=${PAGER:-less} | 7 | pager=${PAGER:-less} |
| 6 | tempfile=$(mktemp) | 8 | tempfile=$(mktemp) |
