diff options
Diffstat (limited to '')
-rwxr-xr-x | hm/soispha/conf/xdg/url_handler | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/hm/soispha/conf/xdg/url_handler b/hm/soispha/conf/xdg/url_handler new file mode 100755 index 00000000..10ce1d90 --- /dev/null +++ b/hm/soispha/conf/xdg/url_handler @@ -0,0 +1,18 @@ +#!/usr/bin/env dash + +# shellcheck source=/dev/null +SHELL_LIBRARY_VERSION="1.10.0" . %SHELL_LIBRARY_PATH + + +project="$(echo "%ALL_PROJECTS_PIPE|nvim" | rofi -sep "|" -dmenu)"; + +if [ "$project" = "nvim" ]; then + "$TERMINAL" -e nvim "$1" +elif [ "$project" ]; then + firefox -P "$project" "$1"; +else + notify-send "(URL HANDLER) No project selected" && exit 1 +fi + + +# vim: ft=sh |