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 88ea6ac
Show file tree
Hide file tree
Showing 17 changed files with 16 additions and 72 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
44 changes: 11 additions & 33 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,37 +80,25 @@
;;; 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)

(setq savehist-file (expand-file-name "minibuffer/history" cat-cache-dir))
(savehist-mode)

;;; eshell
(setq eshell-history-file-name (expand-file-name "eshell/history" cat-cache-dir))

;;; recentf
(setq recentf-max-saved-items 100
recentf-save-file (expand-file-name "recentf" cat-cache-dir))
(setq recentf-max-saved-items 100)
(add-hook 'after-init-hook #'recentf-mode)

;;; saveplace
(setq save-place-file (expand-file-name "places" cat-cache-dir))
(add-hook 'after-init-hook #'save-place-mode)

;;; backup
(setq create-lockfiles nil
make-backup-files nil
backup-directory-alist (list (cons "." (concat cat-cache-dir "backup/"))))
(setq create-lockfiles nil)

;;; autosave
(setq auto-save-default t
auto-save-include-big-deletions t
auto-save-list-file-prefix (concat cat-cache-dir "autosave/"))
auto-save-include-big-deletions t)

;;; ediff
(setq ediff-diff-options "-w" ; turn off whitespace checking
Expand Down Expand Up @@ -162,8 +158,6 @@
(overlay-put ov 'display (propertize info 'face hideshow-folded-face)))))
:custom
(hs-set-up-overlay 'hideshow-folded-overlay-fn))
;;; pcache
(setq pcache-directory (concat cat-cache-dir "pcache/"))

(use-package type-break
:ensure nil
Expand All @@ -172,25 +166,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 +184,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/+diredx.el
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,4 @@
(gls . coreutils)
(fd . fd)
(ffmpegthumbnailer . ffmpegthumbnailer)
(mediainfo . mediainfo)
:custom
(dirvish-cache-dir (concat cat-cache-dir "dirvish/"))))
(mediainfo . mediainfo)))
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
2 changes: 0 additions & 2 deletions cats/+log.el
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
:hook (logview-mode . hl-line-mode)
: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)
4 changes: 1 addition & 3 deletions cats/+nov.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
;; -*- lexical-binding: t; -*-

(use-package nov
:mode ("\\.epub\\'" . nov-mode)
:config
(setq nov-save-place-file (concat cat-cache-dir "nov-places")))
:mode ("\\.epub\\'" . nov-mode))
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
1 change: 0 additions & 1 deletion cats/+prescient.el
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,5 @@
(use-package corfu-prescient
:hook (corfu-mode . corfu-prescient-mode)))

(setq prescient-save-file (expand-file-name "prescient-save.el" cat-cache-dir))
(with-eval-after-load 'prescient
(prescient-persist-mode 1))
1 change: 0 additions & 1 deletion cats/+tramp.el
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
(use-package tramp
:ensure nil
:custom
(tramp-auto-save-directory (concat cat-cache-dir "tramp-autosave/"))
(tramp-backup-directory-alist backup-directory-alist))

(defun +sudo-edit-current-file ()
Expand Down
1 change: 0 additions & 1 deletion cats/+treemacs.el
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
:bind
("M-0" . treemacs-select-window)
:custom
(treemacs-persist-file (concat cat-cache-dir "treemacs"))
(treemacs-is-never-other-window t))

(use-package treemacs-magit
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
6 changes: 0 additions & 6 deletions cats/+workspace.el
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@
(tab-bar-show 1)
(tab-bar-tab-hints t))

(use-package project
:ensure nil
:custom
(project-list-file (concat cat-cache-dir "projects")))

(use-package burly
:disabled
:hook
Expand Down Expand Up @@ -83,7 +78,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
2 changes: 1 addition & 1 deletion elisp/sow.el
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
;;; sow.el --- Variable commands for scrolling the other window. -*- lexical-binding: t; -*-
;;; sow.el --- Variable commands for Scrolling the Other Window. -*- lexical-binding: t; -*-

;; Copyright (C) 2016 Andreas Politz

Expand Down

0 comments on commit 88ea6ac

Please sign in to comment.