This commit is contained in:
2026-07-29 04:01:25 +09:00
parent 601c94a5d8
commit 3f35a54e0a
18 changed files with 695 additions and 2 deletions
+32
View File
@@ -0,0 +1,32 @@
$ErrorActionPreference = "Stop"
$wallpaperDir = Join-Path $HOME ".wallpaper"
if (Test-Path (Join-Path $wallpaperDir ".git")) {
git -C $wallpaperDir pull --ff-only
}
elseif (-not (Test-Path $wallpaperDir)) {
git clone https://github.com/moons-14/wallpapers.git $wallpaperDir
}
else {
throw "$wallpaperDir exists but is not a Git repository."
}
if ($LASTEXITCODE -ne 0) {
throw "Failed to synchronize the wallpaper repository."
}
$themeDir = Join-Path $env:LOCALAPPDATA "Microsoft\Windows\Themes"
$themeTarget = Join-Path $themeDir "moons-wallpaper.theme"
New-Item -ItemType Directory -Force -Path $themeDir | Out-Null
Copy-Item (Join-Path $PSScriptRoot "wallpaper.theme") $themeTarget -Force
$currentTheme = (Get-ItemProperty `
"HKCU:\Software\Microsoft\Windows\CurrentVersion\Themes" `
-Name CurrentTheme `
-ErrorAction SilentlyContinue).CurrentTheme
if ($currentTheme -ne $themeTarget) {
Start-Process $themeTarget
}
+21
View File
@@ -0,0 +1,21 @@
[Theme]
DisplayName=Moons Wallpapers
[Slideshow]
Interval=60000
Shuffle=1
ImagesRootPath=%USERPROFILE%\.wallpaper
[Control Panel\Desktop]
TileWallpaper=0
WallpaperStyle=10
Pattern=
[VisualStyles]
Path=%SystemRoot%\resources\themes\Aero\Aero.msstyles
ColorStyle=NormalColor
Size=NormalSize
Transparency=1
[MasterThemeSelector]
MTSM=DABJDKT