2024-08-08 15:26:43 +01:00
|
|
|
#include "pch.h"
|
|
|
|
|
#include "Constants.h"
|
|
|
|
|
#include "Constants.g.cpp"
|
|
|
|
|
#include "shared_constants.h"
|
|
|
|
|
#include <ShlObj.h>
|
|
|
|
|
|
|
|
|
|
namespace winrt::PowerToys::Interop::implementation
|
|
|
|
|
{
|
|
|
|
|
uint32_t Constants::VK_WIN_BOTH()
|
|
|
|
|
{
|
|
|
|
|
return CommonSharedConstants::VK_WIN_BOTH;
|
|
|
|
|
}
|
|
|
|
|
hstring Constants::AppDataPath()
|
|
|
|
|
{
|
|
|
|
|
PWSTR local_app_path;
|
|
|
|
|
winrt::check_hresult(SHGetKnownFolderPath(FOLDERID_LocalAppData, 0, NULL, &local_app_path));
|
|
|
|
|
winrt::hstring result{ local_app_path };
|
|
|
|
|
CoTaskMemFree(local_app_path);
|
|
|
|
|
result = result + L"\\" + CommonSharedConstants::APPDATA_PATH;
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
hstring Constants::PowerLauncherSharedEvent()
|
|
|
|
|
{
|
|
|
|
|
return CommonSharedConstants::POWER_LAUNCHER_SHARED_EVENT;
|
|
|
|
|
}
|
|
|
|
|
hstring Constants::PowerLauncherCentralizedHookSharedEvent()
|
|
|
|
|
{
|
|
|
|
|
return CommonSharedConstants::POWER_LAUNCHER_CENTRALIZED_HOOK_SHARED_EVENT;
|
|
|
|
|
}
|
|
|
|
|
hstring Constants::RunSendSettingsTelemetryEvent()
|
|
|
|
|
{
|
|
|
|
|
return CommonSharedConstants::RUN_SEND_SETTINGS_TELEMETRY_EVENT;
|
|
|
|
|
}
|
|
|
|
|
hstring Constants::RunExitEvent()
|
|
|
|
|
{
|
|
|
|
|
return CommonSharedConstants::RUN_EXIT_EVENT;
|
|
|
|
|
}
|
|
|
|
|
hstring Constants::FZEExitEvent()
|
|
|
|
|
{
|
|
|
|
|
return CommonSharedConstants::FZE_EXIT_EVENT;
|
|
|
|
|
}
|
|
|
|
|
hstring Constants::FZEToggleEvent()
|
|
|
|
|
{
|
|
|
|
|
return CommonSharedConstants::FANCY_ZONES_EDITOR_TOGGLE_EVENT;
|
|
|
|
|
}
|
|
|
|
|
hstring Constants::ColorPickerSendSettingsTelemetryEvent()
|
|
|
|
|
{
|
|
|
|
|
return CommonSharedConstants::COLOR_PICKER_SEND_SETTINGS_TELEMETRY_EVENT;
|
|
|
|
|
}
|
|
|
|
|
hstring Constants::ShowColorPickerSharedEvent()
|
|
|
|
|
{
|
|
|
|
|
return CommonSharedConstants::SHOW_COLOR_PICKER_SHARED_EVENT;
|
|
|
|
|
}
|
2024-10-24 22:04:32 +02:00
|
|
|
hstring Constants::TerminateColorPickerSharedEvent()
|
|
|
|
|
{
|
|
|
|
|
return CommonSharedConstants::TERMINATE_COLOR_PICKER_SHARED_EVENT;
|
|
|
|
|
}
|
2024-08-22 16:17:12 +02:00
|
|
|
hstring Constants::AdvancedPasteShowUIMessage()
|
2024-08-08 15:26:43 +01:00
|
|
|
{
|
2024-08-22 16:17:12 +02:00
|
|
|
return CommonSharedConstants::ADVANCED_PASTE_SHOW_UI_MESSAGE;
|
2024-08-08 15:26:43 +01:00
|
|
|
}
|
2024-08-22 16:17:12 +02:00
|
|
|
hstring Constants::AdvancedPasteMarkdownMessage()
|
2024-08-08 15:26:43 +01:00
|
|
|
{
|
2024-08-22 16:17:12 +02:00
|
|
|
return CommonSharedConstants::ADVANCED_PASTE_MARKDOWN_MESSAGE;
|
2024-08-08 15:26:43 +01:00
|
|
|
}
|
2024-08-22 16:17:12 +02:00
|
|
|
hstring Constants::AdvancedPasteJsonMessage()
|
2024-08-08 15:26:43 +01:00
|
|
|
{
|
2024-08-22 16:17:12 +02:00
|
|
|
return CommonSharedConstants::ADVANCED_PASTE_JSON_MESSAGE;
|
|
|
|
|
}
|
2024-10-18 15:34:09 +02:00
|
|
|
hstring Constants::AdvancedPasteAdditionalActionMessage()
|
|
|
|
|
{
|
|
|
|
|
return CommonSharedConstants::ADVANCED_PASTE_ADDITIONAL_ACTION_MESSAGE;
|
|
|
|
|
}
|
2024-08-22 16:17:12 +02:00
|
|
|
hstring Constants::AdvancedPasteCustomActionMessage()
|
|
|
|
|
{
|
|
|
|
|
return CommonSharedConstants::ADVANCED_PASTE_CUSTOM_ACTION_MESSAGE;
|
2024-08-08 15:26:43 +01:00
|
|
|
}
|
2025-12-23 21:07:44 +08:00
|
|
|
hstring Constants::AdvancedPasteShowUIEvent()
|
|
|
|
|
{
|
|
|
|
|
return CommonSharedConstants::ADVANCED_PASTE_SHOW_UI_EVENT;
|
|
|
|
|
}
|
2024-10-24 22:04:32 +02:00
|
|
|
hstring Constants::AdvancedPasteTerminateAppMessage()
|
|
|
|
|
{
|
|
|
|
|
return CommonSharedConstants::ADVANCED_PASTE_TERMINATE_APP_MESSAGE;
|
|
|
|
|
}
|
2025-12-23 21:07:44 +08:00
|
|
|
hstring Constants::AlwaysOnTopPinEvent()
|
|
|
|
|
{
|
|
|
|
|
return CommonSharedConstants::ALWAYS_ON_TOP_PIN_EVENT;
|
|
|
|
|
}
|
|
|
|
|
hstring Constants::FindMyMouseTriggerEvent()
|
|
|
|
|
{
|
|
|
|
|
return CommonSharedConstants::FIND_MY_MOUSE_TRIGGER_EVENT;
|
|
|
|
|
}
|
|
|
|
|
hstring Constants::MouseHighlighterTriggerEvent()
|
|
|
|
|
{
|
|
|
|
|
return CommonSharedConstants::MOUSE_HIGHLIGHTER_TRIGGER_EVENT;
|
|
|
|
|
}
|
|
|
|
|
hstring Constants::MouseCrosshairsTriggerEvent()
|
|
|
|
|
{
|
|
|
|
|
return CommonSharedConstants::MOUSE_CROSSHAIRS_TRIGGER_EVENT;
|
|
|
|
|
}
|
|
|
|
|
hstring Constants::CursorWrapTriggerEvent()
|
|
|
|
|
{
|
|
|
|
|
return CommonSharedConstants::CURSOR_WRAP_TRIGGER_EVENT;
|
|
|
|
|
}
|
|
|
|
|
hstring Constants::LightSwitchToggleEvent()
|
|
|
|
|
{
|
|
|
|
|
return CommonSharedConstants::LIGHTSWITCH_TOGGLE_EVENT;
|
|
|
|
|
}
|
|
|
|
|
hstring Constants::ZoomItZoomEvent()
|
|
|
|
|
{
|
|
|
|
|
return CommonSharedConstants::ZOOMIT_ZOOM_EVENT;
|
|
|
|
|
}
|
|
|
|
|
hstring Constants::ZoomItDrawEvent()
|
|
|
|
|
{
|
|
|
|
|
return CommonSharedConstants::ZOOMIT_DRAW_EVENT;
|
|
|
|
|
}
|
|
|
|
|
hstring Constants::ZoomItBreakEvent()
|
|
|
|
|
{
|
|
|
|
|
return CommonSharedConstants::ZOOMIT_BREAK_EVENT;
|
|
|
|
|
}
|
|
|
|
|
hstring Constants::ZoomItLiveZoomEvent()
|
|
|
|
|
{
|
|
|
|
|
return CommonSharedConstants::ZOOMIT_LIVEZOOM_EVENT;
|
|
|
|
|
}
|
|
|
|
|
hstring Constants::ZoomItSnipEvent()
|
|
|
|
|
{
|
|
|
|
|
return CommonSharedConstants::ZOOMIT_SNIP_EVENT;
|
|
|
|
|
}
|
|
|
|
|
hstring Constants::ZoomItRecordEvent()
|
|
|
|
|
{
|
|
|
|
|
return CommonSharedConstants::ZOOMIT_RECORD_EVENT;
|
|
|
|
|
}
|
2024-08-08 15:26:43 +01:00
|
|
|
hstring Constants::ShowPowerOCRSharedEvent()
|
|
|
|
|
{
|
|
|
|
|
return CommonSharedConstants::SHOW_POWEROCR_SHARED_EVENT;
|
|
|
|
|
}
|
2024-10-24 22:04:32 +02:00
|
|
|
hstring Constants::TerminatePowerOCRSharedEvent()
|
|
|
|
|
{
|
|
|
|
|
return CommonSharedConstants::TERMINATE_POWEROCR_SHARED_EVENT;
|
|
|
|
|
}
|
2024-08-08 15:26:43 +01:00
|
|
|
hstring Constants::MouseJumpShowPreviewEvent()
|
|
|
|
|
{
|
|
|
|
|
return CommonSharedConstants::MOUSE_JUMP_SHOW_PREVIEW_EVENT;
|
|
|
|
|
}
|
2024-10-25 13:28:01 +01:00
|
|
|
hstring Constants::TerminateMouseJumpSharedEvent()
|
|
|
|
|
{
|
|
|
|
|
return CommonSharedConstants::TERMINATE_MOUSE_JUMP_SHARED_EVENT;
|
|
|
|
|
}
|
2024-08-08 15:26:43 +01:00
|
|
|
hstring Constants::AwakeExitEvent()
|
|
|
|
|
{
|
|
|
|
|
return CommonSharedConstants::AWAKE_EXIT_EVENT;
|
|
|
|
|
}
|
|
|
|
|
hstring Constants::ShowPeekEvent()
|
|
|
|
|
{
|
|
|
|
|
return CommonSharedConstants::SHOW_PEEK_SHARED_EVENT;
|
|
|
|
|
}
|
2024-10-24 22:04:32 +02:00
|
|
|
hstring Constants::TerminatePeekEvent()
|
|
|
|
|
{
|
|
|
|
|
return CommonSharedConstants::TERMINATE_PEEK_SHARED_EVENT;
|
|
|
|
|
}
|
2024-08-08 15:26:43 +01:00
|
|
|
hstring Constants::PowerAccentExitEvent()
|
|
|
|
|
{
|
|
|
|
|
return CommonSharedConstants::POWERACCENT_EXIT_EVENT;
|
|
|
|
|
}
|
|
|
|
|
hstring Constants::ShortcutGuideTriggerEvent()
|
|
|
|
|
{
|
|
|
|
|
return CommonSharedConstants::SHORTCUT_GUIDE_TRIGGER_EVENT;
|
|
|
|
|
}
|
|
|
|
|
hstring Constants::RegistryPreviewTriggerEvent()
|
|
|
|
|
{
|
|
|
|
|
return CommonSharedConstants::REGISTRY_PREVIEW_TRIGGER_EVENT;
|
|
|
|
|
}
|
|
|
|
|
hstring Constants::MeasureToolTriggerEvent()
|
|
|
|
|
{
|
|
|
|
|
return CommonSharedConstants::MEASURE_TOOL_TRIGGER_EVENT;
|
|
|
|
|
}
|
|
|
|
|
hstring Constants::GcodePreviewResizeEvent()
|
|
|
|
|
{
|
|
|
|
|
return CommonSharedConstants::GCODE_PREVIEW_RESIZE_EVENT;
|
|
|
|
|
}
|
2025-07-10 10:20:30 +01:00
|
|
|
hstring Constants::BgcodePreviewResizeEvent()
|
|
|
|
|
{
|
|
|
|
|
return CommonSharedConstants::BGCODE_PREVIEW_RESIZE_EVENT;
|
|
|
|
|
}
|
2024-08-08 15:26:43 +01:00
|
|
|
hstring Constants::QoiPreviewResizeEvent()
|
|
|
|
|
{
|
|
|
|
|
return CommonSharedConstants::QOI_PREVIEW_RESIZE_EVENT;
|
|
|
|
|
}
|
|
|
|
|
hstring Constants::DevFilesPreviewResizeEvent()
|
|
|
|
|
{
|
|
|
|
|
return CommonSharedConstants::DEV_FILES_PREVIEW_RESIZE_EVENT;
|
|
|
|
|
}
|
|
|
|
|
hstring Constants::MarkdownPreviewResizeEvent()
|
|
|
|
|
{
|
|
|
|
|
return CommonSharedConstants::MARKDOWN_PREVIEW_RESIZE_EVENT;
|
|
|
|
|
}
|
|
|
|
|
hstring Constants::PdfPreviewResizeEvent()
|
|
|
|
|
{
|
|
|
|
|
return CommonSharedConstants::PDF_PREVIEW_RESIZE_EVENT;
|
|
|
|
|
}
|
|
|
|
|
hstring Constants::SvgPreviewResizeEvent()
|
|
|
|
|
{
|
|
|
|
|
return CommonSharedConstants::SVG_PREVIEW_RESIZE_EVENT;
|
|
|
|
|
}
|
|
|
|
|
hstring Constants::ShowHostsSharedEvent()
|
|
|
|
|
{
|
|
|
|
|
return CommonSharedConstants::SHOW_HOSTS_EVENT;
|
|
|
|
|
}
|
|
|
|
|
hstring Constants::ShowHostsAdminSharedEvent()
|
|
|
|
|
{
|
|
|
|
|
return CommonSharedConstants::SHOW_HOSTS_ADMIN_EVENT;
|
|
|
|
|
}
|
2024-10-24 22:04:32 +02:00
|
|
|
hstring Constants::TerminateHostsSharedEvent()
|
|
|
|
|
{
|
|
|
|
|
return CommonSharedConstants::TERMINATE_HOSTS_EVENT;
|
|
|
|
|
}
|
2024-08-08 15:26:43 +01:00
|
|
|
hstring Constants::CropAndLockThumbnailEvent()
|
|
|
|
|
{
|
|
|
|
|
return CommonSharedConstants::CROP_AND_LOCK_THUMBNAIL_EVENT;
|
|
|
|
|
}
|
|
|
|
|
hstring Constants::CropAndLockReparentEvent()
|
|
|
|
|
{
|
|
|
|
|
return CommonSharedConstants::CROP_AND_LOCK_REPARENT_EVENT;
|
|
|
|
|
}
|
Add non-updating mode for Crop-And-Lock (#40720)
<!-- Enter a brief description/summary of your PR here. What does it
fix/what does it change/how was it tested (even manually, if necessary)?
-->
## Summary of the Pull Request
Adds a "screenshot" mode to Crop And Lock, which allows creating a
window showing a freezed snapshot of the original window.
<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist
- [x] **Closes:** #31799, #33071 (also requested in the already closed
duplicate issues #28633, #33812, #37337, )
- [ ] **Communication:** I've discussed this with core contributors
already. If the work hasn't been agreed, this work might be rejected
- [x] **Tests:** Added/updated and all pass (crop-and-lock utility
doesn't have any tests)
- [x] **Localization:** All end-user-facing strings can be localized
- [x] **Dev docs:** Added/updated
- [x] **New binaries:** Added on the required places
- [ ] [JSON for
signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json)
for new binaries
- [ ] [WXS for
installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs)
for new binaries and localization folder
- [ ] [YML for CI
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml)
for new test projects
- [ ] [YML for signed
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml)
- [x] **Documentation updated:**
https://github.com/MicrosoftDocs/windows-dev-docs/pull/5528
<!-- Provide a more detailed description of the PR, other things fixed,
or any additional comments/features here -->
## Detailed Description of the Pull Request / Additional comments
It was asked why this feature is needed at all, because it could be done
with snipping tool and just AoT that window as well. While this is true,
PowerToys goal always was to improve and speed up workflows. Instead of
capturing the screenshot, opening it, and then apply "Crop and Lock" or
"Always on Top" on the screenshots window, this PR aims to provide this
functionality in a single step.
Example use cases:
- _when I want to compare between two situations like previous output
result and current output result._ (#31799)
- _Allow cropping a section of a large code file (say top while working
at the bottom) as reference while working elsewhere in the file._
(#33071)
- _Can be useful for the work in the same document, like excel or word
where you are actively checking the data from the same document._
(#28633)
- _In lot's of older applications, if you need to get some information
or data from one dialog do another, but because of dialog modality it's
not possible to have both windows open at the same time._ (#33812)
- _nowadays quite a lot is happening inside the browser. Quite often, I
want to keep a small portion of the current website visible and switch
to e.g. the writing tool also running in a different tab in the same
browser window._ (#31799)
I've used win+ctrl+shift+s as the default activation shortcut, as it's
not yet used by other powertoys utilities, has similarity with the
normal win+shift+s shortcut hotkey and is consistent with the other Crop
and Lock shortcuts win+ctrl+shift+r (Reparent Mode) and win+ctrl+shift+t
(Thumbnail Mode).
<!-- Describe how you validated the behavior. Add automated tests
wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed
Compatibility tested manually with a large set of applications I have
installed on my computer. However, automated tests don't really make
sense as there is not much business logic which could be tested.
---------
Co-authored-by: Niels Laute <niels.laute@live.nl>
Co-authored-by: vanzue <vanzue@outlook.com>
2026-01-06 14:08:17 +01:00
|
|
|
hstring Constants::CropAndLockScreenshotEvent()
|
|
|
|
|
{
|
|
|
|
|
return CommonSharedConstants::CROP_AND_LOCK_SCREENSHOT_EVENT;
|
|
|
|
|
}
|
2024-08-08 15:26:43 +01:00
|
|
|
hstring Constants::ShowEnvironmentVariablesSharedEvent()
|
|
|
|
|
{
|
|
|
|
|
return CommonSharedConstants::SHOW_ENVIRONMENT_VARIABLES_EVENT;
|
|
|
|
|
}
|
|
|
|
|
hstring Constants::ShowEnvironmentVariablesAdminSharedEvent()
|
|
|
|
|
{
|
|
|
|
|
return CommonSharedConstants::SHOW_ENVIRONMENT_VARIABLES_ADMIN_EVENT;
|
|
|
|
|
}
|
[New Module] Workspaces (#34324)
* spell checker
* Adding OOBE Projects page
* changed the default hotkey
* module interface
* rename projects editor
* bug report tool
* installer
* gpo
* exit event constant
* extend search for projects by search over the containing apps' names
* [Projects] fix grammatical issue #43 (1 app - many apps)
* [Projects] Editor: Main page: fix layout if there are many apps, launch button not disappearing on the right side
* dsc
* github
* pipeline
* guid prefix
* [Projects] fixing general settings gpo handling in runner + minor changes
* arm build fix
* Do not allow saving project if name or applist is empty. Also minor UI changes
* version
* editor version
* spellcheck
* editor dll signing
* update projects names to filter them out
* shortcut saving fix
* [Projects] Editor: brining the highlighted app's icon into the foreground. + minor UI fixes
* spell checker
* spellcheck
* [Projects] re-implementing icon size calculation to have similar sized icons for every app.
* [projects] Adding info message for cases: there are no projects or no results for the search
* [Projects] Adding Edit button to the popup. + minor changes
* [Projects] Making popup having rounded corners
* changed "no projects" text color and position
* remove opening the first proj
* fix placing windows of the same app in the project
* [Projects] bringing back the breadcrumb on the editor page. Make it clickable.
* [Projects] optimizing click handlers
* [Projects] Removing not selected apps on save
* moved on thread executor to common
* moved display utils
* added convert rect
* unsigned monitor number
* set awareness
* app placement
* [Projects] Re-implementing preview drawing - one common image
* [Projects] fix boundary calculation, use DPI aware values
* fix launching with command line args
* Fix ARM64 CI build
* launch packaged apps using names when possible
* spell-check
* update packaged apps path
* projects editor single instance
* [Projects] Add Select all checkbox, Delete selected button
* Add Checkbox for per monitor selection
* modifying highlight in preview
* spell checker
* logs
* exclude help windows
https://github.com/JaneaSystems/PowerToys-DevProjects/issues/49
* Add intermediate step to project creation
* minor bugfix
* mutex fix
* modifying highlight for minimized apps
* Fixing bug: re-draw the preview on app deletion in the editor
* Adding helper class for getting the right bounds for screens
* spell checker
* spell checker
* Minor fixes in the capture dialog
* get dpi unaware screen bounds
* refactoring: added utils
* changed window filter
https://github.com/JaneaSystems/PowerToys-DevProjects/issues/2
* clean up
* refactoring
* projects common lib
* localizable default project prefix
* launcher resources
* clean up
* change snapshot project saving
https://github.com/JaneaSystems/PowerToys-DevProjects/issues/14
* changed project data
https://github.com/JaneaSystems/PowerToys-DevProjects/issues/14
* changed project creation save-cancel handles
https://github.com/JaneaSystems/PowerToys-DevProjects/issues/14
* spell-check
* Remove checkboxes, delete feature
* remove unused from the project
* get command line args in the snapshot
* minimized settings snap fix
* set window property after launching
* FZ: ignore projects launched windows
* Implementing major new features: remove button, position manipulation, arguments, admin, minimized, maximized
* modifying colors
* launcher project filters
* clean up
* Hide Admin checkbox
* hide WIP
* spell-check
* Revert "Hide Admin checkbox"
This reverts commit 3036df9d7fe48de6418b0ebeff6422d535cb25e2.
* get app elevated property
* Implementing Launch and Edit feature
* fixing: update of listed projects on the main page after hitting save in editor
* Fix for packaged app's icons
* fixing scroll speed issue
* change scroll speed to 15
* launch elevated apps
* minor fixes
* minor fix
* enhancing shortcut handling
* can-launch-elevated check
* projects module interface telemetry
* Implementing store of setting "order by".
* minor string correction
* moved projects data parsing
* telemetry
* add move apps checkbox
* notification about elevated apps
* restart unelevated
* move existing windows
* keep opened windows at the same positions
* handle powertoys settings
* use common theme
* fix corrupted data: project id and monitor id
* project launch on "launch and edit"
* clean up
* show screen numbers instead of monitor names
* launcher error messages
* fix default shortcut
* Adding launch button to projects settings, dashboard and flyout
* Adding new app which is launched when launching a project. It shows the status of the launch process
* spell checker
* Renaming Projects to App Layouts. Replacing only string values, not the variable names
* Re-ordering modules after Renaming Projects + spell checker
* setting window size according to the screen (making it bigger)
* commenting out feature "move apps if exist"
* spell checker
* Add ProjectsLauncherUI to signing
* opening apps in minimized state which are placed on a monitor, which is not found at the moment of launching
* consistent file name
* removed unused sln
* telemetry: create event
* WindowPosition comparison
* telemetry: edit event
* fix muted Launch as admin checkbox
* telemetry: delete event
* updated Edit telemetry event
* added invoke point to launcher args
* added utils
* parse invoke point
* replaced tuple with struct
* telemetry: launch event
* MonitorRect comparison
* resources
* rename: folders
* remove outdated
* rename: window property
* rename: files and folders
* rename: common data structures
* rename: telemetry namespace
* rename: workspaces data
* rename ProjectsLib -> WorkspacesLib
* rename: gpo
* rename: settings
* rename: launcher UI
* rename: other
* rename: pt run
* rename: fz
* rename: module interface
* rename: icon
* rename: snapshot tool
* rename: editor
* rename: common files
* rename: launcher
* rename: editor resources
* fix empty file crash
* rename: json
* rename: module interface
* fix custom actions build
* added launch editor event constant
* xaml formatting
* Add missing method defition to interop::Constants idl
Remove Any CPU config
* more .sln cleanup
* [Run][PowerToys] Fix Workspaces utility (#34336)
polished workspaces utility
* build fix - align CppWinRT version
* address PR comment: fix isdigit
* indentation
* address PR comment: rename function
* address PR comment: changed version for workspaces and revision
* added supported version definition
* addressPR comment: use BringToForeground
* address PR comments: updated projects
* address PR comment: uncomment gpo in settings
* address PR comment: rename oobe view
* update OOBE image with current module name
* moved AppUtils
* launching with AppUserModel.ID
* fixed module order in settings
* fix xaml formatting
* [Workspaces] Close launcher if there are failed launches. Plus adding new spinner gif
* fix topmost LauncherUI
* clean up
* UI closing
* BugReportTool - omit cmd arg data
* Delete icon on workspace removal
* Adding cancellation to launcher UI.
* reordered launching
* fix terminating UI
* Removing old shortcut on workspace renaming
* Sentence case labels
* get process path without waiting
* comment out unused
* remove unused argument
* logs
* New icon
* fix launch and edit for the new project
* fix launch and edit: save new project
* Update exe icons
---------
Co-authored-by: donlaci <laszlo@janeasystems.com>
Co-authored-by: Jaime Bernardo <jaime@janeasystems.com>
Co-authored-by: Stefan Markovic <stefan@janeasystems.com>
Co-authored-by: Davide Giacometti <davide.giacometti@outlook.it>
Co-authored-by: Niels Laute <niels.laute@live.nl>
2024-08-23 09:28:13 +02:00
|
|
|
hstring Constants::WorkspacesLaunchEditorEvent()
|
|
|
|
|
{
|
|
|
|
|
return CommonSharedConstants::WORKSPACES_LAUNCH_EDITOR_EVENT;
|
|
|
|
|
}
|
2024-08-30 21:29:31 +02:00
|
|
|
hstring Constants::WorkspacesHotkeyEvent()
|
|
|
|
|
{
|
|
|
|
|
return CommonSharedConstants::WORKSPACES_HOTKEY_EVENT;
|
|
|
|
|
}
|
2024-10-24 22:04:32 +02:00
|
|
|
hstring Constants::PowerToysRunnerTerminateSettingsEvent()
|
|
|
|
|
{
|
|
|
|
|
return CommonSharedConstants::TERMINATE_SETTINGS_SHARED_EVENT;
|
|
|
|
|
}
|
Add the Command Palette module (#37908)
Windows Command Palette ("CmdPal") is the next iteration of PowerToys Run. With extensibility at its core, the Command Palette is your one-stop launcher to start _anything_.
By default, CmdPal is bound to <kbd>Win+Alt+Space</kbd>.


----
This brings the current preview version of CmdPal into the upstream PowerToys repo. There are still lots of bugs to work out, but it's reached the state we're ready to start sharing it with the world. From here, we can further collaborate with the community on the features that are important, and ensuring that we've got a most robust API to enable developers to build whatever extensions they want.
Most of the built-in PT Run modules have already been ported to CmdPal's extension API. Those include:
* Installed apps
* Shell commands
* File search (powered by the indexer)
* Windows Registry search
* Web search
* Windows Terminal Profiles
* Windows Services
* Windows settings
There are a couple new extensions built-in
* You can now search for packages on `winget` and install them right from the palette. This also powers searching for extensions for the palette
* The calculator has an entirely new implementation. This is currently less feature complete than the original PT Run one - we're looking forward to updating it to be more complete for future ingestion in Windows
* "Bookmarks" allow you to save shortcuts to files, folders, and webpages as top-level commands in the palette.
We've got a bunch of other samples too, in this repo and elsewhere
### PowerToys specific notes
CmdPal will eventually graduate out of PowerToys to live as its own application, which is why it's implemented just a little differently than most other modules. Enabling CmdPal will install its `msix` package.
The CI was minorly changed to support CmdPal version numbers independent of PowerToys itself. It doesn't make sense for us to start CmdPal at v0.90, and in the future, we want to be able to rev CmdPal independently of PT itself.
Closes #3200, closes #3600, closes #7770, closes #34273, closes #36471, closes #20976, closes #14495
-----
TODOs et al
**Blocking:**
- [ ] Images and descriptions in Settings and OOBE need to be properly defined, as mentioned before
- [ ] Niels is on it
- [x] Doesn't start properly from PowerToys unless the fix PR is merged.
- https://github.com/zadjii-msft/PowerToys/pull/556 merged
- [x] I seem to lose focus a lot when I press on some limits, like between the search bar and the results.
- This is https://github.com/zadjii-msft/PowerToys/issues/427
- [x] Turned off an extension like Calculator and it was still working.
- Need to get rid of that toggle, it doesn't do anything currently
- [x] `ListViewModel.<FetchItems>` crash
- Pretty confident that was fixed in https://github.com/zadjii-msft/PowerToys/pull/553
**Not blocking / improvements:**
- Show the shortcut through settings, as mentioned before, or create a button that would open CmdPalette settings.
- When PowerToys starts, CmdPalette is always shown if enabled. That's weird when just starting PowerToys/ logging in to the computer with PowerToys auto-start activated. I think this should at least be a setting.
- Needing to double press a result for it to do the default action seems quirky. If one is already selected, I think just pressing should be enough for it to do the action.
- This is currently a setting, though we're thinking of changing the setting even more: https://github.com/zadjii-msft/PowerToys/issues/392
- There's no URI extension. Was surprised when typing a URL that it only proposed a web search.
- [x] There's no System commands extension. Was expecting to be able to quickly restart the computer by typing restart but it wasn't there.
- This is in PR https://github.com/zadjii-msft/PowerToys/pull/452
---------
Co-authored-by: joadoumie <98557455+joadoumie@users.noreply.github.com>
Co-authored-by: Jordi Adoumie <jordiadoumie@microsoft.com>
Co-authored-by: Mike Griese <zadjii@gmail.com>
Co-authored-by: Niels Laute <niels.laute@live.nl>
Co-authored-by: Michael Hawker <24302614+michael-hawker@users.noreply.github.com>
Co-authored-by: Stefan Markovic <57057282+stefansjfw@users.noreply.github.com>
Co-authored-by: Seraphima <zykovas91@gmail.com>
Co-authored-by: Jaime Bernardo <jaime@janeasystems.com>
Co-authored-by: Kristen Schau <47155823+krschau@users.noreply.github.com>
Co-authored-by: Eric Johnson <ericjohnson327@gmail.com>
Co-authored-by: Ethan Fang <ethanfang@microsoft.com>
Co-authored-by: Yu Leng (from Dev Box) <yuleng@microsoft.com>
Co-authored-by: Clint Rutkas <clint@rutkas.com>
2025-03-19 03:39:57 -05:00
|
|
|
hstring Constants::ShowCmdPalEvent()
|
|
|
|
|
{
|
|
|
|
|
return CommonSharedConstants::CMDPAL_SHOW_EVENT;
|
|
|
|
|
}
|
2024-08-08 15:26:43 +01:00
|
|
|
}
|