diff options
author | Profpatsch <mail@profpatsch.de> | 2020-07-03 13:11:03 +0200 |
---|---|---|
committer | Profpatsch <mail@profpatsch.de> | 2020-07-06 20:13:42 +0200 |
commit | 97f05263ef490a063a33733d7ea607411a097df8 (patch) | |
tree | f1617705e22437c908459e1de059993bcab09ed3 /pkgs/profpatsch/xdg-open/xdg-open.dhall | |
parent | e409df3861f48de44d0e37277ce007e348a7a0dc (diff) |
pkgs/profpatsch/xdg-open: Prepare decoding http urls
I want to be able to open http(s) links that are e.g. images directly in the right application. Aka web urls should be transparent, instead of always opening everthing in the browser. This adds some silly ways of connecting to the server and parsing out the headers, in order to fetch the content-type.
Diffstat (limited to 'pkgs/profpatsch/xdg-open/xdg-open.dhall')
-rw-r--r-- | pkgs/profpatsch/xdg-open/xdg-open.dhall | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pkgs/profpatsch/xdg-open/xdg-open.dhall b/pkgs/profpatsch/xdg-open/xdg-open.dhall index a7daebe3..03f168c3 100644 --- a/pkgs/profpatsch/xdg-open/xdg-open.dhall +++ b/pkgs/profpatsch/xdg-open/xdg-open.dhall @@ -91,6 +91,10 @@ let xdg-open = set -e file="$1" + mime= + + # match on protocols + # if you want to match files reliably, start with file:// case "$file" in ${prettyLines { indent = 2 |