Relatively easy way to switch themes on LTspiceXVII with PowerShell once you're all set up.
- Run
LTspice-themes sakabug
in PowerShell while LTspice is closed. - Open LTspice, and sakabug theme is active.
default, sakabug
twilight-after-dawn
https://gist.github.com/metacollin/99f994237af90a7b5ebf82581e01a507
dracula
https://github.com/dracula/ltspice
- Check where your LTspiceXVII.ini is located. Probably in $HOME\appdata\roaming folder.
- Put included LTspice-themes.txt somewhere of your choosing.
- Add this to your PowerShell_profile.ps1, or have the function work in your preferable way. NOTE the file paths for the .ini and .txt:
### LTspice-themes ###
function LTspice-themes ([string]$theme) {
$file1 = "$HOME\appdata\roaming\LTspiceXVII.ini"
$file2 = "D:\Tiedostot\Gits\LTspice-themes\LTspice-themes.txt"
$content1 = Get-Content -Path $file1
$content2 = Get-Content -Path $file2
foreach ($line in $content2){
if ($line -eq $(-join("[",$theme,"]"))) { $index2 = $content2.IndexOf($line) }
}
foreach ($line in $content1){
if ($line -eq "[Colors]") { $index1 = $content1.IndexOf($line) }
}
for ($i=1; $i -lt 36; $i++){
$content1[$index1+$i] = $content2[$index2+$i]
}
$content1 | Set-Content -Path $file1
}
- Restart PowerShell and run
LTspice-themes sakabug
in PowerShell while LTspice is closed. - Open LTspice, and sakabug theme is active.
- Open LTspice-themes.txt.
- Open LTspice and edit color theme to your liking from palette, and close LTspice.
- Open LTspiceXVII.ini and copy paste entire [Colors] section to the LTspice-themes.txt to the end of the file.
- Still in the .txt change the newly brought profile's [Colors] line to [theme-name], and save.
- Copy paste premade [Colors] section from somewhere. Just change the [Colors] to [theme name] and save.
If you want to share your theme, I can centralize them here. And sorry, don't have any Mac devices on hand.