Skip to content
This repository has been archived by the owner on Feb 16, 2020. It is now read-only.

Multiple sections and restoring them by an assignable hotkey #8

Open
nickjj opened this issue Feb 1, 2018 · 3 comments
Open

Multiple sections and restoring them by an assignable hotkey #8

nickjj opened this issue Feb 1, 2018 · 3 comments

Comments

@nickjj
Copy link

nickjj commented Feb 1, 2018

I've never worked with AHK before but is something like this possible?

Things work normally as is, but a new property is introduced to the WinPos.txt file where you can assign a hotkey to a specific section which defaults to [Win] + 0.

Something like this (I know the key binding is not the correct syntax):

SECTION: Monitors=1,MonitorPrimary=1; Desktop size:0,0,2560,1440; Key:[Win]+[Shift]+1

Then, when you press that key combo it would launch that section's window layout.

Use case:

When you want to have 4 or 5 different layouts for different things and you want to jump between using them without having to manually copy / paste things around in the WinPos.txt file.

Workaround for now:

From what I gathered, the only way to do this now would be to:

  1. Duplicate the current AHK script.

  2. Assign a different key combo for the duplicate script (1 instead of 0 for example for save / restore).

  3. Change WinPos.txt to be uniquely named (append a _1 or something to it).

  4. Do business as usual and pick the layout you want on demand.

That's kind of a lot of duplication!

@rwese
Copy link
Owner

rwese commented Feb 1, 2018

I am not sure if it is possible to configure Hotkeys dynamically like this.
One solution would be to reserve multiple keys and store the configuration in separate files, which I believe would be easy.
I will think about it.

@nickjj
Copy link
Author

nickjj commented Feb 1, 2018

Oh, that's a nice idea about pre-registering the keys in the script.

If we go down that route with separate position configs (instead of parsing WinPos.txt), maybe the script could just create WinPos_2.txt, or whatever save invoking key was hit. Then you could at a glance know which position file maps to which key without even looking at the contents of the file.

@digaus
Copy link

digaus commented Feb 14, 2020

Any progress?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants