diff --git a/config.el b/config.el index b8e40ce..dbd898b 100644 --- a/config.el +++ b/config.el @@ -9,16 +9,24 @@ ;; See 'C-h v doom-font' for documentation and more examples of what they ;; accept. For example: (when (string= (system-name) "moonshadow") - (setq doom-font (font-spec :family "JetBrainsMono Nerd Font Mono" :size 16) - doom-variable-pitch-font (font-spec :family "Rubik") - doom-unicode-font (font-spec :family "JetBrainsMono Nerd Font Mono" :size 16) - doom-big-font (font-spec :family "JetBrainsMono Nerd Font Mono" :size 16))) + (setq fontsize 18) + (setq default-frame-alist + '((height . 53) + (width . 154) + (left . 1720) + (top . 0) + (vertical-scroll-bars . nil) + (horizontal-scroll-bars . nil)))) + (when (string= (system-name) "evergloam") - (setq doom-font (font-spec :family "JetBrainsMono Nerd Font Mono" :size 18) - doom-variable-pitch-font (font-spec :family "Rubik") - doom-unicode-font (font-spec :family "JetBrainsMono Nerd Font Mono" :size 18) - doom-big-font (font-spec :family "JetBrainsMono Nerd Font Mono" :size 18))) + (setq fontsize 18) + (add-to-list 'default-frame-alist '(fullscreen . maximized))) + +(setq doom-font (font-spec :family "JetBrainsMono Nerd Font Mono" :size fontsize) + doom-variable-pitch-font (font-spec :family "Rubik") + doom-unicode-font (font-spec :family "JetBrainsMono Nerd Font Mono" :size fontsize) + doom-big-font (font-spec :family "JetBrainsMono Nerd Font Mono" :size fontsize)) ;; Use catppuccin-mocha theme (setq doom-theme 'catppuccin) @@ -101,11 +109,8 @@ If point was already at that position, move point to beginning of line." '(emacs-lisp-mode python-mode)) -;; open Emacs in a maxmimized window -;; (add-to-list 'default-frame-alist '(fullscreen . maximized)) - -;;;; Package: evil-nerd-commenter +;;;; evil-nerd-commenter (global-set-key (kbd "M-;") 'evilnc-comment-or-uncomment-lines) (global-set-key (kbd "C-c l") 'evilnc-quick-comment-or-uncomment-to-the-line) @@ -113,7 +118,9 @@ If point was already at that position, move point to beginning of line." (global-set-key (kbd "C-c p") 'evilnc-comment-or-uncomment-paragraphs) -;;;; Package: org +;;;; org-mode + +(org-bullets-mode 1) (setq org-modules '(org-protocol org-agenda @@ -125,33 +132,23 @@ If point was already at that position, move point to beginning of line." (setq org-directory "~/sync/org/") (setq org-default-notes-file "~/sync/org/notes.org") -(setq my-org-inbox-file "~/sync/org/inbox.org") ;; support selecting lines by using shift (setq org-support-shift-select t) ;; org-mode tags (setq org-tag-alist (quote (("@errand" . ?e) - ("@homemaking" . ?c) - ("@homelab" . ?h) - ("@desktop" . ?d) + ("@homemaking" . ?m) + ("@homelab" . ?l) + ("@config" . ?c) ("@selfcare" . ?s) ("@fedora" . ?f) + ("@techne" . ?t) ("@refile" . ?r)))) ;; org-mode keybindings (with-eval-after-load 'org - (bind-key "C-M-w" 'append-next-kill org-mode-map) - (bind-key "C-TAB" 'org-cycle org-mode-map) - (bind-key "C-c v" 'org-show-todo-tree org-mode-map) - (bind-key "C-c C-r" 'org-refile org-mode-map) - (bind-key "C-c o" 'my-org-follow-entry-link org-mode-map) - (bind-key "C-c d" 'my-org-move-line-to-destination org-mode-map) - (bind-key "C-c t s" 'my-split-sentence-and-capitalize org-mode-map) - (bind-key "C-c t -" 'my-split-sentence-delete-word-and-capitalize org-mode-map) - (bind-key "C-c t d" 'my-delete-word-and-capitalize org-mode-map) - (bind-key "C-c C-p C-p" 'my-org-publish-maybe org-mode-map) - (bind-key "C-c C-r" 'my-org-refile-and-jump org-mode-map) + (bind-key "C-c $" 'org-archive-subtree) (bind-key "C-c r" 'org-capture) (bind-key "C-c R" 'org-roam-capture) (bind-key "C-c a" 'org-agenda) @@ -159,32 +156,8 @@ If point was already at that position, move point to beginning of line." (bind-key "C-c L" 'org-insert-link-global) (bind-key "C-c O" 'org-open-at-point-global)) -(with-eval-after-load 'org-agenda - (bind-key "i" 'org-agenda-clock-in org-agenda-mode-map)) - (setq org-use-effective-time t) -;; link org subtrees and navigate between them -(defun my-org-follow-entry-link () - "Follow the defined link for this entry." - (interactive) - (if (org-entry-get (point) "LINK") - (org-link-open-from-string (org-entry-get (point) "LINK")) - (org-open-at-point))) - -(defun my-org-link-projects (location) - "Add link properties between the current subtree and the one specified by -LOCATION." - (interactive - (list (let ((org-refile-use-cache nil)) - (org-refile-get-location "Location")))) - (let ((link1 (org-store-link nil)) link2) - (save-window-excursion - (org-refile 4 nil location) - (setq link2 (org-store-link nil)) - (org-set-property "LINK" link1)) - (org-set-property "LINK" link2))) - ;; org-refile (setq org-reverse-note-order t) ; new notes prepended (setq org-refile-use-outline-path 'file) @@ -204,11 +177,6 @@ LOCATION." "~/sync/org/grocery.org") . (:maxlevel .5)))) -;; makes it easier to cut something and paste it elsewhere in the hierarchy -(with-eval-after-load 'org - (bind-key "C-c k" 'org-cut-subtree org-mode-map) - (setq org-yank-adjusted-subtrees t)) - ;; org-todo-keywords (with-eval-after-load 'org (setq org-todo-keywords @@ -232,7 +200,7 @@ LOCATION." (setq org-log-done 'time) -;; ;; Package: org-roam +;;;; org-roam (setq org-roam-directory "~/sync/org-roam") (org-roam-db-autosync-mode) @@ -261,27 +229,11 @@ LOCATION." :target (file "self/${slug}.org") :empty-lines 1 :unnarrowed t) - ("c" "recipe" plain - "%?" - :if-new (file+head "recipes/${title}.org" - "#+title: ${title}\n#+filetags: :recipe:\n") - :immediate-finish t + ("c" "cookbook" plain + "* %^{Recipe title}\n :PROPERTIES:\n :source-url:%?\n :servings:\n :prep-time:\n :cook-time:\n :ready-in:\n :END:\n** Ingredients\n \n** Directions\n\n" + :if-new (file "recipes/${title}.org") :unnarrowed t))) -;; create the property "type" on my nodes -(cl-defmethod org-roam-node-type ((node org-roam-node)) - "Return the TYPE of NODE." - (condition-case nil - (file-name-nondirectory - (directory-file-name - (file-name-directory - (file-relative-name (org-roam-node-file node) org-roam-directory)))) - (error ""))) - -;; modify the display template to show the node "type" -(setq org-roam-node-display-template - (concat "${type:15} ${title:*} " (propertize "${tags:10}" 'face 'org-tag))) - ;; org-capture templates (setq org-capture-templates '(("t" "Todo" entry (file "~/sync/org/inbox.org") @@ -289,7 +241,7 @@ LOCATION." :empty-lines-before 1 :unnarrowed t :immediate-finish t) - ("c" "Calendar" entry (file "~/sync/org/calendar.org") + ("d" "Calendar" entry (file "~/sync/org/calendar.org") "* TODO %?" :empty-lines-before 1 :unnarrowed t) @@ -301,16 +253,14 @@ LOCATION." "* %a\n%U\n%^{PROMPT}" :empty-lines-before 1 :unnarrowed t - :immediate-finish t) - ("s" "Slipbox" entry (file "~/sync/org-roam/inbox.org") - "* %?\n"))) + :immediate-finish t))) (defun hyperreal/org-capture-slipbox () (interactive) (org-capture nil "s")) -;;;; Package: python-mode +;;;; python-mode ;; Set bpython as Python shell interpreter (add-hook! python-mode-hook @@ -320,7 +270,7 @@ LOCATION." (setq-hook! 'python-mode-hook +format-with 'black) -;;;; Package: go-mode +;;;; go-mode ;; completion for GoLang (add-hook 'completion-at-point-functions 'go-complete-at-point) @@ -335,32 +285,7 @@ LOCATION." (add-hook 'go-mode-hook #'lsp-deferred) -;;;; Package: yasnippet - -;; Popup rule for yasnippet -(defun yas-popup-isearch-prompt (prompt choices &optional display-fn) - (when (featurep 'popup) - (popup-menu* - (mapcar - (lambda (choice) - (popup-make-item - (or (and display-fn (funcall display-fn choice)) - choice) - :value choice)) - choices) - :prompt prompt - ;; start isearch mode immediately - :isearch t - ))) -(setq yas-prompt-functions '(yas-popup-isearch-prompt yas-maybe-ido-prompt yas-completing-prompt yas-no-prompt)) - - -;;;; Package: nov.el, nov-xwidget - -(setq nov-variable-pitch nil) - - -;;;; Package: dired +;;;; dired (after! dired (setq dired-listing-switches "-laGh1v --group-directories-first") @@ -370,7 +295,7 @@ LOCATION." dired-recursive-deletes 'always)) -;;;; Package: elfeed +;;;; elfeed (elfeed-protocol-enable) (run-with-idle-timer (* 15 60) t #'elfeed-update) @@ -380,12 +305,13 @@ LOCATION." :password (shell-command-to-string "echo -n `pass show envs.net/ttrss`")))) -;;;; Package: dictionary +;;;; dictionary + (global-set-key (kbd "C-c l") #'dictionary-lookup-definition) (setq dictionary-server "dict.org") -;;;; Package: undo-tree +;;;; undo-tree (use-package undo-tree :diminish undo-tree-mode @@ -395,3 +321,76 @@ LOCATION." (setq undo-tree-visualizer-timestamps t) (setq undo-tree-visualizer-diff t) (setq undo-tree-history-directory-alist '(("." . "~/sync/emacs/backups/undo-tree"))))) + + +;;;; tab-bar-mode + +(global-set-key (kbd "s-{") 'tab-bar-switch-to-prev-tab) +(global-set-key (kbd "s-}") 'tab-bar-switch-to-next-tab) +(global-set-key (kbd "s-t") 'tab-bar-new-tab) +(global-set-key (kbd "s-w") 'tab-bar-close-tab) +(tab-bar-mode 1) +(setq tab-bar-close-button-show nil) +(setq tab-bar-new-tab-choice "*doom*") +(setq tab-bar-tab-hints t) +(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)) diff --git a/init.el b/init.el index 4d24083..5466c6b 100644 --- a/init.el +++ b/init.el @@ -22,7 +22,7 @@ :completion company ; the ultimate code completion backend - ;; helm ; the *other* search engine for love and life + ;;helm ; the *other* search engine for love and life ;;ido ; the other *other* search engine... ;;ivy ; a search engine for love and life vertico ; the search engine of the future @@ -43,12 +43,12 @@ ;;neotree ; a project drawer, like NERDTree for vim ophints ; highlight the region an operation acts on (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 ;;unicode ; extended unicode support for various languages (vc-gutter +pretty) ; vcs diff in the fringe vi-tilde-fringe ; fringe tildes to mark beyond EOB - window-select ; visually switch windows + ;;window-select ; visually switch windows workspaces ; tab emulation, persistence & separate workspaces ;;zen ; distraction-free coding or writing @@ -74,19 +74,20 @@ vc ; version-control and Emacs, sitting in a tree :term - eshell ; the elisp shell that works everywhere + ;;eshell ; the elisp shell that works everywhere ;;shell ; simple shell REPL for Emacs ;;term ; basic terminal emulator for Emacs vterm ; the best terminal emulation in Emacs :checkers syntax ; tasing you for every semicolon you forget - ;;(spell +flyspell) ; tasing you for misspelling mispelling + (spell +flyspell) ; tasing you for misspelling mispelling ;;grammar ; tasing grammar mistake every you make :tools ansible ;;biblio ; Writes a PhD for you (citation needed) + ;;collab ; buffers with friends ;;debugger ; FIXME stepping through code, to help you add bugs ;;direnv docker @@ -97,15 +98,15 @@ lookup ; navigate your code and its documentation lsp ; M-x vscode magit ; a git porcelain for Emacs - make ; run make tasks from Emacs + ;;make ; run make tasks from Emacs pass ; password manager for nerds pdf ; pdf enhancements ;;prodigy ; FIXME managing external services & code builders - rgb ; creating color strings + ;;rgb ; creating color strings ;;taskrunner ; taskrunner for all your projects ;;terraform ; infrastructure as code ;;tmux ; an API for interacting with tmux - tree-sitter ; syntax and parsing, sitting in a tree... + ;;tree-sitter ; syntax and parsing, sitting in a tree... ;;upload ; map local to remote projects via ssh/ftp :os @@ -148,12 +149,12 @@ ;;latex ; writing papers in Emacs has never been so fun ;;lean ; for folks with too much to prove ;;ledger ; be audit you can be - lua ; one-based indices? one-based indices + ;;lua ; one-based indices? one-based indices markdown ; writing docs for people to ignore ;;nim ; python + lisp at the speed of c - ;; nix ; I hereby declare "nix geht mehr!" + ;;nix ; I hereby declare "nix geht mehr!" ;;ocaml ; an objective camel - (org +pretty) ; organize your plain life in plain text + org ; organize your plain life in plain text ;;php ; perl's insecure younger brother ;;plantuml ; diagrams for confusing people more ;;purescript ; javascript, but functional @@ -161,10 +162,10 @@ ;;qt ; the 'cutest' gui framework ever ;;racket ; a DSL for DSLs ;;raku ; the artist formerly known as perl6 - rest ; Emacs as a REST client + ;;rest ; Emacs as a REST client ;;rst ; ReST in peace ;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"} - ;; (rust +lsp) ; Fe2O3.unwrap().unwrap().unwrap().unwrap() + ;;(rust +lsp) ; Fe2O3.unwrap().unwrap().unwrap().unwrap() ;;scala ; java, but good ;;(scheme +guile) ; a fully conniving family of lisps sh ; she sells {ba,z,fi}sh shells on the C xor @@ -177,7 +178,7 @@ ;;zig ; C, but simpler :email - ;; (mu4e +org) + ;;(mu4e +org +gmail) ;;notmuch ;;(wanderlust +gmail) @@ -185,8 +186,8 @@ ;;calendar ;;emms ;;everywhere ; *leave* Emacs!? You must be joking - ;;irc ; how neckbeards socialize - rss ; emacs as an RSS reader + ;; irc ; how neckbeards socialize + (rss +org) ; emacs as an RSS reader ;;twitter ; twitter client https://twitter.com/vnought :config diff --git a/packages.el b/packages.el index 162a54c..51dd56d 100644 --- a/packages.el +++ b/packages.el @@ -9,23 +9,26 @@ ;; To install SOME-PACKAGE from MELPA, ELPA or emacsmirror: ;(package! some-package) (package! autothemer) +(package! bufler) (package! catppuccin-theme) -(package! elpher) -(package! gemini :recipe - (:host nil :repo "https://git.carcosa.net/jmcbray/gemini.el")) -(package! python-docstring) -(package! importmagic) -(package! systemd) -(package! license-templates) -(package! shell-pop) -(package! fzf) -(package! evil-nerd-commenter) -(package! just-mode) -(package! justl) -(package! go-complete) -(package! nov) (package! elfeed-protocol) (package! elfeed-tube) (package! elfeed-tube-mpv) -(package! undo-tree) +(package! elpher) +(package! evil-nerd-commenter) +(package! fzf) +(package! gemini :recipe + (:host nil :repo "https://git.carcosa.net/jmcbray/gemini.el")) +(package! go-complete) +(package! importmagic) +(package! just-mode) +(package! justl) +(package! license-templates) +(package! nov) +(package! org-bullets) +(package! org-chef) (package! org-roam) +(package! python-docstring) +(package! shell-pop) +(package! systemd) +(package! undo-tree)