切换隐藏显示热键
Have you ever wanted to be able to just hit a hotkey that tells Windows to switch from High Performance down to Power Saver? Sure, you can use the tray icon, but since we like to customize things there’s always another way.
您是否曾经想过过要一个热键告诉Windows从“高性能”切换到“节能器”? 当然,您可以使用任务栏图标,但是由于我们喜欢自定义内容,因此总有另一种方法。
Thanks to our great forum member ScottW for coming up with this idea. He’s always an excellent source of geeky wisdom!
感谢我们伟大的论坛成员ScottW提出了这个想法。 他一直是极好的智慧来源!
Using the powercfg Command
使用powercfg命令
Windows 7 and Vista come with the powercfg command that you can use from the command prompt, and we’ll have to use this tool to figure out the GUID—the internal ID that Windows uses—for the plan itself.
Windows 7和Vista附带了powercfg命令,您可以在命令提示符下使用它,我们将不得不使用此工具来为计划本身找出GUID(Windows使用的内部ID)。
To find the power scheme GUID, simply open up a command prompt and type in the following:
要查找电源使用方案GUID,只需打开命令提示符并键入以下内容:
powercfg –list
powercfg –列表
This should leave you with a list of the power plans you have assigned on your system, and the appropriate GUID for each. If you’ve read our handy guide to copying to the clipboard from the command prompt, it’s an easy task to copy the GUID for later.
这将为您提供在系统上分配的电源计划的列表,以及每个电源计划的相应GUID。 如果您已从命令提示符下阅读了方便的复制到剪贴板的指南,则将GUID复制以备后用是一件容易的事。
As you can see in the screenshot, you can use the –setactive argument to actually switch between the plans from the command line, which is how we’ll create the shortcut.
如屏幕截图所示,您可以使用–setactive参数从命令行实际在计划之间切换,这就是我们创建快捷方式的方式。
Creating the Shortcut
创建快捷方式
Next you’ll need to create a shortcut by right-clicking on the desktop and choosing New \ Shortcut.
接下来,您需要通过右键单击桌面并选择“新建\快捷方式”来创建快捷方式。
You’ll want to use the following in the application shortcut, replacing the GUID with your own:
您需要在应用程序快捷方式中使用以下内容,用自己的GUID代替:
powercfg -setactive <SCHEME_GUID>
powercfg -setactive <SCHEME_GUID>
Note how it looks in the screenshot… yours should look the same.
注意屏幕截图中的外观……您的外观应该相同。
Update: Reader Nick points out that you can use /setactive “Name of Profile” instead of the GUID as an alternate option.
更新:读者尼克指出,您可以使用/ setactive“配置文件名称”代替GUID作为替代选项。
You can repeat the same thing to create another shortcut for one of the other power plans.
您可以重复同一件事来为其他电源计划之一创建另一个快捷方式。
Customize the Shortcut
自定义快捷方式
Now that we have some fancy shortcuts, you can make them look better by tweaking the icon, and then assign a shortcut key. There are a number of really great icons in the following Windows DLL file:
现在我们有了一些精美的快捷键,您可以通过调整图标,然后分配一个快捷键,使它们看起来更好。 在以下Windows DLL文件中,有许多非常棒的图标:
C:\Windows\System32\powercpl.dll
C:\ Windows \ System32 \ powercpl.dll
And you can assign a shortcut key to switch power schemes on the fly.
您可以分配快捷键来快速切换电源方案。
Once you’re all done, you should have two new icons, ready to use!
完成所有操作后,您应该有两个可以使用的新图标!
If you wanted to get really geeky, you can use the start menu search box or Launchy to switch the schemes from the keyboard.
如果你想获得真正令人讨厌的,您可以使用开始菜单的搜索框或Launchy的方案从键盘切换。
Alternate: Use the Mobility Center
备用:使用移动中心
As reader borja points out in the comments, you can use the Win+X shortcut key combination to bring up the Mobility Center and quickly switch the power management mode—although it’s not going to really be any quicker than using the tray icon, but still a useful tool!
正如读者borja在评论中指出的那样,您可以使用Win + X快捷键组合来调出Mobility Center并快速切换电源管理模式-尽管这实际上不会比使用任务栏图标更快,但是仍然一个有用的工具!
翻译自: https://www.howtogeek.com/howto/windows-vista/create-a-shortcut-or-hotkey-to-switch-power-plans/
切换隐藏显示热键