From 149b6c82183c521b5f405fc4cf286ff1a9ede97c Mon Sep 17 00:00:00 2001 From: Mylloon Date: Fri, 18 Aug 2023 03:32:06 +0200 Subject: [PATCH] Add WindowsAutoNightMode --- .config/WindowsAutoNightMode/config.yaml | 100 +++++++++++++++++++++++ Makefile | 5 ++ windows11.bat | 8 +- 3 files changed, 112 insertions(+), 1 deletion(-) create mode 100644 .config/WindowsAutoNightMode/config.yaml diff --git a/.config/WindowsAutoNightMode/config.yaml b/.config/WindowsAutoNightMode/config.yaml new file mode 100644 index 0000000..1424c9c --- /dev/null +++ b/.config/WindowsAutoNightMode/config.yaml @@ -0,0 +1,100 @@ +AutoThemeSwitchingEnabled: true +Governor: NightLight +Autostart: + Validate: true +WindowsThemeMode: + Enabled: false + DarkThemePath: + LightThemePath: + MonitorActiveTheme: false + ApplyFlags: [] +AppsSwitch: + Enabled: true + Component: + Mode: Switch +SystemSwitch: + Enabled: true + Component: + Mode: Switch + TaskbarSwitchDelay: 1200 + TaskbarColorOnAdaptive: false + TaskbarColorWhenNonAdaptive: Light + DWMPrevalenceSwitch: false + DWMPrevalenceEnableTheme: Light +ColorFilterSwitch: + Enabled: false + Component: {} +OfficeSwitch: + Enabled: true + Component: + Mode: Switch + LightTheme: 0 + DarkTheme: 4 +Sunrise: 2023-08-18T07:00:00.0000000 +Sunset: 2023-08-18T20:00:00.0000000 +Location: + PollingCooldownTimeSpan: 1.00:00:00 + Enabled: false + UseGeolocatorService: true + SunsetOffsetMin: 0 + SunriseOffsetMin: 0 + CustomLat: 0 + CustomLon: 0 +Tunable: + BatterySliderDefaultValue: 25 + DisableEnergySaverOnThemeSwitch: false + UseLogonTask: false + Debug: false + Trace: false + DebugTimerMessage: false + ShowTrayIcon: false + UICulture: fr +GPUMonitoring: + Enabled: true + Threshold: 30 + MonitorTimeSpanMin: 1 + Samples: 1 +Events: + DarkThemeOnBattery: false + Win10AllowLockscreenSwitch: true +Notifications: + OnAutoThemeSwitching: true + OnSkipNextSwitch: true +AutoSwitchNotify: + Enabled: false + GracePeriodMinutes: 5 +Hotkeys: + Enabled: false + ForceLight: + ForceDark: + NoForce: + ToggleTheme: + TogglePostpone: + ToggleAutoThemeSwitch: +IdleChecker: + Enabled: false + Threshold: 5 +WallpaperSwitch: + Enabled: false + Component: + TypeLight: Individual + TypeDark: Individual + Position: Fill + GlobalWallpaper: + Light: + Dark: + SolidColors: + Light: '#FFFFFF' + Dark: '#000000' + Monitors: [] +Updater: + AutoInstall: true + Enabled: true + Silent: true + DaysBetweenUpdateCheck: 7 + CheckOnStart: true + VersionQueryUrl: + DownloadBaseUrl: + ZipCustomUrl: + HashCustomUrl: + diff --git a/Makefile b/Makefile index 991ca00..00cb2ee 100644 --- a/Makefile +++ b/Makefile @@ -145,6 +145,11 @@ sync-windows: @echo "(Windows) Firefox synced!" @echo +# WindowsAutoNightMode + @$(WGET) $(REPO_SRC)/.config/WindowsAutoNightMode/config.yaml -O $(APPDATA)/AutoDarkMode/config.yaml + @echo "(Windows) WindowsAutoNightMode synced!" + @echo + sync: # Check if at least the platform is supported diff --git a/windows11.bat b/windows11.bat index 5708a38..5173b30 100644 --- a/windows11.bat +++ b/windows11.bat @@ -100,7 +100,8 @@ SET ^"apps=Discord.Discord Mozilla.Firefox 7zip.7zip Valve.Steam Parsec.Parsec ^ ONLYOFFICE.DesktopEditors HeroicGamesLauncher.HeroicGamesLauncher ^ OBSProject.OBSStudio Xournal++.Xournal++ Microsoft.PowerToys ^ OpenWhisperSystems.Signal HandBrake.HandBrake Front.scrcpy+ ^ - KDE.KDEConnect PrismLauncher.PrismLauncher Microsoft.PowerShell" + KDE.KDEConnect PrismLauncher.PrismLauncher Microsoft.PowerShell ^ + Armin2208.WindowsAutoNightMode" for %%i in (!apps!) do ( !pmi! %%i @@ -247,6 +248,11 @@ CALL %HOMEPATH%\Documents\Local\fix_obs_shortcut.bat noskip :: Allow system to go in sleep mode when OBS is running powercfg -requestsoverride process obs64.exe display system awaymode +:: Setup WindowsAutoNightMode +MKDIR %APPDATA%\AutoDarkMode 2>NUL +PowerShell -Command "Invoke-WebRequest -Uri !repo!/.config/WindowsAutoNightMode/config.yaml -OutFile '%APPDATA%\AutoDarkMode\config.yaml'" +"%LOCALAPPDATA%\Programs\AutoDarkMode\AutoDarkModeApp.exe" + ECHO Fais un tour des parametres Windows, apres avoir fait toutes les mises a jour disponible sur le PC. ECHO Enfin, redemarre l'ordinateur