nandi/frqpublic Fork 0
4876db8a66c7a990b23d9bdf4fc5a7d7319a9883
Commits
Clone
git clone https://git.rickub.com/nandi/frq.git
git clone ssh://git@rickub.com/nandi/frq.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

platform.jolt · 12 lines · 449 BText Blame HistoryRaw
Click a picture to see it full size 563ada3 nandi 20d ago1(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)))