1
0
mirror of https://codeberg.org/cage/tinmop/ synced 2025-01-19 03:00:08 +01:00

- rearranged columns of gemlog subscriptions.

- fixed typos in init file.
This commit is contained in:
cage 2023-02-24 11:21:57 +01:00
parent 86adc4638d
commit 8278ea485e
2 changed files with 31 additions and 27 deletions

View File

@ -41,11 +41,11 @@
(load-module "share-gemini-link.lisp")
;; abbrevation on command line
;; abbrevations on command line
(load-module "expand-abbrev-command-window.lisp")
;; delete posts using a regeula expression
;; delete posts using a regular expression
(load-module "delete-by-regex.lisp")

View File

@ -41,31 +41,35 @@
(defun gemlog->text (gemlog-db-row window)
(let ((unseen-count (db:row-unseen-count gemlog-db-row)))
(reduce (lambda (a b) (cat-tui-string a b :color-attributes-contagion nil))
(list (make-tui-string (format nil
" ~a/~a "
unseen-count
(+ unseen-count
(db:row-seen-count gemlog-db-row)))
:fgcolor (when (> unseen-count 0)
(swconf:gemini-subscription-count-fg)))
(make-tui-string (format nil
"~a"
(tui:text-ellipsis (db:row-url gemlog-db-row)
(truncate (* (win-width window)
1/3))))
:fgcolor (when (> unseen-count 0)
(swconf:gemini-subscription-url-fg)))
(make-tui-string (format nil
" ~a ~s"
(tui:text-ellipsis (db:row-title gemlog-db-row)
(truncate (* (win-width window)
1/3)))
(if (db:row-subtitle gemlog-db-row)
(tui:text-ellipsis (db:row-subtitle gemlog-db-row)
(truncate (* (win-width window)
1/3)))
(_ "No subtitle")))
:attributes (attribute-bold))))))
(let ((count-string (format nil
" ~a/~a "
unseen-count
(+ unseen-count
(db:row-seen-count gemlog-db-row)))))
(list (make-tui-string (right-padding count-string
(max (length count-string)
(truncate (* (win-width window)
1/20))))
:fgcolor (when (> unseen-count 0)
(swconf:gemini-subscription-count-fg)))
(make-tui-string (format nil
"~a ~s "
(tui:text-ellipsis (trim-blanks (db:row-title gemlog-db-row))
(truncate (* (win-width window)
1/3)))
(if (db:row-subtitle gemlog-db-row)
(tui:text-ellipsis (db:row-subtitle gemlog-db-row)
(truncate (* (win-width window)
1/3)))
(_ "No subtitle")))
:attributes (attribute-bold))
(make-tui-string (format nil
"~a"
(tui:text-ellipsis (db:row-url gemlog-db-row)
(truncate (* (win-width window)
1/3))))
:fgcolor (when (> unseen-count 0)
(swconf:gemini-subscription-url-fg))))))))
(defmethod resync-rows-db ((object gemini-subscription-window)
&key