Skip to content

Commit

Permalink
Add no-littering which no longer manually maintain a etc/var dir
Browse files Browse the repository at this point in the history
  • Loading branch information
chuxubank committed Apr 24, 2024
1 parent efb788b commit 8ec14e1
Show file tree
Hide file tree
Showing 11 changed files with 10 additions and 42 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@

# emacs
auto-save-list
tramp
eln-cache/
server/

# backup
*.*~
Expand Down
27 changes: 8 additions & 19 deletions cats/+default.el
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
;; -*- lexical-binding: t; -*-

(use-package no-littering
:demand
:init
(setq no-littering-etc-directory cat-etc-dir
no-littering-var-directory cat-cache-dir)
:config
(no-littering-theme-backups))

;;; ui
(blink-cursor-mode 0)
(scroll-bar-mode 0)
Expand Down Expand Up @@ -72,9 +80,6 @@
;;; url
(setq url-configuration-directory (concat cat-etc-dir "url/"))

;;; bookmarks
(setq bookmark-default-file (expand-file-name "bookmarks" cat-etc-dir))

;;; minibuffer
(setq enable-recursive-minibuffers t
confirm-kill-emacs #'yes-or-no-p)
Expand Down Expand Up @@ -172,25 +177,16 @@
(type-break-mode . type-break-query-mode)
(type-break-mode . type-break-mode-line-message-mode)
:custom
(type-break-file-name (concat cat-etc-dir "type-break"))
(type-break-query-function #'y-or-n-p)
(type-break-good-break-interval 300)
:config
(type-break-guesstimate-keystroke-threshold 30))

;;; time
(setq timeclock-file (concat cat-etc-dir "timelog"))

(use-package epg-config
:ensure nil
:custom
(epg-pinentry-mode 'loopback))

(use-package abbrev
:ensure nil
:custom
(abbrev-file-name (concat cat-etc-dir "abbrev_defs")))

(use-package ansi-color
:ensure nil
:hook (compilation-filter . ansi-color-compilation-filter))
Expand All @@ -199,13 +195,6 @@
:ensure nil
:delight (compilation-shell-minor-mode ""))

(use-package transient
:pin melpa
:custom
(transient-levels-file (concat cat-etc-dir "transient/levels"))
(transient-values-file (concat cat-etc-dir "transient/values"))
(transient-history-file (concat cat-etc-dir "transient/history")))

(use-package profiler
:ensure nil
:pretty-hydra
Expand Down
4 changes: 1 addition & 3 deletions cats/+doc.el
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,7 @@ Intended for `eldoc-documentation-functions' (which see)."
:hook ((conf-toml-mode
toml-ts-mode). eldoc-toml-mode))

(use-package devdocs
:custom
(devdocs-data-dir (concat cat-etc-dir "devdocs")))
(use-package devdocs)

(defvar-keymap cat-dev-doc-map
:doc "Keymap for `devdocs-mode' commands."
Expand Down
2 changes: 0 additions & 2 deletions cats/+eudc.el
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
;; -*- lexical-binding: t; -*-

(setq eudc-options-file (expand-file-name "eudc-options" cat-etc-dir))

(with-eval-after-load "message"
(define-key message-mode-map [(control ?c) (tab)] 'eudc-expand-try-all))
(with-eval-after-load "sendmail"
Expand Down
1 change: 0 additions & 1 deletion cats/+log.el
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
:custom
(datetime-timezone 'Asia/Shanghai)
(logview-cache-filename (concat cat-cache-dir "logview-cache.extmap"))
(logview-views-file (concat cat-etc-dir "logview.views"))
(logview-additional-timestamp-formats
'(("LogCat"
(java-pattern . "MM-dd HH:mm:ss.SSS"))
Expand Down
2 changes: 0 additions & 2 deletions cats/+lsp.el
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
;; -*- lexical-binding: t; -*-

(use-package lsp-mode
:custom
(lsp-session-file (concat cat-etc-dir "lsp-session"))
:hook
(lsp-mode . lsp-enable-which-key-integration)
:commands lsp)
Expand Down
4 changes: 1 addition & 3 deletions cats/+magit.el
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,4 @@

(use-package forge
:demand t
:after magit
:custom
(forge-database-file (concat cat-etc-dir "forge.db")))
:after magit)
1 change: 0 additions & 1 deletion cats/+org-roam.el
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
:commands #'org-roam-buffer-toggle
:custom
(org-roam-directory cat-org-roam-directory)
(org-roam-db-location (expand-file-name "org-roam.db" cat-etc-dir))
(org-roam-completion-everywhere t)
(org-roam-node-display-template (concat "${type:10} " (propertize "${tags:15} " 'face 'org-tag) "${title:*} "))
(org-roam-mode-section-functions (list #'org-roam-backlinks-section
Expand Down
6 changes: 0 additions & 6 deletions cats/+org.el
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,6 @@
("*" . "+")
("1." . "a."))))

(use-package org-id
:ensure nil
:custom
(org-id-locations-file (expand-file-name "org-id-locations" cat-etc-dir)))

(use-package org-indent
:ensure nil
:delight " 󰉶")
Expand All @@ -150,7 +145,6 @@
:ensure nil
:custom
(org-clock-persist 'history)
(org-clock-persist-file (expand-file-name "org-clock-save.el" cat-etc-dir))
(org-clock-clocked-in-display 'frame-title))

(use-package org-timer
Expand Down
2 changes: 0 additions & 2 deletions cats/+undo.el
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
;; -*- lexical-binding: t; -*-

(use-package undo-fu-session
:custom
(undo-fu-session-directory (concat cat-etc-dir "undo-fu-session"))
:hook (after-init . undo-fu-session-global-mode))

(use-package vundo
Expand Down
1 change: 0 additions & 1 deletion cats/+workspace.el
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@
:custom
(tabspaces-include-buffers nil)
(tabspaces-initialize-project-with-todo nil)
(tabspaces-session-file (concat cat-etc-dir "tabsession.el"))
:pretty-hydra
((:color teal :title (+with-icon "nf-md-tab" "Tabspaces"))
("Buffer"
Expand Down

0 comments on commit 8ec14e1

Please sign in to comment.