feat: add function to detect Windows default browser from WSL
related issue: #357
To provide additional explanation on this issue, I found that in order for the user to change `x-scheme-handler/http`, the actual .desktop file must exist.
To forcefully change it, you would need to modify `/usr/share/applications/defaults.list`, but I thought this wasn't the common behavior.
Therefore, I wrote a function to get the default browser in Windows using a PowerShell command, and linked it with the `browser.id` value, so that if `isWsl` is true, the function would be executed.
## Changes
- Added getWindowsDefaultBrowser() to retrieve the default Windows browser from WSL
- Maps ProgId (e.g. ChromeHTML) to existing IDs
合并状态:已合并 合并于 2025-05-01 关闭于 2025-05-01 2 条评论