diff options
Diffstat (limited to 'emacs/.emacs.d/init')
-rw-r--r-- | emacs/.emacs.d/init/ycp-emms.el | 2 | ||||
-rw-r--r-- | emacs/.emacs.d/init/ycp-markup.el | 11 | ||||
-rw-r--r-- | emacs/.emacs.d/init/ycp-org.el | 22 | ||||
-rw-r--r-- | emacs/.emacs.d/init/ycp-web.el | 7 |
4 files changed, 37 insertions, 5 deletions
diff --git a/emacs/.emacs.d/init/ycp-emms.el b/emacs/.emacs.d/init/ycp-emms.el index a3a4604..458a6b0 100644 --- a/emacs/.emacs.d/init/ycp-emms.el +++ b/emacs/.emacs.d/init/ycp-emms.el @@ -90,6 +90,8 @@ (my-override emms-mode-line-toggle) (add-hook 'emms-playlist-selection-changed-hook 'my-emms-output-current-track-to-i3bar-file) + (add-hook 'emms-player-finished-hook 'my-emms-score-up-playing) + (add-hook 'emms-player-started-hook 'my-emms-score-up-chosen-bonus) (setq emms-player-next-function 'my-emms-next-track-or-random-album) (setq emms-players-preference-f 'my-emms-players-preference) (my-keybind dired-mode-map "e" #'my-dired-add-to-emms) diff --git a/emacs/.emacs.d/init/ycp-markup.el b/emacs/.emacs.d/init/ycp-markup.el index d55586d..fcb98ff 100644 --- a/emacs/.emacs.d/init/ycp-markup.el +++ b/emacs/.emacs.d/init/ycp-markup.el @@ -83,14 +83,21 @@ (setq-local completion-cycle-threshold t) (setq-local ledger-complete-in-steps t) (setq-local company-mode nil))) - (setq ledger-binary-path "hledger")) + (setq ledger-binary-path "hledger") + (require 'my-ledger) + (my-keybind ledger-mode-map + "M-<down>" #'my-ledger-move-xact-down + "M-<up>" #'my-ledger-move-xact-up)) ;;; todo: open epub in emacs client with nov (my-package nov (:delay 15) (add-to-list 'auto-mode-alist '("\\.epub\\'" . nov-mode)) - (setq nov-text-width fill-column) + (setq nov-text-width 76) (add-hook 'nov-mode-hook 'follow-mode) + (add-hook 'nov-mode-hook (lambda () + (setq next-screen-context-lines 4))) + (add-hook 'nov-post-html-render-hook 'my-nov-set-left-margin) (require 'my-nov) (my-override nov-render-title) (my-override nov-scroll-up) diff --git a/emacs/.emacs.d/init/ycp-org.el b/emacs/.emacs.d/init/ycp-org.el index bb1b828..ea95d2a 100644 --- a/emacs/.emacs.d/init/ycp-org.el +++ b/emacs/.emacs.d/init/ycp-org.el @@ -441,7 +441,11 @@ (add-to-list 'org-protocol-protocol-alist '("grok" :protocol "grok" - :function my-org-protocol-grok))) + :function my-org-protocol-grok)) + (add-to-list 'org-protocol-protocol-alist + '("browse-url" + :protocol "browse-url" + :function my-org-protocol-browse-url))) ;; org man links (my-package ol-man @@ -518,5 +522,21 @@ (:delay 60) (require 'my-ox-jira)) +(my-package org-remark + (:install t) + (:delay 60) + (require 'my-org-remark) + (setq org-remark-notes-display-buffer-action + '(display-buffer-reuse-mode-window)) + (require 'nov) + (my-keybind nov-mode-map + "M-n" #'org-remark-next + "M-p" #'org-remark-prev + "<return>" #'my-org-remark-open-or-create + "o" #'org-remark-view + "d" #'org-remark-delete) + (with-eval-after-load 'nov + (org-remark-nov-mode +1))) + (provide 'ycp-org) ;;; ycp-org.el ends here diff --git a/emacs/.emacs.d/init/ycp-web.el b/emacs/.emacs.d/init/ycp-web.el index ffdb83d..a4fa8f5 100644 --- a/emacs/.emacs.d/init/ycp-web.el +++ b/emacs/.emacs.d/init/ycp-web.el @@ -203,6 +203,7 @@ org-jira-jira-status-to-org-keyword-alist org-jira-project-filename-alist org-jira-custom-jqls) + (org-link-set-parameters "jira" '((:follow . org-jira-open))) (require 'my-org-jira) (my-override org-jira--render-issue) (my-override org-jira-update-worklogs-from-org-clocks) @@ -254,12 +255,14 @@ . ,(lambda (url &rest _) (exitter-open-post url))) (my-hacker-news-url-p . ,(lambda (url &rest _) (hnreader-comment url))) - (my-mariadb-kb-url-p - . ,(lambda (url &rest _) (my-mariadb-fetch-kb-source url))) + (my-gitlab-project-url-p + . ,(lambda (url &rest _) (my-gitlab-project-infobox url))) (my-mastodon-url-p . ,(lambda (url &rest _) (mastorg-open url))) (my-newscorp-au-url-p . ,(lambda (url &rest _) (my-open-newscorp-au url))) + (my-org-jira-url-p + . ,(lambda (url &rest _) (my-org-jira-open-url url))) (reddio-reddit-url-p . ,(lambda (url &rest _) (reddio-open-url url))) ("^https?://www.spectator.com.au\\>" . |