2023-09-12 08:07:00 +00:00
|
|
|
<require-service <daemon uri_runner>>
|
|
|
|
|
2024-02-13 12:34:41 +00:00
|
|
|
# the <exec-space #:…> dataspace starts programs when it receives exec messages
|
2023-07-21 09:24:02 +00:00
|
|
|
? <exec-space ?execspace> [
|
|
|
|
|
|
|
|
<action-handler "file://(.*.pdf)" $execspace
|
|
|
|
<exec ["/run/current-system/sw/bin/mupdf" "$1"]>>
|
|
|
|
|
2024-02-13 12:34:41 +00:00
|
|
|
# <action-handler "file://(.*.png|.*.jpg|.*.jpeg|.*.qoi)" $execspace
|
|
|
|
# <exec ["/run/current-system/sw/bin/imv" "$1"]>>
|
2023-07-21 09:24:02 +00:00
|
|
|
|
|
|
|
<action-handler "(magnet:?.*xt=urn:btih.*)" $execspace
|
|
|
|
<exec ["/run/current-system/sw/bin/transmission-gtk" "$1"]>>
|
|
|
|
|
|
|
|
<action-handler "(tg://.*)" $execspace
|
|
|
|
<exec ["/run/current-system/sw/bin/telegram-desktop" "$1"]>>
|
|
|
|
|
|
|
|
<action-handler "https://twitter.com/(.*)" $execspace
|
2024-02-13 12:34:41 +00:00
|
|
|
<exec ["falkon" "--new-tab" "https://nitter.net/$1"]>>
|
2023-07-21 09:24:02 +00:00
|
|
|
|
|
|
|
<action-handler "(http://.*|https://.*)" $execspace
|
2024-02-13 12:34:41 +00:00
|
|
|
<exec ["falkon" "$#"]>>
|
2023-07-21 09:24:02 +00:00
|
|
|
|
|
|
|
<action-handler "(file:///.*.html)" $execspace
|
|
|
|
<exec ["/home/emery/.nix-profile/bin/netsurf-gtk3" "$#"]>>
|
|
|
|
|
|
|
|
<action-handler "mailto:(.*)" $execspace
|
|
|
|
<exec ["/run/current-system/sw/bin/astroid" "--mailto" "mailto:$#"]>>
|
|
|
|
|
|
|
|
<action-handler "file://(.*\\.odt)" $execspace
|
|
|
|
<exec ["/home/emery/.nix-profile/bin/libreoffice" "$#"]>>
|
|
|
|
|
|
|
|
<action-handler "file://(.*\\.eris)" $execspace
|
|
|
|
<exec ["/home/emery/src/bin/erisopen" "$#"]>>
|
2023-09-12 08:07:00 +00:00
|
|
|
|
|
|
|
<action-handler "(.*mp4)" $execspace
|
|
|
|
<exec ["/run/current-system/sw/bin/mpv" "$#"]>>
|
|
|
|
|
|
|
|
<action-handler "(.*mkv)" $execspace
|
|
|
|
<exec ["/run/current-system/sw/bin/mpv" "$#"]>>
|
|
|
|
|
2023-07-21 09:24:02 +00:00
|
|
|
]
|
|
|
|
|
2024-02-13 12:34:41 +00:00
|
|
|
# when mpv is available send it commands directly
|
2023-07-21 09:24:02 +00:00
|
|
|
? <mpv ?mpv> [
|
|
|
|
<action-handler "(.*mp3)" $mpv <play-file "$1">>
|
|
|
|
<action-handler "(.*wav)" $mpv <play-file "$1">>
|
|
|
|
]
|