[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ELPA] New package: gnome-dark-style
From: |
david |
Subject: |
Re: [ELPA] New package: gnome-dark-style |
Date: |
Sat, 08 Mar 2025 12:08:55 -0400 |
User-agent: |
mu4e 1.12.8; emacs 31.0.50 |
Ship Mints <shipmints@gmail.com> writes:
> On Sat, Mar 8, 2025 at 10:29 AM Ship Mints <shipmints@gmail.com> wrote:
>
> On Sat, Mar 8, 2025 at 10:24 AM david <davidimagid@gmail.com> wrote:
>
> Ship Mints <shipmints@gmail.com> writes:
>
> > On Sat, Mar 8, 2025 at 9:13 AM Po Lu <luangruo@yahoo.com>
> wrote:
> >
> > david <davidimagid@gmail.com> writes:
> >
> > > Hello Emacs maintainers,
> > >
> > > I would like to submit my package "gnome-dark-style" to GNU
> ELPA.
> > >
> > > * Repository
> > > https://github.com/dimagid/gnome-dark-style
> > >
> > > The code is licensed under GPLv3.
> > >
> > > * Description
> > > The gnome-dark-style package automatically synchronizes the
> Emacs
> > > theme with GNOME's color scheme. It allows users to define
> custom
> > light
> > > and dark themes, ensuring a consistent look and feel across the
> > GNOME
> > > desktop environment and GNU Emacs.
> > >
> > > * Features
> > > - Automatically switches between light and dark themes based on
> > GNOME's
> > > color scheme.
> > > - Supports custom light and dark themes.
> > > - Monitors GNOME's color scheme in real-time and updates the
> Emacs
> > theme
> > > accordingly.
> > >
> > > * Requirements
> > > - GNOME Shell 47.4 (tested with this version).
> > > - The gsettings command must be available on your system.
> > >
> > > Please let me know the next steps to move forward. I will be
> attentive
> > > to ensure everything is in order.
> > >
> > > Thanks!
> > >
> > > David D.
> >
> > Would you generalize this package to employ the recently
> standardized
> > xdg-portal APIs for retrieving and receiving notifications of
> changes to
> > this preference, and submit it for inclusion in Emacs? It is a
> frequent
> > request that Emacs should adapt to desktop theming preferences,
> and
> > not
> > always just GNOME's.
> >
> >
> >
>
> https://flatpak.github.io/xdg-desktop-portal/docs/doc-org.freedesktop.portal.Settings.html
>
> >
> >
> > +1
> >
> > And +1 to make this, per the earlier emacs-devel discussion this
> week,
> > sufficiently generic to eventually process Windows and macOS
> theme-change
> > notifications. I would avoid using the term "dark" in the package
> name, I find
> > it unhelpful. Better might be something like system-theme.el which
> would be
> > more precise. I did offer to assist on API and indicated WIP on
> something
> > similar to detect and notify of system-level sleep/wake events.
>
> Hi developers,
>
> The gnome-dark-style package does not require D-Bus. As far as I
> know,
> Emacs only uses D-Bus when compiled with the respective library,
> see
> configuration option --with-dbus. However, I’m not sure if Emacs is
> compiled --with-dbus by default.
>
> There are packages that attempt to solve this synchronization issue
> using D-Bus, but they didn’t work as smoothly as I wanted for
> automatic
> theme switching. I tried hacking the code, but I ran into more issues
> and ultimately decided to tackle the problem in the simplest and
> most
> direct way possible, without introducing unnecessary complexity.
>
> Personally, I believe the ideal solution—though potentially
> cumbersome
> and, as someone previously noted, possibly inelegant—would be to
> create
> a separate package capable of handling all desktop communication
> methods across different desktop environments and operating
> systems. gnome-dark-style is not that package; it’s specifically
> designed for GNOME. The current implementation is minimal,
> straightforward, and easy to understand. Could gnome-dark-style be
> used
> by such a package? Yes, of course, but that depends on whether
> there’s
> interest in pursuing that work.
>
> Emacs has dbus support even on macOS when dbus is available. dbus is
> likely available on most platforms and most builds.
>
> I think the more important concern for introducing such a package is for
> people who use the same Emacs configuration across multiple operating
> systems. I use macOS, Linux, and occasionally Windows. I do not want to
> have three different packages to detect sleep/wake, or system theme
> change. The underlying implementation details might be different, but in
> my init, it'll be one package with one configuration, not the Emacs version
> of ifdef everywhere for platform specifics. This is what I expect
> sleep/wake will look like. A single "API" with a single set of functions and
> hooks to use regardless of back-end implementation. Don't you agree
> that's a good way to go?
>
Perhaps, but gnome-dark-style is specifically designed for GNOME (it
could potentially be used in other desktop environments, but that would
require testing to see if gsettings and the color-scheme variable
interact in the same way). I believe we can have packages in GNU ELPA
that work across all environments and operating systems, as well as
environment-specific packages.
Today, Eli mentioned a function I wasn’t aware of,
w32-follow-system-dark-mode. I looked for it, but it’s not available in
my Emacs because I use GNU/Linux. That doesn’t mean the function
shouldn’t exist—of course not! It serves its purpose and works
specifically for Windows (or whatever w32 encompasses).
- Re: [ELPA] New package: gnome-dark-style, (continued)
- Re: [ELPA] New package: gnome-dark-style, Basil L. Contovounesios, 2025/03/08
- Re: [ELPA] New package: gnome-dark-style, Po Lu, 2025/03/08
- Re: [ELPA] New package: gnome-dark-style, Ship Mints, 2025/03/08
- Re: [ELPA] New package: gnome-dark-style, david, 2025/03/08
- Re: [ELPA] New package: gnome-dark-style, Ship Mints, 2025/03/08
- Re: [ELPA] New package: gnome-dark-style, Ship Mints, 2025/03/08
- Re: [ELPA] New package: gnome-dark-style,
david <=
- Re: [ELPA] New package: gnome-dark-style, Ship Mints, 2025/03/08
- Re: [ELPA] New package: gnome-dark-style, Eli Zaretskii, 2025/03/08