diff options
author | Marc Coquand <marc@mccd.space> | 2024-10-11 15:11:08 +0200 |
---|---|---|
committer | Marc Coquand <marc@mccd.space> | 2024-10-11 15:11:08 +0200 |
commit | 619c6b08aa8cf98e102bb68d9b205762cbc898c6 (patch) | |
tree | 69adc92768a4d843411ab5af57510c9c8a76912d /emacs | |
parent | 10f33e65720915b4bc1c55bf4528139450731b48 (diff) | |
download | bsd-619c6b08aa8cf98e102bb68d9b205762cbc898c6.tar.gz bsd-619c6b08aa8cf98e102bb68d9b205762cbc898c6.tar.bz2 bsd-619c6b08aa8cf98e102bb68d9b205762cbc898c6.zip |
.
Diffstat (limited to 'emacs')
-rw-r--r-- | emacs | 77 |
1 files changed, 47 insertions, 30 deletions
@@ -4,20 +4,21 @@ ;; Put Emacs auto-save and backup files to /tmp (defconst emacs-tmp-dir (expand-file-name (format "emacs%d" (user-uid)) temporary-file-directory)) (add-to-list 'load-path "~/.emacs.d/elisp") - - (setq ;; Visual inhibit-startup-screen t - line-spacing 0.2 display-time-format "%a, %d/%m/%Y %H:%M" - default-frame-alist '((font . "Iosevka SS13 Extended")) + default-frame-alist '((font . "Iosevka SS13 Extended") + (line-spacing . 0.5)) shr-max-image-proportion 0.3 ;; undo undo-limit 10000000 undo-outer-limit 20000000 + ;; imenu + imenu-auto-rescan t + ;; complete completion-cycle-threshold 5 completion-ignore-case t @@ -32,7 +33,8 @@ delete-old-versions t kept-new-versions 6 kept-old-versions 2 - version-control t + version-control nil + auto-save-default nil auto-save-list-file-prefix emacs-tmp-dir auto-save-file-name-transforms `((".*" ,emacs-tmp-dir t)) ; Change autosave dir to tmp backup-directory-alist `((".*" . ,emacs-tmp-dir)) @@ -47,12 +49,12 @@ almost-mono-themes markdown-mode yasnippet - avy yasnippet-snippets + avy tldr elfeed elfeed-protocol - yasnippet-snippets + emms mastodon lem expand-region) @@ -89,7 +91,6 @@ (display-time-mode) (set-face-attribute 'default nil :height 150) - ;; activate all thpe packages (in particular autoloads) (package-initialize) @@ -107,7 +108,11 @@ :config (setq avy-timeout-seconds 0.2) - (global-set-key (kbd "C-o") 'avy-goto-char-timer) + (global-set-key (kbd "M-o") 'avy-goto-char-timer) + (set-face-attribute 'avy-lead-face nil :inherit 'fixed-pitch) + (set-face-attribute 'avy-lead-face-0 nil :inherit 'fixed-pitch) + (set-face-attribute 'avy-lead-face-1 nil :inherit 'fixed-pitch) + (set-face-attribute 'avy-lead-face-2 nil :inherit 'fixed-pitch) (setf (alist-get ? avy-dispatch-alist) 'avy-action-mark-to-char) (define-key isearch-mode-map (kbd "M-o") 'avy-isearch) (defun avy-action-kill-whole-line (pt) @@ -184,8 +189,7 @@ (use-package expand-region :ensure t :init - (global-set-key (kbd "C-.") 'er/expand-region) - (global-set-key (kbd "C-,") 'er/contract-region)) + (global-set-key (kbd "C-c .") 'er/expand-region)) (use-package devdocs :ensure t @@ -196,6 +200,7 @@ (use-package sgml-mode :init (add-to-list 'auto-mode-alist '("\\.njk\\'" . html-mode)) + (add-to-list 'auto-mode-alist '("\\.tmpl\\'" . html-mode)) :hook ((html-mode . (lambda() (setq sgml-basic-offset 8 @@ -326,34 +331,33 @@ Uses `marcc/timestamp-format' for formatting the date/time." '((shell . t))) :config - (setq org-agenda-files '("~/personal-db/notes") - org-refile-targets - '((nil :maxlevel . 2) - (org-agenda-files :maxlevel . 2)) - org-default-notes-file "~/personal-db/todo.org" + (setq org-refile-targets + '((nil :maxlevel . 4) + (org-agenda-files :maxlevel . 4)) + org-default-notes-file "~/personal-db/notes/todo.org" org-hide-emphasis-markers t org-agenda-include-diary t org-agenda-remove-tags nil + org-startup-folded 'content org-agenda-inhibit-startup t ;; Add /New Heading at the end for use org-refile-allow-creating-parent-nodes 'confirm org-outline-path-complete-in-steps nil org-refile-use-outline-path 'file ;; Otherwise looks weird in variable-pitch-mode - org-tags-column 0 org-log-done 'time org-capture-templates '(("t" "Todo" - entry (file+headline "~/personal-db/todo.org" "Todo") - "* TODO %?\n%i\n%a\n%T\n " - :empty-lines 1) + entry (file+headline "~/personal-db/notes/todo.org" "Todo") + "* TODO %?\n%i\n%a\n " + :empty-lines 0) ("l" "Log" plain (file "~/personal-db/log") "%<%d %b %Y %H:%M> %?" :prepend t) ("n" "Inbox" - entry (file+headline "~/personal-db/notes/inbox.org" "Notes") + entry (file "~/personal-db/notes/inbox.org") "** %?\n%T" - :empty-lines 1))) + :empty-lines 0))) (set-face-attribute 'org-block nil :inherit 'fixed-pitch) (set-face-attribute 'org-code nil :inherit 'fixed-pitch) (set-face-attribute 'org-table nil :inherit 'fixed-pitch) @@ -364,7 +368,7 @@ Uses `marcc/timestamp-format' for formatting the date/time." (global-set-key (kbd "C-c c") #'org-capture) (global-set-key (kbd "C-c j") #'org-goto) (global-set-key (kbd "C-c s") #'project-find-regexp) - (global-set-key (kbd "C-c =") #'org-open-at-point-global) + (global-set-key (kbd "C-c C-o") #'org-open-at-point-global) :hook ((org-mode . auto-save-visited-mode)) (org-mode . org-indent-mode) @@ -509,20 +513,33 @@ Uses `marcc/timestamp-format' for formatting the date/time." mastodon-active-user "marcc" mastodon-instance-url "https://fosstodon.org")) -;; Eww (use-package eww :config (setq browse-url-browser-function 'eww-browse-url ; Use eww as the default browser + eww-search-prefix "https://lite.duckduckgo.com/lite/?q=" shr-width 70)) +;; Can play youtube urls and music. +;; Requires mpv +(use-package emms + :ensure t + :init + (add-hook 'emms-player-started-hook 'emms-show) + :config + (setq emms-shop-format "on: %s") + (emms-all) + (emms-default-players)) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. + '(default ((t (:inherit nil :extend nil :stipple nil :background "white" :foreground "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight regular :height 151 :width expanded :foundry "UKWN" :family "Iosevka SS13 Extended")))) + '(avy-lead-face ((t (:inherit fixed-pitch :background "dark red" :foreground "white")))) '(calendar-weekend-header ((t (:inherit nil)))) + '(custom-group-subtitle ((t (:weight bold :family "Iosevka Aile")))) '(diary ((t (:inherit fixed-pitch :foreground "red1")))) '(eglot-highlight-symbol-face ((t (:weight bold)))) '(eglot-mode-line ((t (:weight regular)))) @@ -538,7 +555,7 @@ Uses `marcc/timestamp-format' for formatting the date/time." '(font-lock-type-face ((t (:foreground "black")))) '(font-lock-variable-name-face ((t (:foreground "black")))) '(fringe ((t (:background "white")))) - '(header-line ((t (:inherit nil :background "white" :foreground "grey20" :box (:line-width (8 . 8) :color "white") :underline (:color "gray80" :style line :position 0))))) + '(header-line ((t (:inherit default :foreground "grey20" :box (:line-width (8 . 8) :color "#FFFFFF") :underline (:color "gray80" :style line :position 0) :family "Iosevka Aile")))) '(highlight ((t (:background "azure2")))) '(info-header-xref ((t (:inherit info-xref :underline (:color "RoyalBlue3" :style line :position t))))) '(info-node ((t (:foreground "brown" :box (:line-width (4 . 4) :color "white") :slant italic :weight bold)))) @@ -547,17 +564,17 @@ Uses `marcc/timestamp-format' for formatting the date/time." '(markdown-inline-code-face ((t (:inherit markdown-code-face)))) '(markdown-pre-face ((t (:inherit markdown-code-face)))) '(mastodon-display-name-face ((t (:inherit nil :weight bold)))) - '(mode-line ((t (:inherit variable-pitch :background "white" :foreground "black" :box (:line-width (8 . 8) :style flat-button) :overline "gray80")))) + '(mode-line ((t (:foreground "black" :box (:line-width (8 . 8) :style flat-button) :overline "gray80" :family "Iosevka Aile")))) '(mode-line-inactive ((t (:inherit mode-line :background "grey95" :foreground "grey20" :underline (:color "grey80" :style line :position 0) :weight light)))) '(mu4e-header-highlight-face ((t (:inherit hl-line :extend t :weight bold)))) '(mu4e-highlight-face ((t (:inherit highlight)))) '(org-date ((t (:inherit fixed-pitch :foreground "gray40" :underline t)))) - '(org-headline-done ((t (:foreground "black")))) + '(org-headline-done ((t (:foreground "gray40")))) '(org-level-1 ((t (:inherit outline-1 :extend nil :weight regular)))) '(org-tag ((t (:inherit fixed-pitch :foreground "gray40" :weight regular)))) '(org-time-grid ((t (:foreground "gray")))) '(outline-4 ((t (:inherit outline-2)))) - '(tab-bar ((t (:inherit variable-pitch :background "white" :box (:line-width (8 . 8) :color "white" :style flat-button) :weight light)))) + '(tab-bar ((t (:box (:line-width (8 . 8) :style flat-button) :weight light :family "Iosevka Aile")))) '(tldr-code-block ((t (:background "cornsilk" :foreground "black")))) '(tldr-command-argument ((t (:background "cornsilk" :foreground "black")))) '(tldr-command-itself ((t (:background "khaki" :foreground "black" :weight bold)))) @@ -587,10 +604,10 @@ Uses `marcc/timestamp-format' for formatting the date/time." '((:name "Last 7 days" :query "date:7d..now" :hide-unread t :key 119) (:name "Messages with images" :query "mime:image/*" :key 112))) '(org-agenda-files - '("~/builds/sustainably/piva.org" "/home/mccd/personal-db/todo.org" "/home/mccd/personal-db/notes/agency-and-tech.org" "/home/mccd/personal-db/notes/carving-my-own-road.org" "/home/mccd/personal-db/notes/emacs-teaches.org" "/home/mccd/personal-db/notes/emacs.org" "/home/mccd/personal-db/notes/frugal.org" "/home/mccd/personal-db/notes/inbox.org")) + '("~/personal-db/notes/reminders.org" "/home/mccd/builds/sustainably/piva.org" "/home/mccd/personal-db/notes/programming.org" "/home/mccd/personal-db/notes/unix.org" "/home/mccd/personal-db/notes/sustainable-software.org" "/home/mccd/personal-db/notes/agency-and-tech.org" "/home/mccd/personal-db/notes/carving-my-own-road.org" "/home/mccd/personal-db/notes/emacs-teaches.org" "/home/mccd/personal-db/notes/emacs.org" "/home/mccd/personal-db/notes/inbox.org" "/home/mccd/personal-db/notes/todo.org")) '(org-fold-core-style 'overlays) '(package-selected-packages - '(company orglink web-mode flycheck nix-mode nix-ts-mode avy pdf-tools elfeed-protocol lem yasnippet-snippets elfeed yasnippet smartparens markdown-mode mastodon tldr almost-mono-themes rec-mode magit go-mode expand-region devdocs)) + '(emms company orglink web-mode flycheck nix-mode nix-ts-mode avy pdf-tools elfeed-protocol lem yasnippet-snippets elfeed yasnippet smartparens markdown-mode mastodon tldr almost-mono-themes rec-mode magit go-mode expand-region devdocs)) '(tab-bar-format '(tab-bar-separator tab-bar-format-align-right tab-bar-format-global)) '(yank-from-kill-ring-rotate t)) |