From 7ccf2116cd6955acfc2384f64d82e2e6ce5b2687 Mon Sep 17 00:00:00 2001
From: Zoobdude <96008479+Zoobdude@users.noreply.github.com>
Date: Fri, 14 Jun 2024 13:42:25 +0100
Subject: [PATCH] Add new Accent colour on task bar parameter
---
configs/711245.json | 1 +
configs/712057.json | 1 +
configs/README.md | 1 +
main.ps1 | 6 +++++-
4 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/configs/711245.json b/configs/711245.json
index f261caf..343e436 100644
--- a/configs/711245.json
+++ b/configs/711245.json
@@ -19,6 +19,7 @@
],
"Funny-joe-biden": false,
"Accent-colour": "FF AB CB 00 F7 83 B2 00 F7 52 94 00 EA 00 5E 00 AC 00 46 00 88 00 37 00 6B 00 2B 00 7A 75 74 00",
+ "Accent-colour-on-task-bar": true,
"Install-git": true,
"Task-bar-search-mode": "Icon"
}
\ No newline at end of file
diff --git a/configs/712057.json b/configs/712057.json
index ac37dfd..3058de1 100644
--- a/configs/712057.json
+++ b/configs/712057.json
@@ -20,6 +20,7 @@
],
"Funny-joe-biden": false,
"Accent-colour": "FD 86 5F 00 FC 75 51 00 F8 63 42 00 F7 63 0C 00 D0 41 22 00 9C 31 1A 00 79 27 14 00 00 99 BC 00",
+ "Accent-colour-on-task-bar": true,
"Install-git": true,
"Task-bar-search-mode": "Hidden"
}
\ No newline at end of file
diff --git a/configs/README.md b/configs/README.md
index f51ac0f..837df17 100644
--- a/configs/README.md
+++ b/configs/README.md
@@ -29,6 +29,7 @@ Below the type, there is an example of what it could be.
| `Open-tabs` | This opens all these tabs in your default browser | Array of strings
(`["https://google.com", "https://github.com"]`) |
| `Funny-joe-biden` | This downloads and opens a bunch of images of mainly Joe Biden and others. The list of [images that open are here](https://github.com/likes-gay/win-config/blob/main/photos.txt) | Boolean
(`true`/`false`) |
| `Accent-colour` | Sets the accent colour of the system | String.
[Read here to find how to set the value](#how-to-find-the-accent-colour-value) |
+| `Accent-colour-on-task-bar` | Apply the accent colour to the start menu, taskbar and action centre | Boolean
(`true`/`false`) |
| `Install-git` | This intalls Git onto the computers, and it also adds it to PATH | Boolean
(`true`/`false`) |
| `Task-bar-search-mode` | This changes how the taskbar's search bar appears. It could be hidden, or to show only the icon, or to show the entire bar. | String
(`Hidden`/`Icon`/`Bar`) |
diff --git a/main.ps1 b/main.ps1
index a995963..92d878f 100644
--- a/main.ps1
+++ b/main.ps1
@@ -170,7 +170,7 @@ if ($configFile."Open-tabs") {
$i -lt $configFile."Open-tabs".Count
$i++
) {
- Start-Process "chrome.exe" $configFile."Open-tabs"[$i]
+ Start-Process $configFile."Open-tabs"[$i]
}
}
@@ -182,6 +182,10 @@ if ($configFile."Accent-colour") {
$ColorValue = $configFile."Accent-colour".Split(" ") | ForEach-Object { "0x$_" }
+if ($configFile."Accent-colour-on-task-bar") {
+ Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize" -Name "ColorPrevalence" -Value 1
+}
+
Stop-Process -processName: Explorer # Restart explorer to apply changes that require it
# Easter egg ;)