Browse Source

Play PODCASTs from elfeed; Org Agenda Improvements

As well as:
 - Font updates
 - Hydras!
 - Enable Tabnine
 - Add some podcast feeds
 - Some generic fixes/updates
master
Levi Olson 2 years ago
parent
commit
65825e3a89
7 changed files with 709 additions and 65 deletions
  1. +659
    -58
      config.el
  2. +4
    -1
      custom.el
  3. +6
    -5
      init.el
  4. +16
    -0
      packages.el
  5. +8
    -1
      setup-elfeed.el
  6. +9
    -0
      snippets/jsonc-mode/Bold Comment
  7. +7
    -0
      snippets/org-mode/table

+ 659
- 58
config.el View File

@ -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

+ 4
- 1
custom.el View File

@ -4,8 +4,10 @@
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(company-backends '(company-tabnine company-capf))
'(custom-safe-themes
'("fe2539ccf78f28c519541e37dc77115c6c7c2efcec18b970b16e4a4d2cd9891d" "a7b20039f50e839626f8d6aa96df62afebb56a5bbd1192f557cb2efb5fcfb662" "d268b67e0935b9ebc427cad88ded41e875abfcc27abd409726a92e55459e0d01" "3d47380bf5aa650e7b8e049e7ae54cdada54d0637e7bac39e4cc6afb44e8463b" "f91395598d4cb3e2ae6a2db8527ceb83fed79dbaf007f435de3e91e5bda485fb" "835868dcd17131ba8b9619d14c67c127aa18b90a82438c8613586331129dda63" "028c226411a386abc7f7a0fba1a2ebfae5fe69e2a816f54898df41a6a3412bb5" "a0be7a38e2de974d1598cf247f607d5c1841dbcef1ccd97cded8bea95a7c7639" "9b54ba84f245a59af31f90bc78ed1240fca2f5a93f667ed54bbf6c6d71f664ac" "47db50ff66e35d3a440485357fb6acb767c100e135ccdf459060407f8baea7b2" "246a9596178bb806c5f41e5b571546bb6e0f4bd41a9da0df5dfbca7ec6e2250c" "745d03d647c4b118f671c49214420639cb3af7152e81f132478ed1c649d4597d" "d47f868fd34613bd1fc11721fe055f26fd163426a299d45ce69bef1f109e1e71" "3d54650e34fa27561eb81fc3ceed504970cc553cfd37f46e8a80ec32254a3ec3" "a82ab9f1308b4e10684815b08c9cac6b07d5ccb12491f44a942d845b406b0296" "613aedadd3b9e2554f39afe760708fc3285bf594f6447822dd29f947f0775d6c" "850bb46cc41d8a28669f78b98db04a46053eca663db71a001b40288a9b36796c" "4b6b6b0a44a40f3586f0f641c25340718c7c626cbf163a78b5a399fbe0226659" "e8df30cd7fb42e56a4efc585540a2e63b0c6eeb9f4dc053373e05d774332fc13" "b5803dfb0e4b6b71f309606587dd88651efe0972a5be16ece6a958b197caeed8" "266ecb1511fa3513ed7992e6cd461756a895dcc5fef2d378f165fed1c894a78c" "333958c446e920f5c350c4b4016908c130c3b46d590af91e1e7e2a0611f1e8c5" "0d01e1e300fcafa34ba35d5cf0a21b3b23bc4053d388e352ae6a901994597ab1" "5f19cb23200e0ac301d42b880641128833067d341d22344806cdad48e6ec62f6" "0466adb5554ea3055d0353d363832446cd8be7b799c39839f387abb631ea0995" "84b14a0a41bb2728568d40c545280dbe7d6891221e7fbe7c2b1c54a3f5959289" "23c806e34594a583ea5bbf5adf9a964afe4f28b4467d28777bcba0d35aa0872e" "c4063322b5011829f7fdd7509979b5823e8eea2abf1fe5572ec4b7af1dd78519" "234dbb732ef054b109a9e5ee5b499632c63cc24f7c2383a849815dacc1727cb6" "a9a67b318b7417adbedaab02f05fa679973e9718d9d26075c6235b1f0db703c8" "1d44ec8ec6ec6e6be32f2f73edf398620bb721afeed50f75df6b12ccff0fbb15" "6c98bc9f39e8f8fd6da5b9c74a624cbb3782b4be8abae8fd84cbc43053d7c175" "8146edab0de2007a99a2361041015331af706e7907de9d6a330a3493a541e5a6" "e2c926ced58e48afc87f4415af9b7f7b58e62ec792659fcb626e8cba674d2065" "846b3dc12d774794861d81d7d2dcdb9645f82423565bfb4dad01204fa322dbd5" "f7fed1aadf1967523c120c4c82ea48442a51ac65074ba544a5aefc5af490893b" "6c531d6c3dbc344045af7829a3a20a09929e6c41d7a7278963f7d3215139f6a7" "1d5e33500bc9548f800f9e248b57d1b2a9ecde79cb40c0b1398dec51ee820daf" "c2aeb1bd4aa80f1e4f95746bda040aafb78b1808de07d340007ba898efa484f5" "1704976a1797342a1b4ea7a75bdbb3be1569f4619134341bd5a4c1cfb16abad4" default))
'(magit-delta-default-dark-theme "base16")
'(package-selected-packages '(info-colors company-box)))
'(package-selected-packages '(prettier info-colors company-box)))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
@ -14,3 +16,4 @@
)
(put 'upcase-region 'disabled nil)
(put 'narrow-to-region 'disabled nil)
(put 'emms-browser-delete-files 'disabled nil)

