| Click a picture to see it full size | 1 | (ns frq.platform |
| 2 | "The few things that are the desktop's job rather than the app's." | |
| 3 | (:require [clojure.string :as str] | |
| 4 | [jolt.host :as host])) | |
| 5 | ||
| 6 | (defn open-url! | |
| 7 | "Hand a URL to the desktop. Android has no xdg-open, so this is a no-op | |
| 8 | there — the same reason sign-in is desktop-only." | |
| 9 | [url] | |
| 10 | (try | |
| 11 | (zero? (host/sh (str "xdg-open '" (str/replace (or url "") "'" "%27") "' >/dev/null 2>&1 &"))) | |
| 12 | (catch Exception _ false))) |