microsoft / PowerToys

Windows system utilities to maximize productivity
MIT License
110.75k stars 6.52k forks source link

Change Awake icon in the tray depending on the current state #11996

Closed fmiqbal closed 2 months ago

fmiqbal commented 3 years ago

Description of the new feature / enhancement

Scenario when this would be used?

I need a quick glance whether Awake is active or not

Supporting information

No response

apsolut commented 3 years ago

Before anything it should be clear its from PowerToys (info, about... anything) πŸ’₯

https://github.com/microsoft/PowerToys/issues/11962 https://github.com/microsoft/PowerToys/issues/11964

tomcollis commented 3 years ago

I agree, some way to determine what Awake is currently doing, would be great. Maybe 3 icons:

jankolkmeier commented 3 years ago

On a side note, I would appreciate if it this feature was opt-in.

I noticed this new icon in my tray today and had no idea where it came from. I only found out through the "select which icons appear on the taskbar" system dialogue that it was related to Power Toys (which I had updated earlier today).

If it is meant to stay opt-out, at the very least add a title item to the right-click-dialogue that identifies it as a PowerToys feature, so users know where to disable it (and dont have get paranoid about an unknown new tray icon process ;) ).

dedavis6797 commented 3 years ago

Thank you for the feedback! We have a hot fix coming to add a "PowerToys Awake" label to the taskbar sys-tray icon.

For the visual indicators of Awake's mode, I think it's a great idea but will likely have to wait until after our general stability push for us to begin prioritizing investigations/development for it.

r2evans commented 3 years ago

I agree, some way to determine what Awake is currently doing, would be great. Maybe 3 icons:

* Keep Awake Indefinitely (or Prevent Sleep) - Add Steam to Cup?

* Keep Awake Temporarily - Add Clock to Cup (not moving, just a static round clock icon)

* Disabled - Remove All Colour from Cup and Just have the outline to identify the shape.

I suggest also considering an indicator for "Keep screen on", not just awake or not.

