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

[FEAT] TweakToggles logik overhaul #3014

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

MyDrift-user
Copy link
Contributor

@MyDrift-user MyDrift-user commented Nov 6, 2024

Type of Change

  • Refactoring

Description

Every time i worked / wanted to work with them i got annoyed. You define the path and values 3 times i think. The validation, error handling and so one are done at least once for every toggle.

  • simplify logic for toggles
  • remove unneeded redundant logic, infos and so one
  • use regular (existing) tweaks logic
  • -15kb reduction of winutil.ps1

Testing

  • all toggles seem to still work on my machine (exept widgets one, which did not work before so not issue of this PR)
  • I did not update documentation, since it is being reworked either way and documentation is also broken either way
    TODO:
  • load unloaded HKU if needed
  • add ep restart
  • fix theming on dark mode toggle

Checklist

  • My code adheres to the coding and style guidelines of the project.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no errors/warnings/merge conflicts.

MyDrift-user and others added 8 commits November 5, 2024 22:40
- remove Invoke-WPFToggle.ps1
- generalize Get-WinUtilToggleStatus
- add bingsearch reg key for testing
- use Invoke-WinUtilTweaks for actions
- replace Add-Click with checked & unchecked to make undo work
- add all reg keys to tweaks.json into existing toggle entry
- remove unneeded scripts
- load HKU if needed (for tweaks & GetToggleStatus)
- remove unneeded Invoke-WinUtilNumLock
- has loaded HKU does not load/not stay loaded
…prepended to the return value so the result becomes ("hku", $false). In powershell pretty much every variable that exists is interpreted as $true so the toggle for numlock got incorrectly checked
- fix HKU issue globally
- remove some console logs, change some others to write-debug
- change Invoke-WinUtilExplorerRefresh to handle refresh and restart
- add restart logic to window snapping Flyout & Suggestions
- rename Invoke-WinUtilExplorerRefresh to Invoke-WinUtilExplorerUpdate
add explorer restart logic for hidden files + Fileextension toggles
@MyDrift-user MyDrift-user marked this pull request as ready for review November 7, 2024 18:53
@MyDrift-user MyDrift-user marked this pull request as draft November 8, 2024 00:08
@MyDrift-user MyDrift-user marked this pull request as ready for review November 8, 2024 09:44
@MyDrift-user MyDrift-user marked this pull request as draft November 8, 2024 19:25
- fix issue defining WindowArrangementActive as dword instead of string
- switch bing search enabled/disabled values
Copy link
Contributor

@og-mrk og-mrk left a comment

Choose a reason for hiding this comment

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

Although there's room for improvement (especially in Error Handling), the current changes work as intended. Well done @MyDrift-user 😄

@MyDrift-user MyDrift-user marked this pull request as ready for review November 13, 2024 18:22
- add error handling for Get-WinUtilToggleStatus
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.

3 participants