From 84c26706d306f2b2b5f5534a91147df893be7854 Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Sat, 23 Oct 2021 18:41:30 +0200 Subject: open-stdin default tmp folder changed to /tmp --- open-stdin | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/open-stdin b/open-stdin index 1cc54a5..48792b6 100755 --- 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") -- cgit v1.3 From 1ec940dbdb2eaf26ceda1ab53fdb8e4f26540a83 Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Sat, 23 Oct 2021 23:19:42 +0200 Subject: added netsurf wrapper for opening html file --- Makefile | 1 + netsurf-wrapper-file | 9 +++++++++ 2 files changed, 10 insertions(+) create mode 100755 netsurf-wrapper-file diff --git a/Makefile b/Makefile index 827f0bd..dcba315 100644 --- a/Makefile +++ b/Makefile @@ -16,6 +16,7 @@ SCRIPTS = addressgrep \ dunst-toggle \ mail-checknow \ mail-compose \ + netsurf-wrapper-file \ notify-battery \ notify-time \ open-file \ diff --git a/netsurf-wrapper-file b/netsurf-wrapper-file new file mode 100755 index 0000000..1fc9ea0 --- /dev/null +++ b/netsurf-wrapper-file @@ -0,0 +1,9 @@ +#!/bin/sh + +# When using netsurf to open a local file, if the file does not have a proper +# extension it is not interpreted as html. This wrapper script fixes this. +# Requires: netsurf + +cp "$1" "$1.html" +netsurf "$1.html" +rm "$1.html" -- cgit v1.3 From 9e24bcb2eb847448c0d2c930efa56d229e660f67 Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Sat, 23 Oct 2021 23:20:01 +0200 Subject: Changed html file opener --- open-file | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/open-file b/open-file index d30f3c0..0e8e210 100755 --- 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" -- cgit v1.3 From 4754869bdc4b2873093c80cb19024f7b42317fd3 Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Sun, 24 Oct 2021 09:20:35 +0200 Subject: Removed netsurf-wrapper --- Makefile | 1 - netsurf-wrapper-file | 9 --------- 2 files changed, 10 deletions(-) delete mode 100755 netsurf-wrapper-file diff --git a/Makefile b/Makefile index dcba315..827f0bd 100644 --- a/Makefile +++ b/Makefile @@ -16,7 +16,6 @@ SCRIPTS = addressgrep \ dunst-toggle \ mail-checknow \ mail-compose \ - netsurf-wrapper-file \ notify-battery \ notify-time \ open-file \ diff --git a/netsurf-wrapper-file b/netsurf-wrapper-file deleted file mode 100755 index 1fc9ea0..0000000 --- a/netsurf-wrapper-file +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -# When using netsurf to open a local file, if the file does not have a proper -# extension it is not interpreted as html. This wrapper script fixes this. -# Requires: netsurf - -cp "$1" "$1.html" -netsurf "$1.html" -rm "$1.html" -- cgit v1.3 From b12b427f068a7b3302f227c3af8e90c18052ed64 Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Sun, 24 Oct 2021 13:10:06 +0200 Subject: Removed templess (I only used it with mmh) --- Makefile | 1 - templess | 8 -------- 2 files changed, 9 deletions(-) delete mode 100755 templess diff --git a/Makefile b/Makefile index 827f0bd..e547814 100644 --- a/Makefile +++ b/Makefile @@ -26,7 +26,6 @@ SCRIPTS = addressgrep \ popup-terminal \ sfeed-browser \ spawn \ - templess \ togglemute \ translate \ urlgrep \ diff --git a/templess b/templess deleted file mode 100755 index ec3b999..0000000 --- a/templess +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -# Write standard in to a temporary file and sends it to a pager. - -pager=${PAGER:-less} -tempfile=$(mktemp) - -cat > "$tempfile" && $pager "$tempfile" -- cgit v1.3 From 2a31393ecf448fb88d721ac09ef5b73bc8113ef7 Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Sat, 30 Oct 2021 10:39:38 +0200 Subject: Revert "Removed templess (I only used it with mmh)" I actually used it to be able to pipe the content displayed by less to an external command, which is used for example to find urls in my emails with a less shortcut. This reverts commit b12b427f068a7b3302f227c3af8e90c18052ed64. --- Makefile | 1 + templess | 8 ++++++++ 2 files changed, 9 insertions(+) create mode 100755 templess diff --git a/Makefile b/Makefile index e547814..827f0bd 100644 --- a/Makefile +++ b/Makefile @@ -26,6 +26,7 @@ SCRIPTS = addressgrep \ popup-terminal \ sfeed-browser \ spawn \ + templess \ togglemute \ translate \ urlgrep \ diff --git a/templess b/templess new file mode 100755 index 0000000..ec3b999 --- /dev/null +++ b/templess @@ -0,0 +1,8 @@ +#!/bin/sh + +# Write standard in to a temporary file and sends it to a pager. + +pager=${PAGER:-less} +tempfile=$(mktemp) + +cat > "$tempfile" && $pager "$tempfile" -- cgit v1.3 From 8aa8a247985a08add0f92a3d24272408526003ff Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Sat, 30 Oct 2021 10:41:10 +0200 Subject: Added back templess --- templess | 2 ++ 1 file changed, 2 insertions(+) diff --git a/templess b/templess index ec3b999..b06ace7 100755 --- 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) -- cgit v1.3