diff options
Diffstat (limited to 'modules/by-name/xd/xdg/scripts/url-handler.sh')
-rwxr-xr-x | modules/by-name/xd/xdg/scripts/url-handler.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/modules/by-name/xd/xdg/scripts/url-handler.sh b/modules/by-name/xd/xdg/scripts/url-handler.sh new file mode 100755 index 00000000..d1c8277d --- /dev/null +++ b/modules/by-name/xd/xdg/scripts/url-handler.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env sh + +project="$({ + tskm projects list + printf "%s\n" nvim zathura +} | rofi -sep "$(printf "\n")" -dmenu)" + +if [ "$project" = "nvim" ]; then + "$TERMINAL" -e nvim "$1" +elif [ "$project" = "zathura" ]; then + zathura "$1" +elif [ "$project" ]; then + tskm open project "$project" "$1" +else + notify-send "(URL HANDLER) No project selected" + exit 1 +fi + +# vim: ft=sh |