Coder Social home page Coder Social logo

autodarkmode / windows-auto-night-mode Goto Github PK

View Code? Open in Web Editor NEW
6.8K 41.0 245.0 17.89 MB

Automatically switches between the dark and light theme of Windows 10 and Windows 11

License: GNU General Public License v3.0

C# 96.39% Batchfile 0.09% Rust 3.36% Handlebars 0.16%
windows windows-10 windows-desktop dark-theme light-theme csharp wpf tool darkmode lightweight

windows-auto-night-mode's People

Contributors

armin2208 avatar chilltick avatar cmhrky avatar danielsevillano avatar deepchirp avatar emanuel-c4 avatar janek49 avatar jrthsr700tmax avatar kefir2105 avatar khoicandev avatar maboroshin avatar moshe1558418691 avatar mykhaiio avatar ngocanhtve avatar pc-v2 avatar pipixel avatar pohuing avatar qkeleq10 avatar spiritreader avatar susko3 avatar thrrip avatar thunderstrike116 avatar tictactoe101 avatar tooomm avatar utkucanturkan avatar venusgirl avatar weaponmasterjax avatar weblate avatar wordlessecho avatar zheolls avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

windows-auto-night-mode's Issues

[Feature request] Use local sunrise/sunset times to change themes

This might be something to think about a bit down the line, but I'd love it if it would eventually change the theme based on the sunrise and sunset times.

I do think this is a feature that should have been baked into the OS, but thanks for making this app and taking care of it!

Window Focus Resets When Theme Switch Activates

It is most noticeable when playing a game. I'll be in the middle of a game, when all of a sudden, the game window goes out of focus when the theme changes from light to dark. Is there a way for you to fix this?

So many problems with the new update

Unfortunately, the new update has brought more bad than good.

  1. Instant theme switching is gone. It isn't as bad as before, but I can wait a solid two or three minutes before the switch happens. Even after, it isn't proper. The taskbar color becomes grey when theme switches from dark to light, and I have to restart Windows Explorer to fix that.
  2. Wallpaper changing gets disabled automatically. I tried uploading very small sized images hoping it'll fix the problem, but alas, to no avail.
  3. Applying my settings produces "an error occurred :(".
  4. When I try to move the Auto Dark Mode window, the movement isn't immediate. Rather, it's slow, delayed, and smooth. So I could've moved my the cursor already to the left, but on the screen, it'd take a smooth second or two for that to translate. See video here.
  • OS Version: Windows 1903
  • Night-Mode Version [e.g. 2.2]
  • Has user admin rights? Yes
  • which antivirus software you use? Windows Defender
  • what language is your Windows set to? English

Additional context
I tried reinstalling, it didn't work.

Auto dark mode doesnt work after update

I just opened the app's GUI today and I noticed there was an app update so naturally I downloaded the update and updated the program however, after I updated the program I can no longer open it at all, I search for the program in my start menu and click on it, but nothing ever opens windows must be trying to load something because my cursor does the loading wheel but that's about it.

Windows-Auto-Night-Mode does not work other than specfied time!

Describe the bug
When the system is powered on after the specified light time, it does not change the night mode!
Windows-Auto-Night-Mode only set the light and dark mode time on the task scheduler, and so if I power on PC after the specified light time, the dark mode remains unchanged.

Edge is using the wrong theme

Windows 10 1903, app version 2.0

The app works as expected, but Edge is consistently being set to the opposite of what it should be. When the system is light, it is dark, and when the system is dark, it is light.

This continues to be the case even after restarting Edge multiple times.

Auto-night-mode is displayed in acryl window

When run auto-night-mode, the setting windows is displayed in acryl mode(?) and it can not read for setting menus.
In ths case, by mouse hovering on the window, the setting menu become visible!

What is "Some really important Bugs are now fixed" of Auto Dark Mode 2.1.1 ?

Yesterday I installed Auto Dark Mode 2.1 and it seemed working OK.
But when I restarted the system around 22:00, the system could not activate a crtain application wgih I have been using for about 20 years (very old, but stable application). After some cut and try, I found that Auto Dark Mode 2.1 may be related (this is only one program I installed yesterday).
So I uninstalled Auto Dark Mode 2.1 and checked my system by restating and everything worked OK.
Then I found new Auto Dark Mode 2.1.1 is released and installed it, but no problem was recreated and worked OK.
The affeted my application uses VB6 runtime library SP5.
So could you explain what is "Some really important Bugs are now fixed" and affection of this bug?

Start menu tile color

Please add the ability to alter the start menu tile color to be the same as the current OS accent color. I don't really like the black that came with the new version, since it destroys consistency for my start menu. So adding the ability to change it to accent color would be great.
Thanks for the work on this useful program! :)

Executables?

