all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Rahul M. Juliato" <rahuljuliato@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 68766@debbugs.gnu.org
Subject: bug#68766: 29.2; Windows dark/light mode changes does not reflect on Emacs Title bar/Scrollbar
Date: Tue, 30 Jan 2024 16:57:26 -0300	[thread overview]
Message-ID: <874jeuoaqh.fsf@gmail.com> (raw)
In-Reply-To: <87il3enr9u.fsf@gmail.com>

Hello there again!


Regarding the side discussion Stefan and Eli were commenting on (and if I am
polluting this thread, please tell me where we can take this conversation).


I'd be more than happy if `auto-dark-mode` or some version
of it gets added to Emacs or some other more "official" package archive than
MELPA. I am also happy to help on any other matter I can contribute.


Just to be clear of what the package does:

- User sets a variable with "dark-mode" theme name;

- The same for "light-mode"

- Starts the minor mode either manually or on boot (auto-dark-mode)

- Emacs changes between these themes whenever system changes its dark/light
  mode internal state

- Also works with Doom Emacs and Spacemacs


Systems supported by the detection mechanism:

- macos: using `emacs-plus` (faster detection method) or any other emacs build
         falling back to osascript (a little slower detection method)

- gnu/linux: trough dbus with Gnome or gnome modules installed booting another
             WM, such as Sway or i3

- android: using `Termux`

- windows: through powershell or winreg


I am currently working on:

- nil themes: if the user wants to keep the original Emacs appearance,
              and/or set both themes to nil, and use only the detection
              mechanism with auto-dark post detection hooks to do
              something else. (Done, committed it today).

- macos:      emacs-mac build trough a faster detection method since someone
              pointed me there's a similar function to execute applescript
              than i've used for `emacs-plus` build.

- docs:       I plan to work shortly on a walk-trough install guide, some
              development tips and a FAQ


If you'd like to keep auto-dark as is today, I think we could add another
detection mechanism option such as *emacs-internal-auto-dark*, that may be fed
by some internally calculated status into a global elisp variable in which we
could use some event/or polling function to keep track of it during the
execution of the minor-mode.
    

The tricky part here would be assuring that all graphical toolkits in
all OSes can feed the OS system status to Emacs. On either Linux and macOS it
seems to be "automatically done"; Windows, as the bug originally described might
be harder.


Also the source code can be found here: https://github.com/LionyxML/auto-dark-emacs


Thank you for the opportunity to share it with you and discuss this matter.


Rahul M. Juliato





  parent reply	other threads:[~2024-01-30 19:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-28  2:08 bug#68766: 29.2; Windows dark/light mode changes does not reflect on Emacs Title bar/Scrollbar Rahul M. Juliato
2024-01-28  2:40 ` Stefan Kangas
2024-01-28  6:42   ` Eli Zaretskii
2024-01-30 19:52     ` Rahul M. Juliato
2024-01-28  6:38 ` Eli Zaretskii
2024-01-29 22:34   ` Stefan Kangas
2024-01-30  7:37     ` Visuwesh
2024-01-30 11:57     ` Rudolf Schlatte
2024-01-30 13:15       ` Eli Zaretskii
2024-01-30 19:57 ` Rahul M. Juliato [this message]
2024-02-03  9:57   ` Eli Zaretskii
2024-02-19  1:15     ` Rahul M. Juliato

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874jeuoaqh.fsf@gmail.com \
    --to=rahuljuliato@gmail.com \
    --cc=68766@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.