Skip to content
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

Command Line Accessible PowerToys Settings #4649

Open
SirWobbyTheFirst opened this issue Jul 1, 2020 · 25 comments
Open

Command Line Accessible PowerToys Settings #4649

SirWobbyTheFirst opened this issue Jul 1, 2020 · 25 comments
Labels
Idea-Enhancement New feature or request on an existing product Product-Settings The standalone PowerToys Settings application

Comments

@SirWobbyTheFirst
Copy link

Summary of the new feature/enhancement

Currently, PowerToys Settings can only be accessed by right-clicking the icon in the notification tray and choosing Settings. This creates a context switch for users who predominantly use the keyboard as they are required to reach for the mouse. I'd like to see a command-line option to access the PowerToys settings to accommodate these types of users. It also opens the option of using PowerToys without the need to have File Explorer running.

Proposed technical implementation details (optional)

The primary option of fulfilling this request would be to make a simple executable available that invokes the PowerToys Settings applet but an alternative option may be to reuse the relaunch functionality of PowerToys to display the settings applet instead of currently displaying an error that an existing instance is already running.

@ghost ghost added the Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams label Jul 1, 2020
@crutkas
Copy link
Member

crutkas commented Jul 2, 2020

what settings are you in constant need to toggle?

@crutkas crutkas added Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something Product-Settings The standalone PowerToys Settings application labels Jul 2, 2020
@SirWobbyTheFirst
Copy link
Author

Well I personally make heavy use of Fancy Zones so being able to toggle the different settings is useful, I'm sure others may make heavy use of the Keyboard Manager tweak or Shortcut Manager tweak. But this is a "nice to have" feature request, it would be nice to see it implemented because there are still people who use alternative shells in Windows, some of these may not have access to the notification area.

Me personally, I spend a lot of time with PowerShell open and choose to use that instead of Explorer as my main shell. Again it's a nice to have and adds more use to the relaunch functionality than just an error message.

@ghost ghost removed the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Jul 2, 2020
@crutkas
Copy link
Member

crutkas commented Jul 2, 2020

what settings are you constantly toggling however. To me, that is the interesting questions.

For KBM, i'm hearing profiles
For FancyZones, maybe quick toggle layouts? (hot swapping layouts is #1035)

@crutkas crutkas added Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something and removed Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams labels Jul 2, 2020
@SirWobbyTheFirst
Copy link
Author

Well, why not both? Hot swapping layouts as well as a way to launch the Settings app from the command-line?

@ghost ghost added Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Jul 3, 2020
@crutkas crutkas added Idea-Enhancement New feature or request on an existing product and removed Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams labels Jul 28, 2020
@crutkas
Copy link
Member

crutkas commented Jul 28, 2020

fyi, you can just click on the icon in systray as well :)

@crutkas crutkas added this to the Suggested Enhancements milestone Jul 28, 2020
@SirWobbyTheFirst
Copy link
Author

fyi, you can just click on the icon in systray as well :)

Is there a way to activate the icon from PowerShell?

@crutkas
Copy link
Member

crutkas commented Jul 31, 2020

no

@crutkas
Copy link
Member

crutkas commented Jul 31, 2020

if you feel this is a must have feature, we're open source, lets chat about implementation but as of now, it is not something we're planning to implement

@andre-mr
Copy link

there are some games/apps i can't change keys, so i activate powertoys keyboard manager before opening and leave powertoys window open (to not forget to disble later) then after closing the software i go there and disable.

would be nice to have some command line options so i could create a task to toggle when game starts and ends (or at least create a shortcut and keyboard keys to toggle).

@vegar
Copy link

vegar commented Oct 19, 2021

Would love some way of setting FancyZone profile 'programmaticly'. Either through some api, some cli or whatever. This would make it possible to make a stream deck plugin to quick switch between named profiles and have the windows reorganize. Nice for streaming where you might want to quickly switch between window layouts.

@sredna
Copy link
Contributor

sredna commented Oct 19, 2021

as they are required to reach for the mouse

Win+B sets focus to the tray so you can navigate it with the keyboard

@crutkas
Copy link
Member

crutkas commented Oct 20, 2021

@vegar already possible with a quick keystroke. https://docs.microsoft.com/en-us/windows/powertoys/fancyzones#quickly-changing-between-layouts