Provide the Windows executables... please...!!

Automatic theming doesn't change the taskbar colors after waking up from sleep/hibernation

Describe the bug
As you can see in the screenshot, the taskbar color is not changed after waking up from sleep/hibernation then the automatic theme is triggered. The icon colors, the Start menu, the system, and the apps are changed correctly.

To Reproduce
Steps to reproduce the behavior:

  1. Set laptop to sleep/hibernation
  2. Turn it on
  3. Auto Dark Mode automatically triggers the theme change
  4. (Only the) Taskbar color is not changed

Expected behavior
Taskbar should be white. (Or dark if the dark theme is triggered)

Screenshots
Screenshot

Environment:

  • OS Version: Windows 1903
  • Night-Mode Version 2.3
  • Has user admin rights? Yes
  • Which antivirus software you use? Windows Defender
  • What language is your Windows set to? English

Additional context
Add any other context about the problem here.

Icon in notification area

Thank you very much for this application.
It would be very nice to have an icon in the notification area to fastly switch between light and dark theme
immagine

The app doesn't update

Continuing my OG Thread: #22

The app doesn't update reliably. I have to check github myself every so often.

Perhaps get more detail before closing tickets?

TimZone

AutoNight with Location Service works well but don't use the correct Time Zone.
e.g. Europe actual it is Winter time the Autonight Mode set to 9:00 am and 6:00 pm but it must be 8:00 am between 5:00 pm. So I guess the time zone will not corectly use.
Windows 1903

[Feature request] Option to use accent color only on night or day

It would be great if the checkbox to 'use accent color for taskbar' would be removed and be replaced with:

  • 'use accent color for taskbar in light mode'
  • 'use accent color for taskbar in dark mode'

That's because I like the light white task bar, but I find the black one boring. Someone else might feel the reverse.

Thank you!

The app asks to access internet: telemetry?

Hi, I've noticed today that using v1, the app tried to connect to the internet when switching theme. What's the reason behind that?

(I could tell because my custom firewall notifies me when an app tries to access internet)

Thanks. :)

VERY Delayed

ANM applies the theme but after so much time, like 10-20 minutes. I tried reinstalling it several times. Nothing worked. Sometimes, it doesn't even work at all. Or, if I'm in an app like MyTube, it gets really glitchy. The only workaround right now is starting the application itself, as that immediately sets in/out dark mode. I hope this can be fixed, since the program is really wonderful, but it for some reason takes so long to work.

[Feature request] Add automatic dark mode also in Microsoft edge

Since Microsoft system UI and explorer are not synchronized with Microsoft edge browser by default, when switching to dark mode, the browser remains light. it could be useful to add the option for include also the browser, and change both system and browser theme at the same time, every time.

PS.
Thank you for your work, I really appreciate this tool!

backend support: more ways to switch theme

Switching theme...

  • when lowering screen brightness.
  • when ambient sensor detects a dark environment.
  • when energy saver is on.
  • when going from plugged in to on battery for laptops/mobile devices
  • when pressing a keyboard shortcut.

Use with schedule night light windows?

Is there any way to use with schedule night light windows(sunset to sunrise)?
That's mean schedule of your app works with schedule night light windows.
Annotation 2019-05-29 225607

[Feature request] Support Windows 10 light theme in taskbar

Windows 10 introduced a system light theme that tints the taskbar in the latest insider previews, which will come to the stable version in the first half of 2019.

https://blogs.windows.com/windowsexperience/2018/11/14/announcing-windows-10-insider-preview-build-18282/#BB7iwCs7YmIQzLBe.97

With that, the theme can be changed in two ways separatelly, apps and system, inside the registry:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize
-AppsUseLightTheme
-SystemUsesLightTheme (this is the new one introducen in the latest previews, changes the taskbar)

Windows 10 Start menu shows Auto Dark mode and Auto Night mode listings...

My current installation shows an Icon for both version 2.0.0.0 (Auto Night Mode) and version 2.2.0.0, Auto Dark Mode.) Clicking on the icon for the old version launches an update prompt, and the new icon launches the current version.

Attempting to uninstall just takes me to removing the current version.

[BUG] The theme doesn't automatically change after waking up from sleep mode

Describe the bug
The theme doesn't automatically change after waking up from sleep mode

To Reproduce
You set the app to change to light theme at 9am.
You put your computer to sleep at 11pm the day before
When you wake up your computer at 9:30am, the theme will still be dark.

Expected behavior
The app should check after waking up from sleep if it should perform the action.

Environment:

  • OS Version: W10
  • Night-Mode Version [e.g. 1.0] 1.0
  • Has user admin rights? No
  • which antivirus software you use? None
  • what language is your Windows set to? English

[BUG] The app makes windows explorer buggy.

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Make the app change theme
  2. the explorer looks weird. See screenshots.

