mirror of
https://github.com/gabrielkheisa/auto_dark_light_windows.git
synced 2025-04-28 17:09:03 +07:00
Compare commits
No commits in common. "main" and "latest" have entirely different histories.
@ -92,12 +92,10 @@ This produces a GUI app (no console window).
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Tray Preview
|
## 🖼 Tray Preview
|
||||||
|
|
||||||
You must provide your own `icon.ico` in the same folder — this will be used as the tray icon.
|
You must provide your own `icon.ico` in the same folder — this will be used as the tray icon.
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
> Tip: You can create `.ico` files from PNGs using online converters like [icoconvert.com](https://icoconvert.com)
|
> Tip: You can create `.ico` files from PNGs using online converters like [icoconvert.com](https://icoconvert.com)
|
||||||
|
|
||||||
---
|
---
|
||||||
@ -108,7 +106,7 @@ You must provide your own `icon.ico` in the same folder — this will be used as
|
|||||||
- Time check runs every 60 seconds
|
- Time check runs every 60 seconds
|
||||||
- Changing the clock or timezone will trigger a switch automatically
|
- Changing the clock or timezone will trigger a switch automatically
|
||||||
- No admin rights needed
|
- No admin rights needed
|
||||||
- ~~⚠️ **Warning:** This program will kill and restart `explorer.exe` to ensure proper theme application after a mode switch. This is necessary because `explorer.exe` can sometimes become buggy and not fully apply the new theme, leaving behind visual artifacts. **Please ensure `explorer.exe` is not performing any sensitive tasks like copying files before a theme switch occurs, as this process will interrupt those operations.**~~
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Optional Ideas
|
## Optional Ideas
|
||||||
@ -125,4 +123,4 @@ MIT — free for personal and commercial use.
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
Made with Go, Windows quirks, and Indocafe Coffeemix ☕
|
Made with Go, Windows quirks, and coffee ☕
|
||||||
|
4
main.go
4
main.go
@ -30,7 +30,7 @@ func setMode(light bool) {
|
|||||||
// Restart Explorer to fully apply theme
|
// Restart Explorer to fully apply theme
|
||||||
func restartExplorer() {
|
func restartExplorer() {
|
||||||
exec.Command("taskkill", "/f", "/im", "explorer.exe").Run()
|
exec.Command("taskkill", "/f", "/im", "explorer.exe").Run()
|
||||||
time.Sleep(5 * time.Second)
|
time.Sleep(1 * time.Second)
|
||||||
exec.Command("explorer.exe").Start()
|
exec.Command("explorer.exe").Start()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -95,7 +95,7 @@ func backgroundLoop() {
|
|||||||
|
|
||||||
if newMode != lastMode {
|
if newMode != lastMode {
|
||||||
setMode(newMode == "light")
|
setMode(newMode == "light")
|
||||||
// restartExplorer()
|
restartExplorer()
|
||||||
lastMode = newMode
|
lastMode = newMode
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 36 KiB |
Loading…
x
Reference in New Issue
Block a user