dotfiles/platforms/win/cmd/dark-mode.bat
2024-12-01 07:41:57 +00:00

13 lines
507 B
Batchfile
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@REM Not working
@REM encoding: GBK
@echo off
set regPath="HKCU\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize"
for /f "usebackq tokens=2*" %%a in (`reg query %regPath% /v AppsUseLightTheme ^| find "REG_DWORD"`) do set currentMode=%%b
if "%currentMode%"=="0x1" (
reg add %regPath% /v AppsUseLightTheme /t REG_DWORD /d 0 /f >nul
echo <20><><EFBFBD>л<EFBFBD><D0BB><EFBFBD><EFBFBD><EFBFBD>ɫģʽ
) else (
reg add %regPath% /v AppsUseLightTheme /t REG_DWORD /d 1 /f >nul
echo <20><><EFBFBD>л<EFBFBD><D0BB><EFBFBD>dzɫģʽ
)