File tree Expand file tree Collapse file tree 4 files changed +59
-12
lines changed
Expand file tree Collapse file tree 4 files changed +59
-12
lines changed Original file line number Diff line number Diff line change 3535
3636(def blog-edn (blog-content-config ))
3737
38- (defn ->config [] (aero/read-config blog-edn))
38+ (defn ->config []
39+ nil
40+ #_ (aero/read-config blog-edn))
3941
4042(defsys ^:dynamic *config* :start
4143 (log/log! :info " [BLOG-CONFIG]: Restarting *config*" )
Original file line number Diff line number Diff line change 1+ (ns clawe.cli
2+ (:require
3+ [clojure.string :as string]
4+ [clawe.config :as clawe.config]))
5+
6+ ; ; TODO support ops like these with smth like -j
7+ ; ; take jq insight, read bb-cli for parsing/output inspo
8+ ; ; use to support scripts like *-in-wsp details
9+ ; ; first-file, wsp-directory, wsp-git-status
10+ ; ; related common apps and urls
11+ ; ; cheatsheets and relevant keybindings
12+
13+ (defn workspace-def [{:as _opts :keys [title]}]
14+ (clawe.config/workspace-def title))
15+
16+ (defn workspace-dir [opts]
17+ (-> opts workspace-def :workspace/directory ))
18+
19+ (defn preferred-index [opts]
20+ (-> opts workspace-def :workspace/preferred-index ))
21+
22+ (defn git-status [opts]
23+ (-> opts workspace-def :git/status ))
24+
25+ (defn repo-dirs [opts]
26+ (->>
27+ (clawe.config/workspace-defs )
28+ (map (fn [[k def ]] [k (:workspace/directory def )]))))
29+
30+ (defn my-repo-dirs [opts]
31+ (->>
32+ (clawe.config/workspace-defs )
33+ (filter (comp :workspace/directory second))
34+ (filter (fn [[_ def ]] (string/includes? (:workspace/directory def ) " russmatney" )))
35+ (map (fn [[k def ]] [k (:workspace/directory def )]))
36+ (map str)
37+ (string/join " \n " )
38+ ; ; (into {})
39+ ))
Original file line number Diff line number Diff line change 155155; ; workspace-defs
156156; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
157157
158- (defn workspace-defs []
159- (sys/start! `*config*)
160- (:workspace/defs @*config* {}))
158+ (defn workspace-defs
159+ ([] (workspace-defs nil ))
160+ ([_opts]
161+ (sys/start! `*config*)
162+ (let [defs (:workspace/defs @*config* {})]
163+ defs )))
161164
162- (defn workspace-defs-with-titles []
163- (sys/start! `*config*)
164- (->> (:workspace/defs @*config* {})
165- (map (fn [[k def ]]
166- [k (assoc def :workspace/title k)]))
167- (into {})))
165+ (defn workspace-defs-with-titles
166+ ([] (workspace-defs-with-titles nil ))
167+ ([_opts]
168+ (sys/start! `*config*)
169+ (->> (:workspace/defs @*config* {})
170+ (map (fn [[k def ]]
171+ [k (assoc def :workspace/title k)]))
172+ (into {}))))
168173
169174(defn workspace-def [workspace-title]
170175 ((workspace-defs ) workspace-title))
Original file line number Diff line number Diff line change @@ -278,8 +278,9 @@ hi there
278278(defn open-new-wsp-with-emacs [w]
279279 (workspace.open/open-new-workspace w)
280280
281- (client.create/create-client " emacs" {:current-workspace w})
282- (client.create/create-client " terminal" {:current-workspace w}))
281+ ; ; (client.create/create-client "emacs" {:current-workspace w})
282+ (client.create/create-client " terminal" {:current-workspace w})
283+ )
283284
284285(defn test-fn [key]
285286 (if-let [wm (wm/key->workspace key)]
You can’t perform that action at this time.
0 commit comments