summaryrefslogtreecommitdiffstats
path: root/public/.local/bin/myfile-handler.sh
blob: 40360b8ed2261027ae21cfc95a4e105e7be404ae (plain)
1
2
3
4
5
6
7
#!/bin/bash
# A script to handle custom protocol
url="$1"

file_path="${url#myfile://}"
file_path="${file_path/\~/$HOME}"
xdg-open "$file_path"