Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

switched qbittorrent fluent theme based on OS theme + mouse theme switch + restart explorer.exe to reload registry values only after dark mode switch. #31

Open
wants to merge 49 commits into
base: master
Choose a base branch
from

Conversation

bigplayer-ai
Copy link

@bigplayer-ai bigplayer-ai commented Feb 17, 2023

bigplayer-ai contribution:
bigplayer-ai contribution:

for the qBitTorrent fluent theme switch to work:

you need to create a folder called themes in the PowerShell scripts WDD folder:
"~\AppData\Local\WinDynamicDesktop\script\qbittorrenttheme"
and copy these two files(https://github.com/witalihirsch/qBitTorrent-fluent-theme) to the "qbittorrenttheme" folder in the WDD PowerShell scripts folder.

a) fluent-light.qbtheme

b) fluent-dark.qbtheme

Also, you need to change the qBitTorrent theme in settings to this:

Clip_20230217_114652

for the mouse scheme switch:

Change the mouse scheme depending on the system OS theme.
I used these mouse schemes:
https://www.deviantart.com/jepricreations/art/Windows-11-Cursors-Concept-v2-886489356

  1. you need to switch to the desired mouse scheme.
  2. export all registry keys from regedit.exe "Computer\HKEY_CURRENT_USER\Control Panel\Cursors"
  3. convert .reg to PowerShell using this website.
    https://reg2ps.azurewebsites.net/
  4. replace the lines mentioned below in the MouseCursorSwitch.ps1 file with the output PowerShell script from the website.

For light mode desired mouse scheme, replace these lines with website output:
from line 10 ($RegConnect = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey([Microsoft.Win32.RegistryHive]”CurrentUser”,”$env:COMPUTERNAME”))
to line 32 ($RegConnect.Close()).

For dark mode desired mouse scheme, replace these lines with website output:
from line 47($RegConnect = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey([Microsoft.Win32.RegistryHive]”CurrentUser”,”$env:COMPUTERNAME”))
to line 80 ($CursorRefresh::SystemParametersInfo(0x0057,0,$null,0)).
5)Place the edited MouseCursorSwitch.ps1 file in your WDD scripts folder:
"~\AppData\Local\WinDynamicDesktop\script".

restart explorer while saving windows positions and paths if dark/light mode switches (to reload all tweaked registry values).

  1. create in the WDD scripts folder a folder like this:
    "~\AppData\Local\WinDynamicDesktop\scripts\globalScripts"

  2. put all the files mentioned below in it. (I added the .xml files so the transition would be more seamless (no errors on the first run)):

a) NightValue.xml

b) StartValue.xml

c) UpdateNightValueAtStartup.ps1

d)restart_explorer.bat

  1. put the ZRestartExplroer.ps1 in the WDD native scripts' folder:
    "~\AppData\Local\WinDynamicDesktop\scripts"

  2. delay WDD log on task scheduler for 1 second.

  3. add another start-up task that runs UpdateNightValueAtStartup.ps1.

  4. enjoy restarting explorer only when needed to reload all the tweaked registry values.

switched qbittorrent fluent theme based on OS theme.
change mouse cursor to dark windows 11 depending on the system os theme.
@bigplayer-ai bigplayer-ai changed the title switched qbittorrent fluent theme based on OS theme. switched qbittorrent fluent theme based on OS theme + mouse theme switch. Feb 17, 2023
bigplayer-ai contribution:
for the qBitTorrent fluent theme switch to work, you need to create two folders:
1) called themes in the qBitTorrent installation folder
2) called themes in the PowerShell scripts WDD folder.
The themes' folder in the WDD PowerShell scripts folder should have the qBitTorrent fluent themes of this repo:
https://github.com/witalihirsch/qBitTorrent-fluent-theme
Also, you need to change the qBitTorrent theme in settings to this:
![Clip_20230217_114652](https://user-images.githubusercontent.com/119108387/219610478-fa74004a-dc00-4919-b9b4-9b3f47b7a5bc.png)

for the mouse scheme switch, I used this:
Change light to dark/ light to dark depending on the system OS theme. I used these mouse schemes:
https://www.deviantart.com/jepricreations/art/Windows-11-Cursors-Concept-v2-886489356
1) you need to switch to the desired mouse scheme
2) export registry from Computer\HKEY_CURRENT_USER\Control Panel\Cursors
3) convert .reg to PowerShell using this website.
https://reg2ps.azurewebsites.net/
4) replace my registry text with the output PowerShell script from the website in the MouseCursorSwitch.ps1
for light mode, replace these lines with website output:
from line 10 ($RegConnect = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey([Microsoft.Win32.RegistryHive]”CurrentUser”,”$env:COMPUTERNAME”))
to line 32 ($RegConnect.Close()).
For dark mode, replace these lines with website output:
from line 47($RegConnect = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey([Microsoft.Win32.RegistryHive]”CurrentUser”,”$env:COMPUTERNAME”))
to line 80 ($CursorRefresh::SystemParametersInfo(0x0057,0,$null,0)).
ChangeMouseScheme.ps1 Fixed Show fixed Hide fixed
ChangeMouseScheme.ps1 Fixed Show fixed Hide fixed
qBittorrentFluentTheme.ps1 Fixed Show fixed Hide fixed
qBittorrentFluentTheme.ps1 Fixed Show fixed Hide fixed
@t1m0thyj t1m0thyj linked an issue Feb 20, 2023 that may be closed by this pull request
@bigplayer-ai bigplayer-ai changed the title switched qbittorrent fluent theme based on OS theme + mouse theme switch. switched qbittorrent fluent theme based on OS theme + mouse theme switch + restart explorer.exe to reload registry values only after dark mode switch. Feb 20, 2023
…ht mode switches (to reload all tweaked registry values).

1) create in WDD scripts folder a folder like this:
"~\AppData\Local\WinDynamicDesktop\scripts\globalScripts"
2) put all the scripts in it. (I added the .xml files so the transition would be more seamless (no errors on first run)).
3) put the ZRestartExplroer.ps1 in WDD native scripts folder
"~\AppData\Local\WinDynamicDesktop\scripts"
4) delay WDD log on task scheduler for 1 second.
5) add another start up task that runs UpdateNightValueAtStartup.ps1.
6) enjoy restarting explorer to reload all tweaked registry values.
@bigplayer-ai
Copy link
Author

@t1m0thyj any tips would be really appreciated. I am new to the world of coding and scripting.

Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PSScriptAnalyzer found more than 10 potential problems in the proposed changes. Check the Files changed tab for more details.

Updated restarting explorer to more powershell pure.
I updated all the global variables to Enviornment variables so no need for .xml variables.
changed all to environmental variables
changed all to environmental variables
Changed restart explorer to pure PowerShell.
changed local variables to environmental variables for better compatibility.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Change Automatic Mouse Script
1 participant