diff options
author | Soispha <soispha@vhack.eu> | 2023-12-29 08:28:30 +0100 |
---|---|---|
committer | Soispha <soispha@vhack.eu> | 2023-12-29 08:28:30 +0100 |
commit | e77f8cac4f7b865058902866c24ceab84faf5668 (patch) | |
tree | 7d29a6d09ac0e24d85442fcf43c8ec25e9846866 /hm/soispha/conf/xdg/url_handler | |
parent | fix(hm/pkgs): Remove sane-ariscan, as that's covered by con2pdf (diff) | |
download | nixos-config-e77f8cac4f7b865058902866c24ceab84faf5668.zip |
feat(hm/conf/xdg): Add a custom url_handler to support select the project
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 |