1
0
mirror of https://codeberg.org/cage/tinmop/ synced 2025-01-31 04:24:48 +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") (load-module "share-gemini-link.lisp")
;; abbrevation on command line ;; abbrevations on command line
(load-module "expand-abbrev-command-window.lisp") (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") (load-module "delete-by-regex.lisp")

View File

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