Shorten lines to 80 or less (except the ones that have to be long...)

This commit is contained in:
Mitchell Marquez 2023-10-23 15:35:50 -08:00
parent 872c438e8e
commit 7b12623587

View File

@ -13,7 +13,8 @@
(--> image
(shell-command-to-string (format "file %s" it))
(split-string it "," nil " ")
(--filter (string-match-p (rx (+ num) (? " ") "x" (? " ") (+ num)) it) it)
(--filter (string-match-p (rx (+ num) (? " ") "x" (? " ") (+ num))
it) it)
(--remove (string-match-p "density" it) it)
(car it)
(split-string it "x" nil " ")
@ -23,7 +24,10 @@
;; select the background image
(defvar canvas.src.fullname (--> (f-files wallpapers)
(--filter (string-match-p (rx (* any) "." (or "jpg" "jpeg" "png")) it) it)
(--filter
(string-match-p
(rx (* any) "." (or "jpg" "jpeg" "png")) it)
it)
(seq-random-elt it)
))
(defvar canvas.fullname canvas.src.fullname)
@ -38,14 +42,17 @@
(defvar waifu.position.y) ; initialize these so we can `setq' them later
(defvar waifu.basename (file-name-base waifu.src.fullname))
(defvar waifu.maxdim (round (* canvas.x 0.25)))
(defvar waifu.cachefile (expand-file-name (format "%s-%s.png" waifu.basename waifu.maxdim) cachedir))
(defvar waifu.cachefile (expand-file-name
(format "%s-%s.png" waifu.basename waifu.maxdim)
cachedir))
;; debug
(message waifu.src.fullname)
;; adding waifu to image
(if (not (file-exists-p waifu.cachefile))
(shell-command (format "magick %s -resize %s %s" waifu.src.fullname waifu.maxdim waifu.cachefile))
(shell-command (format "magick %s -resize %s %s"
waifu.src.fullname waifu.maxdim waifu.cachefile))
(message "waifu already exists, yay!"))
(defvar waifu.height (car (get-dimensions waifu.cachefile)))
(defvar waifu.width (cdr (get-dimensions waifu.cachefile)))
@ -62,9 +69,12 @@
(defvar logo.maxdim (round (* canvas.x 0.25)))
(defvar logo.start.x) ; init now, setq later
(defvar logo.start.y) ; init now, setq later
(defvar logo.cachefile (expand-file-name (format "%s-%s.png" logo.src.basename logo.maxdim) cachedir))
(defvar logo.cachefile (expand-file-name
(format "%s-%s.png" logo.src.basename logo.maxdim)
cachedir))
(if (not (file-exists-p logo.cachefile))
(shell-command (format "magick %s -resize %s %s" logo.src logo.maxdim logo.cachefile))
(shell-command (format "magick %s -resize %s %s"
logo.src logo.maxdim logo.cachefile))
(message "logo already exists, yay!"))
(defvar logo.x (car (get-dimensions logo.cachefile)))
(defvar logo.y (cdr (get-dimensions logo.cachefile)))