unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Rudolf Schlatte <rudi@constantly.at>
To: 53458@debbugs.gnu.org
Subject: bug#53458: [Request, Linux] Follow system dark mode user preference
Date: Sun, 23 Jan 2022 12:02:44 +0100	[thread overview]
Message-ID: <m18rv6k94b.fsf@constantly.at> (raw)
In-Reply-To: <3iRhN5EFJnIdFLuFt_CnYryIAZSjHpoq96ZkkxYkI1DJS4cNYRyGd18E92AH1lTjuEY75njusiICZbdF_AD0brAkLZ_9o9Gk435hsZbXiho=@protonmail.com>

Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text
editors" <bug-gnu-emacs@gnu.org> writes:

> Maximiliano Sandoval <msandova@protonmail.com> writes:
>
>> Recently a new setting was added to xdg-desktop-portal to declare the user
>> preference for a dark mode. This setting is DE-agnostic¹ and it is sandbox
>> friendly. The dark mode setting will be officially supported in GNOME 42,
>> elementary OS already supports it, and there is a merge request for KDE that
>> will most likely included its next release.
>>
>> How to implement
>
> Isn't the window manager and GTK+ responsible for this, and not the
> applications themselves?

The OS changes the title bar color etc., but such a change would let
Emacs adapt frame contents, for example by changing the active theme.
To give a concrete example, I have the snippet below in my init file,
evaluated when I'm running Yamamoto-san's Mac port:

  (add-hook 'mac-effective-appearance-change-hook
            #'(lambda () (pcase (plist-get (mac-application-state) :appearance)
                           ("NSAppearanceNameDarkAqua" (modus-themes-load-vivendi))
                           ("NSAppearanceNameAqua" (modus-themes-load-operandi))))) 








  reply	other threads:[~2022-01-23 11:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-22 22:14 bug#53458: [Request, Linux] Follow system dark mode user preference Maximiliano Sandoval via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-01-23  2:04 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-01-23 11:02   ` Rudolf Schlatte [this message]
2022-01-23 13:14     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors

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.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=m18rv6k94b.fsf@constantly.at \
    --to=rudi@constantly.at \
    --cc=53458@debbugs.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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.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).