From dca319b8d9d221f1aaf3a00ee457d202096c66ac Mon Sep 17 00:00:00 2001 From: Mitsuo Tokumori Date: Wed, 11 Sep 2024 03:39:28 +0900 Subject: Update custom bash scripts --- local/bin/myfile-handler.sh | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100755 local/bin/myfile-handler.sh (limited to 'local/bin/myfile-handler.sh') diff --git a/local/bin/myfile-handler.sh b/local/bin/myfile-handler.sh new file mode 100755 index 0000000..40360b8 --- /dev/null +++ b/local/bin/myfile-handler.sh @@ -0,0 +1,7 @@ +#!/bin/bash +# A script to handle custom protocol +url="$1" + +file_path="${url#myfile://}" +file_path="${file_path/\~/$HOME}" +xdg-open "$file_path" -- cgit v1.2.3