@vegar
Copy link

vegar commented Oct 20, 2021

yea. Found another issue summing up dozen of similar request, including reference to the release note enabling the shorcut. That's good.
Still - I would prefer a more 'explicit' way. Being able to use the command line to tell what named profile to use open up a whole new box of automations. Like auto-setting a given layout when a specific application launches.

@YSCohen
Copy link

YSCohen commented Jan 28, 2022

basic commands like powertoys.exe --version would be nice, too

@TheBrenny
Copy link

Not to mention powertoys.exe --restore-settings "settings.json". Makes for building a new PC much smoother because I can leave it unattended.

@mibryy
Copy link

mibryy commented Mar 29, 2023

Looking for a way to do this myself, I noticed that there is a backup/restore settings option under general. This restores not only things like saved keybinds but states of whether or not a setting (like keyboard manager) was enabled at the time of the backup.

Would there be a straightforward way to invoke named backups from the commandline? Might try to look at it myself but I've never really delved into anything open source before :)

My specific use case is that I'm a predominantly Mac user, so I have my keybinds on my work computer (a windows machine) all set up to be familiar to the mac equivalents (swapped control/alt/windows around). However I work hybrid remote/in office, so about 2-3 times a week I need to enable/disable my remaps and other settings when I'm connecting remotely through Parsec.

@hubertnguyen
Copy link

Would be nice for automated backup and restores

@artistro08
Copy link

Would also be nice to enable and disable awake without the command window popping up everytime

@welpdx
Copy link

welpdx commented Aug 9, 2023

Not to mention powertoys.exe --restore-settings "settings.json". Makes for building a new PC much smoother because I can leave it unattended.

+1 for this

@MarcoAntolini
Copy link

there are some games/apps i can't change keys, so i activate powertoys keyboard manager before opening and leave powertoys window open (to not forget to disble later) then after closing the software i go there and disable.

would be nice to have some command line options so i could create a task to toggle when game starts and ends (or at least create a shortcut and keyboard keys to toggle).

here for the same reason. it would be cool to be able to easily toogle between profiles, or just being able to switch on/off keyboard mapping with a single command without having to open power toys settings every time

@SharpRT
Copy link

SharpRT commented Oct 6, 2023

I would like a way to reset mouse without borders when it goes wrong (which is regularly), unfortunately the 'reconnect' option doesn't fix the issues that disabling and re-enabling does.

I figured if there was a command line interface I could set up a shortcut to run a script to do the reset.

@AdreKiseque
Copy link

I was hoping to write a script that would install and configure PowerToys with settings like which tools were enabled and their configurations. The lack of CLI options does make this inconvenient, and they're definitely something I think would make for a worthwhile addition!

@starfishpatkhoo
Copy link

starfishpatkhoo commented Feb 20, 2025

Not to mention powertoys.exe --restore-settings "settings.json". Makes for building a new PC much smoother because I can leave it unattended.

Yes please! Not to mention a powertoys.exe --backup-settings "backup.ptb" ... Right now we have to use the GUI to manually click the backup to save the backup.ptb file. Would be great to be able to just script it as part of a computer's backup process.

@jennifer-grodner
Copy link

jennifer-grodner commented Mar 7, 2025

I'm also interested in some CLI options for PowerToys. I'd like to write a script that toggles awake automatically based on the time of day so my screens don't stay on all night when I forget to turn it off.

@GaTechThomas
Copy link

In trying to remap the Copilot+ key back to Ctrl on my new laptop, I found that it's quite nuanced. I came a cross a reddit thread that mentioned how to do so in PowerToys, but many people were bashing it because it involved several steps that were easy to get wrong.

At the same time, they mentioned AutoHotKey and provided strings that could simply be used to config in the correct way.

For PowerToys, I'd expect that the data is persisted to a config file in a human-readable format and that the CLI could be used to add/update the values in addition to manual editing of the config file (without needing to restart PowerToys or Windows).

For those who are interested, this is the aforementioned reddit thread:
https://www.reddit.com/r/LenovoLegion/comments/1csqiiw/comment/mgmvkx4/?context=3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Idea-Enhancement New feature or request on an existing product Product-Settings The standalone PowerToys Settings application
Projects
None yet
Development

No branches or pull requests