-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.ps1
More file actions
30 lines (23 loc) · 979 Bytes
/
install.ps1
File metadata and controls
30 lines (23 loc) · 979 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
$ErrorActionPreference = "Stop"
$source = Join-Path $PSScriptRoot "weasel.custom.yaml"
$targetDir = Join-Path $env:APPDATA "Rime"
$target = Join-Path $targetDir "weasel.custom.yaml"
if (-not (Test-Path -LiteralPath $source)) {
throw "Theme file not found: $source"
}
if (-not (Test-Path -LiteralPath $targetDir)) {
throw "Rime config directory not found: $targetDir"
}
$timestamp = Get-Date -Format "yyyyMMdd-HHmmss"
if (Test-Path -LiteralPath $target) {
$backup = Join-Path $targetDir "weasel.custom.yaml.bak.$timestamp"
Copy-Item -LiteralPath $target -Destination $backup -Force
Write-Host "Backed up existing config to: $backup"
}
Copy-Item -LiteralPath $source -Destination $target -Force
Write-Host ""
Write-Host "Installed theme to: $target"
Write-Host "Next step: right-click the Weasel tray icon and choose 'Redeploy'."
Write-Host ""
Write-Host "Default light theme: apple-mist-light-sage"
Write-Host "Default dark theme: apple-mist-dark-sky"