diff options
author | colin <colin@cicadas.surf> | 2023-03-25 17:21:26 -0700 |
---|---|---|
committer | colin <colin@cicadas.surf> | 2023-03-25 17:21:26 -0700 |
commit | 1939272b1c15d50f5fe1fa403bc9c8ee9fd0a84f (patch) | |
tree | 3ef8b80ae78c616d86a5ce76996c99b6ca63ce2a | |
parent | e2c4c4925e5c75b145fdeb94b7ee816657f6eb63 (diff) |
It seems to finish!
-rw-r--r-- | fussy.el | 19 |
1 files changed, 17 insertions, 2 deletions
@@ -1,9 +1,24 @@ (require 'cl-lib) (require 'package) +(defvar +package-name-filter-out-list+ + (list "airline-")) + +(defvar +excluded-package-names+ + '(tramp-theme color-theme)) + +(defun fussy-string-ends-with (str suffix) + (and (< (length suffix) (length str)) + (string= suffix + (cl-subseq str (- (length str) (length suffix)))))) + (defun fussy-is-theme-p (pkg-entry) - (cl-search "-theme" (symbol-name (cl-first pkg-entry)) - :test 'char-equal)) + (let ((name (symbol-name (cl-first pkg-entry)))) + (and (or (fussy-string-ends-with name "-theme") + (fussy-string-ends-with name "-themes")) + (not (cl-member (cl-first pkg-entry) +excluded-package-names+)) + (cl-notany (lambda (substr) (cl-search substr name)) + +package-name-filter-out-list+)))) (defun fussy-themes-packages () (cl-remove-if-not 'fussy-is-theme-p package-archive-contents)) |