Compare commits

...

9 Commits

Author SHA1 Message Date
copilot-swe-agent[bot]
d34109ba61 Move registry margin adjustment to root Layout::Init method for better performance and code organization
Co-authored-by: yeelam-gordon <73506701+yeelam-gordon@users.noreply.github.com>
2025-09-05 17:50:38 +08:00
Clint Rutkas
ad9de0b54b fix casting thanks to Dustin 2025-09-05 17:50:37 +08:00
Clint Rutkas
1a2b4e2f3e Update LayoutDefaults.h 2025-09-05 17:50:36 +08:00
copilot-swe-agent[bot]
5feab1c9f1 Use Windows DWM ColorPrevalence registry key for margin adjustment
Co-authored-by: crutkas <1462282+crutkas@users.noreply.github.com>
2025-09-05 17:50:36 +08:00
copilot-swe-agent[bot]
7b413375aa Implement registry key for FancyZones margin adjustment
Co-authored-by: crutkas <1462282+crutkas@users.noreply.github.com>
2025-09-05 17:50:33 +08:00
copilot-swe-agent[bot]
abc574d486 Update isLayoutDefault to use DefaultValues constants instead of hardcoded values
Co-authored-by: crutkas <1462282+crutkas@users.noreply.github.com>
2025-09-05 17:50:30 +08:00
copilot-swe-agent[bot]
f97d680fb1 Change FancyZones default spacing from 16px to 0px to remove tiling gaps by default
Co-authored-by: crutkas <1462282+crutkas@users.noreply.github.com>
2025-09-05 17:50:29 +08:00
copilot-swe-agent[bot]
94887b0ebb Initial plan for issue 2025-09-05 17:50:27 +08:00
Hugo Batista
14a45e3e8c [PTRun][Docs] Add PerplexitySearchShortcut to Third-Party plugins (#37789)
## Summary of the Pull Request
A new Third-Party plugin to search on Perplexity

---------

Co-authored-by: Mike Griese <migrie@microsoft.com>
Co-authored-by: Heiko <61519853+htcfreek@users.noreply.github.com>
Co-authored-by: Kayla Cinnamon <cinnamon@microsoft.com>
2025-09-05 13:14:48 +08:00
6 changed files with 35 additions and 5 deletions

View File

@@ -94,6 +94,7 @@ onefuzzingestionpreparationtool
OTP
Yubi
Yubico
Perplexity
svgl
# KEYS

View File

@@ -29,6 +29,8 @@ shortcutguide
# 8LWXpg is user name but user folder causes a flag
LWXpg
# 0x6f677548 is user name but user folder causes a flag
x6f677548
Adoumie
Advaith
alekhyareddy

View File

@@ -73,4 +73,5 @@ Below are community created plugins that target a website or software. They are
| [YubicoOauthOTP](https://github.com/dlnilsson/Community.PowerToys.Run.Plugin.YubicoOauthOTP) | [dlnilsson](https://github.com/dlnilsson) | Display generated codes from OATH accounts stored on the YubiKey in powerToys Run |
| [Firefox Bookmark](https://github.com/8LWXpg/PowerToysRun-FirefoxBookmark) | [8LWXpg](https://github.com/8LWXpg) | Open bookmarks in Firefox based browser |
| [Linear](https://github.com/vednig/powertoys-linear) | [vednig](https://github.com/vednig) | Create Linear Issues directly from Powertoys Run |
| [PerplexitySearchShortcut](https://github.com/0x6f677548/PowerToys-Run-PerplexitySearchShortcut) | [0x6f677548](https://github.com/0x6f677548) | Search Perplexity |
| [SpeedTest](https://github.com/ruslanlap/PowerToysRun-SpeedTest) | [ruslanlap](https://github.com/ruslanlap) | One-command internet speed tests with real-time results, modern UI, and shareable links. |

View File

@@ -20,10 +20,10 @@ namespace
bool isLayoutDefault(const LayoutData& layout)
{
return layout.type == FancyZonesDataTypes::ZoneSetLayoutType::PriorityGrid &&
layout.zoneCount == 3 &&
layout.spacing == 16 &&
layout.showSpacing == true &&
layout.sensitivityRadius == 20;
layout.zoneCount == DefaultValues::ZoneCount &&
layout.spacing == DefaultValues::Spacing &&
layout.showSpacing == DefaultValues::ShowSpacing &&
layout.sensitivityRadius == DefaultValues::SensitivityRadius;
}
}

View File

@@ -4,6 +4,6 @@ namespace DefaultValues
{
const int ZoneCount = 3;
const bool ShowSpacing = true;
const int Spacing = 16;
const int Spacing = 4;
const int SensitivityRadius = 20;
}

View File

@@ -9,6 +9,31 @@
#include <common/logger/logger.h>
namespace
{
int AdjustSpacingForRegistry(int originalSpacing)
{
// Check Windows DWM ColorPrevalence setting
// When ColorPrevalence = 0 (accent color not shown), subtract 1 from spacing
HKEY hKey;
DWORD dwValue = 1; // Default to 1 (accent color shown)
DWORD dwSize = sizeof(DWORD);
if (RegOpenKeyExW(HKEY_CURRENT_USER, L"Software\\Microsoft\\Windows\\DWM", 0, KEY_READ, &hKey) == ERROR_SUCCESS)
{
RegQueryValueExW(hKey, L"ColorPrevalence", nullptr, nullptr, reinterpret_cast<LPBYTE>(&dwValue), &dwSize);
RegCloseKey(hKey);
}
// Apply -1 margin when ColorPrevalence = 0 (accent color not shown)
if (dwValue == 0)
{
return originalSpacing - 1;
}
return originalSpacing;
}
}
namespace ZoneSelectionAlgorithms
{
constexpr int OVERLAPPING_CENTERS_SENSITIVITY = 75;
@@ -128,6 +153,7 @@ bool Layout::Init(const FancyZonesUtils::Rect& workArea, HMONITOR monitor) noexc
}
auto spacing = m_data.showSpacing ? m_data.spacing : 0;
spacing = AdjustSpacingForRegistry(spacing);
switch (m_data.type)
{