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

Store Zones in a JSon file #368

Closed
wilhelmmedetz opened this issue Sep 13, 2019 · 9 comments
Closed

Store Zones in a JSon file #368

wilhelmmedetz opened this issue Sep 13, 2019 · 9 comments
Assignees
Labels
FancyZones-Editor Issue revolving the FancyZone Editor Idea-Enhancement New feature or request on an existing product Product-FancyZones Refers to the FancyZones PowerToy Resolution-Fix Committed Fix is checked in, but it might be 3-4 weeks until a release.
Milestone

Comments

@wilhelmmedetz
Copy link

Summary of the new feature/enhancement

Editing overlapping zones with the graphical zones editor is difficult (e.g. if zones are hidden by larger zones in the foreground).

Currently configured zones are stored as a binary representation in the Registry.

An alternative would be to edit zones in a JSON text file. This would allow manual editing of zones.

Moving the zones configuration to a JSon text file would also allow to 'fine-tune' zones and copy zone configurations between computers.

@enricogior enricogior added Idea-Enhancement New feature or request on an existing product FancyZones-Editor Issue revolving the FancyZone Editor labels Sep 13, 2019
@enricogior enricogior added the Product-FancyZones Refers to the FancyZones PowerToy label Sep 30, 2019
@enricogior enricogior added the Status-In progress This issue or work-item is under development label Nov 12, 2019
@stefansjfw
Copy link
Collaborator

In progress...

@enricogior enricogior added this to the 0.15 milestone Nov 13, 2019
@enricogior enricogior modified the milestones: 0.15, 0.16 Dec 2, 2019
@enricogior
Copy link
Contributor

Moving to milestone 0.16 since 0.15 is a milestone to improve stability and this change has a high impact that will require extensive testing.

@jbienzms
Copy link

jbienzms commented Jan 9, 2020

Are there any update to this issue? I've noticed that my zones aren't behaving as expected (adding margins when I specified none). I'll search for an existing issue on that, but I would prefer to edit zones without needing to edit registry settings.

Here are some other issues with the current registry implementation:

  1. The location isn't documented (registry key is HKEY_CURRENT_USER\Software\SuperFancyZones)
  2. The Layouts registry folder contains binary keys but it's not documented how these map to Zones or displays.
  3. There appear to be multiple registry folders per display, such as SAM0C4D#7&fc5e70&1&UID256_3840_2160_{D36624DD-D62B-4400-90AA-013D7B5BBBA6}
  4. Some display folders contain extra settings like ShowSpacing while others do not. IMO these settings should be part of the Zone itself and not the display. At least that's how spacing appears in the Zone editor.

Please consider addressing the issues above as part of the move from registry to .json.

Thanks!

@enricogior
Copy link
Contributor

Hi @jbienzms
the work to migrate to the json format is almost done, next week we will start testing it in a dedicated branch and if everything goes well, we will merge it into master in the upcoming weeks.
The migration will only address some of the current limitations/problems. After the migration will be completed, we will work to address other issues, including the ShowSpacing behavior.

@stefansjfw
Copy link
Collaborator

Hi @jbienzms,
2. This will now be clear in json file. Main goal while doing entire migration was to have an easy-to-understand json file.
3. This could be if you have used multiple virtual desktops on same dipslay. Or if the UUID of single 'default' desktop was changed for some reason. If this happens, we should check why and when it is changed. Either way, I'm not sure whether we can do something about it.
4. This ShowSpacing entry preserves editor's Show spacing values.. So when you change ShowSpacing in editor, next time you spawn the editor, you'll have the same value as before

@crutkas crutkas modified the milestones: 20.02 release, 20.01 release Jan 16, 2020
@crutkas crutkas added this to To do in 0.15 Release via automation Jan 16, 2020
@crutkas crutkas moved this from To do to In progress in 0.15 Release Jan 16, 2020
@enricogior enricogior added Resolution-Fix Committed Fix is checked in, but it might be 3-4 weeks until a release. and removed Status-In progress This issue or work-item is under development labels Feb 10, 2020
@enricogior enricogior moved this from In progress to Done in 0.15 Release Feb 10, 2020
@enricogior
Copy link
Contributor

Fix available in v0.15.1 https://github.com/microsoft/PowerToys/releases

@caesay
Copy link

caesay commented Jul 7, 2020

For anyone looking for the location of this settings file (I only found it by looking through settings_helpers.cpp) it is located at

%localappdata%\Microsoft\PowerToys\FancyZones

@jatin7gupta
Copy link

For anyone looking for the location of this settings file (I only found it by looking through settings_helpers.cpp) it is located at

%localappdata%\Microsoft\PowerToys\FancyZones

How do I change it?
whenever I change it, it changes back to the previous setting. It might be due to the fact that two layouts were overlapping.

Did you manual calculations to make this work?

@wilhelmmedetz
Copy link
Author

Editing the file works for me (also have obverlapping zones).
You first have to quit PowertToys, then edit the file, and then restart PowerToys.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FancyZones-Editor Issue revolving the FancyZone Editor Idea-Enhancement New feature or request on an existing product Product-FancyZones Refers to the FancyZones PowerToy Resolution-Fix Committed Fix is checked in, but it might be 3-4 weeks until a release.
Projects
No open projects
0.15 Release
  
Done
Development

No branches or pull requests

7 participants