diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2022-12-07 10:58:54 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2022-12-07 17:49:22 -0700 |
commit | dabb0f05dbf9f4c775ba6fab11cd4522c172ae30 (patch) | |
tree | 98dfac5f9542aded0eefd5cac59d9119da868cce /archive | |
parent | 64a3111fdb7956500a1970c004338e9ee254351a (diff) | |
download | dotfiles-dabb0f05dbf9f4c775ba6fab11cd4522c172ae30.tar.gz |
archive xdg-open wrapper, at least for now
In light of 0375c8aa, I am unsure whether or not we still need this.
Diffstat (limited to 'archive')
-rwxr-xr-x | archive/bin/xdg-open | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/archive/bin/xdg-open b/archive/bin/xdg-open new file mode 100755 index 00000000..f6d2ad99 --- /dev/null +++ b/archive/bin/xdg-open @@ -0,0 +1,20 @@ +#!/bin/sh + +# Deal with the fact that xdg-open likes to fork bomb under i3. Idea +# to bypass system xdg-open in this way from here: +# https://drewdevault.com/2019/12/30/dotfiles.html + +case "${1%%:*}" in + http|https) + exec firefox --new-window "$1" + ;; + *.pdf|*.PDF) + exec evince "$1" + ;; + *.xlsx) + exec soffice "$1" + ;; + *) + exec /usr/bin/xdg-open "$@" + ;; +esac |