Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not detect mode change #29

Open
kek opened this issue Apr 8, 2023 · 6 comments
Open

Does not detect mode change #29

kek opened this issue Apr 8, 2023 · 6 comments

Comments

@kek
Copy link

kek commented Apr 8, 2023

@edfloreshz writes in #3 (comment), "I'm calling dark-light::detect on a loop and invoking the callback function when the theme changes." which indicates to me that it should at least under some circumstances be possible to call the detect function several times during the lifetime of a program and get the current setting. However this does not seem to be the case for me since it only reports what the setting was when the program was started.

Attaching a kind of test case:

fn main() {
    println!("Darklight mode: {:?}", dark_light::detect());
    println!("Change your mode and press enter");
    let mut input = String::new();
    std::io::stdin().read_line(&mut input).unwrap();
    println!("Darklight mode: {:?}", dark_light::detect());
}

Output:

Lightness mode: Light
Change your mode and press enter

Lightness mode: Light

Tested on Macos 13.3.1.

nekowinston added a commit to nekowinston/faerber that referenced this issue Apr 17, 2023
Currently doesn't change while the app is running, see
ref: frewsxcv/rust-dark-light#29
@AregevDev
Copy link

Bump. It works as intended on Windows 11.
Will test on my KDE machine later.

@edfloreshz
Copy link
Collaborator

@kek Unfortunately I'm unable to test this on macOS, I don't own a Mac. Perhaps someone else could help us replicate this issue?

@kek
Copy link
Author

kek commented Aug 14, 2023

Would a screen recording help? Also, it might be useful for me to check if this is still an issue.

@edfloreshz
Copy link
Collaborator

Sure, you can add it to the issue description.

@fenhl
Copy link

fenhl commented Jan 11, 2024

I can reproduce this issue on macOS 14.2.1.

@jacksongoode
Copy link

jacksongoode commented Feb 19, 2024

Hmm, is this planning on being fixed in #26? Or is there a workaround you found?

@d2weber d2weber mentioned this issue Feb 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants