[xdg] Open alfaview:// links

This commit is contained in:
Sebastian Schulze 2022-02-11 20:05:00 +01:00
parent b313fa6fcf
commit eac2ee61f2
No known key found for this signature in database
GPG Key ID: F6BA63C6A7D3044E
1 changed files with 4 additions and 1 deletions

View File

@ -4,7 +4,7 @@ set -eo pipefail
# Strip file:// protocol as file -b will handle this
argument=$(echo $1 | sed "s|file://||")
url_regex='^(https?|mailto|ftp):/?/?.*'
url_regex='^(https?|alfaview|mailto|ftp):/?/?.*'
if [[ $argument =~ $url_regex ]]; then
match=$argument
@ -21,6 +21,9 @@ case "${match}" in
inode/directory)
exec browse-folder "${argument}"
;;
alfaview:*)
exec alfaview "${argument}"
;;
ssh:*)
host=$(echo $1 | cut -d "/" -f 3)
exec foot ssh "$host"