diff options
Diffstat (limited to '.emacs.d/rul-init.d')
-rw-r--r-- | .emacs.d/rul-init.d/auto-fill.el | 4 | ||||
-rw-r--r-- | .emacs.d/rul-init.d/flycheck.el | 22 | ||||
-rw-r--r-- | .emacs.d/rul-init.d/flyspell.el | 12 | ||||
-rw-r--r-- | .emacs.d/rul-init.d/fonts.el | 30 | ||||
-rw-r--r-- | .emacs.d/rul-init.d/go-lang.el | 23 | ||||
-rw-r--r-- | .emacs.d/rul-init.d/hydra.el | 48 | ||||
-rw-r--r-- | .emacs.d/rul-init.d/ibuffer.el | 35 | ||||
-rw-r--r-- | .emacs.d/rul-init.d/imenu.el | 12 | ||||
-rw-r--r-- | .emacs.d/rul-init.d/latex.el | 9 | ||||
-rw-r--r-- | .emacs.d/rul-init.d/logos.el | 31 | ||||
-rw-r--r-- | .emacs.d/rul-init.d/magit.el | 18 | ||||
-rw-r--r-- | .emacs.d/rul-init.d/mail-mode.el | 15 | ||||
-rw-r--r-- | .emacs.d/rul-init.d/markdown.el | 5 | ||||
-rw-r--r-- | .emacs.d/rul-init.d/notmuch.el | 136 | ||||
-rw-r--r-- | .emacs.d/rul-init.d/python.el | 1 | ||||
-rw-r--r-- | .emacs.d/rul-init.d/themes.el | 48 | ||||
-rw-r--r-- | .emacs.d/rul-init.d/vterm.el | 5 | ||||
-rw-r--r-- | .emacs.d/rul-init.d/which-key.el | 5 |
18 files changed, 0 insertions, 459 deletions
diff --git a/.emacs.d/rul-init.d/auto-fill.el b/.emacs.d/rul-init.d/auto-fill.el deleted file mode 100644 index dad2831..0000000 --- a/.emacs.d/rul-init.d/auto-fill.el +++ /dev/null @@ -1,4 +0,0 @@ -;; auto-fill mode -(add-hook 'text-mode-hook 'turn-on-auto-fill) -(global-set-key (kbd "C-c q") 'auto-fill-mode) - diff --git a/.emacs.d/rul-init.d/flycheck.el b/.emacs.d/rul-init.d/flycheck.el deleted file mode 100644 index 006081e..0000000 --- a/.emacs.d/rul-init.d/flycheck.el +++ /dev/null @@ -1,22 +0,0 @@ -(use-package flycheck - :ensure t - :config - -(flycheck-define-checker proselint - "A linter for prose." - :command ("proselint" source-inplace) - :error-patterns - ((warning line-start (file-name) ":" line ":" column ": " - (id (one-or-more (not (any " ")))) - (message) line-end)) - :modes (text-mode markdown-mode gfm-mode org-mode)) - -(add-to-list 'flycheck-checkers 'proselint) - -;; TODO: docker run --rm -p 8010:8010 erikvl87/languagetool -(use-package flycheck-languagetool - :ensure t - :hook (message-mode . flycheck-languagetool-setup) - :init - (setq flycheck-languagetool-url "http://localhost:8010") -)) diff --git a/.emacs.d/rul-init.d/flyspell.el b/.emacs.d/rul-init.d/flyspell.el deleted file mode 100644 index 8cf27b8..0000000 --- a/.emacs.d/rul-init.d/flyspell.el +++ /dev/null @@ -1,12 +0,0 @@ -(defcustom flyspell-delayed-commands nil - "List of commands that are \"delayed\" for Flyspell mode. -After these commands, Flyspell checking is delayed for a short time, -whose length is specified by `flyspell-delay'." - :group 'flyspell - :type '(repeat (symbol))) - -(setq ispell-dictionary "en") -(setq flyspell-default-dictionary "en") - -(setq flyspell-issue-welcome-flag nil) -(setq-default ispell-list-command "list") diff --git a/.emacs.d/rul-init.d/fonts.el b/.emacs.d/rul-init.d/fonts.el deleted file mode 100644 index a7cb255..0000000 --- a/.emacs.d/rul-init.d/fonts.el +++ /dev/null @@ -1,30 +0,0 @@ -(use-package fontaine - :ensure t - :config - (setq fontaine-presets - '((tiny - :default-height 100) - (small - :default-height 120) - (medium - :default-height 140) - (large - :default-weight semilight - :default-height 180 - :bold-weight extrabold) - (presentation - :default-weight semilight - :default-height 200 - :bold-weight extrabold) - (jumbo - :default-weight semilight - :default-height 230 - :bold-weight extrabold) - (t - :default-family "Iosevka" - :default-weight regular - :default-height 140 - :variable-pitch-family "Iosevka Aile"))) - - ;; Set desired style from `fontaine-presets' - (fontaine-set-preset 'medium)) diff --git a/.emacs.d/rul-init.d/go-lang.el b/.emacs.d/rul-init.d/go-lang.el deleted file mode 100644 index 8ec678b..0000000 --- a/.emacs.d/rul-init.d/go-lang.el +++ /dev/null @@ -1,23 +0,0 @@ -;; Debian packages: elpa-go-mode -;; Elpa packages: go-eldoc - -(use-package go-mode - :ensure t - :init - (progn - (bind-key [remap find-tag] #'godef-jump)) - :config - (add-hook 'go-mode-hook #'yas-minor-mode) - (add-hook 'go-mode-hook 'electric-pair-mode) - (add-hook 'go-mode-hook 'my-go-mode-hook) - (add-hook 'before-save-hook 'gofmt-before-save) -) - -(use-package go-eldoc - :ensure t - :init - (add-hook 'go-mode-hook 'go-eldoc-setup)) - -;; Define function to call when go-mode loads -(defun my-go-mode-hook () - (set 'compile-command "go build -v && go test -v && go vet")) diff --git a/.emacs.d/rul-init.d/hydra.el b/.emacs.d/rul-init.d/hydra.el deleted file mode 100644 index 525162e..0000000 --- a/.emacs.d/rul-init.d/hydra.el +++ /dev/null @@ -1,48 +0,0 @@ -(use-package hydra - :ensure t - :defer 1) - -;; tab-bar -(defhydra hydra-tab-bar (:color amaranth) - "Tab Bar Operations" - ("t" tab-new "Create a new tab" :column "Creation" :exit t) - ("d" dired-other-tab "Open Dired in another tab") - ("f" find-file-other-tab "Find file in another tab") - ("x" tab-close "Close current tab") - ("m" tab-move "Move current tab" :column "Management") - ("r" tab-rename "Rename Tab") - ("<return>" tab-bar-select-tab-by-name "Select tab by name" :column "Navigation") - ("l" tab-next "Next Tab") - ("j" tab-previous "Previous Tab") - ("q" nil "Exit" :exit t)) - -(global-set-key (kbd "C-x t") 'hydra-tab-bar/body) - -;; Zoom -(defhydra hydra-zoom () - "zoom" - ("g" text-scale-increase "in") - ("l" text-scale-decrease "out")) - -(global-set-key (kbd "C-c z") 'hydra-zoom/body) - -;; Go -(defhydra hydra-go () - "zoom" - ("=" gofmt :exit t) - ("c" go-coverage :exit t)) - -;; vterm -(defhydra hydra-vterm () - "zoom" - ("t" multi-vterm "Open a terminal" :exit t) - ("d" multi-vterm-dedicated-open "Dedicated" :exit t) - ("p" multi-vterm-prev "Previous terminal") - ("n" multi-vterm-next "Next terminal") - ("r" multi-vterm-rename-buffer "Rename buffer" :exit t) - ) - -(global-set-key (kbd "C-c t") 'hydra-vterm/body) - - -(global-set-key (kbd "C-c m") 'hydra-go/body) diff --git a/.emacs.d/rul-init.d/ibuffer.el b/.emacs.d/rul-init.d/ibuffer.el deleted file mode 100644 index d5198d8..0000000 --- a/.emacs.d/rul-init.d/ibuffer.el +++ /dev/null @@ -1,35 +0,0 @@ -;; Debian packages: elpa-ibuffer-vc - -(use-package ibuffer ; Better buffer list - :bind (([remap list-buffers] . ibuffer)) - ;; Show VC Status in ibuffer - :config (setq ibuffer-formats - '((mark modified read-only vc-status-mini " " - (name 18 18 :left :elide) - " " - (size 9 -1 :right) - " " - (mode 16 16 :left :elide) - " " - (vc-status 16 16 :left) - " " - filename-and-process) - (mark modified read-only " " - (name 18 18 :left :elide) - " " - (size 9 -1 :right) - " " - (mode 16 16 :left :elide) - " " filename-and-process) - (mark " " - (name 16 -1) - " " filename)))) - -(use-package ibuffer-vc ; Group buffers by VC project and status - :ensure t - :defer t - :init (add-hook 'ibuffer-hook - (lambda () - (ibuffer-vc-set-filter-groups-by-vc-root) - (unless (eq ibuffer-sorting-mode 'alphabetic) - (ibuffer-do-sort-by-alphabetic))))) diff --git a/.emacs.d/rul-init.d/imenu.el b/.emacs.d/rul-init.d/imenu.el deleted file mode 100644 index 1a2b29b..0000000 --- a/.emacs.d/rul-init.d/imenu.el +++ /dev/null @@ -1,12 +0,0 @@ -;; Debian packages: elpa-imenu-list -(use-package imenu-list - :ensure t - :bind ("C-." . imenu-list-minor-mode) - :config - (setq imenu-list-focus-after-activation t) - (setq imenu-list-size 0.2) - (setq imenu-list-position 'left) - (add-hook 'go-mode-hook #'imenu-list-minor-mode)) - - - diff --git a/.emacs.d/rul-init.d/latex.el b/.emacs.d/rul-init.d/latex.el deleted file mode 100644 index de4de1f..0000000 --- a/.emacs.d/rul-init.d/latex.el +++ /dev/null @@ -1,9 +0,0 @@ -(add-hook 'latex-mode-hook 'flyspell-mode) -(setq TeX-PDF-mode t) - -(defun pdfevince () - (add-to-list 'TeX-output-view-style - '("^pdf$" "." "evince %o %(outpage)"))) - -(add-hook 'LaTeX-mode-hook 'pdfevince t) ; AUCTeX LaTeX mode - diff --git a/.emacs.d/rul-init.d/logos.el b/.emacs.d/rul-init.d/logos.el deleted file mode 100644 index 0ea1244..0000000 --- a/.emacs.d/rul-init.d/logos.el +++ /dev/null @@ -1,31 +0,0 @@ -(use-package logos -:ensure t -:config - -;; If you want to use outlines instead of page breaks (the ^L) -(setq logos-outlines-are-pages t) -(setq logos-outline-regexp-alist - `((emacs-lisp-mode . "^;;;+ ") - (org-mode . "^\\*+ +") - (markdown-mode . "^\\#+ +") - )) - -;; These apply when `logos-focus-mode' is enabled. Their value is -;; buffer-local. -(setq-default logos-hide-mode-line t - logos-hide-buffer-boundaries t - logos-hide-fringe t - logos-variable-pitch nil - logos-buffer-read-only nil - logos-scroll-lock nil - logos-olivetti t - olivetti-body-width 100 - ) - - -(let ((map global-map)) - (define-key map [remap narrow-to-region] #'logos-narrow-dwim) - (define-key map [remap forward-page] #'logos-forward-page-dwim) - (define-key map [remap backward-page] #'logos-backward-page-dwim) - (define-key map (kbd "<f9>") #'logos-focus-mode)) -) diff --git a/.emacs.d/rul-init.d/magit.el b/.emacs.d/rul-init.d/magit.el deleted file mode 100644 index 11370e5..0000000 --- a/.emacs.d/rul-init.d/magit.el +++ /dev/null @@ -1,18 +0,0 @@ -;; Debian packages: elpa-magit - -(use-package magit - :ensure t - :bind - (("C-c g s" . magit-status) - ("C-c g b" . magit-blame)) - :config - (progn - (defun inkel/magit-log-edit-mode-hook () - (flyspell-mode t) - (turn-on-auto-fill)) - (defadvice magit-status (around magit-fullscreen activate) - (window-configuration-to-register :magit-fullscreen) - ad-do-it - (delete-other-windows)))) - -(add-to-list 'project-switch-commands '(magit-project-status "Magit" "m")) diff --git a/.emacs.d/rul-init.d/mail-mode.el b/.emacs.d/rul-init.d/mail-mode.el deleted file mode 100644 index 09b04f9..0000000 --- a/.emacs.d/rul-init.d/mail-mode.el +++ /dev/null @@ -1,15 +0,0 @@ -(setq auto-mode-alist (append '((".*tmp/mutt.*" . message-mode)) auto-mode-alist)) -(setq auto-mode-alist (append '((".*tmp/neomutt.*" . message-mode)) auto-mode-alist)) -(add-to-list 'auto-mode-alist '("/mutt" . mail-mode)) - -(setq mml-secure-openpgp-sign-with-sender t) - -(add-hook 'mail-mode-hook - (lambda () - (font-lock-add-keywords nil - '(("^[ \t]*>[ \t]*>[ \t]*>.*$" - (0 'compilation-error)) - ("^[ \t]*>[ \t]*>.*$" - (0 'compilation-column-number)) - ("^[ \t]*>.*$" - (0 'comint-highlight-prompt)))))) diff --git a/.emacs.d/rul-init.d/markdown.el b/.emacs.d/rul-init.d/markdown.el deleted file mode 100644 index f035509..0000000 --- a/.emacs.d/rul-init.d/markdown.el +++ /dev/null @@ -1,5 +0,0 @@ -(autoload 'markdown-mode "markdown-mode.el" - "Major mode for editing Markdown files" t) - -(setq auto-mode-alist - (cons '("\\.mdwn" . markdown-mode) auto-mode-alist)) diff --git a/.emacs.d/rul-init.d/notmuch.el b/.emacs.d/rul-init.d/notmuch.el deleted file mode 100644 index e8e4d9d..0000000 --- a/.emacs.d/rul-init.d/notmuch.el +++ /dev/null @@ -1,136 +0,0 @@ -;; -------- -;; notmuch mode -;; -------- -(require 'rul-config-mail) -(use-package notmuch -:ensure t -:config -;;;; General UI -(setq notmuch-show-logo nil - notmuch-column-control 1.0 - notmuch-hello-auto-refresh t - notmuch-hello-recent-searches-max 20 - notmuch-hello-thousands-separator "" - notmuch-show-all-tags-list t) - -;; Keymaps -(defun rul/capture-mail() - "Capture mail to org mode." - (interactive) - (org-store-link nil) - (org-capture nil "m") - ) - -(bind-key "c" 'rul/capture-mail notmuch-show-mode-map) - -(define-key notmuch-show-mode-map "R" 'notmuch-show-reply) -(define-key notmuch-search-mode-map "R" 'notmuch-search-reply-to-thread) - -; Spam -(define-key notmuch-show-mode-map "S" - (lambda () - "mark message as spam" - (interactive) - (notmuch-show-tag (list "+spam" "-inbox" "-unread")))) - -(define-key notmuch-search-mode-map "S" - (lambda (&optional beg end) - "mark thread as spam" - (interactive (notmuch-search-interactive-region)) - (notmuch-search-tag (list "+spam" "-inbox" "-unread") beg end))) - -; Archive -(setq notmuch-archive-tags (list "-inbox" "+archive")) -(define-key notmuch-show-mode-map "A" - (lambda () - "archive" - (interactive) - (notmuch-show-tag (list "+archive" "-inbox" "-unread")) - (notmuch-refresh-this-buffer))) - -(define-key notmuch-search-mode-map "A" - (lambda (&optional beg end) - "archive thread" - (interactive (notmuch-search-interactive-region)) - (notmuch-search-tag (list "+archive" "-inbox" "-unread") beg end) - (notmuch-refresh-this-buffer))) - -; Mark as read -(define-key notmuch-search-mode-map "r" - (lambda (&optional beg end) - "mark thread as read" - (interactive (notmuch-search-interactive-region)) - (notmuch-search-tag (list "-unread") beg end) - (notmuch-search-next-thread))) - -(define-key notmuch-search-mode-map (kbd "RET") - (lambda () - "Show the selected thread with notmuch-tree if it has more -than one email. Use notmuch-show otherwise." - (interactive) - (if (= (plist-get (notmuch-search-get-result) :total) 1) - (notmuch-search-show-thread) - (notmuch-tree (notmuch-search-find-thread-id) - notmuch-search-query-string - nil - (notmuch-prettify-subject (notmuch-search-find-subject)))))) - -(defun color-inbox-if-unread () (interactive) - (save-excursion - (goto-char (point-min)) - (let ((cnt (car (process-lines "notmuch" "count" "tag:inbox and tag:unread")))) - (when (> (string-to-number cnt) 0) - (save-excursion - (when (search-forward "inbox" (point-max) t) - (let* ((overlays (overlays-in (match-beginning 0) (match-end 0))) - (overlay (car overlays))) - (when overlay - (overlay-put overlay 'face '((:inherit bold) (:foreground "green"))))))))))) - -(defvar notmuch-hello-refresh-count 0) -(defun notmuch-hello-refresh-status-message () - (let* ((new-count - (string-to-number - (car (process-lines notmuch-command "count")))) - (diff-count (- new-count notmuch-hello-refresh-count))) - (cond - ((= notmuch-hello-refresh-count 0) - (message "You have %s messages." - (notmuch-hello-nice-number new-count))) - ((> diff-count 0) - (message "You have %s more messages since last refresh." - (notmuch-hello-nice-number diff-count))) - ((< diff-count 0) - (message "You have %s fewer messages since last refresh." - (notmuch-hello-nice-number (- diff-count))))) - (setq notmuch-hello-refresh-count new-count))) - -(add-hook 'notmuch-hello-refresh-hook 'color-inbox-if-unread) -(add-hook 'notmuch-hello-refresh-hook 'notmuch-hello-refresh-status-message) - -(setq notmuch-hello-sections '(notmuch-hello-insert-saved-searches - notmuch-hello-insert-search - notmuch-hello-insert-recent-searches - notmuch-hello-insert-alltags - )) - -;; https://git.sr.ht/~tslil/dotfiles/tree/4e51afbb/emacs/notmuch-config.el#L76-82 -(defmacro make-binds (mode-map binds argfunc &rest body) - "Create keybindings in `mode-map' using a list of (keystr . arg) -pairs in `binds' of the form ( ... (argfunc arg) body)." - `(progn ,@(mapcar (lambda (pair) - `(define-key ,mode-map (kbd ,(car pair)) - (lambda () (interactive) (,argfunc ,(cdr pair)) ,@body))) - (eval binds)))) - -(defvar notmuch-hello-tree-searches '(("u" . "tag:unread") - ("i" . "tag:inbox") - ("*" . "*")) - "List of (key . query) pairs to bind in notmuch-hello.") - -(make-binds notmuch-hello-mode-map - notmuch-hello-tree-searches - notmuch-search) -) - -(use-package notmuch-indicator :ensure t) diff --git a/.emacs.d/rul-init.d/python.el b/.emacs.d/rul-init.d/python.el deleted file mode 100644 index 3186c72..0000000 --- a/.emacs.d/rul-init.d/python.el +++ /dev/null @@ -1 +0,0 @@ -(add-hook 'python-mode-hook 'py-autopep8-enable-on-save) diff --git a/.emacs.d/rul-init.d/themes.el b/.emacs.d/rul-init.d/themes.el deleted file mode 100644 index 468cd28..0000000 --- a/.emacs.d/rul-init.d/themes.el +++ /dev/null @@ -1,48 +0,0 @@ -(use-package modus-themes :ensure t) -(use-package ef-themes :ensure t) - -(setq - modus-themes-mode-line '(accented borderless padded) - modus-themes-region '(bg-only) - modus-themes-bold-constructs t - modus-themes-italic-constructs t - modus-themes-paren-match '(bold intense) - modus-themes-headings (quote ((1 . (rainbow variable-pitch 1.3)) - (2 . (rainbow 1.1)) - (t . (rainbow)))) - modus-themes-org-blocks 'tinted - ) - -(use-package dbus) -(defun mf/set-theme-from-dbus-value (value) - "Set the appropiate theme according to the color-scheme setting value." - (message "value is %s" value) - (if (equal value '1) - (progn (message "Switch to dark theme") - (modus-themes-select 'modus-vivendi)) - (progn (message "Switch to light theme") - (modus-themes-select 'modus-operandi)))) - -(defun mf/color-scheme-changed (path var value) - "DBus handler to detect when the color-scheme has changed." - (when (and (string-equal path "org.freedesktop.appearance") - (string-equal var "color-scheme")) - (mf/set-theme-from-dbus-value (car value)) - )) - -;; Register for future changes -(dbus-register-signal - :session "org.freedesktop.portal.Desktop" - "/org/freedesktop/portal/desktop" "org.freedesktop.portal.Settings" - "SettingChanged" - #'mf/color-scheme-changed) - -;; Request the current color-scheme -(dbus-call-method-asynchronously - :session "org.freedesktop.portal.Desktop" - "/org/freedesktop/portal/desktop" "org.freedesktop.portal.Settings" - "Read" - (lambda (value) (mf/set-theme-from-dbus-value (caar value))) - "org.freedesktop.appearance" - "color-scheme" - ) diff --git a/.emacs.d/rul-init.d/vterm.el b/.emacs.d/rul-init.d/vterm.el deleted file mode 100644 index 5116bf0..0000000 --- a/.emacs.d/rul-init.d/vterm.el +++ /dev/null @@ -1,5 +0,0 @@ -(use-package multi-vterm - :ensure t - :config - (setq vterm-max-scrollback 100000) - (add-hook 'vterm-mode-hook 'goto-address-mode)) diff --git a/.emacs.d/rul-init.d/which-key.el b/.emacs.d/rul-init.d/which-key.el deleted file mode 100644 index 1d8fd8d..0000000 --- a/.emacs.d/rul-init.d/which-key.el +++ /dev/null @@ -1,5 +0,0 @@ -(use-package which-key - :ensure t - :config - (which-key-mode) -) |