Merge branch 'main' of git.sr.ht:~marcuskammer/emacs.d

This commit is contained in:
Marcus Kammer 2021-12-16 09:45:31 +01:00
commit 48d58753be
11 changed files with 207 additions and 212 deletions

View file

@ -113,3 +113,14 @@ was created from a Texinfo file generated by Docutils or Sphinx."
(add-hook 'after-save-hook
'executable-make-buffer-file-executable-if-script-p)
(global-set-key (kbd "M-i") 'imenu)
(global-set-key (kbd "M-o") 'ace-window)
(global-set-key (kbd "M-[") 'tab-bar-history-back)
(global-set-key (kbd "M-]") 'tab-bar-history-forward)
(add-hook 'diary-display-hook 'fancy-diary-display)
(add-hook 'today-visible-calendar-hook 'calendar-mark-today)
(add-hook 'write-file-hooks 'delete-trailing-whitespace)
(add-hook 'diary-list-entries-hook 'diary-include-other-diary-files)
(add-hook 'diary-mark-entries-hook 'diary-mark-included-diary-files)

78
bundle/bundle--gui.el Normal file
View file

@ -0,0 +1,78 @@
(use-package counsel
:bind (("C-M-j" . 'counsel-switch-buffer)
:map minibuffer-local-map
("C-r" . 'counsel-minibuffer-history))
:custom
(counsel-linux-app-format-function #'counsel-linux-app-format-function-name-only)
:config
(counsel-mode 1))
(use-package all-the-icons
:if (display-graphic-p)
:commands all-the-icons-install-fonts
:init
(unless (find-font (font-spec :name "all-the-icons"))
(all-the-icons-install-fonts t)))
(use-package all-the-icons-dired
:if (display-graphic-p)
:hook (dired-mode . all-the-icons-dired-mode))
(use-package ivy
:bind (("C-s" . swiper))
:init
(ivy-mode 1))
(use-package olivetti
:init (add-hook 'Info-mode-hook (lambda () (olivetti-mode) (setq olivetti-body-width 73)))
:custom (olivetti-body-width 89))
(use-package shrface
:config
(shrface-basic)
(shrface-trial)
(shrface-default-keybindings)
(setq shrface-href-versatile t
shrface-toggle-bullets t
shr-width nil))
(use-package ace-window)
(use-package doom-modeline
:init (doom-modeline-mode 1))
(use-package doom-themes
:init (load-theme 'doom-nord t))
(use-package rainbow-delimiters
:hook (prog-mode . rainbow-delimiters-mode))
(use-package helpful
:commands (helpful-callable helpful-variable helpful-command helpful-key)
:custom
(counsel-describe-function-function #'helpful-callable)
(counsel-describe-variable-function #'helpful-variable)
:bind
([remap describe-function] . counsel-describe-function)
([remap describe-command] . helpful-command)
([remap describe-variable] . counsel-describe-variable)
([remap describe-key] . helpful-key))
(use-package emojify
:hook (erc-mode . emojify-mode)
:commands emojify-mode)
(use-package unicode-fonts
:config
(unicode-fonts-setup))
(use-package webjump
:bind ("C-c j" . webjump)
:custom
(webjump-sites
(append '(("Wikipedia_de" . [simple-query
"de.wikipedia.org"
"https://de.wikipedia.org/wiki/" ""]))
webjump-sample-sites)))
(use-package smartparens)

View file

@ -1,10 +0,0 @@
(add-hook 'diary-display-hook 'fancy-diary-display)
(add-hook 'today-visible-calendar-hook 'calendar-mark-today)
(add-hook 'write-file-hooks 'delete-trailing-whitespace)
(add-hook 'diary-list-entries-hook 'diary-include-other-diary-files)
(add-hook 'diary-mark-entries-hook 'diary-mark-included-diary-files)
(add-hook 'newsticker-mode-hook 'imenu-add-menubar-index)
(if (display-graphic-p)
(add-hook 'after-init-hook (lambda ()
(org-agenda-list)
(me/split-h3))))

View file

@ -1,7 +0,0 @@
;; GLOBAL KEYS
;; (global-set-key (kbd "C-c C-x m") 'org-pomodoro)
(global-set-key (kbd "M-i") 'imenu)
(global-set-key (kbd "C-c n") 'newsticker-start)
(global-set-key (kbd "M-o") 'ace-window)
(global-set-key (kbd "M-[") 'tab-bar-history-back)
(global-set-key (kbd "M-]") 'tab-bar-history-forward)

View file

@ -1,7 +0,0 @@
(add-to-list 'auto-mode-alist '("\\.tmpl\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.lisp$" . lisp-mode))
(add-to-list 'auto-mode-alist '("\\.lsp$" . lisp-mode))
(add-to-list 'auto-mode-alist '("\\.cl$" . lisp-mode))
(add-to-list 'auto-mode-alist '("\\.epub\\'" . nov-mode))
(add-to-list 'auto-mode-alist '("\\.[Cc][Ss][Vv]\\'" . csv-mode))
(add-to-list 'slime-contribs 'slime-autodoc)

View file

@ -74,3 +74,7 @@
(s-replace ".git" "" remote-url)
"/pull/"
(match-string 1 region)))))))
(if (display-graphic-p)
(add-hook 'after-init-hook (lambda () (org-agenda-list) (me/split-h3)))
(org-agenda-list))

46
bundle/bundle--news.el Normal file
View file

@ -0,0 +1,46 @@
(use-package eww
:init
(add-hook 'eww-after-render-hook #'shrface-mode)
:config
(require 'shrface)
(setq shr-use-colors nil
shr-use-fonts nil
shr-cookie-policy nil
browse-url-browser-function (quote eww-browse-url)))
(use-package elfeed
:bind ("C-x w" . elfeed)
:init
(setq elfeed-feeds
'(("http://nullprogram.com/feed/" lisp blog)
("https://planet.emacslife.com/atom.xml" emacs)
("https://drewdevault.com/blog/index.xml" coding golang blog)
("https://emacsredux.com/atom.xml" emacs blog)
("https://endlessparentheses.com/atom.xml" emacs elisp blog)
("https://norvig.com/rss-feed.xml" coding lisp blog)
("https://blog.mozilla.org/en/feed/" browser web)
("https://blog.codinghorror.com/rss/" coding blog)
("https://blog.chromium.org/feeds/posts/default" browser web)
("https://hacks.mozilla.org/feed/" browser web)
("https://www.interaction-design.org/rss/site_news.xml" ux design)
("https://www.nngroup.com/feed/rss/" ux design)
("https://uxpamagazine.org/?feed=full" ux design)
("https://feedpress.me/UXmatters" ux design)
("https://uxmovement.com/feed" ux design)
("https://www.uxbeginner.com/feed/" ux design)
("https://jeffgothelf.com/feed/" lean ux design blog)
("https://www.colinmclear.net/posts/index.xml" research emacs blog)
("https://ambrevar.xyz/atom.xml" emacs lisp blog)
("https://en.wikipedia.org/w/api.php?action=featuredfeed&feed=onthisday&feedformat=atom" general)
("https://uxwritinghub.com/feed/" ux writing blog)
("https://www.philnewton.net/blog/feed/" emacs blog)
("https://emacsredux.com/atom.xml" emacs blog)
("https://marcus3santos.github.io/index.xml" emacs blog)
("https://pragdave.me/feed.xml" coding blog)
("https://yiming.dev/rss.xml" coding emacs lisp blog)
("https://feeds.feedburner.com/PythonInsider" security bugs python news)
("https://mailbox.org/share/feed-de-mailbox.xml" email mailbox web)
("https://blog.codinghorror.com/rss/" blog coding)
("https://feeds.feedburner.com/PythonInsider" python blog news)
("https://blog.rust-lang.org/feed.xml" rust blog news))
elfeed-search-filter "@1-week-ago +unread "))

View file

@ -2,6 +2,9 @@
(use-package ob-http)
(use-package ob-rust)
(use-package ob-typescript)
(use-package ox-reveal)
(use-package org
:init
(org-babel-lob-ingest "~/.emacs.d/library-of-babel.org")
@ -92,6 +95,51 @@
(typescript . t)
(http . t))))
(use-package org-roam
:init
(setq org-roam-v2-ack t)
(setq org-roam-db-location "~/org-roam.db")
(require 'org-roam-dailies)
:bind (("C-c r l" . org-roam-buffer-toggle)
("C-c r f" . org-roam-node-find)
("C-c r g" . org-roam-graph)
("C-c r i" . org-roam-node-insert)
("C-c r c" . org-roam-capture)
("C-c r j" . org-roam-dailies-map)
:map org-roam-dailies-map
("t" . org-roam-dailies-capture-today)
("y" . org-roam-dailies-capture-yesterday)
("T" . org-roam-dailies-capture-tomorrow)
:map org-mode-map
("C-M-i" . completion-at-point))
:custom
(org-roam-completion-everywhere t)
(org-roam-dailies-capture-templates
'(("d" "default" entry "* %<%R> %?"
:if-new (file+head "%<%F>.org" "#+title: %<%F>\n"))))
(org-roam-capture-templates
'(("d" "default" plain
"%?"
:if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n#+date: %U\n")
:unnarrowed t)
("n" "Note" plain
"%?"
:if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n#+date: %U\n%l\n\n%i")
:unnarrowed t)
("p" "personas" plain
"%?"
:if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n#+date: %U\n* Personality\n* Behaviors\n* Needs & Goals\n")
:unnarrowed t))))
(use-package org-tree-slide
:custom
(org-image-actual-width nil))
(use-package org-web-tools
:custom (org-web-tools-pandoc-sleep-time 0.4))
;; work with org-agenda dispatcher [c] "Today Clocked Tasks" to view today's clocked tasks.
(defun org-agenda-log-mode-colorize-block ()
"Set different line spacing based on clock time duration."
@ -140,41 +188,4 @@ Excludes the heading and any child subtrees."
(global-set-key (kbd "C-c a") 'org-agenda)
(global-set-key (kbd "C-c c") 'org-capture)
(global-set-key (kbd "C-c b") 'org-switchb)
(use-package org-roam
:init
(setq org-roam-v2-ack t)
(setq org-roam-db-location "~/org-roam.db")
(require 'org-roam-dailies)
:bind (("C-c r l" . org-roam-buffer-toggle)
("C-c r f" . org-roam-node-find)
("C-c r g" . org-roam-graph)
("C-c r i" . org-roam-node-insert)
("C-c r c" . org-roam-capture)
("C-c r j" . org-roam-dailies-map)
:map org-roam-dailies-map
("t" . org-roam-dailies-capture-today)
("y" . org-roam-dailies-capture-yesterday)
("T" . org-roam-dailies-capture-tomorrow)
:map org-mode-map
("C-M-i" . completion-at-point))
:custom
(org-roam-completion-everywhere t)
(org-roam-dailies-capture-templates
'(("d" "default" entry "* %<%R> %?"
:if-new (file+head "%<%F>.org" "#+title: %<%F>\n"))))
(org-roam-capture-templates
'(("d" "default" plain
"%?"
:if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n#+date: %U\n")
:unnarrowed t)
("n" "Note" plain
"%?"
:if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n#+date: %U\n%l\n\n%i")
:unnarrowed t)
("p" "personas" plain
"%?"
:if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n#+date: %U\n* Personality\n* Behaviors\n* Needs & Goals\n")
:unnarrowed t))))
(org-clock-persistence-insinuate)

View file

@ -20,56 +20,9 @@
;; :init
;; (global-company-mode))
(use-package counsel
:bind (("C-M-j" . 'counsel-switch-buffer)
:map minibuffer-local-map
("C-r" . 'counsel-minibuffer-history))
:custom
(counsel-linux-app-format-function #'counsel-linux-app-format-function-name-only)
:config
(counsel-mode 1))
(use-package all-the-icons
:if (display-graphic-p)
:commands all-the-icons-install-fonts
:init
(unless (find-font (font-spec :name "all-the-icons"))
(all-the-icons-install-fonts t)))
(use-package all-the-icons-dired
:if (display-graphic-p)
:hook (dired-mode . all-the-icons-dired-mode))
(use-package ivy
:bind (("C-s" . swiper))
:init
(ivy-mode 1))
(use-package olivetti
:init (add-hook 'Info-mode-hook (lambda () (olivetti-mode) (setq olivetti-body-width 73)))
:custom (olivetti-body-width 89))
(use-package shrface
:config
(shrface-basic)
(shrface-trial)
(shrface-default-keybindings)
(setq shrface-href-versatile t
shrface-toggle-bullets t
shr-width nil))
(use-package eww
:init
(add-hook 'eww-after-render-hook #'shrface-mode)
:config
(require 'shrface)
(setq shr-use-colors nil
shr-use-fonts nil
shr-cookie-policy nil
browse-url-browser-function (quote eww-browse-url)))
(use-package nov
:hook (nov-mode . olivetti-mode)
:mode ("\\.epub\\'" . nov-mode)
:init
(add-hook 'nov-mode-hook #'shrface-mode)
:config
@ -118,7 +71,8 @@
(use-package web-mode
;; :hook html-mode
:mode "\\.html?\\'"
:mode (("\\.html?\\'" . web-mode)
("\\.tmpl\\'" . web-mode))
:custom
(web-mode-markup-indent-offset 2)
(web-mode-css-indent-offset 2)
@ -140,21 +94,6 @@
slime-editing-commands
slime-sbcl-exts)))
(use-package helpful
:commands (helpful-callable helpful-variable helpful-command helpful-key)
:custom
(counsel-describe-function-function #'helpful-callable)
(counsel-describe-variable-function #'helpful-variable)
:bind
([remap describe-function] . counsel-describe-function)
([remap describe-command] . helpful-command)
([remap describe-variable] . counsel-describe-variable)
([remap describe-key] . helpful-key))
(use-package ox-reveal)
(use-package powershell)
;; (use-package geiser
@ -165,15 +104,6 @@
(use-package racket-mode)
(use-package doom-modeline
:init (doom-modeline-mode 1))
(use-package doom-themes
:init (load-theme 'doom-nord t))
(use-package rainbow-delimiters
:hook (prog-mode . rainbow-delimiters-mode))
(use-package flyspell
:config
;;(add-hook 'text-mode-hook #'flyspell-mode)
@ -181,12 +111,6 @@
(setq ispell-dictionary "en_US"))
;; :hook (text-mode . flyspell-mode))
(use-package org-tree-slide
:custom
(org-image-actual-width nil))
(use-package ace-window)
(use-package markdown-mode)
(use-package yaml-mode)
@ -197,32 +121,14 @@
;; :after (slime company)
;; :custom (slime-company-after-completion 'slime-company-just-one-space))
(use-package emojify
:commands emojify-mode)
(use-package org-web-tools
:custom (org-web-tools-pandoc-sleep-time 0.4))
(use-package webjump
:bind ("C-c j" . webjump)
:custom
(webjump-sites
(append '(("Wikipedia_de" . [simple-query
"de.wikipedia.org"
"https://de.wikipedia.org/wiki/" ""]))
webjump-sample-sites)))
(use-package plantuml-mode
:mode "\\.puml?\\'")
(use-package unicode-fonts
:config
(unicode-fonts-setup))
(use-package pyvenv)
(add-to-list 'auto-mode-alist '("\\.webmanifest\\'" . js-mode))
(use-package js-mode
:ensure nil
:mode ("\\.webmanifest\\'" . js-mode))
(use-package python
:mode ("\\.py\\'" . python-mode)
@ -235,47 +141,8 @@
:config
(add-hook 'python-mode-hook 'eglot-ensure))
(use-package csv-mode)
(use-package elfeed
:bind ("C-x w" . elfeed)
:init
(setq elfeed-feeds
'(("http://nullprogram.com/feed/" lisp blog)
("https://planet.emacslife.com/atom.xml" emacs)
("https://drewdevault.com/blog/index.xml" coding golang blog)
("https://emacsredux.com/atom.xml" emacs blog)
("https://endlessparentheses.com/atom.xml" emacs elisp blog)
("https://norvig.com/rss-feed.xml" coding lisp blog)
("https://blog.mozilla.org/en/feed/" browser web)
("https://blog.codinghorror.com/rss/" coding blog)
("https://blog.chromium.org/feeds/posts/default" browser web)
("https://hacks.mozilla.org/feed/" browser web)
("https://www.interaction-design.org/rss/site_news.xml" ux design)
("https://www.nngroup.com/feed/rss/" ux design)
("https://uxpamagazine.org/?feed=full" ux design)
("https://feedpress.me/UXmatters" ux design)
("https://uxmovement.com/feed" ux design)
("https://www.uxbeginner.com/feed/" ux design)
("https://jeffgothelf.com/feed/" lean ux design blog)
("https://www.colinmclear.net/posts/index.xml" research emacs blog)
("https://ambrevar.xyz/atom.xml" emacs lisp blog)
("https://en.wikipedia.org/w/api.php?action=featuredfeed&feed=onthisday&feedformat=atom" general)
("https://uxwritinghub.com/feed/" ux writing blog)
("https://www.philnewton.net/blog/feed/" emacs blog)
("https://emacsredux.com/atom.xml" emacs blog)
("https://marcus3santos.github.io/index.xml" emacs blog)
("https://pragdave.me/feed.xml" coding blog)
("https://yiming.dev/rss.xml" coding emacs lisp blog)
("https://feeds.feedburner.com/PythonInsider" security bugs python news)
("https://mailbox.org/share/feed-de-mailbox.xml" email mailbox web)
("https://blog.codinghorror.com/rss/" blog coding)
("https://feeds.feedburner.com/PythonInsider" python blog news)
("https://blog.rust-lang.org/feed.xml" rust blog news))
elfeed-search-filter "@1-week-ago +unread "))
(use-package smartparens)
(use-package csv-mode
:mode ("\\.[Cc][Ss][Vv]\\'" . csv-mode))
(use-package simple-httpd)
@ -285,6 +152,8 @@
(use-package elpher)
(load "bundle--org")
(load "bundle--magit")
(load "bundle--irc")
(use-package lisp-mode
:ensure nil
:mode (("\\.lisp$" . lisp-mode)
("\\.lsp$" . lisp-mode)
("\\.cl$" . lisp-mode)))

View file

@ -50,7 +50,7 @@
'(org-roam-directory "~/Documents/org-roam")
'(package-enable-at-startup t)
'(package-selected-packages
'(elpher yaml htmlize simple-httpd simple-http org-roam racket-mode csv-mode pyvenv plantuml-mode org-web-tools rust-mode shrface emojify erc-image slime-company company webpaste magit yaml-mode markdown-mode ace-window org-tree-slide rainbow-delimiters doom-themes doom-modeline powershell ox-reveal helpful slime web-mode ob-typescript ob-rust ob-http ob-go eglot go-mode typescript-mode projectile nov olivetti all-the-icons-ivy-rich all-the-icons-dired counsel use-package))
'(elpher yaml htmlize simple-httpd simple-http org-roam racket-mode csv-mode plantuml-mode org-web-tools rust-mode shrface emojify erc-image webpaste magit yaml-mode markdown-mode ace-window org-tree-slide rainbow-delimiters doom-themes doom-modeline powershell ox-reveal helpful slime web-mode ob-typescript ob-rust ob-http ob-go eglot go-mode typescript-mode projectile nov olivetti all-the-icons-ivy-rich all-the-icons-dired counsel use-package))
'(plantuml-default-exec-mode 'jar)
'(python-shell-interpreter "ipython")
'(python-shell-interpreter-args "-i --simple-prompt --InteractiveShell.display_page=True")

10
init.el
View file

@ -2,13 +2,13 @@
(load "bundle--defaults")
(load "bundle--server")
(load "bundle--package")
(load "bundle--gui")
(load "bundle--org")
(load "bundle--magit")
(load "bundle--irc")
(load "bundle--news")
(load "bundle--customfile")
(load "bundle--keys")
(load "bundle--coding")
(load "bundle--holidays")
(load "bundle--latex")
(load "bundle--mk")
(load "bundle--hooks")
(load "bundle--lists")
(org-clock-persistence-insinuate)
(org-agenda-list)