summaryrefslogtreecommitdiffhomepage
path: root/init.el
diff options
context:
space:
mode:
Diffstat (limited to 'init.el')
-rw-r--r--init.el87
1 files changed, 47 insertions, 40 deletions
diff --git a/init.el b/init.el
index bfe76fb..0be081f 100644
--- a/init.el
+++ b/init.el
@@ -1800,43 +1800,52 @@
(jao-d-l
(progn
- (defun jao-open-firefox () (interactive) (jao-mac-open "-a Firefox"))
- (defun jao-open-nnw () (interactive) (jao-mac-open "-a NetNewsWire"))
- (defun jao-open-telegram () (interactive) (jao-mac-open "-a Telegram"))
- (global-set-key (kbd "s-f") #'jao-open-firefox)
- (global-set-key (kbd "s-n") #'jao-open-nnw)
- (global-set-key (kbd "s-t") #'jao-open-telegram)
-
- (transient-define-prefix jao-transient-utils ()
- "Global operations."
- [["Notes"
- ("nn" "create new note" jao-org-notes-create)
- ("no" "open note" jao-org-notes-open)
- ("nt" "open note by tags" jao-org-notes-consult-tags)
- ("ng" "ripgrep notes" jao-org-notes-consult-ripgrep)]
- ["Documents"
- ("d" "go to doc" jao-select-pdf)
- ("o" "open doc" jao-open-doc)
- ("c" "view cache" doc-view-dired-cache)]
- ["External"
- ("xn" "browse NNW article" jao-nnw-browse-current-article)
- ("xs" "browse safary article" jao-safari-browse-current)
- ("xk" "open skim doc" jao-skim-open-current-doc)
- ("xe" "choose an emoji" ns-do-show-character-palette)]
- ["Blog"
- ("bn" "create post" jao-org-static-blog-create-new-post)
- ("bd" "create draft" jao-org-static-blog-create-new-draft)
- ("be" "edit draft" jao-org-static-blog-edit-draft)]
- ["Afio"
- ("g" "mail" jao-afio-goto-mail)
- ("z" "docs" jao-afio-goto-docs)
- ("w" "wwww" jao-afio-goto-www)
- ("f" "main" jao-afio-goto-main)]
- ["Utilities"
- ("s" "ssh" jao-ssh)
- ("l" "packages" jao-list-packages)
- ("p" "passwords" password-store-menu)
- ("F" "copy buffer file name" copy-buffer-file-name-as-kill)]]))
+ (defun jao-open-firefox () (interactive) (jao-mac-open "-a Firefox"))
+ (defun jao-open-nnw () (interactive) (jao-mac-open "-a NetNewsWire"))
+ (defun jao-open-safari () (interactive) (jao-mac-open "-a Safari"))
+ (defun jao-open-telegram () (interactive) (jao-mac-open "-a Telegram"))
+ (global-set-key (kbd "s-f") #'jao-open-safari)
+ ;; (global-set-key (kbd "s-n") #'jao-open-nnw)
+ (global-set-key (kbd "s-t") #'jao-open-telegram)
+
+ (defun jao-safari-internal-browse ()
+ (interactive)
+ (when-let ((url (jao-safari-current-url)))
+ (jao-browse-url-browse url)))
+
+ (transient-define-prefix jao-transient-utils ()
+ "Global operations."
+ [["Notes"
+ ("nn" "create new note" jao-org-notes-create)
+ ("no" "open note" jao-org-notes-open)
+ ("nt" "open note by tags" jao-org-notes-consult-tags)
+ ("ng" "ripgrep notes" jao-org-notes-consult-ripgrep)]
+ ["Documents"
+ ("d" "go to doc" jao-select-pdf)
+ ("o" "open doc" jao-open-doc)
+ ("c" "view cache" doc-view-dired-cache)]
+ ["External"
+ ("xn" "browse NNW article" jao-nnw-browse-current-article)
+ ("xs" "browse safary article" jao-safari-internal-browse)
+ ("xk" "open skim doc" jao-skim-open-current-doc)
+ ("xe" "choose an emoji" ns-do-show-character-palette)]
+ ["Blog"
+ ("bn" "create post" jao-org-static-blog-create-new-post)
+ ("bd" "create draft" jao-org-static-blog-create-new-draft)
+ ("be" "edit draft" jao-org-static-blog-edit-draft)]
+ ["Afio"
+ ("g" "mail" jao-afio-goto-mail)
+ ("z" "docs" jao-afio-goto-docs)
+ ("w" "wwww" jao-afio-goto-www)
+ ("f" "main" jao-afio-goto-main)]
+ ["Network"
+ ("s" "ssh" jao-ssh)
+ ("r" "r2e" jao-r2e)]
+ ["Utilities"
+ ("m" "mpc" jao-transient-media)
+ ("l" "packages" jao-list-packages)
+ ("p" "passwords" password-store-menu)
+ ("F" "copy buffer file name" copy-buffer-file-name-as-kill)]]))
(transient-define-prefix jao-transient-utils ()
"Global operations."
@@ -1903,9 +1912,7 @@
(global-set-key "\C-xr\M-w" #'kill-rectangle-save)
(global-set-key "\C-c\C-z" #'comment-or-uncomment-region)
(global-set-key "\C-z" #'comment-or-uncomment-region)
- (jao-when-darwin
- (global-set-key (kbd "M-`") 'other-frame)
- (global-set-key (kbd "s-e") 'jao-firefox-open)))
+ (jao-when-darwin (global-set-key (kbd "M-`") 'other-frame)))
(jao-global-keybindings)