Compare commits

...
Author SHA1 Message Date
Mohammad FaizandGitHub f7361fdb72 fix: repair popup install binding, dialog titles, presets switch, radio groups, JSON, tests (#4893)
* fix: repair popup install binding, dialog titles, presets switch, radio groups, JSON, tests

- Invoke-WPFInstall: add param block so the right-click app popup binds
  -PackagesToInstall. It previously dropped the argument into $args and
  installed the whole selected list instead of the clicked app (or warned
  that nothing was selected).
- Replace undefined $AppTitle with "WinUtil" in Install/UnInstall warning
  boxes, matching the XAML window title and sibling dialogs.
- tweaks.json: remove stray nested "link" inside the WPFToggleScrollbars
  registry entry (dead property; registry entries expose only the six
  consumed fields).
- Invoke-WPFPresets: fix dead switch cases to the wildcard-pattern
  convention so selectedFeatures/selectedToggles clear correctly.
- Invoke-WPFUIElements: store the group StackPanel in radioButtonGroups so
  grouped radio buttons share one container (else branch was unreachable).
- sanity.Tests.ps1: pass the Windows PowerShell parser script via
  -EncodedCommand; -Command string marshaling corrupted backticks/quotes and
  produced false parse failures.
- install-workflow.Tests.ps1: remove the AppTitle workaround and update
  title assertions to "WinUtil"; drop orphaned cleanup lines.
- Add CHANGES.md with technical and plain-language explanations.

Verified: each bug reproduced against HEAD, fixes demonstrated to change
behavior, full Pester suite 471/471.

* Delete

* test: cover the explicit popup install parameter path

Add a regression test invoking Invoke-WPFInstall -PackagesToInstall with a
package different from the default sync.selectedApps selection and assert
the runspace receives the explicit object, mirroring the Initialize-WPFUI
popup call shape. Existing default-path coverage is unchanged.
2026-08-03 12:03:03 -05:00
Sean (ANGRYxScotsman)andGitHub f3cf1587e0 Import YouTubeEmbed in tweaks guide (#4907)
Add the `YouTubeEmbed` component import to `docs/src/content/docs/guides/tweaks.mdx` so the guide can use embedded YouTube content without missing-component build issues.
2026-08-03 11:57:01 -05:00
91ffd3af30 Refactor UI checkbox and toggle state synchronization (#4885)
Co-authored-by: vyas-devgna <vyas-devgna@users.noreply.github.com>
2026-08-03 11:38:26 -05:00
Sean (ANGRYxScotsman)andGitHub 1ef581026f Fix image paths in GitHub markdown docs (#4905)
Update image links in `.github/CONTRIBUTING.md` and `.github/READMEITALIAN.md` from `../docs/...` to `/docs/...` so screenshots resolve correctly when viewed from the `.github` directory context on GitHub.
2026-08-03 11:37:32 -05:00
Sean (ANGRYxScotsman)andGitHub 89fd09fc0e fix(docs): add mobile navigation to the splash homepage (#4904)
The homepage uses Starlight's splash template, which has no sidebar and
therefore never gets Starlight's own mobile menu toggle - on narrow
viewports there was no way to reach any nav link at all. Add a small
toggle + panel in the header (only rendered on pages without a sidebar)
exposing the same links as the desktop nav, and group it with the
search icon so mobile actions sit together instead of spread across
the header.

Also add the Store and Forums links to the real sidebar config so
they're reachable on mobile on every other page too (previously only
in the desktop-only top nav), and pull both URLs from a shared
site-links.ts so the sidebar config and header can't drift apart.
2026-08-03 11:36:46 -05:00
056a819470 Refresh Applications tab screenshots and reorder docs to match the app (#4903)
* Update Applications tab screenshots

Replace outdated install/uninstall/show-installed screenshots and add
new ones for upgrade-all, clear-selection, selected-apps counter, and
collapse/expand categories.

* Update Applications guide with new screenshots and sections

Point each tab at its refreshed screenshot, reorder tabs to match the
sidebar button order in the app, and document the Upgrade All,
Selected Apps counter, and Collapse/Expand Categories controls.

* Add missing Updates tab screenshot

The image was referenced by the Updates guide but was never checked
into the repo.

* Reorder screenshots to follow their intro paragraph

Move the tab screenshot below the introductory text on the Tweaks and
Updates guide pages, matching the paragraph-then-screenshot layout
used elsewhere in the docs.

---------

Co-authored-by: Chris Titus <contact@christitus.com>
2026-08-03 11:36:03 -05:00
Sean (ANGRYxScotsman)andGitHub e96f990c60 Fix alignment issues, update links, and enhance documentation (#4898)
* Fix the same arrow-icon alignment issue on the "Read the Docs" button

Same root cause as the hero/final-CTA buttons: the label was plain
markdown text, which MDX wrapped in a <p>, and the icon was missing
the size/nudge applied elsewhere. Match it to the other two buttons.

* Rename known-issues page slug to knownissues

Update the sidebar config, nav dropdown, and every internal link that
pointed at /known-issues/ to match.

* Fix image paths in root-level markdown to match the new docs site

The Hugo docs site (docs/assets/images/...) has been replaced by the
Astro site (docs/src/assets/...); update CONTRIBUTING.md,
READMEITALIAN.md, and README.md to point at the new asset locations.

* Remove unused houston.webp asset

Leftover Starlight default-theme asset with no references anywhere
in the docs site.

* Fix docs site reference in generator docs

Updates `tools/devdocs-generator.md` to describe link generation correctly: links now point to the Astro/Starlight documentation site instead of the old Hugo site.

* Point docs homepage CTAs to guides hub

Updates the docs landing page CTA links to use `/guides/` instead of `/guides/getting-started/` in the hero action and both “Get Started”/“Read the Docs” buttons, routing users to the guides index.

* Add reusable YouTube embeds to docs guides

Introduces a new `YouTubeEmbed.astro` component for responsive 16:9 video embeds using the privacy-enhanced `youtube-nocookie.com` domain. The User Guide index and Tweaks guide now import and use this component instead of plain YouTube links, and the component includes styling that overrides Starlight’s iframe reset so embedded videos render at the correct size.

* Fix YouTube embed iframe height via not-content

Add the `not-content` class to the embed wrapper so Starlight's markdown reset no longer overrides `iframe { height: auto }`. Drop the `@layer starlight.core` wrapper and `!important` overrides that were compensating for the same issue.

* Clarify docs comments across Astro components

Adds and refines inline comments in the docs site config, custom Starlight components, and theme styles to better explain layout structure, navigation dropdown behavior, hero composition, and theme initialization. Also normalizes a few multi-line comments into single-line form for readability without changing functionality.

* Set secondary docs button background color

Update `.wu-btn-secondary` in the docs theme to use `var(--sl-color-gray-6)` instead of a transparent background, improving button visibility and contrast while keeping existing border and hover behavior.

* Move User Guides into docs dropdown

Updates the docs header navigation so the “User Guides” link is grouped under the existing “Documentation” dropdown instead of appearing as a separate top-level nav item. This keeps related documentation links together and simplifies the top navigation.

* Fix hero margin and center trust section

Remove the automatic 1.5rem top margin Starlight adds between the hero and the content column. Also flex-center the trust section so its content is properly aligned.

* Disable edit links in generated dev docs

Update `tools/devdocs-generator.ps1` to include `editUrl: false` in the frontmatter for generated tweak and feature docs pages. This prevents Starlight from showing edit links on these auto-generated pages.

* Move docs update PRs to pre-release flow

The docs Pages workflow is simplified to only build and deploy the docs site: it now triggers only on docs changes, drops extra permissions/default shell settings, and removes the dev-docs generation + auto-PR steps. The pre-release workflow now owns that automation by expanding its PR step to include generated code-reference docs alongside JSON link updates, with updated commit/title/body text and a documentation label.

* Shorten generated docs source note

Simplify the autogenerated DevDocs notice so generated pages only warn against direct edits while still linking back to the source file.

* Improve docs header dropdown behavior

Reworked the header nav dropdown triggers to use native `<details>/<summary>` instead of buttons, then updated menu visibility logic to use `details[open]` for no-JS support on touch and keyboard while preserving hover behavior. Also renamed the “Developer Docs” link to “Code Reference” and tightened related CSS comments.

* Refresh contribution and docs workflow docs

Updated contributor-facing docs to use consistent Markdown admonition blocks, cleaned Mermaid fence formatting, and fixed minor wording/capitalization in contribution steps. Clarified `devdocs-generator` behavior so workflow ownership is explicit: generation now documented as part of `pre-release.yaml` (via docs-update PR), while `docs.yaml` is documented as build/deploy only.

* Fix contributing guide grammar

Correct the "it's" to "its" typo in both contributing guides so the pull request guidance is consistent across the GitHub and docs versions.
2026-08-03 10:23:31 -05:00
Chris TitusandGitHub e591161dac Update sponsors in README (#4900) 2026-08-01 10:46:40 -05:00
Chris TitusandGitHub d98f8a9916 Update README.md 2026-07-31 15:32:15 -05:00
45 changed files with 400 additions and 194 deletions
+33 -38
View File
@@ -5,13 +5,13 @@
* Test the latest changes to WinUtil by running the pre-release and reporting issues you are encountering to help us continually improve WinUtil! * Test the latest changes to WinUtil by running the pre-release and reporting issues you are encountering to help us continually improve WinUtil!
#### **Run the latest pre-release** #### **Run the latest pre-release**
```ps1
irm https://christitus.com/windev | iex
```
!!! bug "Keep in mind" ```ps1
irm https://christitus.com/windev | iex
```
This is a pre-release and should be treated as such. It exists for developers to test the utility and report or fix bugs before they get added to the stable release. Don't use it in production! > [!CAUTION]
> **Keep in mind:** This is a pre-release and should be treated as such. It exists for developers to test the utility and report or fix bugs before they get added to the stable release. Don't use it in production!
## Issues ## Issues
@@ -23,19 +23,17 @@
* If you're doing code changes, then you can submit a PR to the `main` branch. * If you're doing code changes, then you can submit a PR to the `main` branch.
!!! warning "Important" > [!IMPORTANT]
> Do not use a code formatter, make massive amounts of line changes, or make multiple feature changes. EACH FEATURE CHANGE SHOULD BE ITS OWN PULL REQUEST!
Do not use a code formatter, make massive amounts of line changes, or make multiple feature changes. EACH FEATURE CHANGE SHOULD BE IT'S OWN PULL REQUEST! >
> Do not open a pull request that adds support for other languages to WinUtil for now, until we decide how we want to move forward with language support.
Do not open a pull request that adds support for other languages to WinUtil for now, until we decide how we want to move forward with language support.
* When creating pull requests, it is essential to thoroughly document all changes made. This includes, but is not limited to, documenting any additions made to the `tweaks` section and corresponding `undo tweak`, so users are able to remove the newly added tweaks if necessary, and comprehensive documentation is required for all code changes. Document your changes and briefly explain why you made your changes in your Pull Request Description. Failure to adhere to this format may result in the denial of the pull request. Additionally, any code lacking sufficient documentation may also be denied. * When creating pull requests, it is essential to thoroughly document all changes made. This includes, but is not limited to, documenting any additions made to the `tweaks` section and corresponding `undo tweak`, so users are able to remove the newly added tweaks if necessary, and comprehensive documentation is required for all code changes. Document your changes and briefly explain why you made your changes in your Pull Request Description. Failure to adhere to this format may result in the denial of the pull request. Additionally, any code lacking sufficient documentation may also be denied.
* By following these guidelines, we can maintain a high standard of quality and ensure that the codebase remains organized and well-documented. * By following these guidelines, we can maintain a high standard of quality and ensure that the codebase remains organized and well-documented.
!!! note > [!NOTE]
> When creating a function, please include "WPF" or "WinUtil" in the file name so it can be loaded into the runspace.
When creating a function, please include "WPF" or "WinUtil" in the file name so it can be loaded into the runspace.
## Walk through ## Walk through
@@ -47,37 +45,34 @@
### Overview ### Overview
``` mermaid ```mermaid
%%{init: {"flowchart": {"curve": "cardinal"}} }%% %%{init: {"flowchart": {"curve": "cardinal"}} }%%
graph TD graph TD
  A[Fork Project] --> B[Clone Repository]; A[Fork Project] --> B[Clone Repository];
  B --> C[Create New Branch]; B --> C[Create New Branch];
  C --> D[Make Changes]; C --> D[Make Changes];
  D --> G[Test Changes]; D --> G[Test Changes];
  G --> H{Tests Passed?}; G --> H{Tests Passed?};
  H -->|Yes| E[Commit Changes]; H -->|Yes| E[Commit Changes];
  H -->|No| J[Fix Issues]; H -->|No| J[Fix Issues];
  J --> G; J --> G;
  E --> F[Push Branch]; E --> F[Push Branch];
  F --> K[Create Pull Request]; F --> K[Create Pull Request];
  K --> L[Fill out PR template]; K --> L[Fill out PR template];
classDef default stroke:#333,stroke-width:4px,font-size:12pt; classDef default stroke:#333,stroke-width:4px,font-size:12pt;
``` ```
!!! info
This is a diagram to guide you through the process. It may vary depending on the type of change you're making. > [!NOTE]
> This is a diagram to guide you through the process. It may vary depending on the type of change you're making.
### Fork the Repo ### Fork the Repo
* Fork the WinUtil Repository [here](https://github.com/ChrisTitusTech/winutil) to create a copy that will be available in your repository list. * Fork the WinUtil Repository [here](https://github.com/ChrisTitusTech/winutil) to create a copy that will be available in your repository list.
![Fork Image](/docs/assets/images/Fork-Button-Dark.png#gh-dark-mode-only) ![Fork Image](/docs/src/assets/contributing/Fork-Button-Dark.png)
![Fork Image](/docs/assets/images/Fork-Button-Light.png#only-light#gh-light-mode-only)
### Clone the Fork ### Clone the Fork
!!! tip > [!TIP]
> While you can make your changes directly through the Web, we recommend cloning the repo to your device using the application GitHub Desktop (available in WinUtil) to test your fork easily.
While you can make your changes directly through the Web, we recommend cloning the repo to your device using the application GitHub Desktop (available in WinUtil) to test your fork easily.
* Install GitHub Desktop if it is not already installed. * Install GitHub Desktop if it is not already installed.
* Log in using the same GitHub account you used to fork WinUtil. * Log in using the same GitHub account you used to fork WinUtil.
@@ -96,7 +91,7 @@ graph TD
* Run the following command to compile and run WinUtil: * Run the following command to compile and run WinUtil:
* `.\Compile.ps1 -run` * `.\Compile.ps1 -run`
![Compile](/docs/assets/images/Complie.png) ![Compile](/docs/src/assets/contributing/Complie.png)
Open PowerShell as Administrator. Open PowerShell as Administrator.
@@ -107,15 +102,15 @@ Open PowerShell as Administrator.
### Committing the changes ### Committing the changes
* Before committing your changes, please discard changes made to the `winutil.ps1` file, like the following: * Before committing your changes, please discard changes made to the `winutil.ps1` file, like the following:
![Push Commit Image](/docs/assets/images/Discard-GHD.png) ![Push Commit Image](/docs/src/assets/contributing/Discard-GHD.png)
* Now, commit your changes once you are happy with the result. * Now, commit your changes once you are happy with the result.
![Commit Image](/docs/assets/images/Commit-GHD.png) ![Commit Image](/docs/src/assets/contributing/Commit-GHD.png)
* Push the changes to upload them to your fork on github.com. * Push the changes to upload them to your fork on GitHub.
![Push Commit Image](/docs/assets/images/Push-Commit.png) ![Push Commit Image](/docs/src/assets/contributing/Push-Commit.png)
### Making a PR ### Making a PR
* To make a PR on your repo under a new branch linking to the main branch, a button will show and say Preview and Create pull request. Click that button and fill in all the information that is provided on the template. Once all the information is filled in correctly, check your PR to make sure there is no WinUtil.ps1 file attached to the PR. Once everything is good, make the PR and wait for Chris (the maintainer) to accept or deny your PR. Once it is accepted by Chris, you will be able to see your changes in the "/windev" build. * To make a PR on your repo under a new branch linking to the main branch, a button will show and say Preview and Create pull request. Click that button and fill in all the information that is provided on the template. Once all the information is filled in correctly, check your PR to make sure there is no WinUtil.ps1 file attached to the PR. Once everything is good, make the PR and wait for Chris (the maintainer) to accept or deny your PR. Once it is accepted by Chris, you will be able to see your changes in the "/windev" build.
+1 -1
View File
@@ -7,7 +7,7 @@
Questa utility è una raccolta di attività Windows che eseguo personalmente su ogni sistema che utilizzo. È progettata per snellire le *installazioni*, rimuovere i componenti superflui tramite *ottimizzazioni*, risolvere problemi tramite la *configurazione*, e riparare *aggiornamenti* di Windows. Sono estremamente selettivo riguardo ai contributi per mantenere questo progetto pulito ed efficiente. Questa utility è una raccolta di attività Windows che eseguo personalmente su ogni sistema che utilizzo. È progettata per snellire le *installazioni*, rimuovere i componenti superflui tramite *ottimizzazioni*, risolvere problemi tramite la *configurazione*, e riparare *aggiornamenti* di Windows. Sono estremamente selettivo riguardo ai contributi per mantenere questo progetto pulito ed efficiente.
![screen-install](/docs/assets/images/Title-Screen.png) ![screen-install](/docs/src/assets/branding/title-screen.png)
## 💡 Come usarlo ## 💡 Come usarlo
-38
View File
@@ -6,25 +6,17 @@ on:
- main - main
paths: paths:
- "docs/**" - "docs/**"
- "config/tweaks.json"
- "config/feature.json"
- "functions/**"
workflow_dispatch: workflow_dispatch:
permissions: permissions:
contents: read contents: read
pages: write pages: write
id-token: write id-token: write
pull-requests: write
concurrency: concurrency:
group: "pages" group: "pages"
cancel-in-progress: false cancel-in-progress: false
defaults:
run:
shell: bash
jobs: jobs:
build: build:
if: github.repository == 'ChrisTitusTech/winutil' if: github.repository == 'ChrisTitusTech/winutil'
@@ -38,36 +30,6 @@ jobs:
fetch-depth: 0 fetch-depth: 0
persist-credentials: false persist-credentials: false
- name: Generate Dev Docs from JSON
shell: pwsh
run: |
Set-Location tools
./devdocs-generator.ps1
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v8
with:
token: ${{ secrets.AUTO_MERGE }}
commit-message: 'chore: Update generated dev docs'
title: 'chore: Update Generated Dev Docs'
body: 'Automated update of generated documentation from JSON sources'
branch: docs-update
delete-branch: true
add-paths: |
docs/src/content/docs/code-reference/
config/tweaks.json
config/feature.json
labels: |
automated
documentation
skip-changelog
- name: Check outputs
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
- name: Install, build, and upload your site - name: Install, build, and upload your site
uses: withastro/action@v6 uses: withastro/action@v6
with: with:
+6 -4
View File
@@ -31,21 +31,23 @@ jobs:
Set-ExecutionPolicy Bypass -Scope Process -Force; ./Compile.ps1 Set-ExecutionPolicy Bypass -Scope Process -Force; ./Compile.ps1
continue-on-error: false # Directly fail the job on error, removing the need for a separate check continue-on-error: false # Directly fail the job on error, removing the need for a separate check
- name: Create Pull Request for Updated JSON Links - name: Create Pull Request for Updated Docs and JSON Links
id: cpr id: cpr
uses: peter-evans/create-pull-request@v8 uses: peter-evans/create-pull-request@v8
with: with:
token: ${{ secrets.AUTO_MERGE }} token: ${{ secrets.AUTO_MERGE }}
commit-message: 'chore: Update documentation links in JSON configs' commit-message: 'chore: Update generated dev docs and JSON links'
title: 'chore: Update documentation links in JSON configs' title: 'chore: Update generated dev docs and JSON links'
body: 'Automated update of documentation links in JSON configs from pre-release build' body: 'Automated update of generated documentation and JSON config links from pre-release build'
branch: docs-update branch: docs-update
delete-branch: true delete-branch: true
add-paths: | add-paths: |
docs/src/content/docs/code-reference/
config/tweaks.json config/tweaks.json
config/feature.json config/feature.json
labels: | labels: |
automated automated
documentation
skip-changelog skip-changelog
- name: Check outputs - name: Check outputs
+3 -2
View File
@@ -6,7 +6,8 @@
A curated compilation of Windows system tasks streamline **installs**, debloat with **tweaks**, troubleshoot with **config**, and configure **Windows updates**. Run it fresh on every new Windows install. A curated compilation of Windows system tasks streamline **installs**, debloat with **tweaks**, troubleshoot with **config**, and configure **Windows updates**. Run it fresh on every new Windows install.
![Title Screen](/docs/assets/images/Title-Screen.png) ![Title Screen](docs/src/assets/branding/title-screen.png)
--- ---
@@ -77,7 +78,7 @@ See https://github.com/ChrisTitusTech/winutil/blob/main/.github/CONTRIBUTING.md
These are the sponsors that help keep this project alive with monthly contributions. These are the sponsors that help keep this project alive with monthly contributions.
<!-- sponsors --><a href="https://github.com/ysaito8015"><img src="https:&#x2F;&#x2F;github.com&#x2F;ysaito8015.png" width="60px" alt="User avatar: Yusuke Saito" /></a><a href="https://github.com/dwelfusius"><img src="https:&#x2F;&#x2F;github.com&#x2F;dwelfusius.png" width="60px" alt="User avatar: " /></a><a href="https://github.com/mews-se"><img src="https:&#x2F;&#x2F;github.com&#x2F;mews-se.png" width="60px" alt="User avatar: Martin Stockzell" /></a><a href="https://github.com/jdiegmueller"><img src="https:&#x2F;&#x2F;github.com&#x2F;jdiegmueller.png" width="60px" alt="User avatar: Jason A. Diegmueller" /></a><a href="https://github.com/robertsandrock"><img src="https:&#x2F;&#x2F;github.com&#x2F;robertsandrock.png" width="60px" alt="User avatar: RMS" /></a><a href="https://github.com/paulsheets"><img src="https:&#x2F;&#x2F;github.com&#x2F;paulsheets.png" width="60px" alt="User avatar: Paul" /></a><a href="https://github.com/djones369"><img src="https:&#x2F;&#x2F;github.com&#x2F;djones369.png" width="60px" alt="User avatar: Dave J (WhamGeek)" /></a><a href="https://github.com/anthonymendez"><img src="https:&#x2F;&#x2F;github.com&#x2F;anthonymendez.png" width="60px" alt="User avatar: Anthony Mendez" /></a><a href="https://github.com/FatBastard0"><img src="https:&#x2F;&#x2F;github.com&#x2F;FatBastard0.png" width="60px" alt="User avatar: " /></a><a href="https://github.com/DursleyGuy"><img src="https:&#x2F;&#x2F;github.com&#x2F;DursleyGuy.png" width="60px" alt="User avatar: DursleyGuy" /></a><a href="https://github.com/DwayneTheRockLobster1"><img src="https:&#x2F;&#x2F;github.com&#x2F;DwayneTheRockLobster1.png" width="60px" alt="User avatar: " /></a><a href="https://github.com/KieraKujisawa"><img src="https:&#x2F;&#x2F;github.com&#x2F;KieraKujisawa.png" width="60px" alt="User avatar: Kiera Meredith" /></a><a href="https://github.com/andrewpayne68"><img src="https:&#x2F;&#x2F;github.com&#x2F;andrewpayne68.png" width="60px" alt="User avatar: Andrew P" /></a><a href="https://github.com/seanh1995"><img src="https:&#x2F;&#x2F;github.com&#x2F;seanh1995.png" width="60px" alt="User avatar: Sean (ANGRYxScotsman)" /></a><a href="https://github.com/Abs313a"><img src="https:&#x2F;&#x2F;github.com&#x2F;Abs313a.png" width="60px" alt="User avatar: Abs" /></a><!-- sponsors --> <!-- sponsors --><a href="https://github.com/ysaito8015"><img src="https:&#x2F;&#x2F;github.com&#x2F;ysaito8015.png" width="60px" alt="User avatar: Yusuke Saito" /></a><a href="https://github.com/dwelfusius"><img src="https:&#x2F;&#x2F;github.com&#x2F;dwelfusius.png" width="60px" alt="User avatar: " /></a><a href="https://github.com/mews-se"><img src="https:&#x2F;&#x2F;github.com&#x2F;mews-se.png" width="60px" alt="User avatar: Martin" /></a><a href="https://github.com/jdiegmueller"><img src="https:&#x2F;&#x2F;github.com&#x2F;jdiegmueller.png" width="60px" alt="User avatar: Jason A. Diegmueller" /></a><a href="https://github.com/robertsandrock"><img src="https:&#x2F;&#x2F;github.com&#x2F;robertsandrock.png" width="60px" alt="User avatar: RMS" /></a><a href="https://github.com/paulsheets"><img src="https:&#x2F;&#x2F;github.com&#x2F;paulsheets.png" width="60px" alt="User avatar: Paul" /></a><a href="https://github.com/djones369"><img src="https:&#x2F;&#x2F;github.com&#x2F;djones369.png" width="60px" alt="User avatar: Dave J (WhamGeek)" /></a><a href="https://github.com/anthonymendez"><img src="https:&#x2F;&#x2F;github.com&#x2F;anthonymendez.png" width="60px" alt="User avatar: Anthony Mendez" /></a><a href="https://github.com/FatBastard0"><img src="https:&#x2F;&#x2F;github.com&#x2F;FatBastard0.png" width="60px" alt="User avatar: " /></a><a href="https://github.com/DursleyGuy"><img src="https:&#x2F;&#x2F;github.com&#x2F;DursleyGuy.png" width="60px" alt="User avatar: DursleyGuy" /></a><a href="https://github.com/DwayneTheRockLobster1"><img src="https:&#x2F;&#x2F;github.com&#x2F;DwayneTheRockLobster1.png" width="60px" alt="User avatar: " /></a><a href="https://github.com/KieraKujisawa"><img src="https:&#x2F;&#x2F;github.com&#x2F;KieraKujisawa.png" width="60px" alt="User avatar: Kiera Meredith" /></a><a href="https://github.com/andrewpayne68"><img src="https:&#x2F;&#x2F;github.com&#x2F;andrewpayne68.png" width="60px" alt="User avatar: Andrew P" /></a><a href="https://github.com/seanh1995"><img src="https:&#x2F;&#x2F;github.com&#x2F;seanh1995.png" width="60px" alt="User avatar: Sean (ANGRYxScotsman)" /></a><a href="https://github.com/Abs313a"><img src="https:&#x2F;&#x2F;github.com&#x2F;Abs313a.png" width="60px" alt="User avatar: Abs" /></a><!-- sponsors -->
--- ---
+1 -2
View File
@@ -1454,8 +1454,7 @@
"Value": "0", "Value": "0",
"Type": "DWord", "Type": "DWord",
"OriginalValue": "1", "OriginalValue": "1",
"DefaultState": "false", "DefaultState": "false"
"link": "https://winutil.christitus.com/dev/tweaks/customize-preferences/scrollbars"
} }
], ],
"link": "https://winutil.christitus.com/code-reference/tweaks/customize-preferences/scrollbars" "link": "https://winutil.christitus.com/code-reference/tweaks/customize-preferences/scrollbars"
+8 -2
View File
@@ -1,6 +1,7 @@
// @ts-check // @ts-check
import { defineConfig } from 'astro/config'; import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight'; import starlight from '@astrojs/starlight';
import { siteLinks } from './src/site-links.ts';
// https://astro.build/config // https://astro.build/config
export default defineConfig({ export default defineConfig({
@@ -18,16 +19,19 @@ export default defineConfig({
{ icon: 'github', label: 'GitHub', href: 'https://github.com/ChrisTitusTech/winutil' }, { icon: 'github', label: 'GitHub', href: 'https://github.com/ChrisTitusTech/winutil' },
{ icon: 'discord', label: 'Discord', href: 'https://discord.gg/RUbZUZyByQ' }, { icon: 'discord', label: 'Discord', href: 'https://discord.gg/RUbZUZyByQ' },
], ],
// Global theme overrides (colors, fonts, landing-page section styles).
customCss: ['./src/styles/theme.css'], customCss: ['./src/styles/theme.css'],
// Custom component overrides, all under src/components/.
components: { components: {
ThemeProvider: './src/components/ThemeProvider.astro', ThemeProvider: './src/components/ThemeProvider.astro',
Hero: './src/components/Hero.astro',
Header: './src/components/Header.astro', Header: './src/components/Header.astro',
Hero: './src/components/Hero.astro',
Footer: './src/components/Footer.astro', Footer: './src/components/Footer.astro',
}, },
editLink: { editLink: {
baseUrl: 'https://github.com/ChrisTitusTech/winutil/edit/main/docs/', baseUrl: 'https://github.com/ChrisTitusTech/winutil/edit/main/docs/',
}, },
// Sidebar groups, top to bottom: User Guide, Code Reference, Help.
sidebar: [ sidebar: [
{ {
label: 'User Guide', label: 'User Guide',
@@ -54,10 +58,12 @@ export default defineConfig({
label: 'Help', label: 'Help',
items: [ items: [
{ label: 'FAQ', slug: 'faq' }, { label: 'FAQ', slug: 'faq' },
{ label: 'Known Issues', slug: 'known-issues' }, { label: 'Known Issues', slug: 'knownissues' },
{ label: 'Contributing', slug: 'contributing' }, { label: 'Contributing', slug: 'contributing' },
{ label: siteLinks.forums.label, link: siteLinks.forums.href, attrs: { target: '_blank', rel: 'noreferrer' } },
], ],
}, },
{ label: siteLinks.store.label, link: siteLinks.store.href, attrs: { target: '_blank', rel: 'noreferrer' } },
], ],
}), }),
], ],
Binary file not shown.

Before

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 193 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 193 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 193 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 139 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 139 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 193 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 139 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 139 KiB

After

Width:  |  Height:  |  Size: 193 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 139 KiB

After

Width:  |  Height:  |  Size: 193 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 193 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

+4
View File
@@ -12,11 +12,13 @@ const { icon, title } = Astro.props;
--- ---
<div class="wu-corner-card"> <div class="wu-corner-card">
{/* Corner brackets decoration. */}
<span class="wu-corner-marks" aria-hidden="true"> <span class="wu-corner-marks" aria-hidden="true">
<span class="mark top-left" /><span class="mark top-right" /><span class="mark bottom-left" /><span <span class="mark top-left" /><span class="mark top-right" /><span class="mark bottom-left" /><span
class="mark bottom-right" class="mark bottom-right"
/> />
</span> </span>
{/* Icon badge + heading + description. */}
<div class="wu-corner-card-icon"> <div class="wu-corner-card-icon">
<Icon name={icon} size="1.25rem" /> <Icon name={icon} size="1.25rem" />
</div> </div>
@@ -36,6 +38,7 @@ const { icon, title } = Astro.props;
background-color: var(--sl-color-bg); background-color: var(--sl-color-bg);
} }
/* Corner brackets decoration (four small L-shaped marks). */
.wu-corner-marks { .wu-corner-marks {
position: absolute; position: absolute;
inset: 0; inset: 0;
@@ -93,6 +96,7 @@ const { icon, title } = Astro.props;
right: 0; right: 0;
} }
/* Icon badge + heading + description. */
.wu-corner-card-icon { .wu-corner-card-icon {
display: flex; display: flex;
align-items: center; align-items: center;
+7 -4
View File
@@ -9,12 +9,14 @@ const year = new Date().getFullYear();
--- ---
<footer class="sl-flex"> <footer class="sl-flex">
{/* Edit link + last-updated timestamp, and prev/next pagination. */}
<div class="meta sl-flex"> <div class="meta sl-flex">
<EditLink /> <EditLink />
<LastUpdated /> <LastUpdated />
</div> </div>
<Pagination /> <Pagination />
{/* "Built with Starlight" credit (only shown if Starlight's `credits` config is enabled). */}
{ {
config.credits && ( config.credits && (
<a class="kudos sl-flex" href="https://starlight.astro.build"> <a class="kudos sl-flex" href="https://starlight.astro.build">
@@ -23,11 +25,13 @@ const year = new Date().getFullYear();
) )
} }
{/* Copyright line. */}
<div class="site-footer-copyright">© {year} <a href="https://christitus.com">Chris Titus Tech</a>. All rights reserved.</div> <div class="site-footer-copyright">© {year} <a href="https://christitus.com">Chris Titus Tech</a>. All rights reserved.</div>
</footer> </footer>
<style> <style>
@layer starlight.core { @layer starlight.core {
/* Footer layout: stacked meta row + pagination. */
footer { footer {
flex-direction: column; flex-direction: column;
gap: 1.5rem; gap: 1.5rem;
@@ -44,6 +48,7 @@ const year = new Date().getFullYear();
margin-inline-start: auto; margin-inline-start: auto;
} }
/* "Built with Starlight" credit link. */
.kudos { .kudos {
align-items: center; align-items: center;
gap: 0.5em; gap: 0.5em;
@@ -63,16 +68,14 @@ const year = new Date().getFullYear();
} }
} }
/* Collapse the meta/pagination rows entirely when they have nothing in them /* Collapse the meta/pagination rows entirely when they have nothing in them (e.g. editUrl: false and no prev/next), instead of leaving an empty gap. */
(e.g. editUrl: false and no prev/next), instead of leaving an empty gap. */
footer .meta:empty, footer .meta:empty,
footer :global(.pagination-links):empty { footer :global(.pagination-links):empty {
display: none; display: none;
margin: 0; margin: 0;
} }
/* Site-wide copyright line, matching the previous Hugo docs site's footer. /* Site-wide copyright line, matching the previous Hugo docs site's footer. The divider above it comes from Starlight's own .content-panel border. */
The divider above it comes from Starlight's own .content-panel border. */
.site-footer-copyright { .site-footer-copyright {
font-size: var(--sl-text-xs); font-size: var(--sl-text-xs);
color: var(--sl-color-gray-3); color: var(--sl-color-gray-3);
+172 -19
View File
@@ -6,40 +6,79 @@ import Search from 'virtual:starlight/components/Search';
import SiteTitle from 'virtual:starlight/components/SiteTitle'; import SiteTitle from 'virtual:starlight/components/SiteTitle';
import SocialIcons from 'virtual:starlight/components/SocialIcons'; import SocialIcons from 'virtual:starlight/components/SocialIcons';
import ThemeSelect from 'virtual:starlight/components/ThemeSelect'; import ThemeSelect from 'virtual:starlight/components/ThemeSelect';
import { Icon } from '@astrojs/starlight/components';
import { siteLinks } from '../site-links';
/** // Render the `Search` component if Pagefind is enabled or the default search component has been overridden.
* Render the `Search` component if Pagefind is enabled or the default search component has been overridden.
*/
const shouldRenderSearch = const shouldRenderSearch =
config.pagefind || config.components.Search !== '@astrojs/starlight/components/Search.astro'; config.pagefind || config.components.Search !== '@astrojs/starlight/components/Search.astro';
// Pages with a sidebar already have Starlight's own mobile menu toggle; only splash pages need this one.
const { hasSidebar } = Astro.locals.starlightRoute;
--- ---
<div class="header"> <div class="header">
{/* Site title. */}
<div class="title-wrapper sl-flex"> <div class="title-wrapper sl-flex">
<SiteTitle /> <SiteTitle />
</div> </div>
<div class="mobile-actions sl-flex">
{/* Search box. */}
<div class="sl-flex print:hidden"> <div class="sl-flex print:hidden">
{shouldRenderSearch && <Search />} {shouldRenderSearch && <Search />}
</div> </div>
{
!hasSidebar && (
<div class="site-nav-toggle sl-flex md:sl-hidden print:hidden">
<button type="button" aria-expanded="false" aria-controls="site-nav-panel" aria-label="Site navigation">
<Icon name="bars" class="open-menu" />
<Icon name="close" class="close-menu" />
</button>
<div id="site-nav-panel" class="site-nav-panel">
<div class="site-nav-panel-group">
<p class="site-nav-panel-heading">Documentation</p>
<a href="/guides/">User Guides</a>
<a href="/contributing/">Contribution Guides</a>
<a href="/code-reference/architecture/">Code Reference</a>
</div>
<div class="site-nav-panel-group">
<p class="site-nav-panel-heading">Help</p>
<a href="/faq/">FAQ</a>
<a href="/knownissues/">Known Issues</a>
<a href={siteLinks.forums.href} target="_blank" rel="noreferrer">{siteLinks.forums.label}</a>
</div>
<a class="site-nav-panel-link" href={siteLinks.store.href} target="_blank" rel="noreferrer">{siteLinks.store.label}</a>
</div>
</div>
)
}
</div>
{/* Right-side group: nav links, social icons, theme/language pickers. */}
<div class="sl-hidden md:sl-flex print:hidden right-group"> <div class="sl-hidden md:sl-flex print:hidden right-group">
<nav class="site-nav" aria-label="Top"> <nav class="site-nav" aria-label="Top">
<a class="site-nav-link" href="/guides/">User Guides</a> {/* "Documentation" dropdown. */}
<div class="site-nav-dropdown"> <div class="site-nav-dropdown">
<button type="button" class="site-nav-link" aria-haspopup="true">Documentation</button> <details name="site-nav-dropdown">
<summary class="site-nav-link">Documentation</summary>
</details>
<div class="site-nav-menu"> <div class="site-nav-menu">
<a href="/guides/">User Guides</a>
<a href="/contributing/">Contribution Guides</a> <a href="/contributing/">Contribution Guides</a>
<a href="/code-reference/architecture/">Developer Docs</a> <a href="/code-reference/architecture/">Code Reference</a>
</div> </div>
</div> </div>
{/* "Help" dropdown. */}
<div class="site-nav-dropdown"> <div class="site-nav-dropdown">
<button type="button" class="site-nav-link" aria-haspopup="true">Help</button> <details name="site-nav-dropdown">
<summary class="site-nav-link">Help</summary>
</details>
<div class="site-nav-menu"> <div class="site-nav-menu">
<a href="/faq/">FAQ</a> <a href="/faq/">FAQ</a>
<a href="/known-issues/">Known Issues</a> <a href="/knownissues/">Known Issues</a>
<a href="https://forum.christitus.com/" target="_blank" rel="noreferrer">Forums</a> <a href={siteLinks.forums.href} target="_blank" rel="noreferrer">{siteLinks.forums.label}</a>
</div> </div>
</div> </div>
<a class="site-nav-link" href="https://christitus.com/downloads/" target="_blank" rel="noreferrer">Store</a> <a class="site-nav-link" href={siteLinks.store.href} target="_blank" rel="noreferrer">{siteLinks.store.label}</a>
</nav> </nav>
<div class="sl-flex social-icons"> <div class="sl-flex social-icons">
<SocialIcons /> <SocialIcons />
@@ -49,8 +88,28 @@ const shouldRenderSearch =
</div> </div>
</div> </div>
<script>
const toggle = document.querySelector<HTMLElement>('.site-nav-toggle');
const btn = toggle?.querySelector('button');
if (toggle && btn) {
const setExpanded = (expanded: boolean) => btn.setAttribute('aria-expanded', String(expanded));
btn.addEventListener('click', () => setExpanded(btn.getAttribute('aria-expanded') !== 'true'));
toggle.addEventListener('keyup', (e) => {
if (e.code === 'Escape') {
setExpanded(false);
btn.focus();
}
});
// Collapse the panel if the viewport grows past the mobile breakpoint.
matchMedia('(min-width: 50em)').addEventListener('change', () => setExpanded(false));
}
</script>
<style> <style>
@layer starlight.core { @layer starlight.core {
/* Header shell: title, search, right-side nav group. */
.header { .header {
display: flex; display: flex;
gap: var(--sl-nav-gap); gap: var(--sl-nav-gap);
@@ -60,14 +119,19 @@ const shouldRenderSearch =
} }
.title-wrapper { .title-wrapper {
/* Prevent long titles overflowing and covering the search and menu buttons on narrow viewports. */ /* Clips long titles instead of overflowing onto the search/menu buttons; padding/negative margin avoids clipping the focus ring. */
overflow: clip; overflow: clip;
/* Avoid clipping focus ring around title wrapper. */
padding: 0.25rem; padding: 0.25rem;
margin: -0.25rem; margin: -0.25rem;
min-width: 0; min-width: 0;
} }
.mobile-actions {
align-items: center;
gap: 0.75rem;
}
/* Right-side group: nav + social icons, divided by a hairline. */
.right-group, .right-group,
.social-icons { .social-icons {
gap: 1rem; gap: 1rem;
@@ -86,6 +150,7 @@ const shouldRenderSearch =
:global(:root:not([data-has-toc])) { :global(:root:not([data-has-toc])) {
--__toc-width: 0rem; --__toc-width: 0rem;
} }
/* Columns: site title */
.header { .header {
--__sidebar-width: max(0rem, var(--sl-content-inline-start, 0rem) - var(--sl-nav-pad-x)); --__sidebar-width: max(0rem, var(--sl-content-inline-start, 0rem) - var(--sl-nav-pad-x));
--__main-column-fr: calc( --__main-column-fr: calc(
@@ -97,21 +162,18 @@ const shouldRenderSearch =
); );
display: grid; display: grid;
grid-template-columns: grid-template-columns:
/* 1 (site title): runs up until the main content columns left edge or the width of the title, whichever is the largest */
minmax( minmax(
calc(var(--__sidebar-width) + max(0rem, var(--__main-column-fr) - var(--sl-nav-gap))), calc(var(--__sidebar-width) + max(0rem, var(--__main-column-fr) - var(--sl-nav-gap))),
auto auto
) )
/* 2 (search box): all free space that is available. */
1fr 1fr
/* 3 (right items): use the space that these need. */
auto; auto;
align-content: center; align-content: center;
} }
} }
} }
/* Top nav links + dropdowns, matching the previous Hugo docs site's navbar. */ /* Top nav links + dropdowns. */
.site-nav { .site-nav {
display: flex; display: flex;
align-items: center; align-items: center;
@@ -120,6 +182,7 @@ const shouldRenderSearch =
border-inline-end: 1px solid var(--sl-color-hairline-light); border-inline-end: 1px solid var(--sl-color-hairline-light);
} }
/* Top nav trigger: shared style for plain links and dropdown triggers. */
.site-nav-link { .site-nav-link {
font-size: var(--sl-text-sm); font-size: var(--sl-text-sm);
font-weight: 500; font-weight: 500;
@@ -136,13 +199,25 @@ const shouldRenderSearch =
color: var(--sl-color-white); color: var(--sl-color-white);
} }
/* Extends the hoverable box down to the menu, closing the dead zone between trigger and menu. */
.site-nav-dropdown { .site-nav-dropdown {
position: relative; position: relative;
/* Extends the dropdown's own hoverable box down to meet the menu, so the
cursor never crosses a dead zone between the trigger and the menu. */
padding-bottom: 0.75rem; padding-bottom: 0.75rem;
margin-bottom: -0.75rem; margin-bottom: -0.75rem;
} }
/* No box of its own; only the <summary> lays out. Its `open` state (no JS) is read by .site-nav-menu below. */
.site-nav-dropdown > details {
display: contents;
}
.site-nav-dropdown > details > summary {
display: inline-flex;
align-items: center;
list-style: none;
}
.site-nav-dropdown > details > summary::-webkit-details-marker {
display: none;
}
/* Dropdown menu panel: shown on hover (mouse) or when the sibling <details> is toggled open (touch/keyboard). */
.site-nav-menu { .site-nav-menu {
display: none; display: none;
position: absolute; position: absolute;
@@ -160,7 +235,7 @@ const shouldRenderSearch =
z-index: 10; z-index: 10;
} }
.site-nav-dropdown:hover .site-nav-menu, .site-nav-dropdown:hover .site-nav-menu,
.site-nav-dropdown:focus-within .site-nav-menu { .site-nav-dropdown:has(details[open]) .site-nav-menu {
display: flex; display: flex;
} }
.site-nav-menu a { .site-nav-menu a {
@@ -175,4 +250,82 @@ const shouldRenderSearch =
color: var(--sl-color-white); color: var(--sl-color-white);
background: var(--sl-color-gray-6); background: var(--sl-color-gray-6);
} }
/* Mobile equivalent of the site-nav, shown via a toggle button since the desktop nav is hidden below `md`. */
.site-nav-toggle button {
display: flex;
align-items: center;
justify-content: center;
width: 2.25rem;
height: 2.25rem;
border: 0;
border-radius: var(--wu-radius-sm, 0.5rem);
padding: 0;
background: none;
color: var(--sl-color-gray-2);
cursor: pointer;
}
.site-nav-toggle button:hover {
color: var(--sl-color-white);
}
.site-nav-toggle button svg {
width: 1.25rem;
height: 1.25rem;
}
.site-nav-toggle button[aria-expanded='true'] .open-menu,
.site-nav-toggle button:not([aria-expanded='true']) .close-menu {
display: none;
}
.site-nav-panel {
display: none;
position: fixed;
inset-inline: 0;
top: var(--sl-nav-height);
z-index: var(--sl-z-index-menu);
flex-direction: column;
gap: 0.25rem;
max-height: calc(100vh - var(--sl-nav-height));
overflow-y: auto;
padding: 1rem var(--sl-nav-pad-x) 1.5rem;
background: var(--sl-color-bg-nav);
border-bottom: 1px solid var(--sl-color-hairline-shade);
}
.site-nav-toggle button[aria-expanded='true'] ~ .site-nav-panel {
display: flex;
}
.site-nav-panel-link {
padding: 0.5rem 0.25rem;
font-size: var(--sl-text-sm);
font-weight: 500;
color: var(--sl-color-gray-2);
text-decoration: none;
}
.site-nav-panel-link:hover {
color: var(--sl-color-white);
}
.site-nav-panel-group {
display: flex;
flex-direction: column;
border-top: 1px solid var(--sl-color-hairline-light);
padding-top: 0.5rem;
}
.site-nav-panel-heading {
margin: 0 0 0.25rem;
padding: 0 0.25rem;
font-size: var(--sl-text-xs);
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.02em;
color: var(--sl-color-gray-3);
}
.site-nav-panel-group a {
padding: 0.5rem 0.25rem;
font-size: var(--sl-text-sm);
color: var(--sl-color-gray-2);
text-decoration: none;
}
.site-nav-panel-group a:hover {
color: var(--sl-color-white);
}
</style> </style>
+7
View File
@@ -6,6 +6,7 @@ import { Icon } from '@astrojs/starlight/components';
// Matches Starlight's internal PAGE_TITLE_ID (used by the skip-to-content link). // Matches Starlight's internal PAGE_TITLE_ID (used by the skip-to-content link).
const PAGE_TITLE_ID = '_top'; const PAGE_TITLE_ID = '_top';
// Resolve hero content: Starlight's built-in hero fields plus our custom schema extensions.
const { data } = Astro.locals.starlightRoute.entry; const { data } = Astro.locals.starlightRoute.entry;
const { title = data.title, tagline, image, actions = [] } = data.hero || {}; const { title = data.title, tagline, image, actions = [] } = data.hero || {};
const { heroEyebrow, heroCaption, heroBadges = [] } = data; const { heroEyebrow, heroCaption, heroBadges = [] } = data;
@@ -15,9 +16,11 @@ if (image && 'file' in image) heroImage = image.file;
--- ---
<section class="wu-hero"> <section class="wu-hero">
{/* Full-bleed grid/glow background layer. */}
<div class="wu-hero-grid" aria-hidden="true"></div> <div class="wu-hero-grid" aria-hidden="true"></div>
<div class="wu-hero-glow" aria-hidden="true"></div> <div class="wu-hero-glow" aria-hidden="true"></div>
<div class="wu-hero-inner"> <div class="wu-hero-inner">
{/* Copy column: eyebrow, heading, tagline, actions, caption. */}
<div class="wu-hero-copy"> <div class="wu-hero-copy">
{heroEyebrow && <p class="wu-eyebrow">{heroEyebrow}</p>} {heroEyebrow && <p class="wu-eyebrow">{heroEyebrow}</p>}
<h1 id={PAGE_TITLE_ID} data-page-title set:html={title} /> <h1 id={PAGE_TITLE_ID} data-page-title set:html={title} />
@@ -42,6 +45,7 @@ if (image && 'file' in image) heroImage = image.file;
} }
{heroCaption && <p class="wu-hero-caption">{heroCaption}</p>} {heroCaption && <p class="wu-hero-caption">{heroCaption}</p>}
</div> </div>
{/* Screenshot framed as a fake browser/app window. */}
{ {
heroImage && ( heroImage && (
<div class="wu-hero-media"> <div class="wu-hero-media">
@@ -66,6 +70,7 @@ if (image && 'file' in image) heroImage = image.file;
) )
} }
</div> </div>
{/* Badge row (shields.io / dcbadge images) below the two-column layout. */}
{ {
heroBadges.length > 0 && ( heroBadges.length > 0 && (
<div class="wu-hero-bottom"> <div class="wu-hero-bottom">
@@ -138,6 +143,7 @@ if (image && 'file' in image) heroImage = image.file;
padding-block: 3rem 2rem; padding-block: 3rem 2rem;
} }
/* Hero copy: eyebrow, heading, tagline, actions, caption. */
.wu-hero-copy { .wu-hero-copy {
text-align: center; text-align: center;
} }
@@ -198,6 +204,7 @@ if (image && 'file' in image) heroImage = image.file;
box-shadow: 0 25px 50px -12px hsl(0 0% 0% / 0.5); box-shadow: 0 25px 50px -12px hsl(0 0% 0% / 0.5);
} }
/* Window chrome: title bar + traffic-light buttons. */
.wu-window-bar { .wu-window-bar {
display: flex; display: flex;
align-items: center; align-items: center;
+2
View File
@@ -5,10 +5,12 @@ import { Icon } from '@astrojs/starlight/components';
<script is:inline> <script is:inline>
window.StarlightThemeProvider = (() => { window.StarlightThemeProvider = (() => {
// Apply the resolved theme to <html> immediately, before paint, to avoid a flash of the wrong theme.
const storedTheme = const storedTheme =
typeof localStorage !== 'undefined' && localStorage.getItem('starlight-theme'); typeof localStorage !== 'undefined' && localStorage.getItem('starlight-theme');
const theme = storedTheme || 'dark'; const theme = storedTheme || 'dark';
document.documentElement.dataset.theme = theme === 'light' ? 'light' : 'dark'; document.documentElement.dataset.theme = theme === 'light' ? 'light' : 'dark';
// Re-syncs each theme-select picker's icon + value after the visitor changes theme.
return { return {
updatePickers(theme = storedTheme || 'auto') { updatePickers(theme = storedTheme || 'auto') {
document.querySelectorAll('starlight-theme-select').forEach((picker) => { document.querySelectorAll('starlight-theme-select').forEach((picker) => {
+39
View File
@@ -0,0 +1,39 @@
---
// Responsive 16:9 YouTube embed using the privacy-enhanced (nocookie) domain.
interface Props {
id: string;
title: string;
}
const { id, title } = Astro.props;
---
<div class="wu-video-embed not-content">
<iframe
src={`https://www.youtube-nocookie.com/embed/${id}`}
title={title}
loading="lazy"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
allowfullscreen
></iframe>
</div>
<style>
/* `not-content` on the wrapper opts it out of Starlight's markdown reset, which otherwise forces `iframe { height: auto }`. */
.wu-video-embed {
position: relative;
width: 100%;
aspect-ratio: 16 / 9;
margin: 1.5rem 0;
border: 1px solid var(--sl-color-hairline-light);
background-color: var(--sl-color-black);
}
.wu-video-embed iframe {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
border: 0;
}
</style>
+2 -2
View File
@@ -28,7 +28,7 @@ irm https://christitus.com/windev | iex
* If you're doing code changes, then you can submit a PR to the `main` branch. * If you're doing code changes, then you can submit a PR to the `main` branch.
:::caution :::caution
Do not use a code formatter, make massive amounts of line changes, or make multiple feature changes. EACH FEATURE CHANGE SHOULD BE IT'S OWN PULL REQUEST! Do not use a code formatter, make massive amounts of line changes, or make multiple feature changes. EACH FEATURE CHANGE SHOULD BE ITS OWN PULL REQUEST!
::: :::
:::caution :::caution
@@ -114,7 +114,7 @@ While you can make your changes directly through the Web, we recommend cloning t
![Commit Image](../../assets/contributing/Commit-GHD.png) ![Commit Image](../../assets/contributing/Commit-GHD.png)
* Push the changes to upload them to your fork on github.com. * Push the changes to upload them to your fork on GitHub.
![Push Commit Image](../../assets/contributing/Push-Commit.png) ![Push Commit Image](../../assets/contributing/Push-Commit.png)
+1 -1
View File
@@ -314,7 +314,7 @@ WinUtil itself uses about 50-100 MB while running. Once closed, it is removed fr
Can't find your answer? Try these resources: Can't find your answer? Try these resources:
- **[Known Issues](/known-issues/)** — Check if it's a known problem - **[Known Issues](/knownissues/)** — Check if it's a known problem
- **[User Guide](/guides/getting-started/)** — Comprehensive documentation - **[User Guide](/guides/getting-started/)** — Comprehensive documentation
- **[Discord Community](https://discord.gg/RUbZUZyByQ)** — Get help from other users - **[Discord Community](https://discord.gg/RUbZUZyByQ)** — Get help from other users
- **[GitHub Issues](https://github.com/ChrisTitusTech/winutil/issues)** — Report bugs - **[GitHub Issues](https://github.com/ChrisTitusTech/winutil/issues)** — Report bugs
+25 -13
View File
@@ -10,19 +10,13 @@ import { Tabs, TabItem } from '@astrojs/starlight/components';
Use the Applications tab to install, upgrade, uninstall, and review supported apps from one place. WinUtil relies on package manager support for these actions, so the available results depend on what WinGet can detect and manage on your system. Use the Applications tab to install, upgrade, uninstall, and review supported apps from one place. WinUtil relies on package manager support for these actions, so the available results depend on what WinGet can detect and manage on your system.
<Tabs> <Tabs>
<TabItem label="Installation & Updates"> <TabItem label="Install & Upgrade">
* Choose the applications you want to install or upgrade. * Choose the applications you want to install or upgrade.
* For programs not currently installed, this action will install them. * For programs not currently installed, this action will install them.
* For programs already installed, this action will update them to the latest version. * For programs already installed, this action will update them to the latest version.
* Click the `Install/Upgrade Selected` button to start the installation or upgrade process. * Click the `Install/Upgrade Selected` button to start the installation or upgrade process.
![Install or upgrade selected applications](../../../assets/screenshots/install-pics/installation.png) ![Install or upgrade selected applications](../../../assets/screenshots/install-pics/installation&upgrade.png)
</TabItem>
<TabItem label="Upgrade All">
* Simply press the `Upgrade All` button.
* This upgrades every supported installed program without individual selection.
![Upgrade all applications](../../../assets/screenshots/install-pics/install-apps.png)
</TabItem> </TabItem>
<TabItem label="Uninstall"> <TabItem label="Uninstall">
* Select the programs you wish to uninstall. * Select the programs you wish to uninstall.
@@ -30,17 +24,35 @@ Use the Applications tab to install, upgrade, uninstall, and review supported ap
![Uninstall selected applications](../../../assets/screenshots/install-pics/uninstall-apps.png) ![Uninstall selected applications](../../../assets/screenshots/install-pics/uninstall-apps.png)
</TabItem> </TabItem>
<TabItem label="Show Installed Apps"> <TabItem label="Upgrade All">
* Click the `Show Installed Apps` button. * Simply press the `Upgrade All` button.
* This scans for and selects installed applications supported by WinGet. * This upgrades every supported installed program without individual selection.
![Show installed apps](../../../assets/screenshots/install-pics/show-installed-apps.png) ![Upgrade all applications](../../../assets/screenshots/install-pics/upgrade-all.png)
</TabItem> </TabItem>
<TabItem label="Clear Selection"> <TabItem label="Clear Selection">
* Click the `Clear Selection` button. * Click the `Clear Selection` button.
* This clears all current selections. * This clears all current selections.
![Clear app selections](../../../assets/screenshots/install-pics/clear-selection-apps.png) ![Clear app selections](../../../assets/screenshots/install-pics/clear-selected-apps.png)
</TabItem>
<TabItem label="Collapse & Expand Categories">
* Click `Collapse All Categories` to close every category and shrink the list to just the category headers.
* Click `Expand All Categories` to reopen every category and show all applications again.
![Collapse or expand all categories](../../../assets/screenshots/install-pics/Collapse&ExpandCat.png)
</TabItem>
<TabItem label="Selected Apps Counter">
* The `Selected Apps` counter in the sidebar shows how many applications are currently selected.
* Use it to keep track of your selection as you browse categories.
![Selected apps counter](../../../assets/screenshots/install-pics/Selected-Apps.png)
</TabItem>
<TabItem label="Show Installed Apps">
* Click the `Show Installed Apps` button.
* This scans for and selects installed applications supported by WinGet.
![Show installed apps](../../../assets/screenshots/install-pics/show-installed-apps.png)
</TabItem> </TabItem>
</Tabs> </Tabs>
@@ -225,7 +225,7 @@ If the launch command fails:
- Retry from a normal PowerShell session rather than a restricted enterprise shell profile. - Retry from a normal PowerShell session rather than a restricted enterprise shell profile.
- If the command starts and then closes immediately, reopen Terminal as Administrator and run it again so you can read the error output. - If the command starts and then closes immediately, reopen Terminal as Administrator and run it again so you can read the error output.
If it still fails, check the [Known Issues](/known-issues/) page. If it still fails, check the [Known Issues](/knownissues/) page.
## Next steps ## Next steps
@@ -240,7 +240,7 @@ Now that you're set up, explore these guides:
If you need assistance: If you need assistance:
- **Documentation**: Browse this documentation site - **Documentation**: Browse this documentation site
- **Known Issues**: Check the [Known Issues](/known-issues/) page - **Known Issues**: Check the [Known Issues](/knownissues/) page
- **Discord**: Join the [community Discord server](https://discord.gg/RUbZUZyByQ) - **Discord**: Join the [community Discord server](https://discord.gg/RUbZUZyByQ)
- **GitHub Issues**: Report bugs on [GitHub](https://github.com/ChrisTitusTech/winutil/issues) - **GitHub Issues**: Report bugs on [GitHub](https://github.com/ChrisTitusTech/winutil/issues)
- **YouTube**: Watch [video tutorials](https://www.youtube.com/watch?v=6UQZ5oQg8XA) - **YouTube**: Watch [video tutorials](https://www.youtube.com/watch?v=6UQZ5oQg8XA)
+6 -2
View File
@@ -5,6 +5,8 @@ sidebar:
order: 0 order: 0
--- ---
import YouTubeEmbed from '../../../components/YouTubeEmbed.astro';
Welcome to the official User Guide for **Winutil**, your all-in-one Windows toolkit. Welcome to the official User Guide for **Winutil**, your all-in-one Windows toolkit.
:::caution :::caution
@@ -125,7 +127,7 @@ Need help?
- **Documentation**: You're reading it. Use the navigation menu. - **Documentation**: You're reading it. Use the navigation menu.
- **FAQ**: Check [Frequently Asked Questions](/faq/) - **FAQ**: Check [Frequently Asked Questions](/faq/)
- **Known Issues**: Review [Known Issues](/known-issues/) - **Known Issues**: Review [Known Issues](/knownissues/)
- **Discord**: Join the [community Discord](https://discord.gg/RUbZUZyByQ) - **Discord**: Join the [community Discord](https://discord.gg/RUbZUZyByQ)
- **GitHub**: Report bugs on [GitHub Issues](https://github.com/ChrisTitusTech/winutil/issues) - **GitHub**: Report bugs on [GitHub Issues](https://github.com/ChrisTitusTech/winutil/issues)
- **YouTube**: Watch [video tutorials](https://www.youtube.com/watch?v=6UQZ5oQg8XA) - **YouTube**: Watch [video tutorials](https://www.youtube.com/watch?v=6UQZ5oQg8XA)
@@ -144,7 +146,9 @@ Want to help improve Winutil?
## Video Tutorial ## Video Tutorial
Watch the complete WinUtil overview: [https://www.youtube.com/watch?v=6UQZ5oQg8XA](https://www.youtube.com/watch?v=6UQZ5oQg8XA) Watch the complete WinUtil overview:
<YouTubeEmbed id="6UQZ5oQg8XA" title="WinUtil overview" />
Ready to get started? Head to the **[Getting Started Guide](/guides/getting-started/)**. Ready to get started? Head to the **[Getting Started Guide](/guides/getting-started/)**.
+6 -2
View File
@@ -5,10 +5,12 @@ sidebar:
order: 3 order: 3
--- ---
![Image of Tweaks Tab](../../../assets/screenshots/tweaks-tab-new.png) import YouTubeEmbed from '../../../components/YouTubeEmbed.astro';
Use the Tweaks tab to apply recommended Windows changes, review optional presets, and adjust a few supporting settings such as DNS and power plans. Start with a preset unless you already know which individual tweaks you want. Use the Tweaks tab to apply recommended Windows changes, review optional presets, and adjust a few supporting settings such as DNS and power plans. Start with a preset unless you already know which individual tweaks you want.
![Image of Tweaks Tab](../../../assets/screenshots/tweaks-tab-new.png)
### Recommended Selections ### Recommended Selections
Use the quick-selection buttons at the top of the Tweaks tab to speed up setup: Use the quick-selection buttons at the top of the Tweaks tab to speed up setup:
@@ -53,7 +55,9 @@ Advanced Tweaks are for users who understand the side effects of deeper Windows
### O&O ShutUp10++ ### O&O ShutUp10++
[O&O ShutUp10++](https://www.oo-software.com/en/shutup10) can be launched from WinUtil with one click. It is a free privacy tool for Windows that helps users manage telemetry, update behavior, and app permission settings. [O&O ShutUp10++](https://www.oo-software.com/en/shutup10) can be launched from WinUtil with one click. It is a free privacy tool for Windows that helps users manage telemetry, update behavior, and app permission settings.
Watch a walkthrough: [https://www.youtube.com/watch?v=3HvNr8eMcv0](https://www.youtube.com/watch?v=3HvNr8eMcv0) Watch a walkthrough:
<YouTubeEmbed id="3HvNr8eMcv0" title="O&O ShutUp10++ walkthrough" />
### DNS ### DNS
+2
View File
@@ -7,6 +7,8 @@ sidebar:
WinUtil provides three update modes so you can choose how aggressively Windows Update is managed on your system: WinUtil provides three update modes so you can choose how aggressively Windows Update is managed on your system:
![Image of Updates Tab](../../../assets/screenshots/updates-tab-new.png)
Changing modes adjusts system-wide Windows Update behavior. After switching modes, give Windows a moment to apply the policy and plan for a restart if the new state does not appear immediately. Changing modes adjusts system-wide Windows Update behavior. After switching modes, give Windows a moment to apply the policy and plan for a restart if the new state does not appear immediately.
- **Recommended**: Prioritizes stability while still receiving security updates - **Recommended**: Prioritizes stability while still receiving security updates
+5 -5
View File
@@ -21,7 +21,7 @@ hero:
file: ../../assets/branding/title-screen.png file: ../../assets/branding/title-screen.png
actions: actions:
- text: Get Started - text: Get Started
link: /guides/getting-started/ link: /guides/
icon: right-arrow icon: right-arrow
- text: View on GitHub - text: View on GitHub
link: https://github.com/ChrisTitusTech/winutil link: https://github.com/ChrisTitusTech/winutil
@@ -156,9 +156,9 @@ import CornerCard from '../../components/CornerCard.astro';
</div> </div>
</div> </div>
<div class="wu-cta" style="margin-top: 3rem;"> <div class="wu-cta" style="margin-top: 3rem;">
<a class="wu-btn wu-btn-secondary" href="/guides/getting-started/"> <a class="wu-btn wu-btn-secondary" href="/guides/">
Read the Docs {'Read the Docs'}
<Icon name="right-arrow" /> <Icon name="right-arrow" size="1.5em" class="wu-icon-arrow" />
</a> </a>
</div> </div>
</div> </div>
@@ -185,7 +185,7 @@ import CornerCard from '../../components/CornerCard.astro';
<h2>Stop hunting for the same fixes every time</h2> <h2>Stop hunting for the same fixes every time</h2>
<p>Get a script that installs, tweaks, fixes, and updates Windows from one window.</p> <p>Get a script that installs, tweaks, fixes, and updates Windows from one window.</p>
<div class="wu-btn-row"> <div class="wu-btn-row">
<a class="wu-btn wu-btn-primary" href="/guides/getting-started/"> <a class="wu-btn wu-btn-primary" href="/guides/">
{'Get Started'} {'Get Started'}
<Icon name="right-arrow" size="1.5em" class="wu-icon-arrow" /> <Icon name="right-arrow" size="1.5em" class="wu-icon-arrow" />
</a> </a>
+5
View File
@@ -0,0 +1,5 @@
// Shared external links, so astro.config.mjs and Header.astro can't drift out of sync.
export const siteLinks = {
store: { label: 'Store', href: 'https://christitus.com/downloads/' },
forums: { label: 'Forums', href: 'https://forum.christitus.com/' },
} as const;
+10 -3
View File
@@ -139,8 +139,7 @@ body {
border-color 0.15s ease, border-color 0.15s ease,
color 0.15s ease; color 0.15s ease;
} }
/* The right/left-arrow glyph's visual weight sits high in its viewBox, so it /* The right/left-arrow glyph's visual weight sits high in its viewBox, so it reads as floating above the label's baseline without this nudge. */
reads as floating above the label's baseline without this nudge. */
.wu-btn .wu-icon-arrow { .wu-btn .wu-icon-arrow {
position: relative; position: relative;
top: 0.05em; top: 0.05em;
@@ -155,7 +154,7 @@ body {
.wu-btn-secondary { .wu-btn-secondary {
border: 1px solid var(--sl-color-hairline-light); border: 1px solid var(--sl-color-hairline-light);
color: var(--sl-color-white); color: var(--sl-color-white);
background: transparent; background: var(--sl-color-gray-6);
} }
.wu-btn-secondary:hover { .wu-btn-secondary:hover {
border-color: var(--sl-color-accent); border-color: var(--sl-color-accent);
@@ -167,6 +166,11 @@ body {
display: contents; display: contents;
} }
/* Cancels Starlight's automatic 1.5rem margin between the hero and the content column. */
.wu-hero + .sl-markdown-content {
margin-top: 0;
}
/* Cancels Starlight's automatic 1.5rem inter-block margin inside our own grids/rows (it otherwise lands on item 2+ of each row and breaks alignment). */ /* Cancels Starlight's automatic 1.5rem inter-block margin inside our own grids/rows (it otherwise lands on item 2+ of each row and breaks alignment). */
.sl-markdown-content .wu-section, .sl-markdown-content .wu-section,
.sl-markdown-content .wu-solution-grid > *, .sl-markdown-content .wu-solution-grid > *,
@@ -188,6 +192,9 @@ body {
padding-block: clamp(3rem, 4vw + 1.5rem, 5.5rem); padding-block: clamp(3rem, 4vw + 1.5rem, 5.5rem);
} }
.wu-section--trust { .wu-section--trust {
display: flex;
align-items: center;
justify-content: center;
padding-block: 2rem; padding-block: 2rem;
} }
.wu-section--tint { .wu-section--tint {
+7 -24
View File
@@ -20,28 +20,12 @@ function Reset-WPFCheckBoxes {
[Parameter(position=1)] [Parameter(position=1)]
[string]$checkboxfilterpattern = "**" [string]$checkboxfilterpattern = "**"
) )
$selectedSet = [System.Collections.Generic.HashSet[string]]::new([string[]]@($sync.selectedApps + $sync.selectedTweaks + $sync.selectedFeatures + $sync.selectedAppx), [StringComparer]::OrdinalIgnoreCase)
$CheckBoxesToCheck = $sync.selectedApps + $sync.selectedTweaks + $sync.selectedFeatures + $sync.selectedAppx foreach ($syncEntry in $sync.GetEnumerator()) {
$CheckBoxes = foreach ($syncEntry in $sync.GetEnumerator()) {
if ($syncEntry.Value -is [System.Windows.Controls.CheckBox] -and $syncEntry.Name -notlike "WPFToggle*" -and $syncEntry.Name -like $checkboxfilterpattern) { if ($syncEntry.Value -is [System.Windows.Controls.CheckBox] -and $syncEntry.Name -notlike "WPFToggle*" -and $syncEntry.Name -like $checkboxfilterpattern) {
$syncEntry $checkboxName = $syncEntry.Key
} $sync.$checkboxName.IsChecked = $selectedSet.Contains($checkboxName)
}
foreach ($CheckBox in $CheckBoxes) {
$checkboxName = $CheckBox.Key
if (-not $CheckBoxesToCheck) {
$sync.$checkBoxName.IsChecked = $false
continue
}
# Check if the checkbox name exists in the flattened JSON hashtable
if ($CheckBoxesToCheck -contains $checkboxName) {
# If it exists, set IsChecked to true
$sync.$checkboxName.IsChecked = $true
} else {
# If it doesn't exist, set IsChecked to false
$sync.$checkboxName.IsChecked = $false
} }
} }
@@ -57,10 +41,9 @@ function Reset-WPFCheckBoxes {
# Only act on toggles that are explicitly listed in the import - toggles absent # Only act on toggles that are explicitly listed in the import - toggles absent
# from the export file were not part of the saved config and should keep whatever # from the export file were not part of the saved config and should keep whatever
# state the live system already has (set during UI initialisation via Get-WinUtilToggleStatus). # state the live system already has (set during UI initialisation via Get-WinUtilToggleStatus).
$importedToggles = $sync.selectedToggles $importedToggles = [System.Collections.Generic.HashSet[string]]::new([string[]]@($sync.selectedToggles), [StringComparer]::OrdinalIgnoreCase)
$allToggles = $sync.GetEnumerator() | Where-Object { $_.Key -like "WPFToggle*" -and $_.Value -is [System.Windows.Controls.CheckBox] } foreach ($toggle in $sync.GetEnumerator()) {
foreach ($toggle in $allToggles) { if ($toggle.Key -like "WPFToggle*" -and $toggle.Value -is [System.Windows.Controls.CheckBox] -and $importedToggles.Contains($toggle.Key)) {
if ($importedToggles -contains $toggle.Key) {
$sync[$toggle.Key].IsChecked = $true $sync[$toggle.Key].IsChecked = $true
} }
# Toggles not present in the import are intentionally left untouched; # Toggles not present in the import are intentionally left untouched;
+6 -4
View File
@@ -3,19 +3,21 @@ function Invoke-WPFInstall {
.SYNOPSIS .SYNOPSIS
Installs the selected programs using winget, if one or more of the selected programs are already installed on the system, winget will try and perform an upgrade if there's a newer version to install. Installs the selected programs using winget, if one or more of the selected programs are already installed on the system, winget will try and perform an upgrade if there's a newer version to install.
#> #>
param(
$PackagesToInstall = $sync.selectedApps | Foreach-Object { $sync.configs.applicationsHashtable.$_ } [Parameter(Mandatory = $false)]
[PSObject[]]$PackagesToInstall = $($sync.selectedApps | Foreach-Object { $sync.configs.applicationsHashtable.$_ })
)
if($sync.ProcessRunning) { if($sync.ProcessRunning) {
$msg = "[Invoke-WPFInstall] An Install process is currently running." $msg = "[Invoke-WPFInstall] An Install process is currently running."
Show-WinUtilMessage -Message $msg -Title "Winutil" -Button "OK" -Icon "Warning" Show-WinUtilMessage -Message $msg -Title "WinUtil" -Button "OK" -Icon "Warning"
return return
} }
if ($PackagesToInstall.Count -eq 0) { if ($PackagesToInstall.Count -eq 0) {
$WarningMsg = "Please select the program(s) to install or upgrade." $WarningMsg = "Please select the program(s) to install or upgrade."
Show-WinUtilMessage -Message $WarningMsg -Title $AppTitle -Button "OK" -Icon "Warning" Show-WinUtilMessage -Message $WarningMsg -Title "WinUtil" -Button "OK" -Icon "Warning"
return return
} }
+2 -2
View File
@@ -38,8 +38,8 @@ function Invoke-WPFPresets {
"WPFTweak*" { $sync.selectedTweaks = [System.Collections.Generic.List[string]]::new() } "WPFTweak*" { $sync.selectedTweaks = [System.Collections.Generic.List[string]]::new() }
"WPFInstall*" { $sync.selectedApps = [System.Collections.Generic.List[string]]::new() } "WPFInstall*" { $sync.selectedApps = [System.Collections.Generic.List[string]]::new() }
"WPFAppx*" { $sync.selectedAppx = [System.Collections.Generic.List[string]]::new() } "WPFAppx*" { $sync.selectedAppx = [System.Collections.Generic.List[string]]::new() }
"WPFeatures" { $sync.selectedFeatures = [System.Collections.Generic.List[string]]::new() } "WPFFeature*" { $sync.selectedFeatures = [System.Collections.Generic.List[string]]::new() }
"WPFToggle" { $sync.selectedToggles = [System.Collections.Generic.List[string]]::new() } "WPFToggle*" { $sync.selectedToggles = [System.Collections.Generic.List[string]]::new() }
default {} default {}
} }
@@ -327,6 +327,7 @@ function Invoke-WPFUIElements {
$groupStackPanel = New-Object Windows.Controls.StackPanel $groupStackPanel = New-Object Windows.Controls.StackPanel
$groupStackPanel.Orientation = "Vertical" $groupStackPanel.Orientation = "Vertical"
[System.Windows.Automation.AutomationProperties]::SetName($groupStackPanel, $entryInfo.GroupName) [System.Windows.Automation.AutomationProperties]::SetName($groupStackPanel, $entryInfo.GroupName)
$radioButtonGroups[$entryInfo.GroupName] = $groupStackPanel
# Add the group container to the ItemsControl # Add the group container to the ItemsControl
$itemsControl.Items.Add($groupStackPanel) | Out-Null $itemsControl.Items.Add($groupStackPanel) | Out-Null
+2 -2
View File
@@ -11,13 +11,13 @@ function Invoke-WPFUnInstall {
if($sync.ProcessRunning) { if($sync.ProcessRunning) {
$msg = "[Invoke-WPFUnInstall] Install process is currently running" $msg = "[Invoke-WPFUnInstall] Install process is currently running"
Show-WinUtilMessage -Message $msg -Title "Winutil" -Button "OK" -Icon "Warning" Show-WinUtilMessage -Message $msg -Title "WinUtil" -Button "OK" -Icon "Warning"
return return
} }
if ($PackagesToUninstall.Count -eq 0) { if ($PackagesToUninstall.Count -eq 0) {
$WarningMsg = "Please select the program(s) to uninstall" $WarningMsg = "Please select the program(s) to uninstall"
Show-WinUtilMessage -Message $WarningMsg -Title $AppTitle -Button "OK" -Icon "Warning" Show-WinUtilMessage -Message $WarningMsg -Title "WinUtil" -Button "OK" -Icon "Warning"
return return
} }
+21 -9
View File
@@ -66,7 +66,6 @@ BeforeAll {
$selectedApps.Add($key) $selectedApps.Add($key)
} }
$script:AppTitle = "Winutil"
$script:sync = [Hashtable]::Synchronized(@{ $script:sync = [Hashtable]::Synchronized(@{
ProcessRunning = $ProcessRunning ProcessRunning = $ProcessRunning
selectedApps = $selectedApps selectedApps = $selectedApps
@@ -122,7 +121,6 @@ Describe "Invoke-WPFInstall entrypoint" {
AfterEach { AfterEach {
Remove-Variable -Name sync -Scope Script -ErrorAction SilentlyContinue Remove-Variable -Name sync -Scope Script -ErrorAction SilentlyContinue
Remove-Variable -Name AppTitle -Scope Script -ErrorAction SilentlyContinue
Remove-Variable -Name capturedInstallScriptBlock -Scope Script -ErrorAction SilentlyContinue Remove-Variable -Name capturedInstallScriptBlock -Scope Script -ErrorAction SilentlyContinue
Remove-Variable -Name capturedInstallParameterList -Scope Script -ErrorAction SilentlyContinue Remove-Variable -Name capturedInstallParameterList -Scope Script -ErrorAction SilentlyContinue
} }
@@ -146,6 +144,23 @@ Describe "Invoke-WPFInstall entrypoint" {
} }
} }
It "queues the explicit app popup package over the selected apps" {
$explicitPackage = New-WinUtilPackage -Name "VLC" -Winget "VideoLAN.VLC" -Choco "vlc"
Invoke-WPFInstall -PackagesToInstall $explicitPackage
Should -Invoke -CommandName Invoke-WPFRunspace -Times 1 -Exactly -ParameterFilter {
$ScriptBlock -is [scriptblock] -and
$ParameterList.Count -eq 2 -and
$ParameterList[0][0] -eq "PackagesToInstall" -and
@($ParameterList[0][1]).Count -eq 1 -and
@($ParameterList[0][1])[0].winget -eq "VideoLAN.VLC" -and
$ParameterList[1][0] -eq "ManagerPreference" -and
$ParameterList[1][1] -eq "Winget"
}
Should -Invoke -CommandName Show-WinUtilMessage -Times 0 -Exactly
}
It "prompts and exits when no packages are selected" { It "prompts and exits when no packages are selected" {
New-WinUtilInstallTestContext New-WinUtilInstallTestContext
@@ -153,7 +168,7 @@ Describe "Invoke-WPFInstall entrypoint" {
Should -Invoke -CommandName Show-WinUtilMessage -Times 1 -Exactly -ParameterFilter { Should -Invoke -CommandName Show-WinUtilMessage -Times 1 -Exactly -ParameterFilter {
$Message -eq "Please select the program(s) to install or upgrade." -and $Message -eq "Please select the program(s) to install or upgrade." -and
$Title -eq "Winutil" -and $Title -eq "WinUtil" -and
$Button -eq "OK" -and $Button -eq "OK" -and
$Icon -eq "Warning" $Icon -eq "Warning"
} }
@@ -167,7 +182,7 @@ Describe "Invoke-WPFInstall entrypoint" {
Should -Invoke -CommandName Show-WinUtilMessage -Times 1 -Exactly -ParameterFilter { Should -Invoke -CommandName Show-WinUtilMessage -Times 1 -Exactly -ParameterFilter {
$Message -eq "[Invoke-WPFInstall] An Install process is currently running." -and $Message -eq "[Invoke-WPFInstall] An Install process is currently running." -and
$Title -eq "Winutil" -and $Title -eq "WinUtil" -and
$Button -eq "OK" -and $Button -eq "OK" -and
$Icon -eq "Warning" $Icon -eq "Warning"
} }
@@ -201,7 +216,6 @@ Describe "Invoke-WPFInstall runspace body" {
AfterEach { AfterEach {
Remove-Variable -Name sync -Scope Script -ErrorAction SilentlyContinue Remove-Variable -Name sync -Scope Script -ErrorAction SilentlyContinue
Remove-Variable -Name AppTitle -Scope Script -ErrorAction SilentlyContinue
Remove-Variable -Name capturedInstallScriptBlock -Scope Script -ErrorAction SilentlyContinue Remove-Variable -Name capturedInstallScriptBlock -Scope Script -ErrorAction SilentlyContinue
} }
@@ -289,7 +303,6 @@ Describe "Invoke-WPFUnInstall entrypoint" {
AfterEach { AfterEach {
Remove-Variable -Name sync -Scope Script -ErrorAction SilentlyContinue Remove-Variable -Name sync -Scope Script -ErrorAction SilentlyContinue
Remove-Variable -Name AppTitle -Scope Script -ErrorAction SilentlyContinue
Remove-Variable -Name capturedUninstallScriptBlock -Scope Script -ErrorAction SilentlyContinue Remove-Variable -Name capturedUninstallScriptBlock -Scope Script -ErrorAction SilentlyContinue
Remove-Variable -Name capturedUninstallParameterList -Scope Script -ErrorAction SilentlyContinue Remove-Variable -Name capturedUninstallParameterList -Scope Script -ErrorAction SilentlyContinue
} }
@@ -324,7 +337,7 @@ Describe "Invoke-WPFUnInstall entrypoint" {
Should -Invoke -CommandName Show-WinUtilMessage -Times 1 -Exactly -ParameterFilter { Should -Invoke -CommandName Show-WinUtilMessage -Times 1 -Exactly -ParameterFilter {
$Message -eq "Please select the program(s) to uninstall" -and $Message -eq "Please select the program(s) to uninstall" -and
$Title -eq "Winutil" -and $Title -eq "WinUtil" -and
$Button -eq "OK" -and $Button -eq "OK" -and
$Icon -eq "Warning" $Icon -eq "Warning"
} }
@@ -338,7 +351,7 @@ Describe "Invoke-WPFUnInstall entrypoint" {
Should -Invoke -CommandName Show-WinUtilMessage -Times 1 -Exactly -ParameterFilter { Should -Invoke -CommandName Show-WinUtilMessage -Times 1 -Exactly -ParameterFilter {
$Message -eq "[Invoke-WPFUnInstall] Install process is currently running" -and $Message -eq "[Invoke-WPFUnInstall] Install process is currently running" -and
$Title -eq "Winutil" -and $Title -eq "WinUtil" -and
$Button -eq "OK" -and $Button -eq "OK" -and
$Icon -eq "Warning" $Icon -eq "Warning"
} }
@@ -379,7 +392,6 @@ Describe "Invoke-WPFUnInstall runspace body" {
AfterEach { AfterEach {
Remove-Variable -Name sync -Scope Script -ErrorAction SilentlyContinue Remove-Variable -Name sync -Scope Script -ErrorAction SilentlyContinue
Remove-Variable -Name AppTitle -Scope Script -ErrorAction SilentlyContinue
Remove-Variable -Name capturedUninstallScriptBlock -Scope Script -ErrorAction SilentlyContinue Remove-Variable -Name capturedUninstallScriptBlock -Scope Script -ErrorAction SilentlyContinue
} }
+2 -1
View File
@@ -53,7 +53,8 @@ if ($failed.Count -gt 0) {
} }
'@ '@
$output = & $windowsPowerShell.Source -NoProfile -NonInteractive -ExecutionPolicy Bypass -Command $parseScript 2>&1 $encodedCommand = [Convert]::ToBase64String([System.Text.Encoding]::Unicode.GetBytes($parseScript))
$output = & $windowsPowerShell.Source -NoProfile -NonInteractive -ExecutionPolicy Bypass -EncodedCommand $encodedCommand 2>&1
if ($LASTEXITCODE -ne 0) { if ($LASTEXITCODE -ne 0) {
throw "Windows PowerShell parser failed:`n$($output | Out-String)" throw "Windows PowerShell parser failed:`n$($output | Out-String)"
} }
+7 -7
View File
@@ -9,10 +9,10 @@ The `devdocs-generator.ps1` script automatically generates Astro/Starlight markd
## When Does it Run? ## When Does it Run?
- Automatically triggered by the `docs.yaml` GitHub Actions workflow, which generates the `.mdx` files, commits them back to the repo, and then triggers the Astro build to build the site - Automatically runs as part of the `pre-release.yaml` GitHub Actions workflow (manually triggered via `workflow_dispatch`), which regenerates the `.mdx` files and updates the `"link"` properties in the JSON config files
- Automatically runs during the pre-release workflow, committing the updated `"link"` properties back to the JSON config files - `pre-release.yaml` then opens a `docs-update` pull request with those changes; `auto-merge-docs.yaml` auto-approves and merges it into `main`
- Watches `docs/**`, `config/tweaks.json`, `config/feature.json`, and `functions/**` for changes - That merge pushes changes under `docs/**`, which triggers `docs.yaml` — but `docs.yaml` only builds and deploys the Astro site, it does not run the generator itself
- Supports manual runs via `workflow_dispatch` - Can also be run manually/locally from `tools/` (`./devdocs-generator.ps1`)
## What Does It Do? ## What Does It Do?
@@ -25,7 +25,7 @@ The `devdocs-generator.ps1` script automatically generates Astro/Starlight markd
### 2. Updates Links in JSON ### 2. Updates Links in JSON
- Adds or updates a `"link"` property on every entry in both JSON config files - Adds or updates a `"link"` property on every entry in both JSON config files
- Each link points to that entry's documentation page on the Hugo site - Each link points to that entry's documentation page on the Astro/Starlight site
- The updated links are automatically committed back to the JSON config files as part of the pre-release workflow - The updated links are automatically committed back to the JSON config files as part of the pre-release workflow
### 3. Cleans Up Old Docs ### 3. Cleans Up Old Docs
@@ -104,5 +104,5 @@ The script strips common prefixes from the JSON key names using the pattern `WPF
— if a category `index.mdx` landing page is added inside `tweaks/` or `features/`, uncomment the exclusion in the cleanup step first, or it will be deleted on the next run — if a category `index.mdx` landing page is added inside `tweaks/` or `features/`, uncomment the exclusion in the cleanup step first, or it will be deleted on the next run
- Category directories are created automatically if they don't exist - Category directories are created automatically if they don't exist
- The `"link"` property added to JSON entries is excluded from the displayed code blocks - The `"link"` property added to JSON entries is excluded from the displayed code blocks
- The `docs` workflow generates the `.mdx` files and commits them back to the repo before the Astro site is built - The `pre-release` workflow generates both the `.mdx` files and the `"link"` properties, and commits them back to the repo via the `docs-update` PR
- The `pre-release` workflow generates the `"link"` properties and commits them back to the repo - The `docs` workflow never runs the generator — it only builds and deploys the already-committed Astro site
+3 -3
View File
@@ -100,7 +100,7 @@ function Get-GeneratedFromNote {
$githubUrl = "https://github.com/ChrisTitusTech/winutil/blob/main/$SourceRelativePath" $githubUrl = "https://github.com/ChrisTitusTech/winutil/blob/main/$SourceRelativePath"
$note = ":::note`r`n" $note = ":::note`r`n"
$note += "This page is generated from [``$SourceRelativePath``]($githubUrl). Edit the source file and regenerate the docs rather than editing this file directly.`r`n" $note += "This page is generated from [``$SourceRelativePath``]($githubUrl). Do not edit this page directly.`r`n"
$note += ":::`r`n`r`n" $note += ":::`r`n`r`n"
return $note return $note
} }
@@ -347,7 +347,7 @@ foreach ($itemName in $tweakNames) {
$title = $item.Content -replace '"', '\"' $title = $item.Content -replace '"', '\"'
$description = if ($item.Description) { $item.Description -replace '"', '\"' } else { '' } $description = if ($item.Description) { $item.Description -replace '"', '\"' } else { '' }
$content = "---`r`ntitle: `"$title`"`r`ndescription: `"$description`"`r`n---`r`n`r`n" $content = "---`r`ntitle: `"$title`"`r`ndescription: `"$description`"`r`neditUrl: false`r`n---`r`n`r`n"
if ($item.Type -eq "Button") { if ($item.Type -eq "Button") {
$funcName = $buttonFunctionMap[$itemName] $funcName = $buttonFunctionMap[$itemName]
@@ -406,7 +406,7 @@ foreach ($itemName in $featureNames) {
$title = $item.Content -replace '"', '\"' $title = $item.Content -replace '"', '\"'
$description = if ($item.Description) { $item.Description -replace '"', '\"' } else { '' } $description = if ($item.Description) { $item.Description -replace '"', '\"' } else { '' }
$content = "---`r`ntitle: `"$title`"`r`ndescription: `"$description`"`r`n---`r`n`r`n" $content = "---`r`ntitle: `"$title`"`r`ndescription: `"$description`"`r`neditUrl: false`r`n---`r`n`r`n"
if ($item.category -in $functionEmbedCategories) { if ($item.category -in $functionEmbedCategories) {
$funcName = if ($item.function) { $item.function } else { $buttonFunctionMap[$itemName] } $funcName = if ($item.function) { $item.function } else { $buttonFunctionMap[$itemName] }