Expected behavior
The explorer shouldn't be buggy. I'd suggest your app could reload explorer.exe until MS fixes it.

Screenshots
1: appearance if a windows explorer is already opened: https://i.imgur.com/eYRZeY1.png
2: apperance if I quit the current window and open a new one: https://i.imgur.com/M7b2IWz.png
3: expected appearence, when I reload from task manager explorer.exe: https://i.imgur.com/qEFZVLT.png

Environment:

  • OS Version: 1809
  • Night-Mode Versio: 1.0
  • Has user admin rights: no
  • which antivirus software you use: none
  • what language is your Windows set to: english

Additional context
-The same happens to me when I directly use the task scheduler to change theme.

Partially fires dark mode at 3:35pm every day, but only for Windows Explorer

Describe the bug
So pretty much every day, I'll be using the computer when on the dot at 3:35pm the Windows Explorer theme will change to night mode. Opening up Auto Dark Mode, it will think for a mnute, as the sunrise and sunset times display as the default 7am and 7pm, but then it will update the location information, and they will go back to being correctly set, at which point Windows Explorer will switch back to light mode.

To Reproduce
Steps to reproduce the behavior:

  1. Occurs at precisely 3:35pm every day.
  2. Set to Use Location Service

Expected behavior
This not to happen?

Environment:

  • OS Version: Windows 1903
  • Night-Mode Version 2.3
  • Has user admin rights? Yes
  • which antivirus software you use? Windows built in
  • what language is your Windows set to? English Australia

Additional context
At first I thought it might be something to do with a timezone issue, because it was happening 2 hours before sundown. But as the sunset time has shifted it keeps happening at 3:35pm.

Annotation 2019-08-15 154337

Use Edge Different Theme Settings for Chrome Instead

Hi! I use chrome instead of edge, and it'd be great if I could use this application to single that browser out instead of edge.

Regardless of whether or not you have time to add this feature, thank you for your work on this application, I've been waiting for something like this after getting used to Nightowl on my mac.

Cursor Switching Support

I'm requesting a feature that would also toggle cursor color if possible.
Further if possible, is to choose the black cursor from the new Windows 10 feature color selection (rgb screen) instead of the default clickable icon in System - Easy of Access since it's better.

Unhandled exception on Win 10 Pro / does not work

Hi Armin,

on my german win 10 pro I get the following error when trying to start the app - both on normal users and admin users:

Frameworkversion: v4.0.30319
Beschreibung: Der Prozess wurde aufgrund einer unbehandelten Ausnahme beendet.
Ausnahmeinformationen: System.NullReferenceException
   bei AutoThemeChanger.RegEditHandler.AppsUseLightTheme()
   bei AutoThemeChanger.MainWindow..ctor()

