Tidy and update

This commit is contained in:
Jeffrey Serio 2023-08-20 15:45:21 -05:00
parent e2971f4477
commit bde47a165d
3 changed files with 84 additions and 96 deletions

170
config.el
View File

@ -6,6 +6,12 @@
(setq user-full-name "Jeffrey Serio" (setq user-full-name "Jeffrey Serio"
user-mail-address "hyperreal@fedoraproject.org") user-mail-address "hyperreal@fedoraproject.org")
(setq doom-user-dir "~/sync/doom/")
(after! projectile
(setq projectile-project-root-files-bottom-up
(remove ".git" projectile-project-root-files-bottom-up)))
;; This sets the frame dimensions and position on the screen when on moonshadow host. ;; This sets the frame dimensions and position on the screen when on moonshadow host.
;; Also sets the font size for moonshadow host. ;; Also sets the font size for moonshadow host.
(when (string= (system-name) "moonshadow") (when (string= (system-name) "moonshadow")
@ -129,8 +135,6 @@ If point was already at that position, move point to beginning of line."
org-annotate-file org-annotate-file
org-choose org-choose
org-collector org-collector
org-man
org-notify
)) ))
(eval-after-load 'org (eval-after-load 'org
'(org-load-modules-maybe t)) '(org-load-modules-maybe t))
@ -310,102 +314,86 @@ If point was already at that position, move point to beginning of line."
dired-recursive-deletes 'always)) dired-recursive-deletes 'always))
;;;; elfeed
(elfeed-protocol-enable)
(run-with-idle-timer (* 15 60) t #'elfeed-update)
(setq elfeed-protocol-ttrss-maxsize 200)
(setq elfeed-feeds (list
(list "ttrss+https://hyperreal@rss.envs.net"
:password (shell-command-to-string "echo -n `pass show envs.net/ttrss`"))))
;;;; dictionary ;;;; dictionary
(global-set-key (kbd "C-c l") #'dictionary-lookup-definition) (global-set-key (kbd "C-c l") #'dictionary-lookup-definition)
(setq dictionary-server "dict.org") (setq dictionary-server "dict.org")
;;;; undo-tree ;;;; centaur-tabs
(use-package undo-tree (global-set-key (kbd "s-{") 'centaur-tabs-switch-group)
:diminish undo-tree-mode (setq centaur-tabs-buffer-show-groups t)
:config
(progn (defun centaur-tabs-buffer-groups ()
(global-undo-tree-mode) "`centaur-tabs-buffer-groups' control buffers' group rules.
(setq undo-tree-visualizer-timestamps t)
(setq undo-tree-visualizer-diff t) Group centaur-tabs with mode if buffer is derived from `eshell-mode'
(setq undo-tree-history-directory-alist '(("." . "~/sync/emacs/backups/undo-tree"))))) `emacs-lisp-mode' `dired-mode' `org-mode' `magit-mode'
All buffer names starting with * will group to \"Emacs\".
Other buffer groups by `centaur-tabs-get-group-name' wit project name."
(list
(cond
((or (string-equal "*" (substring (buffer-name) 0 1))
(memq major-mode '(magit-process-mode
magit-status-mode
magit-diff-mode
magit-log-mode
magit-file-mode
magit-blob-mode
magit-blame-mode
)))
"Emacs")
((derived-mode-p 'prog-mode)
"Editing")
((derived-mode-p 'dired-mode)
"Dired")
((memq major-mode '(helpful-mode
help-mode))
"Help")
((memq major-mode '(org-mode
org-agenda-clockreport-mode
org-src-mode
org-agenda-mode
org-beamer-mode
org-indent-mode
org-bullets-mode
org-agenda-log-mode
diary-mode
org-roam-mode))
"OrgMode")
(t
(centaur-tabs-get-group-name (current-buffer))))))
;; prevent access to specified buffers
(defun centaur-tabs-hide-tab (x)
"Do not show given buffer in tabs."
(let ((name (format "%s" x)))
(or
;; Current window is not dedicated window.
(window-dedicated-p (selected-window))
;; Buffer name does not match blacklisted buffers.
(string-prefix-p "*epc" name)
(string-prefix-p "*Compile-Log*" name)
(string-prefix-p "*lsp" name)
(string-prefix-p "*tramp" name)
(string-prefix-p "*help" name)
(string-prefix-p "*Help" name)
;; Buffer is not a magit buffer.
(and (string-prefix-p "magit" name)
(not (file-name-extension name)))
)))
;;;; tab-bar-mode ;;;; elfeed
(global-set-key (kbd "s-{") 'tab-bar-switch-to-prev-tab) (elfeed-goodies/setup)
(global-set-key (kbd "s-}") 'tab-bar-switch-to-next-tab) (setq elfeed-show-entry-switch 'pop-to-buffer-same-window)
(global-set-key (kbd "s-t") 'tab-bar-new-tab) (setq elfeed-protocol-enabled-protocols '(ttrss))
(global-set-key (kbd "s-w") 'tab-bar-close-tab) (elfeed-protocol-enable)
(tab-bar-mode 1) (setq elfeed-protocol-ttrss-maxsize 200)
(setq tab-bar-close-button-show nil) (setq elfeed-feeds (list
(setq tab-bar-new-tab-choice "*doom*") (list "ttrss+https://hyperreal@rss.envs.net"
(setq tab-bar-tab-hints t) :password (shell-command-to-string "echo -n `pass show envs.net/ttrss`"))))
(setq tab-bar-format '(tab-bar-format-history tab-bar-format-tabs tab-bar-separator))
(setq tab-bar-select-tab-modifiers "super")
;;;; bufler-mode
(setq bufler-tabs-mode 1)
(global-set-key (kbd "C-x b") 'bufler-switch-buffer)
(bufler-defgroups
(group
;; Subgroup collecting all named workspaces.
(auto-workspace))
(group
;; Subgroup collecting all help-mode and info-mode buffers
(group-or "*Help/Info*"
(mode-match "*Help*" (rx bos "help-"))
(mode-match "*Info*" (rx bos "info-"))))
(group
;; Subgroup collecting all special buffers (i.e. ones that are not
;; file-backed), except magit-status-mode buffers (which are allowed to fall
;; through to other groups, so they end up grouped with their project buffers).
(group-and "*Special*"
(lambda (buffer)
(unless (or (funcall (mode-match "Magit" (rx bos "magit-status"))
buffer)
(funcall (mode-match "Dired" (rx bos "dired"))
buffer)
(funcall (auto-file) buffer))
"*Special*")))
(group
;; Subgroup collecting these "special special" buffers
;; separately for convenience.
(name-match "**Special**"
(rx bos "*" (or "Messages" "Warnings" "scratch" "Backtrace") "*")))
(group
;; Subgroup collecting all other Magit buffers, grouped by directory.
(mode-match "*Magit* (non-status)" (rx bos (or "magit" "forge") "-"))
(auto-directory))
;; Remaining special buffers are grouped automatically by mode.
(auto-mode))
;; All buffers under ~/.doom.d
(dir doom-user-dir)
(group
;; Subgroup collecting buffers in org-directory.
(dir org-directory)
(dir org-roam-directory)
(group
;; Subgroup collecting indirect Org buffers, grouping them by file.
;; This is very useful when used with org-tree-to-indirect-buffer.
(auto-indirect)
(auto-file))
(group-not "*special*" (auto-file))
(auto-mode))
(group
;; Subgroup collecting buffers in a version-control project,
;; grouping them by directory.
(auto-project))
;; Group remaining buffers by directory, then major mode.
(auto-directory)
(auto-mode))

View File

@ -43,7 +43,7 @@
;;neotree ; a project drawer, like NERDTree for vim ;;neotree ; a project drawer, like NERDTree for vim
ophints ; highlight the region an operation acts on ophints ; highlight the region an operation acts on
(popup +defaults) ; tame sudden yet inevitable temporary windows (popup +defaults) ; tame sudden yet inevitable temporary windows
;; tabs ; a tab bar for Emacs tabs ; a tab bar for Emacs
;;treemacs ; a project drawer, like neotree but cooler ;;treemacs ; a project drawer, like neotree but cooler
;;unicode ; extended unicode support for various languages ;;unicode ; extended unicode support for various languages
(vc-gutter +pretty) ; vcs diff in the fringe (vc-gutter +pretty) ; vcs diff in the fringe
@ -187,7 +187,7 @@
;;emms ;;emms
;;everywhere ; *leave* Emacs!? You must be joking ;;everywhere ; *leave* Emacs!? You must be joking
;; irc ; how neckbeards socialize ;; irc ; how neckbeards socialize
(rss +org) ; emacs as an RSS reader ;; (rss +org) ; emacs as an RSS reader
;;twitter ; twitter client https://twitter.com/vnought ;;twitter ; twitter client https://twitter.com/vnought
:config :config

View File

@ -9,8 +9,9 @@
;; To install SOME-PACKAGE from MELPA, ELPA or emacsmirror: ;; To install SOME-PACKAGE from MELPA, ELPA or emacsmirror:
;(package! some-package) ;(package! some-package)
(package! autothemer) (package! autothemer)
(package! bufler)
(package! catppuccin-theme) (package! catppuccin-theme)
(package! elfeed)
(package! elfeed-goodies)
(package! elfeed-protocol) (package! elfeed-protocol)
(package! elfeed-tube) (package! elfeed-tube)
(package! elfeed-tube-mpv) (package! elfeed-tube-mpv)
@ -31,4 +32,3 @@
(package! python-docstring) (package! python-docstring)
(package! shell-pop) (package! shell-pop)
(package! systemd) (package! systemd)
(package! undo-tree)