Skip to content

Commit

Permalink
chore: misc
Browse files Browse the repository at this point in the history
  • Loading branch information
yqrashawn committed Jan 26, 2025
1 parent d49f143 commit 47bd64f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 8 deletions.
13 changes: 9 additions & 4 deletions .doom.d/autoload.el
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@ _b_ranch _j_next _k_prev _h_up
;;;###autoload
(defun +cljr--log-spy (prefix-info log-type arg)
(let* ((log-spy-str (cond
((eq log-type :js-console) "js/console.log")
((eq log-type :squint) "log/spy")
((eq log-type :log!) "log/spy!")
(t "log/spy")))
(log-spy-str (if prefix-info
Expand Down Expand Up @@ -666,8 +666,8 @@ _b_ranch _j_next _k_prev _h_up
(defun +spy (arg)
(interactive "P")
(when (and lispy-mode (memq major-mode '(clojure-mode clojurescript-mode clojurec-mode)))
(let* ((squint? (seq-find (-partial 'string= "squint.edn") (projectile-dir-files (doom-project-root))))
(has-as-log? (or squint? (ignore-errors (save-excursion (re-search-backward ":as log\\]")))))
(let* ((has-as-log? (ignore-errors (save-excursion (re-search-backward ":as log\\]"))))
(squint? (seq-find (-partial 'string= "squint.edn") (projectile-dir-files (doom-project-root))))
(telemere? (+cljr-project-has-dep? "com.taoensso/telemere"))
(glogi? (+cljr-project-has-dep? "lambdaisland/glogi"))
(timbre? (+cljr-project-has-dep? "timbre"))
Expand All @@ -676,12 +676,17 @@ _b_ranch _j_next _k_prev _h_up
(f (apply-partially '+cljr--log-spy
pedestal?
(cond
(squint? :js-console)
(squint? :squint)
((and telemere? (not glogi?)) :log!)
(t :log)))))
(cond
(has-as-log? (funcall f arg))

(squint?
(save-excursion
(cljr--insert-in-ns ":require")
(insert "[\"@/spy\":as log]"))
(funcall f arg))
(glogi?
(save-excursion
(cljr--insert-in-ns ":require")
Expand Down
5 changes: 4 additions & 1 deletion modules/yqrashawn/home-manager/dotfiles/aerospace.toml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,10 @@ if.app-id = 'ai.perplexity.mac'
run = [ 'move-node-to-workspace B' ]
[[on-window-detected]]
if.app-id = 'com.openai.chat'
run = [ 'move-node-to-workspace B' ]
run = [ 'layout floating', 'move-node-to-workspace B' ]
[[on-window-detected]]
if.app-id = 'ai.perplexity.mac'
run = [ 'layout floating', 'move-node-to-workspace B' ]

### coding workspace
[[on-window-detected]]
Expand Down
7 changes: 4 additions & 3 deletions modules/yqrashawn/home-manager/dotfiles/karabiner.edn
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,10 @@
;; [:!Tm :!Sreturn_or_enter]
;; [:!Creturn_or_enter :return_or_enter]]}
{:des "chatgpt"
:rules [[:f23 :!OS8]
:rules [;; [:f23 :!OS8]
;; [:f23 :!CT8]
;; [:f23 :f18]
]}
[:f23 [:hsl "/Applications/ChatGPT.app"]]]}
{:des "unstuck emacs"
:rules [[:!CTg ["/bin/kill -s USR2 $(pgrep Emacs)"
"/bin/kill -s USR1 $(pgrep Emacs)"]]]}
Expand Down Expand Up @@ -453,7 +453,8 @@
[:comma :same_wind_app :Safari]
[:l [:op "/Applications/Firefox Developer Edition.app"] :!Firefoxes]
[:l :same_wind_app :Firefoxes]
[:return_or_enter [:togg "/Applications/ChatGPT.app"]]
;; [:return_or_enter [:togg "/Applications/ChatGPT.app"]]
[:return_or_enter :!OS8]
[:m [:op "/System/Applications/Mail.app"]]
[:v [:op "/Applications/WeChat.app"]]
[:q [:op "/Applications/Karabiner-Elements.app"]]
Expand Down

0 comments on commit 47bd64f

Please sign in to comment.