Ausnahmeinformationen: System.Reflection.TargetInvocationException
   bei System.RuntimeTypeHandle.CreateInstance(System.RuntimeType, Boolean, Boolean, Boolean ByRef, System.RuntimeMethodHandleInternal ByRef, Boolean ByRef)
   bei System.RuntimeType.CreateInstanceSlow(Boolean, Boolean, Boolean, System.Threading.StackCrawlMark ByRef)
   bei System.RuntimeType.CreateInstanceDefaultCtor(Boolean, Boolean, Boolean, System.Threading.StackCrawlMark ByRef)
   bei System.Activator.CreateInstance(System.Type, Boolean)
   bei System.RuntimeType.CreateInstanceImpl(System.Reflection.BindingFlags, System.Reflection.Binder, System.Object[], System.Globalization.CultureInfo, System.Object[], System.Threading.StackCrawlMark ByRef)
   bei System.Activator.CreateInstance(System.Type, System.Reflection.BindingFlags, System.Reflection.Binder, System.Object[], System.Globalization.CultureInfo, System.Object[])
   bei System.Activator.CreateInstance(System.Type, System.Object[])
   bei System.Xaml.Schema.SafeReflectionInvoker.CreateInstanceCritical(System.Type, System.Object[])
   bei System.Xaml.Schema.SafeReflectionInvoker.CreateInstance(System.Type, System.Object[])
   bei System.Xaml.Schema.XamlTypeInvoker.CreateInstance(System.Object[])
   bei MS.Internal.Xaml.Runtime.ClrObjectRuntime.CreateInstanceWithCtor(System.Xaml.XamlType, System.Object[])
   bei MS.Internal.Xaml.Runtime.ClrObjectRuntime.CreateInstance(System.Xaml.XamlType, System.Object[])
   bei System.Xaml.XamlObjectWriter.Logic_CreateAndAssignToParentStart(MS.Internal.Xaml.Context.ObjectWriterContext)
   bei System.Xaml.XamlObjectWriter.WriteStartMember(System.Xaml.XamlMember)
   bei System.Xaml.XamlWriter.WriteNode(System.Xaml.XamlReader)
   bei System.Windows.Markup.WpfXamlLoader.TransformNodes(System.Xaml.XamlReader, System.Xaml.XamlObjectWriter, Boolean, Boolean, Boolean, System.Xaml.IXamlLineInfo, System.Xaml.IXamlLineInfoConsumer, MS.Internal.Xaml.Context.XamlContextStack`1<System.Windows.Markup.WpfXamlFrame>, System.Windows.Markup.IStyleConnector)
   bei System.Windows.Markup.WpfXamlLoader.Load(System.Xaml.XamlReader, System.Xaml.IXamlObjectWriterFactory, Boolean, System.Object, System.Xaml.XamlObjectWriterSettings, System.Uri)
   bei System.Windows.Markup.WpfXamlLoader.LoadBaml(System.Xaml.XamlReader, Boolean, System.Object, System.Xaml.Permissions.XamlAccessLevel, System.Uri)
   bei System.Windows.Markup.XamlReader.LoadBaml(System.IO.Stream, System.Windows.Markup.ParserContext, System.Object, Boolean)
   bei System.Windows.Application.LoadBamlStreamWithSyncInfo(System.IO.Stream, System.Windows.Markup.ParserContext)
   bei System.Windows.Application.LoadComponent(System.Uri, Boolean)
   bei System.Windows.Application.DoStartup()
   bei System.Windows.Application.<.ctor>b__1_0(System.Object)
   bei System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
   bei System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
   bei System.Windows.Threading.DispatcherOperation.InvokeImpl()
   bei System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(System.Object)
   bei MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(System.Object)
   bei System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   bei System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   bei System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
   bei MS.Internal.CulturePreservingExecutionContext.Run(MS.Internal.CulturePreservingExecutionContext, System.Threading.ContextCallback, System.Object)
   bei System.Windows.Threading.DispatcherOperation.Invoke()
   bei System.Windows.Threading.Dispatcher.ProcessQueue()
   bei System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   bei MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   bei MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
   bei System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
   bei System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
   bei System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
   bei MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)
   bei MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)
   bei System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame)
   bei System.Windows.Threading.Dispatcher.PushFrame(System.Windows.Threading.DispatcherFrame)
   bei System.Windows.Application.RunDispatcher(System.Object)
   bei System.Windows.Application.RunInternal(System.Windows.Window)
   bei System.Windows.Application.Run(System.Windows.Window)
   bei AutoThemeChanger.App.Main()

Stuck on "Searching your location..."

Describe the bug
Another thing, the location status taskbar icon shows up for a few seconds but it disappears after a while.

To Reproduce
Press Use Location Service

Environment:
Windows 10 1903 18334.1
Auto-Night Mode 2.0

Opening language list but not changing language causes program to state "App restart needed to see the changes"

Describe the bug
Opening and closing the dropdown list menu for language states "App restart needed to see the changes" despite no actual language changes having taken place.

To Reproduce
Steps to reproduce the behavior:

  1. Open the Settings window
  2. Open the "Language" dropdown list menu
  3. Close the list, either by clicking the already-selected language in the list or by clicking the source button for the dropdown list.
  4. The red text "App restart needed to see the changes" appears despite no actual changes having taken place.
  5. The program will restart after closing the window even though there were no actual changes which needed to occur.

Error occurs while applying settings

Some users run into issues while applying their settings. Only an error message is shown and the theme switch can not be enabled.

In Auto Dark Mode Version 2.3 the error messages got much more detailed. Please post a screenshot of your error message under this issue. Don't forget to add some information about your setup, like Windows version. This helps me to resolve this problem in a future update.

Thank you.

EDIT:

If you use Windows LTSC or LTSB, please see this post.

Add 12-hour clock option

Describe the bug
An option for 12-hour time (AM/PM) would be helpful for American users, among others.

Does not update Firefox content

Describe the bug
Firefox 67 has a feature where websites can be styled differently in dark mode. Toggling dark mode using this program does not update any open pages.

To Reproduce
Steps to reproduce the behavior:

  1. Start in light mode
  2. Open https://bugzilla.mozilla.org/ in Firefox 67
  3. Run path\to\AutoDarkMode.exe /dark in a PowerShell
  4. Bugzilla is still in light mode

Expected behavior
Bugzilla should immediately update to be in dark mode.

Environment:

  • OS Version: Windows 1803
  • Night-Mode Version 2.1.1
  • Has user admin rights? Yes
  • which antivirus software you use? Windows Defender
  • what language is your Windows set to? English

Additional context
This does work as expected when using the toggle in the Settings app, so there's a difference in beavior here.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.