My recommendations (I'm showing on a dark background, colors might need adjusting for broader use):

image

From left to right:

I give full artistic license to the PowerToys developers for these designs.

LRitzdorf commented 3 years ago

Personally, I like the idea of a grayscale icon for "passive mode" (turned off), and the blue color, plus sub-icons, when it's active in either indefinite or timed mode. Great work with the steam and sub-icons, by the way!

dend commented 3 years ago

Love the idea - thank you for the detailed input. Will put this on the backlog to implement - will also need @niels9001's help with the icons. Next step here will be creating a concrete specification. I will work on that and make sure that it's covered within this work item.

technobulb commented 3 years ago

How about not having it appear as an extra icon at all, unless it is active? It can be activated from the powertoys main menu or notification context menu..

as-it commented 3 years ago

I would like to have the option to define "quick actions" for different mouse/key interactions on try icon:

In Awake settings would be new pane with list of predefined Quick Actions and Add button (to be able to Add more).

Example of Predefined Quick Actions list:

Action: [combobox] :

Activation/Deactivation [combobox] :

When any defined Activation if made on try icon:

htcfreek commented 3 years ago

@dend

mchowdhury commented 3 years ago

I created a tool similar to awake a while back. For the tray UI I used a button that toggles different time intervals and shows the time remaining all at once. The UI was inspired by the Caffeine quick tile in LineageOS Android ROM.

The UI looks like this:

caffeinetray2

This type of design would solve this issue along with:

And could be integrated into: #6751

ddimick commented 2 years ago

Currently, Caffeine delivers the functionality I need better than Awake (visual icon status and double-click to activate/deactivate). Would love to see Awake incorporate these features.

Alternatively, I'm wondering if it's possible to script Awake with AutoHotKey. Has anyone tried that?

r2evans commented 2 years ago

(This is a little off-topic here, but I'll answer it. If the mods what to remove it, my apologies for the noise :-)

I do have an AHK script for what I want ... it may be more than is necessary, and outside the scope of Awake (since I also want to force stronger power modes at times), but it does what I want, which is: set the "Active" power configuration and disable the screensaver; or set the other (non-Active) power configuration and enable the screensaver. This works for me in Win10Pro, I have not tested on any other computer (yet).

The TrayTips are a little verbose, that's mostly because I'm not a guru at AHK, and I found many times what I thought was being set was not. I'll likely trim down the verbosity a little at some point.

The "change" traytip is rather verbose, mostly because I'm not a guru at AHK and I needed it during dev/debugging:

Power: (Active) -> (Balanced)
        ^^^^^^      ^^^^^^^^
           \            `--- 2. the new power-configuration state
            `--- 1. the previous power-configuration state
SSaver: disabled -> enable/enabled
        ^^^^^^^^    ^^^^^^ ^^^^^^^
            \           \      `--- 3. ssaver after I think I changed it
             \           `--- 2. what we will be commanding it to
              `--- 1. what it was before we tried to set it
AHK script for power-configuration and screensaver toggling ``` DllCall("AllocConsole") WinHide % "ahk_id " DllCall("GetConsoleWindow", "ptr") StayAwake(ByRef Action := "status") { ; http://www.jasinskionline.com/windowsapi/ref/s/systemparametersinfo.html sh := ComObjCreate("WScript.shell") out := sh.Exec("powercfg /list").StdOut.ReadAll() actGUID := "unkg" actPLAN := "unkp" othGUID := "unkg" othPLAN := "unkp" isACTIVE := 0 for each, line in StrSplit(out, "`n", "`r") { if (!InStr(line, "GUID")) { continue } if (InStr(line, "active")) { isActive := (RegexMatch(line, "\* *$") <> 0) ; 1 means we are in "(Active)" actGUID := RegExReplace(line, "i).*GUID:\s*([^ ]+)\s+.*", "$1") actPLAN := RegexReplace(line, "i).*GUID:\s*[^ ]+\s+([^\s].*?)[\s*]*$", "$1") } else { othGUID := RegExReplace(line, "i).*GUID:\s*([^ ]+)\s+.*", "$1") othPLAN := RegexReplace(line, "i).*GUID:\s*[^ ]+\s+([^\s].*?)[\s*]*$", "$1") } } if (actPLAN = "unkp" or othPLAN = "unkp") { TrayTip Power Plan Error, Unable to find both 'Active' and at least one other power plan, , 0x3 } if (Action = "toggle") { Action := isActive = 0 ? "active" : "balance" } curPLAN := isActive ? actPLAN : othPLAN if (Action = "active") { newGUID := actGUID newPLAN := actPLAN } else { newGUID := othGUID newPLAN := othPLAN } ;; what WAS the state before we do anything DllCall("SystemParametersInfo", Int,16, UInt,NULL, "UInt *",SS_oldstate, Int,0) SS_oldstate := SS_oldstate = 0 ? "disabled" : "enabled" ;; what we INTEND to set it to (if not "status") SS_newstate := Action = "active" ? 0 : 1 if (Action = "status") { TrayTip Current State, Power: %curPLAN%`nSSaver: %SS_oldstate%, , 0x10 } else { DllCall("SystemParametersInfo", Int,17 , Int,SS_newstate , UInt,NULL , Int,2) DllCall("SystemParametersInfo", Int,16, UInt,NULL, "UInt *",SS_curstate, Int,0) SS_newstate := SS_newstate = 0 ? "disable" : "enable" SS_curstate := SS_curstate = 0 ? "disabled" : "enabled" S = powercfg /setactive %newGUID% ign := sh.Exec(S).StdErr.ReadAll() TrayTip Change State, Power: %curPLAN% -> %newPLAN%`nSSaver: %SS_oldstate% -> %SS_newstate%/%SS_curstate%, , 0x10 } } #\:: StayAwake("toggle") #!\:: StayAwake("status") #^\:: StayAwake("active") #^+\:: StayAwake("balance") ```
jasontenpenny commented 2 years ago

differing icons would be awesome. This is common in these types of apps. I use both Mac and Windows, and have been using Amphetamine on the Mac side for a long time. The ability to see at a glance if it's on or not is helpful. It also has the ability to send periodic reminder notifications that it's still on. That would be useful as well, at least when you have it on the indefinite setting.

Jeffrey04 commented 2 years ago
* Ability to toggle using double click

personally prefer a single tap as double tapping through the tablet interface is not a pleasant experience

dend commented 2 years ago

@niels9001 I'd love your professional help with the icons for this request. Could you please help create the SVG, PNG, and ICO files for each of the states?

lalomartins commented 2 years ago
* Ability to toggle using double click

personally prefer a single tap as double tapping through the tablet interface is not a pleasant experience

I also think single click/tap makes more sense, there's no obvious other function for single click in this icon.

owainharris commented 2 years ago

Agree with this enhancement request.

A different color at least would make it so much easier to see what state you are currently in.

Caffeine on macOS (and a few other similar power control apps) either the color changes, or the icon changes depending whether it is set to keep awake or not.

NordVPN's icon is grey if not connected to a VPN, and turns blue if you are connected to a VPN. Functionality just like this would be helpful to Awake in Power Toys.

dend commented 2 years ago

@niels9001 just a quick follow-up - I am preparing to implement this feature, and was wondering if there is a way for us to get the updates assets πŸ˜€

technobulb commented 2 years ago

Its always interesting how sometimes seemingly simple changes can take a so long, but whole new powertoys can be added in that same time... Is there something specific that is holding this up? Definitely looks like one of the most requested features, and for a good reason.

Jay-o-Way commented 2 years ago

@technobulb I understand what you mean. I assume it won't surprise you that it's a complicated matter. The amount of open issues is absolutley enormous; same goes for all the ideas for improving existing modules. The number of people that can actually (on a "reliable basis") contribute to the software however, is not that much. Also, "new" PowerToys modules very often have a history outside of this repository: they have been built in a slower pase in a less populair environment.

JRHB314 commented 2 years ago

The tooltip timer would be very nice, right now it's hard to know how much time is remaining.

dend commented 1 year ago

@niels9001 wanted to revisit this thread - I am implementing this feature and will be using placeholder art but would love to have higher-fidelity icons for the state. Is this something you could help with?

niels9001 commented 1 year ago

@niels9001 wanted to revisit this thread - I am implementing this feature and will be using placeholder art but would love to have higher-fidelity icons for the state. Is this something you could help with?

Yeah, happy to help!

Looking at the different statusses that we want to support, I am doubting a bit if we can create an icon set that is still glanceable.

What would be the most important information we want to communicate?

mchowdhury commented 1 year ago

@niels9001 I might be able to help as well.

In my opinion the logic and statuses should be similar to the ones that I made a concept of a while back with the timer and status integrated into one: https://github.com/microsoft/PowerToys/issues/11996#issuecomment-922352064

This should be integrated into https://github.com/microsoft/PowerToys/pull/22408

niels9001 commented 1 year ago

@niels9001 I might be able to help as well.

In my opinion the logic and statuses should be similar to the ones that I made a concept of a while back with the timer and status integrated into one: https://github.com/microsoft/PowerToys/issues/11996#issuecomment-922352064

This should be integrated into https://github.com/microsoft/PowerToys/pull/22408

That'd be cool! I agree, #22408 could take this further and give a noce status overview while having some quick settings!

BrBill commented 1 year ago

One more vote for an icon difference when Awake is active. To show the difference, maybe active = heat lines coming up from the cup.

dend commented 1 year ago

There are two separate issues at hand here, though @niels9001. One is the #22408 experience, and the other one is dedicated entirely and exclusively to Awake, where the tray icon needs to reflect the state of the application.

bilogic commented 1 year ago

@niels9001 I'd love your professional help with the icons for this request. Could you please help create the SVG, PNG, and ICO files for each of the states?

  • Disabled but running
  • Timed keep awake with screen on
  • Timed keep awake without keeping the screen on
  • Indefinite keep awake with screen on
  • Indefinite keep awake without keeping the screen on

@dend what are the dimensions you need?

dend commented 1 year ago

@bilogic from 16x16 to 256x256, basically.

dend commented 1 year ago

@niels9001 @bilogic just checking in - any chance we can get some icon versions so that I can include them in the app for the next release? 😊

TheJoeFin commented 10 months ago

@niels9001 is this on your to-do list? Any ETA?

niels9001 commented 10 months ago

@dend @thejoefin @crutkas

Long, long, loooong overdue! This is what I have so far:

image

in situ (100%):

image

technobulb commented 10 months ago

Nice work. I propose changing the arrow in the "indefinite" mode to an Infiniti loop ♾️. I feel like it gets the point across clearer than the circular arrow, which may indicate restart....

TheJoeFin commented 7 months ago

@niels9001 any update on this?

niels9001 commented 7 months ago

@niels9001 any update on this?

not from my side.. I can deliver the correct icons if someone is implementing this feature!

TheJoeFin commented 7 months ago

@niels9001 I believe @dend is doing the implementation

CennoxX commented 6 months ago

@niels9001 It might be better if the sub-icons were to the left of the cup icon, as the current version makes it difficult to identify that the main icon is a cup: grafik

dend commented 6 months ago

@niels9001 can you please add the icons somewhere? 😊 I am working on implementing this feature (will be tracked in #32378)

We also need one more icon for the expirable state (might be a small calendar overlay?)

niels9001 commented 6 months ago

@niels9001 can you please add the icons somewhere? 😊 I am working on implementing this feature (will be tracked in #32378)

We also need one more icon for the expirable state (might be a small calendar overlay?)

What format do you need? .ico?

dend commented 6 months ago

@niels9001 can you please add the icons somewhere? 😊 I am working on implementing this feature (will be tracked in #32378) We also need one more icon for the expirable state (might be a small calendar overlay?)

What format do you need? .ico?

You can send PNGs and I can produce ICOs.

dend commented 3 months ago

@niels9001 nudge on this little item πŸ˜€

dend commented 3 months ago

We probably need two more icons for:

cc: @niels9001

niels9001 commented 3 months ago

@dend Here you go:

AwakeIcons.zip

technobulb commented 3 months ago

@dend Here you go:

AwakeIcons.zip

Nice. maybe you can take into account what was mentioned by @CennoxX

@niels9001 It might be better if the sub-icons were to the left of the cup icon, as the current version makes it difficult to identify that the main icon is a cup: !

niels9001 commented 3 months ago

@dend Here you go: AwakeIcons.zip

Nice. maybe you can take into account what was mentioned by @CennoxX

@niels9001 It might be better if the sub-icons were to the left of the cup icon, as the current version makes it difficult to identify that the main icon is a cup: !

Yeah, we've looked at that. Two issues though:

dend commented 3 months ago

Thank you @niels9001 for the icons! I am working on including them in the application.

@technobulb - confirming that we've decided that right-side state is better and consistent with the rest of the Windows tray icons.

mchowdhury commented 3 months ago

@dend Here you go: AwakeIcons.zip

Nice. maybe you can take into account what was mentioned by @CennoxX

@niels9001 It might be better if the sub-icons were to the left of the cup icon, as the current version makes it difficult to identify that the main icon is a cup: !

Yeah, we've looked at that. Two issues though:

  • All indicators for most apps are on the right, and it helps with the visual balance of the icon.
  • Putting it on the left shows the cup handle, but that acts additional visual complexity on a very small icon.

Nice work! @niels9001 Maybe the cup be flipped so that the handle is on the left side and icons are on the right? This might fix the issue.

technobulb commented 2 months ago

Thanks for this @dend! This fix is really a game-changer for me. It makes the whole awake utility feel so much more polished! (Not to mention the usability aspect)