Compare commits

...

3 Commits
latest ... main

Author SHA1 Message Date
gabrielkheisa
c0f53de986 disable restart explorer 2025-04-25 21:43:37 +07:00
gabrielkheisa
da93884565 extend the explorer.exe relaunch interval 2025-04-23 21:32:27 +07:00
gabrielkheisa
b02568fbea update 2025-04-19 20:34:44 +07:00
3 changed files with 7 additions and 5 deletions

View File

@ -92,10 +92,12 @@ 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.
![tray](/screenshot/tray.jpg)
> Tip: You can create `.ico` files from PNGs using online converters like [icoconvert.com](https://icoconvert.com)
---
@ -106,7 +108,7 @@ You must provide your own `icon.ico` in the same folder — this will be used as
- Time check runs every 60 seconds
- Changing the clock or timezone will trigger a switch automatically
- 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
@ -123,4 +125,4 @@ MIT — free for personal and commercial use.
---
Made with Go, Windows quirks, and coffee ☕
Made with Go, Windows quirks, and Indocafe Coffeemix

View File

@ -30,7 +30,7 @@ func setMode(light bool) {
// Restart Explorer to fully apply theme
func restartExplorer() {
exec.Command("taskkill", "/f", "/im", "explorer.exe").Run()
time.Sleep(1 * time.Second)
time.Sleep(5 * time.Second)
exec.Command("explorer.exe").Start()
}
@ -95,7 +95,7 @@ func backgroundLoop() {
if newMode != lastMode {
setMode(newMode == "light")
restartExplorer()
// restartExplorer()
lastMode = newMode
}

BIN
screenshot/tray.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB