-
Notifications
You must be signed in to change notification settings - Fork 6.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Auto-suspend process when it doesn't have focus (while system is on battery) #142
Comments
That's going to be cool, it's gonna double or even triple your battery life. |
These are all great suggestions for a "Power" Power Toy. :) |
* Add handling of portable mode when updating Additionally: 1. Changed getting version from internally rather than from RELEASES file 2. Added PortableDataPath as a constant so can be used to determine if portable mode is used * Fix incorrectly wired auto update event handler * Fix Sys plugin missing Shutdown command icon * Add check update command to Sys plugin * Add message if current Wox version is latest * Add default silent when auto checking updates in background Silent when current is still the latest version * Move UserData folder to new version location * Changes per review 1. Move IsPortableMode to Constant 2. Merge if statement * Per comment- change variables to be more descriptive UpdateInfo and UpdateManager renamed * Per comment- Add exception handling and message if failed.
I've actually got a proof of concept application I was developing before I found this suggestion existed. From tests, if a process is suspended the window doesn't become active, even through Alt-Tab, taskbar, etc. So you'd have to completely work around this somehow. Maybe detecting when the mouse button is clicked on a window? It's no easy fix. Additionally, there's the concern for custom hardware. Stuff like Corsair hotkeys, and even function buttons on Microsoft's own Multimedia 4000 keyboard stop working. I had to create exclusions for these. Finally, it'd probably be best to create a blacklist instead of a whitelist if implemented as a powertoy, not just for the previous concern, but in general. Without knowing what the user is going to be using it with and for it's incredibly user-unfriendly to just suspend a process. #146 is a good starting point however. Regardless, it is a great idea for a powertoy that MS devs can probably do better than myself. Here's the results from my proof of concept on an Intel Atom x5-Z8550: |
Start addition of features recommended in github.com/microsoft/PowerToys/issues/142
On discussing this, the reason we cannot suspend arbitrary Win32 apps is because they are not isolated from one another (all full trust); they share named objects, can access same files without broker, free window messaging, etc. One example is if you suspend an app that is holding a file open. With UWP, we can find the app that has it and shut it down (it has saved state). With Win32, if you caught the app at the wrong time (opened the file and hasn’t closed yet), the foreground app will fail to get access to the file. if you suspend something with sysinternals, you're putting your system at risk for instability |
I'd be interested, even if it does put my system at risk. |
Originally in #142 and #144, but github didn't automatically change the base branch 😨 ----- As discussed in #77. Biggest change is that `IDynamicListPage` doesn't have `GetItems(String query)` anymore. Instead, the host will call the `SearchText` setter, and the list can raise `ItemsChanged` to let the host know to call `GetItems` again See src/modules/cmdpal/Exts/EverythingExtension/Pages/EverythingExtensionPage.cs for an example of how to update dynamic extensions. Closes #131 Closes #77 ---- * I put the sample pages into a single top-level command, so deploying that extension didn't add 5 top-level commands to your palette * I tightened up some of the phrasing for the samples, and the builtins, to be less repetitive * I added a few icons * I made the markdown sample longer (and work more reliably) * and also thank you Hawker for auto-format on save, you the man
As discussed in #121. Adds a new `IListItem.TextToSuggest` property. If an extension populates that, and the user hits right-arrow when the item is selected, we'll set the `SearchText` to that text. I didn't give it a UI treatment, because 1. I'm not good at XAML 2. As noted in zadjii-msft#121 (comment), there's complicated edge cases here. You have to track what's actually been typed, and then also have a ghost suggestion for the very first item (before the user types/up/downs at all). I didn't think it was valuable to implement that right now before we have A Real App. * targets #144 * which targets #142 * which targets #141 and those guys are all merged as of #150
Many apps consume a lot of power while "idle" in the background (Chrome, Visual Studio to name a few), thus draining the battery quickly. When on battery, I often use pssuspend (sysinternals tool) to suspend a process, but then I'm forced to suspend/resume apps that I want to temporarily use.
Request is for a PowerToys option to automatically suspend a process when it doesn't have focus (or after a configurable timeout), then resume that app when focus returns (e.g. via mouse click or alt-tab). This option would be in effect when the system is on battery power, not plugged in. May also need a whitelist of apps that can be suspended, e.g. you may not want some apps suspended ever (Slack, etc.). Thanks!
The text was updated successfully, but these errors were encountered: