|
|
@ -25,17 +25,27 @@ |
|
|
|
doom-big-font (font-spec :family "PragmataPro Liga" :size 18 :weight 'regular) |
|
|
|
;; doom-variable-pitch-font (font-spec :family "PragmataPro Liga" :size 20) |
|
|
|
doom-variable-pitch-font (font-spec :family "Overpass" :size 20 :weight 'thin) |
|
|
|
doom-unicode-font (font-spec :family "PragmataPro Liga" :size 18) |
|
|
|
doom-unicode-font (font-spec :family "Fira Code" :size 15 :weight 'regular) ;;Fira Code |
|
|
|
doom-serif-font (font-spec :family "Baskerville" :size 20)) |
|
|
|
|
|
|
|
;; There are two ways to load a theme. Both assume the theme is installed and |
|
|
|
;; available. You can either set `doom-theme' or manually load a theme with the |
|
|
|
;; `load-theme' function. This is the default: |
|
|
|
(setq doom-theme 'doom-one) |
|
|
|
(setq doom-theme 'doom-one) ;; doom-material is nice too |
|
|
|
;; Light theme alternatives |
|
|
|
;; doom-ayu-light |
|
|
|
;; doom-acario-light |
|
|
|
;; doom-earl-grey |
|
|
|
;; doom-flatwhite |
|
|
|
;; doom-one-light |
|
|
|
;; doom-nord-light * |
|
|
|
;; doom-opera-light |
|
|
|
;; doom-solarized-light |
|
|
|
;; doom-tomorrow-day * |
|
|
|
(remove-hook 'window-setup-hook #'doom-init-theme-h) |
|
|
|
(add-hook 'after-init-hook #'doom-init-theme-h 'append) |
|
|
|
(delq! t custom-theme-load-path) |
|
|
|
(setq doom-modeline-height 45) |
|
|
|
(setq doom-modeline-height 60) |
|
|
|
|
|
|
|
;; If you use `org' and don't want your org files in the default location below, |
|
|
|
;; change `org-directory'. It must be set before org loads! |
|
|
@ -48,6 +58,13 @@ |
|
|
|
(map! :g "s-<right>" #'next-buffer |
|
|
|
:g "s-<left>" #'previous-buffer) |
|
|
|
|
|
|
|
;; Enable tramp so we can use webdav to connect to nextcloud |
|
|
|
(use-package! tramp-gvfs |
|
|
|
:init |
|
|
|
(setq tramp-gvfs-enabled t) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
;; This determines the style of line numbers in effect. If set to `nil', line |
|
|
|
;; numbers are disabled. For relative line numbers, set this to `relative'. |
|
|
|
(setq display-line-numbers-type t) |
|
|
@ -56,7 +73,7 @@ |
|
|
|
(require 's) |
|
|
|
|
|
|
|
(when (eq system-type 'gnu/linux) |
|
|
|
(when (s-contains? "microsoft" operating-system-release t) |
|
|
|
(when (s-contains? "microsoft" operating-system-release t) ;; TODO: maybe use variable system-configuration instead? |
|
|
|
(progn |
|
|
|
(setq org-directory "/mnt/c/Users/Levi/Nextcloud/Org") |
|
|
|
(add-to-list 'default-frame-alist '(top . 400)) |
|
|
@ -142,7 +159,6 @@ Also immediately enables `mixed-pitch-modes' if currently in one of the modes." |
|
|
|
(load! "functions.el") |
|
|
|
(use-package! functions) |
|
|
|
|
|
|
|
;; (load! "setup-elfeed.el") |
|
|
|
;; (use-package! setup-elfeed) |
|
|
|
|
|
|
|
;; (load! "fancy-banner.el") |
|
|
@ -162,8 +178,8 @@ Also immediately enables `mixed-pitch-modes' if currently in one of the modes." |
|
|
|
;; Tabnine::active ;; checks if Tabnine is activated |
|
|
|
;; Tabnine::config ;; to open the config |
|
|
|
;; Tabnine::config_dir ;; /Users/leviolson/Library/Preferences/TabNine |
|
|
|
(use-package company-tabnine |
|
|
|
:disabled f |
|
|
|
;; Tabnine::config |
|
|
|
(use-package! company-tabnine |
|
|
|
:config |
|
|
|
(add-to-list 'company-backends 'company-tabnine)) |
|
|
|
|
|
|
@ -183,7 +199,7 @@ Also immediately enables `mixed-pitch-modes' if currently in one of the modes." |
|
|
|
(setq company-idle-delay 0.2) |
|
|
|
|
|
|
|
;; Number the candidates (use M-1, M-2 etc to select completions). |
|
|
|
(setq company-show-quick-access nil)) |
|
|
|
(setq company-show-quick-access t)) |
|
|
|
|
|
|
|
(use-package! darkroom |
|
|
|
:commands darkroom-mode |
|
|
@ -202,41 +218,46 @@ Also immediately enables `mixed-pitch-modes' if currently in one of the modes." |
|
|
|
("C-," . org-cycle-agenda-files) |
|
|
|
;; ("C-c C-d" . org-capture) |
|
|
|
:map org-mode-map |
|
|
|
("M-n" . leo/org-narrow-next-tree) |
|
|
|
("M-p" . leo/org-narrow-prev-tree) |
|
|
|
("M-P" . leo/org-present) |
|
|
|
;; ("M-n" . leo/org-narrow-next-tree) |
|
|
|
;; ("M-p" . leo/org-narrow-prev-tree) |
|
|
|
;; ("M-P" . leo/org-present) |
|
|
|
) |
|
|
|
:preface |
|
|
|
(defvar org-html-validation-link) |
|
|
|
(defvar org-html-text-markup-alist) |
|
|
|
(defvar org-capture-templates) |
|
|
|
:init |
|
|
|
(setq org-agenda-files (list (concat org-directory "/todo.org") |
|
|
|
(concat org-directory "/projects.org") |
|
|
|
(concat org-directory "/Recipies.org") |
|
|
|
(concat org-directory "/help.org") |
|
|
|
(concat org-directory "/personal.org") |
|
|
|
(concat org-directory "/archive.org") |
|
|
|
)) |
|
|
|
(setq org-agenda-files (list |
|
|
|
(concat org-directory "/todo.org") |
|
|
|
(concat org-directory "/projects.org") |
|
|
|
(concat org-directory "/Recipies.org") |
|
|
|
(concat org-directory "/help.org") |
|
|
|
(concat org-directory "/personal.org") |
|
|
|
(concat org-directory "/archive.org") |
|
|
|
(concat "/Users/Levi_Olson/Projects" "/verastar/epc_guided_flow.org") |
|
|
|
)) |
|
|
|
(setq org-agenda-include-diary t) |
|
|
|
(add-to-list 'safe-local-variable-values '(eval leo/deft-insert-boilerplate)) |
|
|
|
(setq org-refile-targets '((nil :maxlevel . 3) |
|
|
|
(org-agenda-files :maxlevel . 3)) |
|
|
|
org-default-notes-file (concat org-directory "/todo.org")) |
|
|
|
(org-agenda-files :maxlevel . 3))) |
|
|
|
(setq org-todo-keyword-faces |
|
|
|
'(("TODO" . org-roam-link-shielded) |
|
|
|
("WAIT" . org-roam-link-shielded) |
|
|
|
("HOLD" . org-roam-link-shielded) |
|
|
|
("NEXT" . org-roam-link-current) |
|
|
|
("PLAN" . org-target) |
|
|
|
("SPIKE" . org-target) |
|
|
|
("ACTIVE" . org-todo))) |
|
|
|
(setq org-todo-keywords '( |
|
|
|
(sequence "TODO(t)" "NEXT(n)" "|" "DONE(d!)") |
|
|
|
(sequence "PLAN(p)" "SPIKE(s)" "ACTIVE(a)" "WAIT(w@/!)" "HOLD(h)" "|" "DONE(d!)" "CANCELLED(c@)") |
|
|
|
(sequence "PLAN(p)" "SPIKE(s)" "ACTIVE(a)" "WAIT(w@/!)" "|" "DONE(d!)" "CANCELLED(c@)") |
|
|
|
)) |
|
|
|
:config |
|
|
|
(require 'org-protocol) |
|
|
|
|
|
|
|
(setq org-default-notes-file (concat org-directory "/todo.org")) |
|
|
|
(setq org-display-remote-inline-images t) |
|
|
|
(setq org-image-actual-width (list 1000)) |
|
|
|
|
|
|
|
(org-babel-do-load-languages 'org-babel-load-languages '((js . t) |
|
|
|
(typescript . t) |
|
|
|
(shell . t) |
|
|
@ -247,7 +268,7 @@ Also immediately enables `mixed-pitch-modes' if currently in one of the modes." |
|
|
|
(setq org-capture-templates |
|
|
|
'(("w" "Default template" entry (file+headline org-default-notes-file "Unfiled") |
|
|
|
"* %^{Title}%?\n\nSource: %:link\n:COPIED_TEXT:\n %i\n:END:\n") |
|
|
|
("t" "new task" entry (file+headline (concat org-directory "/todo.org") "Tasks") |
|
|
|
("t" "new task" entry (file+headline org-default-notes-file "Tasks") |
|
|
|
"* TODO [#A] %?\nSCHEDULED: %(org-insert-time-stamp (org-read-date nil t \"+0d\"))\n%a\n") |
|
|
|
("n" "new note" entry (file+headline org-default-notes-file "Notes") |
|
|
|
"* %?\n%i\n") |
|
|
@ -275,9 +296,32 @@ Also immediately enables `mixed-pitch-modes' if currently in one of the modes." |
|
|
|
(match-end 1) |
|
|
|
,(concat (list ?\C-i) |
|
|
|
(list (decode-char 'ucs (cadr regex-char-pair))))))))) |
|
|
|
'(("\\(\\[ \\]\\)" #XF096);2B1C;F096; |
|
|
|
("\\(\\[-\\]\\)" #XF147);29C7;F458;F147; |
|
|
|
("\\(\\[X\\]\\)" #XF046);2BBD;F046; |
|
|
|
'( |
|
|
|
;; Fira Code PragmataPro Liga Alternate |
|
|
|
;; 2B1C -> ⬜ F096 -> |
|
|
|
;; 29C7 -> ⧇ F147 -> F458 -> |
|
|
|
;; 2BBD -> ⮽ F046 -> |
|
|
|
;; 25A1 -> □ |
|
|
|
;; 25A2 -> ▢ |
|
|
|
;; 25A3 -> ▣ |
|
|
|
;; 25C6 -> ◆ |
|
|
|
;; 25C7 -> ◇ |
|
|
|
;; 25C9 -> ◉ |
|
|
|
;; 2610 -> ☐ |
|
|
|
;; 2611 -> ☑ |
|
|
|
;; 229F -> ⊟ |
|
|
|
;; 2612 -> ☒ |
|
|
|
|
|
|
|
;; PragmataPro Liga |
|
|
|
;; ("\\(\\[ \\]\\)" #XF096) |
|
|
|
;; ("\\(\\[-\\]\\)" #XF147) |
|
|
|
;; ("\\(\\[X\\]\\)" #XF046) |
|
|
|
|
|
|
|
;; Fira Code |
|
|
|
("\\(\\[ \\]\\)" #X2B1C) |
|
|
|
("\\(\\[-\\]\\)" #XF147) |
|
|
|
("\\(\\[X\\]\\)" #X2BBD) |
|
|
|
|
|
|
|
))) |
|
|
|
(defun add-checkbox-symbol-keywords () |
|
|
|
"Add checkbox font to font-lock." |
|
|
@ -287,9 +331,12 @@ Also immediately enables `mixed-pitch-modes' if currently in one of the modes." |
|
|
|
(add-hook 'org-mode-hook '(lambda () |
|
|
|
(visual-line-mode 0) |
|
|
|
(variable-pitch-mode 1) |
|
|
|
(org-indent-mode) |
|
|
|
(org-indent-mode 1) |
|
|
|
(auto-fill-mode 0) |
|
|
|
)) |
|
|
|
(setq org-display-remote-inline-images t) |
|
|
|
(setq org-image-actual-width (list 1000)) |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
(use-package org-roam |
|
|
@ -305,6 +352,163 @@ Also immediately enables `mixed-pitch-modes' if currently in one of the modes." |
|
|
|
(("C-c n i" . org-roam-insert)) |
|
|
|
(("C-c n I" . org-roam-insert-immediate)))) |
|
|
|
|
|
|
|
(use-package! org-agenda |
|
|
|
:after org |
|
|
|
:bind ("C-c a" . (lambda() (interactive) (org-agenda nil "z"))) |
|
|
|
:init |
|
|
|
(set-face-attribute 'org-agenda-structure nil :weight 'bold :slant 'italic :foreground "#51afef") |
|
|
|
|
|
|
|
;; Override stubborn vars |
|
|
|
(setq org-deadline-warning-days 0) |
|
|
|
|
|
|
|
|
|
|
|
(setq org-agenda-custom-commands |
|
|
|
'( |
|
|
|
("z" "Show All Ze Things" |
|
|
|
( |
|
|
|
(todo "TODO" |
|
|
|
((org-agenda-skip-function '(org-agenda-skip-if nil '(timestamp))) |
|
|
|
(org-agenda-skip-function |
|
|
|
`(org-agenda-skip-entry-if |
|
|
|
'notregexp ,(format "\\[#%s\\]" (char-to-string org-priority-highest)))) |
|
|
|
;; (org-agenda-skip-function '(org-agenda-skip-entry-if 'wait)) |
|
|
|
(org-agenda-block-separator nil) |
|
|
|
(org-agenda-overriding-header "\nImportant tasks without a date\n") |
|
|
|
)) |
|
|
|
(todo "TODO" |
|
|
|
((org-agenda-overriding-header "\nTasks Ready\n") |
|
|
|
(org-agenda-skip-function '(org-agenda-skip-entry-if 'regexp "\\[#A\\]")) |
|
|
|
(org-agenda-block-separator nil) |
|
|
|
)) |
|
|
|
(todo "WAIT" |
|
|
|
((org-agenda-overriding-header "\nTasks on hold\n") |
|
|
|
(org-agenda-block-separator nil) |
|
|
|
)) |
|
|
|
(agenda "" |
|
|
|
((org-agenda-overriding-header "\nDaily Agenda\n") |
|
|
|
(org-agenda-span 1) |
|
|
|
(org-agenda-start-day nil) |
|
|
|
(org-deadline-warning-days 0) |
|
|
|
(org-deadline-warning-days 0) |
|
|
|
(org-scheduled-past-days 0) |
|
|
|
(org-deadline-past-days 0) |
|
|
|
|
|
|
|
(org-agenda-day-face-function (lambda(date) 'org-agenda-date)) |
|
|
|
(org-agenda-format-date "") |
|
|
|
(org-agenda-skip-deadline-if-done t) |
|
|
|
(org-agenda-skip-scheduled-if-done t) |
|
|
|
(org-agenda-block-separator nil))))) |
|
|
|
|
|
|
|
)) |
|
|
|
) |
|
|
|
|
|
|
|
(use-package! org-super-agenda |
|
|
|
:disabled t |
|
|
|
:after org-agenda |
|
|
|
:init |
|
|
|
(setq |
|
|
|
org-agenda-time-grid '((daily today require-timed) (800 1000 1200 1400 1600 1800 2000) "----------------------" "......") |
|
|
|
org-agenda-skip-scheduled-if-done t |
|
|
|
org-agenda-skip-deadline-if-done t |
|
|
|
org-agenda-include-deadlines t |
|
|
|
org-agenda-include-diary t |
|
|
|
org-agenda-block-separator nil |
|
|
|
org-agenda-compact-blocks t |
|
|
|
org-agenda-start-day nil |
|
|
|
org-agenda-span 'day |
|
|
|
org-agenda-start-on-weekday nil |
|
|
|
org-agenda-start-with-log-mode t |
|
|
|
) |
|
|
|
(setq org-super-agenda-groups |
|
|
|
'((:discard (:and (:scheduled t |
|
|
|
:todo "DONE" |
|
|
|
:not (:log closed)))) |
|
|
|
(:name "Done today" |
|
|
|
:log closed |
|
|
|
:order 4) |
|
|
|
(:name "Today" |
|
|
|
:time-grid t) |
|
|
|
(:name "Deadlines" |
|
|
|
:deadline today |
|
|
|
:order 0) |
|
|
|
(:name "Overdue" |
|
|
|
:deadline past |
|
|
|
:order 2) |
|
|
|
(:name "Next" |
|
|
|
:category "next") |
|
|
|
(:name "Personal tasks" |
|
|
|
:scheduled today))) |
|
|
|
|
|
|
|
(setq org-agenda-custom-commands |
|
|
|
'(("z" "Super view" |
|
|
|
((agenda "" ((org-agenda-span 1) |
|
|
|
(org-agenda-start-day nil) |
|
|
|
(org-super-agenda-groups |
|
|
|
'((:name "Today" |
|
|
|
:time-grid t |
|
|
|
;; :date today |
|
|
|
;; :todo "TODAY" |
|
|
|
:scheduled today |
|
|
|
:order 1))))) |
|
|
|
(alltodo "" ((org-agenda-span 1) |
|
|
|
(org-agenda-start-day nil) |
|
|
|
(org-agenda-overriding-header "") |
|
|
|
(org-super-agenda-groups |
|
|
|
'( |
|
|
|
(:name "Next to do" |
|
|
|
:todo "NEXT" |
|
|
|
:order 1) |
|
|
|
|
|
|
|
(:name "Important" |
|
|
|
:tag "Important" |
|
|
|
:priority "A" |
|
|
|
:order 2) |
|
|
|
|
|
|
|
(:name "Due Today" |
|
|
|
:deadline today |
|
|
|
:order 3) |
|
|
|
|
|
|
|
(:name "Overdue" |
|
|
|
:deadline past |
|
|
|
:order 7) |
|
|
|
|
|
|
|
(:name "Due Soon" |
|
|
|
:deadline future |
|
|
|
:order 8) |
|
|
|
|
|
|
|
;; (:name "Assignments" |
|
|
|
;; :tag "Assignment" |
|
|
|
;; :order 10) |
|
|
|
;; (:name "Issues" |
|
|
|
;; :tag "Issue" |
|
|
|
;; :order 12) |
|
|
|
;; (:name "Projects" |
|
|
|
;; :tag "Project" |
|
|
|
;; :order 14) |
|
|
|
;; (:name "Emacs" |
|
|
|
;; :tag "Emacs" |
|
|
|
;; :order 13) |
|
|
|
;; (:name "Research" |
|
|
|
;; :tag "Research" |
|
|
|
;; :order 15) |
|
|
|
;; (:name "To read" |
|
|
|
;; :tag "Read" |
|
|
|
;; :order 30) |
|
|
|
;; (:name "Waiting" |
|
|
|
;; :todo "WAITING" |
|
|
|
;; :order 20) |
|
|
|
;; (:name "trivial" |
|
|
|
;; :priority<= "C" |
|
|
|
;; :tag ("Trivial" "Unimportant") |
|
|
|
;; :todo ("SOMEDAY" ) |
|
|
|
;; :order 90) |
|
|
|
;; (:discard (:tag ("Chore" "Routine" "Daily"))) |
|
|
|
)))))))) |
|
|
|
|
|
|
|
:config |
|
|
|
(org-super-agenda-mode) |
|
|
|
) |
|
|
|
|
|
|
|
(use-package! deft |
|
|
|
:bind |
|
|
|
("C-c n d" . deft) |
|
|
@ -323,6 +527,7 @@ Also immediately enables `mixed-pitch-modes' if currently in one of the modes." |
|
|
|
) |
|
|
|
|
|
|
|
(use-package! lsp-mode |
|
|
|
:disabled t |
|
|
|
:config |
|
|
|
(setq +lsp-company-backends '(:separate company-tabnine company-lsp company-yasnippet company-capf)) |
|
|
|
(setq lsp-enable-symbol-highlighting nil |
|
|
@ -350,28 +555,315 @@ Also immediately enables `mixed-pitch-modes' if currently in one of the modes." |
|
|
|
(dired-omit-files nil)) |
|
|
|
|
|
|
|
(use-package! hydra |
|
|
|
:ensure t) |
|
|
|
:config |
|
|
|
;; (global-set-key (kbd "C-x o") (defhydra hydra-window () |
|
|
|
;; "window" |
|
|
|
;; ("v" (lambda() |
|
|
|
;; (interactive) |
|
|
|
;; (split-window-right) |
|
|
|
;; (windmove-right)) |
|
|
|
;; "vert") |
|
|
|
;; ("x" (lambda() |
|
|
|
;; (interactive) |
|
|
|
;; (split-window-below) |
|
|
|
;; (windmove-down)) |
|
|
|
;; "horz") |
|
|
|
;; ("o" delete-other-windows "one" :color blue) |
|
|
|
;; ("m" ace-window "ace") |
|
|
|
;; ("b" ivy-switch-buffer "buf") |
|
|
|
;; ("q" nil "quit") |
|
|
|
;; )) |
|
|
|
) |
|
|
|
|
|
|
|
(use-package! pretty-hydra |
|
|
|
:init |
|
|
|
(defun with-faicon (icon str &optional height v-adjust) |
|
|
|
(s-concat (all-the-icons-faicon icon :v-adjust (or v-adjust 0) :height (or height 1)) " " str)) |
|
|
|
|
|
|
|
(defun with-fileicon (icon str &optional height v-adjust) |
|
|
|
(s-concat (all-the-icons-fileicon icon :v-adjust (or v-adjust 0) :height (or height 1)) " " str)) |
|
|
|
|
|
|
|
(defun with-octicon (icon str &optional height v-adjust) |
|
|
|
(s-concat (all-the-icons-octicon icon :v-adjust (or v-adjust 0) :height (or height 1)) " " str)) |
|
|
|
|
|
|
|
(defun with-material (icon str &optional height v-adjust) |
|
|
|
(s-concat (all-the-icons-material icon :v-adjust (or v-adjust 0) :height (or height 1)) " " str)) |
|
|
|
|
|
|
|
(defun with-mode-icon (mode str &optional height nospace face) |
|
|
|
(let* ((v-adjust (if (eq major-mode 'emacs-lisp-mode) 0.0 0.05)) |
|
|
|
(args `(:height ,(or height 1) :v-adjust ,v-adjust)) |
|
|
|
(_ (when face |
|
|
|
(lax-plist-put args :face face))) |
|
|
|
(icon (apply #'all-the-icons-icon-for-mode mode args)) |
|
|
|
(icon (if (symbolp icon) |
|
|
|
(apply #'all-the-icons-octicon "file-text" args) |
|
|
|
icon))) |
|
|
|
(s-concat icon (if nospace "" " ") str))) |
|
|
|
|
|
|
|
(defun icon-displayable-p () |
|
|
|
"Return non-nil if icons are displayable." |
|
|
|
(and t |
|
|
|
(or (display-graphic-p) (daemonp)) |
|
|
|
(or (featurep 'all-the-icons) |
|
|
|
(require 'all-the-icons nil t)))) |
|
|
|
(cl-defun pretty-hydra-title (title &optional icon-type icon-name |
|
|
|
&key face height v-adjust) |
|
|
|
"Add an icon in the hydra title." |
|
|
|
(let ((face (or face `(:foreground ,(face-background 'highlight)))) |
|
|
|
(height (or height 1.0)) |
|
|
|
(v-adjust (or v-adjust 0.0))) |
|
|
|
(concat |
|
|
|
(when (and (icon-displayable-p) icon-type icon-name) |
|
|
|
(let ((f (intern (format "all-the-icons-%s" icon-type)))) |
|
|
|
(when (fboundp f) |
|
|
|
(concat |
|
|
|
(apply f (list icon-name :face face :height height :v-adjust v-adjust)) |
|
|
|
" ")))) |
|
|
|
(propertize title 'face face)))) |
|
|
|
(defun leo/load-theme (theme) |
|
|
|
(setq doom-theme theme) |
|
|
|
(load-theme theme)) |
|
|
|
|
|
|
|
(defvar leo/toggles--title (with-faicon "toggle-on" "Toggles" 1 -0.05)) |
|
|
|
(pretty-hydra-define leo/toggles |
|
|
|
(:color amaranth :quit-key ("q" "C-g") :title leo/toggles--title) |
|
|
|
("Basic" |
|
|
|
( |
|
|
|
("n" doom/toggle-line-numbers "line numbers") |
|
|
|
("w" whitespace-mode "whitespace" :toggle t) |
|
|
|
("r" rainbow-mode "rainbow" :toggle t) |
|
|
|
) |
|
|
|
"Highlight" |
|
|
|
( |
|
|
|
("h l" hl-line-mode "line" :toggle t) |
|
|
|
("h t" hl-todo-mode "todo" :toggle t) |
|
|
|
) |
|
|
|
"UI" |
|
|
|
( |
|
|
|
("d" (leo/load-theme 'doom-one) "dark theme" :toggle (eq doom-theme 'doom-one)) |
|
|
|
("l" (leo/load-theme 'doom-nord-light) "light theme" :toggle (eq doom-theme 'doom-nord-light)) |
|
|
|
) |
|
|
|
"Modeline" |
|
|
|
( |
|
|
|
("m" doom-modeline-mode "modern mode-line" :toggle t) |
|
|
|
("b" display-battery-mode "battery" :toggle t) |
|
|
|
("t" display-time-mode "time" :toggle t) |
|
|
|
) |
|
|
|
"Coding" |
|
|
|
( |
|
|
|
("f" flycheck-mode "flycheck" :toggle t) |
|
|
|
("F" flymake-mode "flymake" :toggle t) |
|
|
|
("p" smartparens-mode "smartparens" :toggle t) |
|
|
|
("P" smartparens-strict-mode "smartparens strict" :toggle t) |
|
|
|
("S" show-smartparens-mode "show smartparens" :toggle t) |
|
|
|
) |
|
|
|
"Emacs" |
|
|
|
( |
|
|
|
("D" toggle-debug-on-error "debug on error" :toggle (default-value 'debug-on-error)) |
|
|
|
("X" toggle-debug-on-quit "debug on quit" :toggle (default-value 'debug-on-quit)) |
|
|
|
) |
|
|
|
) |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
(use-package! podcaster |
|
|
|
:custom |
|
|
|
(podcaster-mp3-player "mpv") |
|
|
|
(podcaster-feeds-urls '( |
|
|
|
"https://feeds.fireside.fm/linuxunplugged/rss" ;; Linux Unplugged |
|
|
|
"https://feeds.fireside.fm/office/rss" ;; Office Hours |
|
|
|
"https://feeds.fireside.fm/linuxactionnews/rss" ;; Linux Action News |
|
|
|
"https://feeds.fireside.fm/selfhosted/rss" ;; Self Hosted |
|
|
|
"https://feeds.fireside.fm/coder/rss" ;; Coder Radio |
|
|
|
"https://feeds.fireside.fm/extras/rss" ;; Extras |
|
|
|
)) |
|
|
|
(podcaster-mp3-player-extra-params '("--quiet" "--really-quiet" "--no-audio-display" "--force-window=no")) |
|
|
|
:config |
|
|
|
(defun podcaster () |
|
|
|
"Play podcasts." |
|
|
|
(interactive) |
|
|
|
(let* ((ivy-sort-functions-alist nil) |
|
|
|
(items (podcaster--collect-podcasts)) |
|
|
|
(titles (mapcar #'car items)) |
|
|
|
(title (completing-read "Podcasts: " titles)) |
|
|
|
(item (cdr (assoc-string title items)))) |
|
|
|
(when (ignore-errors (podcaster--player-process)) |
|
|
|
(podcaster-stop)) |
|
|
|
(podcaster--play-podcast item))) |
|
|
|
) |
|
|
|
|
|
|
|
(use-package! emms |
|
|
|
:disabled t |
|
|
|
:commands emms |
|
|
|
:init |
|
|
|
(add-hook 'emms-player-started-hook 'emms-show) |
|
|
|
(setq emms-show-format "Playing: %s") |
|
|
|
:config |
|
|
|
(emms-minimalistic) |
|
|
|
(emms-default-players) |
|
|
|
(setq emms-player-list '(emms-player-mpv) |
|
|
|
emms-playlist-buffer-name "*Media*") |
|
|
|
(setq emms-info-asynchronously nil) |
|
|
|
|
|
|
|
(setq-default |
|
|
|
emms-source-file-default-directory "~/Music/" |
|
|
|
|
|
|
|
emms-source-playlist-default-format 'm3u |
|
|
|
emms-playlist-mode-center-when-go t |
|
|
|
emms-playlist-default-major-mode 'emms-playlist-mode |
|
|
|
emms-show-format "NP: %s" |
|
|
|
|
|
|
|
emms-player-list '(emms-player-mpv)) |
|
|
|
:bind (:map global-map |
|
|
|
("C-c m" . nil) |
|
|
|
("C-c m" . emms-hydra/body)) |
|
|
|
:pretty-hydra |
|
|
|
((:color amaranth :quit-key "q") |
|
|
|
("emms" |
|
|
|
(("p" emms-start "Play/Pause") |
|
|
|
("s" emms-stop "Stop") |
|
|
|
("i" emms-show "Info") |
|
|
|
) |
|
|
|
) |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
(use-package! emacs |
|
|
|
:bind (:map global-map |
|
|
|
("s-." . emacs-hydra/body)) |
|
|
|
:config |
|
|
|
(defun leo/music-play (url title album) |
|
|
|
(setq podcast-hard-link (car (car org-stored-links))) |
|
|
|
(message podcast-hard-link) |
|
|
|
(do-applescript |
|
|
|
(format " |
|
|
|
tell application \"Music\" |
|
|
|
open location \"%s\" |
|
|
|
play |
|
|
|
set name of current track to \"%s\" |
|
|
|
set album of current track to \"%s\" |
|
|
|
end tell" url title album))) |
|
|
|
|
|
|
|
(defun leo/music-visual-scrubber () |
|
|
|
"Show a graphical representation of the player progress bar." |
|
|
|
(interactive) |
|
|
|
(dotimes (i 5) |
|
|
|
(message (do-applescript |
|
|
|
"tell application \"Music\" |
|
|
|
set player_pos to get player position |
|
|
|
set player_dur to get duration of current track |
|
|
|
set player_time to get time of current track |
|
|
|
set get_seconds to round (player_pos) mod 60 |
|
|
|
set get_minutes to round (player_pos) / 60 |
|
|
|
set get_hours to round (player_pos) / (60 * 60) |
|
|
|
set pad_seconds to text -2 thru -1 of (\"00\" & get_seconds) |
|
|
|
set pad_minutes to text -2 thru -1 of (\"00\" & get_minutes) |
|
|
|
set pad_hours to text -2 thru -1 of (\"00\" & get_hours) |
|
|
|
set current_pos to pad_hours & \":\" & pad_minutes & \":\" & pad_seconds |
|
|
|
set final_pos to text -1 thru -8 of (\"00000000\" & player_time) |
|
|
|
set perc to player_pos / player_dur |
|
|
|
set bar_length to 40 |
|
|
|
set done to round (bar_length * perc) |
|
|
|
if done is 0 then set done to 1 |
|
|
|
set progress_completed to text 1 thru done of (\"\") |
|
|
|
set total_progress to text 1 thru bar_length of (progress_completed & \"\") |
|
|
|
set total_progress to \"\" & total_progress & \"\" |
|
|
|
set right_aligned_final_pos to text -1 thru -(bar_length - 8 + 2) of (\" \" & final_pos) |
|
|
|
set total_progress to total_progress & \" |
|
|
|
\" & current_pos & right_aligned_final_pos |
|
|
|
end tell")) |
|
|
|
(sit-for 1) |
|
|
|
) |
|
|
|
(message "") |
|
|
|
) |
|
|
|
|
|
|
|
;; |
|
|
|
;;01:34:37 01:21:27 |
|
|
|
;; |
|
|
|
;;00000 |
|
|
|
|
|
|
|
|
|
|
|
(defun leo/music-get-info () |
|
|
|
(interactive) |
|
|
|
(do-applescript "tell application \"Music\" |
|
|
|
set myName to get name of current track |
|
|
|
set myAlbum to get album of current track |
|
|
|
myName & \" - \" & myAlbum |
|
|
|
end tell")) |
|
|
|
|
|
|
|
(defun leo/music-playpause () |
|
|
|
(interactive) |
|
|
|
(do-applescript |
|
|
|
(format "tell application \"Music\" to playpause"))) |
|
|
|
|
|
|
|
(defun leo/music-skip-forward-30 () |
|
|
|
(interactive) |
|
|
|
(do-applescript |
|
|
|
(format "tell application \"Music\" to set player position to (player position + 30)"))) |
|
|
|
|
|
|
|
(defun leo/music-skip-backward-10 () |
|
|
|
(interactive) |
|
|
|
(do-applescript |
|
|
|
(format "tell application \"Music\" to set player position to (player position - 10)"))) |
|
|
|
|
|
|
|
(defun leo/play-podcast-in-music-app () |
|
|
|
"When in an elfeed-entry buffer, open mp3 url in Music.app on macos." |
|
|
|
(interactive) |
|
|
|
(org-store-link nil nil) |
|
|
|
(when (not (string= (buffer-name) "*elfeed-entry*")) |
|
|
|
(error "Not in an elfeed entry buffer")) |
|
|
|
|
|
|
|
(let ( |
|
|
|
(url (car (car (elfeed-entry-enclosures elfeed-show-entry)))) |
|
|
|
(title (elfeed-entry-title elfeed-show-entry)) |
|
|
|
(podcast (elfeed-feed-title (elfeed-entry-feed elfeed-show-entry))) |
|
|
|
) |
|
|
|
(leo/music-play url title podcast) |
|
|
|
)) |
|
|
|
(defun leo/music-open-show-notes () |
|
|
|
(interactive) |
|
|
|
(org-link-open-from-string podcast-hard-link) |
|
|
|
(elfeed-show-refresh--mail-style) |
|
|
|
) |
|
|
|
|
|
|
|
:pretty-hydra |
|
|
|
((:title (pretty-hydra-title (leo/music-get-info) 'faicon "headphones" :face 'all-the-icons-purple :height 1.1 :v-adjust -0.05) |
|
|
|
:color amaranth |
|
|
|
:quit-key ("q" "C-g" "s-.")) |
|
|
|
("Scrub" |
|
|
|
( |
|
|
|
("j" leo/music-skip-backward-10 "back 10 sec") |
|
|
|
("l" leo/music-skip-forward-30 "forward 30 sec") |
|
|
|
("v" leo/music-visual-scrubber "view scrubber") |
|
|
|
) |
|
|
|
"Controls" |
|
|
|
( |
|
|
|
("p" leo/music-playpause "play/pause" :color blue) |
|
|
|
("SPC" leo/music-playpause "play/pause" :color blue) ;; [[elfeed:feeds.fireside.fm#e27c3bf8-55cd-47fa-9a14-4eb93d6dc632][475: I Do Declare]] |
|
|
|
) |
|
|
|
"Other" |
|
|
|
( |
|
|
|
("s" leo/music-open-show-notes "show notes" :color blue) |
|
|
|
("b" elfeed "browse" :color blue) |
|
|
|
) |
|
|
|
)) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
(use-package! elfeed |
|
|
|
:after hydra |
|
|
|
:bind (:map elfeed-search-mode-map |
|
|
|
("a" . elfeed-search-clear) |
|
|
|
("e" . elfeed-search-emacs) |
|
|
|
("E" . (lambda () (interactive) (elfeed-search-toggle "+emacs"))) |
|
|
|
("t" . elfeed-search-tesla) |
|
|
|
("T" . (lambda () (interactive) (elfeed-search-toggle "+tesla"))) |
|
|
|
("y" . elfeed-search-video) |
|
|
|
("Y" . (lambda () (interactive) (elfeed-search-toggle "+youtube"))) |
|
|
|
("v" . elfeed-search-browse-url) |
|
|
|
("o" . elfeed-search-show-entry) |
|
|
|
("g" . elfeed-search-fetch) |
|
|
|
("U" . elfeed-search-toggle-unread) |
|
|
|
) |
|
|
|
("?" . elfeed-hydra/body)) |
|
|
|
:config |
|
|
|
(load! "setup-elfeed.el") |
|
|
|
(setq elfeed-show-refresh-function 'elfeed-show-refresh--mail-style) |
|
|
|
:init |
|
|
|
(defun elfeed-search-clear () (interactive) (setq elfeed-search-filter "") (elfeed-search-update :force)) |
|
|
|
(defun elfeed-search-emacs () (interactive) (setq elfeed-search-filter "+emacs") (elfeed-search-update :force)) |
|
|
|
(defun elfeed-search-tesla () (interactive) (setq elfeed-search-filter "+tesla") (elfeed-search-update :force)) |
|
|
|
(defun elfeed-search-podcast () (interactive) (setq elfeed-search-filter "+podcast") (elfeed-search-update :force)) |
|
|
|
(defun elfeed-search-video () (interactive) (setq elfeed-search-filter "+youtube") (elfeed-search-update :force)) |
|
|
|
|
|
|
|
(defun elfeed-search-toggle-unread () |
|
|
|
(interactive) |
|
|
|
(let ((filter elfeed-search-filter)) |
|
|
@ -388,13 +880,72 @@ Also immediately enables `mixed-pitch-modes' if currently in one of the modes." |
|
|
|
(if (s-contains-p term filter) |
|
|
|
(setq elfeed-search-filter (s-trim (s-replace term "" filter))) |
|
|
|
(setq elfeed-search-filter (concat filter " " term)))) |
|
|
|
(elfeed-search-update :force) |
|
|
|
) |
|
|
|
(elfeed-search-update :force)) |
|
|
|
|
|
|
|
:pretty-hydra |
|
|
|
((:title (pretty-hydra-title "Elfeed" 'faicon "rss-square" :face 'all-the-icons-orange :height 1.1 :v-adjust -0.05) |
|
|
|
:color amaranth |
|
|
|
:quit-key ("q" "C-g" "s-.")) |
|
|
|
("Search" |
|
|
|
(("c" elfeed-db-compact "compact db") |
|
|
|
("g" elfeed-search-update--force "refresh") |
|
|
|
("G" elfeed-search-fetch "update") |
|
|
|
("y" elfeed-search-yank "copy URL") |
|
|
|
("+" elfeed-search-tag-all "tag all") |
|
|
|
("-" elfeed-search-untag-all "untag all")) |
|
|
|
"Filter" |
|
|
|
(("/" elfeed-search-live-filter "live filter") |
|
|
|
("f" (elfeed-search-set-filter "@6-months-ago +f") "favorites") |
|
|
|
("c" (elfeed-search-set-filter "@6-months-ago") "clear search") |
|
|
|
("t" (elfeed-search-set-filter "@1-day-ago") "today")) |
|
|
|
"Search Toggles" |
|
|
|
( |
|
|
|
("se" (elfeed-search-toggle "+emacs") "emacs") |
|
|
|
("st" (elfeed-search-toggle "+tesla") "tesla") |
|
|
|
("sp" (elfeed-search-toggle "+podcast") "podcasts") |
|
|
|
("sj" (elfeed-search-toggle "+jb") "jb") |
|
|
|
("sy" (elfeed-search-toggle "+youtube") "youtube") |
|
|
|
("sl" (elfeed-search-toggle "+linux") "linux") |
|
|
|
) |
|
|
|
"Media" |
|
|
|
( |
|
|
|
("P" leo/play-podcast-in-music-app "Play Media") |
|
|
|
("A" elfeed-show-add-enclosure-to-playlist "Add to playlist") |
|
|
|
) |
|
|
|
"Article" |
|
|
|
(("b" elfeed-search-browse-url "browse") |
|
|
|
("n" next-line "next") |
|
|
|
("p" previous-line "previous") |
|
|
|
("u" elfeed-search-tag-all-unread "mark unread") |
|
|
|
("r" elfeed-search-untag-all-unread "mark read") |
|
|
|
("RET" elfeed-search-show-entry "show")))) |
|
|
|
) |
|
|
|
|
|
|
|
(after! xref |
|
|
|
(add-to-list '+lookup-provider-url-alist '("Melpa" "https://melpa.org/#/?q=%s")) |
|
|
|
(add-to-list '+lookup-provider-url-alist '("GitHub - LifeOmic" "https://github.com/search?q=user:LifeOmic+%s"))) |
|
|
|
(add-to-list '+lookup-provider-url-alist '("GitHub - LifeOmic" "https://github.com/search?q=user:LifeOmic+%s")) |
|
|
|
(add-to-list '+lookup-provider-url-alist '("Nix Packages" "https://search.nixos.org/packages?channel=22.05&from=0&size=50&sort=relevance&type=packages&query=%s")) |
|
|
|
(add-to-list '+lookup-provider-url-alist '("Home Manager" "https://mipmip.github.io/home-manager-option-search/?%s")) |
|
|
|
(add-to-list '+lookup-provider-url-alist '("Github - Nix Darwin" "https://github.com/LnL7/nix-darwin/search?q=%s")) |
|
|
|
) |
|
|
|
|
|
|
|
(after! world-clock |
|
|
|
;; Seattle 13:27 PDT |
|
|
|
;; New York 16:27 EDT |
|
|
|
;; London 21:27 BST |
|
|
|
;; Paris 22:27 CEST |
|
|
|
;; Bangalore 01:57 IST |
|
|
|
;; Tokyo 05:27 JST |
|
|
|
:config |
|
|
|
(setq world-clock-time-format "%I:%M %p") |
|
|
|
(setq world-clock-list '( |
|
|
|
("+7:00" "Pacific") |
|
|
|
("+5:00" "Central") |
|
|
|
("+4:00" "Eastern") |
|
|
|
("-1:00" "London") |
|
|
|
("-5:30" "India") |
|
|
|
)) |
|
|
|
) |
|
|
|
|
|
|
|
;;;;;;;;;;; |
|
|
|
;; HOOKS ;; |
|
|
@ -409,20 +960,70 @@ Also immediately enables `mixed-pitch-modes' if currently in one of the modes." |
|
|
|
(map! :map global-map |
|
|
|
:prefix "C-x" |
|
|
|
"C-l" nil |
|
|
|
(:prefix ("C-l" . "launch app") |
|
|
|
(:prefix ("C-l" . "Levi's Leader") |
|
|
|
"a" #'org-agenda |
|
|
|
"e" #'elfeed |
|
|
|
"m" #'emms-browser |
|
|
|
"g" #'magit-status |
|
|
|
"w" #'world-clock |
|
|
|
)) |
|
|
|
|
|
|
|
(map! :map global-map |
|
|
|
:prefix "C-c" |
|
|
|
"a" nil |
|
|
|
(:prefix ("a" . "launch app") |
|
|
|
"a" #'org-agenda |
|
|
|
"e" #'elfeed |
|
|
|
"g" #'magit-status |
|
|
|
)) |
|
|
|
(map! :map org-mode-map |
|
|
|
:localleader |
|
|
|
"t" nil |
|
|
|
(:prefix ("t" . "tables") |
|
|
|
|
|
|
|
:desc "Insert row seperator below point" |
|
|
|
"-" #'org-table-hline-and-move |
|
|
|
|
|
|
|
:desc "Align Column Separators" |
|
|
|
"a" #'org-table-align |
|
|
|
|
|
|
|
:desc "Blank current field" |
|
|
|
"b" #'org-table-blank-field |
|
|
|
|
|
|
|
:desc "Create or Convert" |
|
|
|
"c" #'org-table-create-or-convert-from-region |
|
|
|
|
|
|
|
(:prefix ("d" . "delete") |
|
|
|
:desc "Column" |
|
|
|
"c" #'org-table-delete-column |
|
|
|
:desc "Row" |
|
|
|
"r" #'org-table-kill-row) |
|
|
|
|
|
|
|
:desc "Edit Field" |
|
|
|
"e" #'org-table-edit-field |
|
|
|
|
|
|
|
:desc "Edit Formula" |
|
|
|
"f" #'org-table-edit-formulas |
|
|
|
|
|
|
|
:desc "Help Show Field Info" |
|
|
|
"h" #'org-table-field-info |
|
|
|
|
|
|
|
(:prefix ("i" . "insert") |
|
|
|
:desc "Insert Column" |
|
|
|
"c" #'org-table-insert-column |
|
|
|
:desc "Insert Row" |
|
|
|
"r" #'org-table-insert-row |
|
|
|
) |
|
|
|
|
|
|
|
:desc "Recalculate This Table" |
|
|
|
"r" #'org-table-recalculate |
|
|
|
|
|
|
|
:desc "Recalculate All Buffer Tables" |
|
|
|
"R" #'org-table-recalculate-buffer-tables |
|
|
|
|
|
|
|
:desc "Sort by" |
|
|
|
"s" #'org-table-sort-lines |
|
|
|
|
|
|
|
(:prefix ("t" . "toggle") |
|
|
|
:desc "Toggle Formulas" |
|
|
|
"f" #'org-table-toggle-formula-debugger |
|
|
|
:desc "Toggle Coordinates" |
|
|
|
"c" #'org-table-toggle-coordinate-overlays |
|
|
|
) |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
(map! :map comint-mode-map |
|
|
|
"q" '(lambda() |
|
|
@ -458,12 +1059,10 @@ Also immediately enables `mixed-pitch-modes' if currently in one of the modes." |
|
|
|
|
|
|
|
(use-package! vs-restclient |
|
|
|
:bind (:map vs-restclient-mode-map |
|
|
|
("C-c C-c" . 'vs-restclient-http-send-current-stay-in-window)) |
|
|
|
:ensure t) |
|
|
|
("C-c C-c" . 'vs-restclient-http-send-current-stay-in-window))) |
|
|
|
|
|
|
|
(use-package! vs-restclient-jq |
|
|
|
:after vs-restclient |
|
|
|
:ensure t |
|
|
|
:config |
|
|
|
(vs-restclient-register-result-func |
|
|
|
"jq-set-var" #'vs-restclient-jq-json-var-function |
|
|
@ -473,10 +1072,10 @@ Also immediately enables `mixed-pitch-modes' if currently in one of the modes." |
|
|
|
(define-key vs-restclient-response-mode-map (kbd "C-c C-j") #'vs-restclient-jq-interactive-result) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
(map! :map global-map |
|
|
|
"M-t" #'treemacs-select-window |
|
|
|
"M-q" #'leo/kill-this-buffer-unless-scratch |
|
|
|
"s-w" #'leo/kill-this-buffer-unless-scratch |
|
|
|
"M-RET" #'eshell |
|
|
|
|
|
|
|
:desc "Format Document or Region" |
|
|
@ -484,9 +1083,10 @@ Also immediately enables `mixed-pitch-modes' if currently in one of the modes." |
|
|
|
:desc "Comment or Uncomment Line or Region" |
|
|
|
"C-;" #'leo/comment-or-uncomment-region-or-line |
|
|
|
:desc "Open Private Doom Config" |
|
|
|
"C-c C-e" #'leo/edit-config |
|
|
|
"C-c C-e" #'leo/edit-config |
|
|
|
"C-c d" #'leo/duplicate-thing |
|
|
|
"C-c g" #'magit-status |
|
|
|
"s-g" #'magit-status |
|
|
|
"M-n" #'leo/jump-to-next-symbol |
|
|
|
"M-p" #'leo/jump-to-prev-symbol |
|
|
|
"M-u" #'upcase-dwim |
|
|
@ -502,7 +1102,8 @@ Also immediately enables `mixed-pitch-modes' if currently in one of the modes." |
|
|
|
"C-c C-r" #'persp-rename |
|
|
|
"C-c C-l" #'persp-switch |
|
|
|
"C-c C-s" #'persp-switch |
|
|
|
"C-c b" #'ivy-switch-buffer |
|
|
|
"C-c b" #'+ivy/switch-workspace-buffer |
|
|
|
"s-b" #'+ivy/switch-workspace-buffer |
|
|
|
|
|
|
|
;; "C-c b" #'counsel-switch-buffer |
|
|
|
"C-s" #'swiper |
|
|
|