+ 6
- 5
init.el View File

@ -20,7 +20,7 @@
;;layout ; auie,ctsrnm is the superior home row
:completion
(company +childFrame) ; the ultimate code completion backend
(company +childframe) ; the ultimate code completion backend
;; helm ; the *other* search engine for love and life
;;ido ; the other *other* search engine...
(ivy +fuzzy +prescient +icons) ; a search engine for love and life
@ -41,7 +41,7 @@
(ligatures) ; ligatures and symbols to make your code pretty again
minimap ; show a map of the code on the side
modeline ; snazzy, Atom-inspired modeline, plus API
;;nav-flash ; blink cursor line after big motions
nav-flash ; blink cursor line after big motions
;;neotree ; a project drawer, like NERDTree for vim
ophints ; highlight the region an operation acts on
(popup +all +defaults) ; tame sudden yet inevitable temporary windows
@ -82,14 +82,14 @@
vterm ; the best terminal emulation in Emacs
:checkers
(syntax +childframe) ; tasing you for every semicolon you forget
syntax ; tasing you for every semicolon you forget
spell ; tasing you for misspelling mispelling
grammar ; tasing grammar mistake every you make
:tools
;;ansible
debugger ; FIXME stepping through code, to help you add bugs
;;direnv
direnv
(docker +lsp)
;;editorconfig ; let someone else argue about tabs vs spaces
;;ein ; tame Jupyter notebooks with emacs
@ -150,13 +150,14 @@
nix ; I hereby declare "nix geht mehr!"
;;ocaml ; an objective camel
(org
+pandoc
+pretty
+dragndrop
+roam) ; organize your plain life in plain text
;;php ; perl's insecure younger brother
;;plantuml ; diagrams for confusing people more
;;purescript ; javascript, but functional
;; python ; beautiful is better than ugly
python ; beautiful is better than ugly
;;qt ; the 'cutest' gui framework ever
;;racket ; a DSL for DSLs
;;raku ; the artist formerly known as perl6

+ 16
- 0
packages.el View File

@ -66,11 +66,27 @@
(package! jq-mode)
(package! org-super-agenda
:recipe (:host github :repo "alphapapa/org-super-agenda") :pin "857783ecd3dbe35c72b4eca046e0a5dc64041fdf")
(package! magit-delta
:recipe (:host github :repo "dandavison/magit-delta"))
(package! emms)
(package! podcaster
:recipe (:host github :repo "lujun9972/podcaster"))
(package! elfeed-goodies
:recipe (:host github :repo "algernon/elfeed-goodies"))
(package! pretty-hydra)
;; (package! major-mode-hydra
;; :recipe (:host github :repo "jerrypnz/major-mode-hydra.el"))
(package! hydra-posframe
:recipe (:host github :repo "Ladicle/hydra-posframe"))
(package! vs-restclient
:recipe (:host github :repo "leothelocust/vs-restclient.el"))

+ 8
- 1
setup-elfeed.el View File

@ -25,6 +25,13 @@
("https://feeds.fireside.fm/linuxunplugged/rss" podcast linux)
("https://latenightlinux.com/feed/all" podcast linux)
("https://feeds.fireside.fm/linuxunplugged/rss" podcast linux jb) ;; Linux Unplugged
("https://feeds.fireside.fm/office/rss" podcast linux jb) ;; Office Hours
("https://feeds.fireside.fm/linuxactionnews/rss" podcast linux jb) ;; Linux Action News
("https://feeds.fireside.fm/selfhosted/rss" podcast linux jb) ;; Self Hosted
("https://feeds.fireside.fm/coder/rss" podcast linux jb) ;; Coder Radio
("https://feeds.fireside.fm/extras/rss" podcast linux jb) ;; Extras
("https://www.youtube.com/feeds/videos.xml?channel_id=UCbgBDBrwsikmtoLqtpc59Bw" youtube tech) ;; teaching tech
("https://www.youtube.com/feeds/videos.xml?channel_id=UCBJycsmduvYEL83R_U4JriQ" youtube tech) ;; mkbhd
("https://www.youtube.com/feeds/videos.xml?channel_id=UCUHW94eEFW7hkUMVaZz4eDg" youtube science) ;; minute physics
@ -45,7 +52,7 @@
:config
(defun yt-dl-it (url)
"Downloads the URL in an async shell"
(let ((default-directory "/Users/leviolson/Videos"))
(let ((default-directory "/Users/Levi_Olson/Videos"))
(async-shell-command (format "youtube-dl %s" url))))
(defun elfeed-youtube-dl (&optional use-generic-p)

+ 9
- 0
snippets/jsonc-mode/Bold Comment View File

@ -0,0 +1,9 @@
# -*- mode: snippet -*-
# name: Bold Comment
# key: bc
# condition: t
# --
// ${1:$(make-string (string-width yas-text) ?\=)}
// ${1:comment}
// ${1:$(make-string (string-width yas-text) ?\=)}
$0

+ 7
- 0
snippets/org-mode/table View File

@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: New Table
# key: table
# condition: t
# --
| $0 |

Loading…
Cancel
Save