From: Stefan Kangas <stefan@marxist.se>
To: Org-mode <emacs-orgmode@gnu.org>
Cc: Daniel Mendler <mail@daniel-mendler.de>
Subject: [PATCH] Improve look of agenda on graphical displays
Date: Mon, 27 Jun 2022 14:08:44 +0200 [thread overview]
Message-ID: <CADwFkm=5CkUb=7mx3MtdYV5AwzGYLVZ-Ush4W6GU=h27kHVVLg@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 156 bytes --]
The attached patch improves the look of the agenda time grid and
separator line on graphical displays. It was inspired by
org-modern.el by Daniel Mendler.
[-- Attachment #2: 0001-Improve-look-of-agenda-on-graphical-displays.patch --]
[-- Type: text/x-patch, Size: 3132 bytes --]
From dba6d68019c74232f581a55ab012fd9d06f53434 Mon Sep 17 00:00:00 2001
From: Stefan Kangas <stefan@marxist.se>
Date: Mon, 27 Jun 2022 14:04:00 +0200
Subject: [PATCH] Improve look of agenda on graphical displays
* lisp/org-agenda.el (org-agenda-block-separator)
(org-agenda-time-grid, org-agenda-current-time-string): Improve
default visual elements on graphical displays. Inspired by
org-modern.el by Daniel Mendler <mail@daniel-mendler.de>.
---
lisp/org-agenda.el | 27 +++++++++++++++++++--------
1 file changed, 19 insertions(+), 8 deletions(-)
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index a66d6e116..495fd5454 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -131,13 +131,18 @@ name and week number or the separator lines."
:group 'org-agenda
:type 'boolean)
-(defcustom org-agenda-block-separator ?=
+(defcustom org-agenda-block-separator
+ (if (and (display-graphic-p)
+ (char-displayable-p ?─))
+ ?─
+ ?=)
"The separator between blocks in the agenda.
If this is a string, it will be used as the separator, with a newline added.
If it is a character, it will be repeated to fill the window width.
If nil the separator is disabled. In `org-agenda-custom-commands' this
addresses the separator between the current and the previous block."
:group 'org-agenda
+ :version "29.1"
:type '(choice
(const :tag "Disabled" nil)
(character)
@@ -1539,11 +1544,12 @@ the variable `org-agenda-time-grid'."
:type 'boolean)
(defcustom org-agenda-time-grid
- '((daily today require-timed)
- (800 1000 1200 1400 1600 1800 2000)
- "......"
- "----------------")
-
+ (let ((graphical (and (display-graphic-p)
+ (char-displayable-p ?┄))))
+ `((daily today require-timed)
+ (800 1000 1200 1400 1600 1800 2000)
+ ,(if graphical " ┄┄┄┄┄ " "......")
+ ,(if graphical "┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄" "----------------")))
"The settings for time grid for agenda display.
This is a list of four items. The first item is again a list. It contains
symbols specifying conditions when the grid should be displayed:
@@ -1563,6 +1569,7 @@ times that have a grid line.
The fourth item is a string placed after the grid times. This
will align with agenda items."
:group 'org-agenda-time-grid
+ :version "29.1"
:type
'(list
(set :greedy t :tag "Grid Display Options"
@@ -1584,10 +1591,14 @@ will align with agenda items."
:type 'boolean)
(defcustom org-agenda-current-time-string
- "now - - - - - - - - - - - - - - - - - - - - - - - - -"
+ (if (and (display-graphic-p)
+ (char-displayable-p ?⭠)
+ (char-displayable-p ?─))
+ "⭠ now ───────────────────────────────────────────────"
+ "now - - - - - - - - - - - - - - - - - - - - - - - - -")
"The string for the current time marker in the agenda."
:group 'org-agenda-time-grid
- :version "24.1"
+ :version "29.1"
:type 'string)
(defgroup org-agenda-sorting nil
--
2.30.2
next reply other threads:[~2022-06-27 12:11 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-27 12:08 Stefan Kangas [this message]
2022-06-29 9:19 ` [PATCH] Improve look of agenda on graphical displays Ihor Radchenko
2022-06-29 10:20 ` Stefan Kangas
2022-06-29 12:46 ` [STYLE] :version tags in defcustom definitions (was: [PATCH] Improve look of agenda on graphical displays) Ihor Radchenko
2022-06-29 12:55 ` Stefan Kangas
2022-06-29 14:07 ` Timothy
2022-06-29 16:56 ` Bruce D'Arcus
2022-11-13 7:38 ` [PATCH] " Ihor Radchenko
2022-11-19 13:03 ` [PATCH] Re: [STYLE] :version tags in defcustom definitions Bastien Guerry
2022-11-20 5:47 ` Ihor Radchenko
2022-06-30 7:28 ` [PATCH] Improve look of agenda on graphical displays Ihor Radchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CADwFkm=5CkUb=7mx3MtdYV5AwzGYLVZ-Ush4W6GU=h27kHVVLg@mail.gmail.com' \
--to=stefan@marxist.se \
--cc=emacs-orgmode@gnu.org \
--cc=mail@daniel-mendler.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).