Skip to content

Commit

Permalink
Revert "add portal utility"
Browse files Browse the repository at this point in the history
This reverts commit ea69b3b.
  • Loading branch information
humorless committed Aug 8, 2024
1 parent fcb2e40 commit 75b647d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 19 deletions.
2 changes: 1 addition & 1 deletion deps.edn
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
:aliases
{:dev
{:extra-paths ["dev"]
:extra-deps {djblue/portal {:mvn/version "0.57.1"}}}
:extra-deps {}}

:prod
{:extra-deps
Expand Down
19 changes: 1 addition & 18 deletions repl-sessions/portal.clj
Original file line number Diff line number Diff line change
@@ -1,26 +1,9 @@
(ns portal)


(clojure.java.shell/sh
"/home/arne/opt/firefox-nightly/firefox"
(portal.runtime.jvm.launcher/url @user/portal-instance)
:env {"DISPLAY" ":0"})

(println (portal.runtime.jvm.launcher/url @user/portal-instance))

;;
(require '[portal.api :as p])

(def portal-instance (atom nil))

(defn portal
"Open a Portal window and register a tap handler for it. The result can be
treated like an atom."
[]
;; Portal doesn't recognize records as maps, make them at least datafiable
(extend-protocol clojure.core.protocols/Datafiable
clojure.lang.IRecord
(datafy [r] (into {} r)))
(let [pi (p/open @portal-instance)]
(reset! portal-instance pi)
(add-tap p/submit)
pi))

0 comments on commit 75b647d

Please sign in to comment.