sync: from Windows

This commit is contained in:
js0ny 2024-11-30 03:38:53 +00:00
parent 16d9d1348b
commit fd3ecfd674
15 changed files with 2581 additions and 29 deletions

12
win/cmd/dark-mode.bat Normal file
View file

@ -0,0 +1,12 @@
@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 已切换到深色模式
) else (
reg add %regPath% /v AppsUseLightTheme /t REG_DWORD /d 1 /f >nul
echo 已切换到浅色模式
)