mirror of
https://github.com/danbulant/dribbblish-dynamic-theme
synced 2026-05-19 04:08:53 +00:00
added patch-dark-mode.ps1
This commit is contained in:
parent
34bd5fe4f8
commit
55b714dbda
2 changed files with 32 additions and 1 deletions
|
|
@ -66,7 +66,7 @@ xpui.js_repl_8008 = ,${1}58,
|
|||
|
||||
## Hide Window Controls
|
||||
Windows user, please edit your Spotify shortcut and add flag `--transparent-window-controls` after the Spotify.exe:
|
||||
To edit an taskbar shortcut, right click it, then right click Spotify in the list again.
|
||||
To edit a taskbar shortcut, right click it, then right click Spotify in the list again.
|
||||
|
||||
<img src="https://raw.githubusercontent.com/JulienMaille/dribbblish-dynamic-theme/main/showcase-images/windows-shortcut-instruction.png" alt="img">
|
||||
|
||||
|
|
@ -74,6 +74,13 @@ In addition to `--transparent-window-controls` you can set `Windows Top Bars` to
|
|||
|
||||
<img src="https://raw.githubusercontent.com/JulienMaille/dribbblish-dynamic-theme/main/showcase-images/top-bars.png" alt="img" width="500px">
|
||||
|
||||
## Follow system dark/light theme (Powershell)
|
||||
Automatic dark mode should work on MacOs and Linux out of the box.
|
||||
From Spotify > v1.1.70, dark mode is forced in Windows builds. You will need to patch Spotify.exe using this script:
|
||||
```powershell
|
||||
Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/JulienMaille/dribbblish-dynamic-theme/master/patch-dark-mode.ps1" | Invoke-Expression
|
||||
```
|
||||
|
||||
## Uninstall
|
||||
### Windows (PowerShell)
|
||||
```powershell
|
||||
|
|
|
|||
24
patch-dark-mode.ps1
Normal file
24
patch-dark-mode.ps1
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
$sp = "$env:APPDATA\Spotify\Spotify.exe"
|
||||
Copy-Item $sp ($sp + ".backup")
|
||||
|
||||
$bytes = [System.IO.File]::ReadAllBytes($sp);
|
||||
$toRemove = [System.Text.Encoding]::UTF8.GetBytes("force-dark-mode");
|
||||
|
||||
for ($i = 0; $i -lt $bytes.Length; $i++) {
|
||||
$found = $true
|
||||
for ($j = 0; $j -lt $toRemove.Length; $j++) {
|
||||
if ($bytes[$i + $j] -ne $toRemove[$j]) {
|
||||
$found = $false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ($found -eq $true) {
|
||||
for ($j = 0; $j -lt $toRemove.Length; $j++) {
|
||||
$bytes[$i + $j] = [byte]65;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
[System.IO.File]::WriteAllBytes($sp, $bytes);
|
||||
Loading…
Reference in a new issue