You are not logged in.

#1 2025-08-08 19:31:17

linerman
Member
Registered: 2021-02-16
Posts: 88

[SOLVED] Dark mode switching

Hi,

I wanted to have my Gnome 48 Wayland switching from light do dark mode and vice-versa.
I have my Mcmojave light and dark themes for GTK and Kvantum for QT. Some gnome extensions are in use also to get full dark/light mode (Legacy Theme Scheme Auto Switcher+Light Style+Night Theme Switcher)
According to wiki, I got Yin-Yang tool because it's easy and very configurable. All of that worked for couple of months but lately some issues occurred.
The automatic switching connected to geoclue stopped. Right now to switch the mode, I need to run the Yin-Yang and click Apply (without changing anything in the program itself).
I described that issue to author but without answer.
Do you have an idea hot to fix that or at least to prepare some automation process of running the program and clicking apply button?

Last edited by linerman (2025-08-17 20:27:17)

Offline

#2 2025-08-08 20:37:40

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,703

Re: [SOLVED] Dark mode switching

Does geoclue still work?

/usr/lib/geoclue-2.0/demos/where-am-i

Offline

#3 2025-08-09 18:57:53

topcat01
Member
Registered: 2019-09-17
Posts: 273

Re: [SOLVED] Dark mode switching

By default geoclue relies on Mozilla's location service which is now discontinued. You can use the alternate google service but it requires an API key. This can be configured in

/etc/geoclue/geoclue.conf

You can also set a static location if google does not work.

Offline

#4 2025-08-09 19:10:23

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,703

Re: [SOLVED] Dark mode switching

@topcat01
https://bbs.archlinux.org/viewtopic.php … 7#p2252767 - only the two links at the top.

Offline

#5 2025-08-09 19:13:05

topcat01
Member
Registered: 2019-09-17
Posts: 273

Re: [SOLVED] Dark mode switching

Nice! I no longer use it myself so missed that update.

Offline

#6 2025-08-11 10:18:32

linerman
Member
Registered: 2021-02-16
Posts: 88

Re: [SOLVED] Dark mode switching

seth wrote:

Does geoclue still work?

/usr/lib/geoclue-2.0/demos/where-am-i
 /usr/lib/geoclue-2.0/demos/where-am-i
Client object: /org/freedesktop/GeoClue2/Client/4

New location:
Latitude:    52,330496°
Longitude:   16,790323°
Accuracy:    1560,414857 meters
Description: WiFi
Timestamp:   pon, 11 sie 2025, 12:10:55 (1754907055 seconds since the Epoch) 

Looks that geoclue still works

Offline

#7 2025-08-11 11:47:23

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,703

Re: [SOLVED] Dark mode switching

You might want to edit/obfuscate the coordinates.

I need to run the Yin-Yang and click Apply (without changing anything in the program itself)

Is the daemon running at all then?

Offline

#8 2025-08-11 12:14:53

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,545

Re: [SOLVED] Dark mode switching

@seth, I think he already did or is a few hundred miles west of Ireland
Luckily not a lot of pirating going on there lol
Anyway, better obfuscate such output...

Offline

#9 2025-08-11 12:29:47

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,703

Offline

#10 2025-08-11 12:47:17

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,545

Re: [SOLVED] Dark mode switching

Think you're right, I don't see a '-' minus sign

Offline

#11 2025-08-12 07:40:24

linerman
Member
Registered: 2021-02-16
Posts: 88

Re: [SOLVED] Dark mode switching

seth wrote:

You might want to edit/obfuscate the coordinates.

Did that for 400km, maybe not perfect...

seth wrote:

Is the daemon running at all then?

Yes, it is

UNIT                          LOAD   ACTIVE SUB     DESCRIPTION              >
  geoclue.service               loaded active running Location Lookup Service

Offline

#12 2025-08-12 11:52:59

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,703

Re: [SOLVED] Dark mode switching

I meant the yin-yang daemon, not geoclue (we determined that works no problem)

Offline

#13 2025-08-15 07:30:19

linerman
Member
Registered: 2021-02-16
Posts: 88

Re: [SOLVED] Dark mode switching

Actually yin-yang does not come with a daemon or I know nothing about that. Community suggested to put yin-yang to autostart and run in minimized. Following seth thought about the daemon I checked the autostart and voila...
The author of the program changed the name from yin-yang to yin_yang.
Because of that my autostart script did not run and after changes it does. Placing file yin_yang.desktop in autostart folder with content below fixed the issue.

[Desktop Entry]
Type=Application
Name=Yin & Yang
Comment=Automatically switch between light and dark themes
Path=/opt/yin_yang
Icon=sh.oskar.yin_yang
Exec=sh -c "/usr/bin/yin_yang --systemd --minimized"
Categories=Utility;System;Settings
Keywords=night;day;dark;light;color;theme;

Thanx seth for help once again!

Offline

#14 2025-08-15 12:32:36

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,703

Re: [SOLVED] Dark mode switching

\o/
Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Offline

Board footer

Powered by FluxBB