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.

Click a picture to see it full size 563ada3 · on 4876db8a66c7a990b23d9bdf4fc5a7d7319a9883 · nandi · 20d ago
platform.jolt · 12 lines · 449 BText Blame HistoryRaw
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
(ns frq.platform
  "The few things that are the desktop's job rather than the app's."
  (:require [clojure.string :as str]
            [jolt.host :as host]))

(defn open-url!
  "Hand a URL to the desktop. Android has no xdg-open, so this is a no-op
  there — the same reason sign-in is desktop-only."
  [url]
  (try
    (zero? (host/sh (str "xdg-open '" (str/replace (or url "") "'" "%27") "' >/dev/null 2>&1 &")))
    (catch Exception _ false)))