scripts

Various scripts for UNIX-like systems
git clone https://git.tronto.net/scripts
Download | Log | Files | Refs | README

commit 302ac9f5271796d203772b7ff6b9a737c8e6da73
parent 6edcf79ec3474dc748bf3914099983c3ab51affe
Author: Sebastiano Tronto <sebastiano.tronto@gmail.com>
Date:   Tue,  2 Nov 2021 08:07:21 +0100

Merge branch 'main' of https://github.com/sebastianotronto/scripts into main

Diffstat:
Mopen-file | 4+++-
Mopen-stdin | 3++-
Mtempless | 2++
3 files changed, 7 insertions(+), 2 deletions(-)

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