Ross-Patterson / Portals-Desktop-Organization

A free, simple, lightweight and customizable tool for desktop organization on Windows.
https://portals-app.com
116 stars 1 forks source link

FEATURE REQUEST: Add option to auto-apply a saved layout when launching Portals #150

Open dking02 opened 1 year ago

dking02 commented 1 year ago

Display Setup in Portals supports automatically applying a saved layout when a change in display setups (scaling, external monitors, etc.) is detected. However, there is currently no option to have Portals automatically apply a fresh copy of a saved layout when it is launched if the display setup has not changed (normal situation for desktop PCs) or the user has not configured Display Setup. Portals automatically restores the current layout left at the end of the previous session.

I suggest adding a column to the Layouts table in Settings where the user could add a checkmark to select the desired layout to be auto-applied at launch. If no layout is checkmarked, Portals would continue to restore the previous current layout. Display Setups would not be affected; however, the existing entries in the Display Setup table would now also be used to specify the saved layout to be auto-applied for each display setup when Portals is launched. The expected behavior at launch of Portals under this enhancement is summarized as follows:

  1. For users who have not configured Display Setups, auto-apply the saved layout checkmarked in the Layouts table when Portals is started. Otherwise, restore the previous current layout.

  2. For users who have configured Display Setups and when no change in display setup is detected at launch, restore the current layout if no layout is checkmarked in the Layouts table; otherwise, auto-apply the saved layout specified in the Display Setups table for the display setup in effect.

Ross-Patterson commented 1 year ago

Is this to rectify accidental movement? Why would they change during a session unless you deliberately made a change - you can just lock them in place?

dking02 commented 1 year ago

The above comment seems to imply that you are expecting the current layout to be static. However, a user may wish to have particular portals on the desktop only as required or may wish to add, delete or modify portals on the fly. In addition to moving or resizing portals when unlocked, Portals provides many other opportunities to change the current layout during a session; e.g.,

The intent of the suggested change is to automatically restore the current layout to a known state defined in a saved layout when launching Portals. The alternative is to start with current layout that was left at the end of the previous session and then manually apply the saved layout or check and adjust it for any undesired changes.

Note: A current workaround is to save the desired starting layout in a separate portals.ptl file and replace the current portals.ptl file with the saved version before launching Portals.

The following related changes are recommended to improve usability (so user does not need to open Setup to make some adjustments) and to allow scripting of changes to the current layout and applying multiple layouts via the CLI in lieu of including it in the Setups>Layouts GUI (ref. issue #139):

(1) Add the following items to the Portals taskbar app right-click menu:

(2) Add the following commands/arguments to Portals CLI:

Note: The Portals CLI is undocumented. I am unaware of the any portals.exe CLI options other than (1) create new portal/folder (NEW) and (2) create portal from folder ().

dking02 commented 1 year ago

image

The above snapshot portrays a sample of what I am looking at. The concept allows individual portals to be launched dynamically as needed and offers more flexibility than organizing the desktop into static portals.

The portal on the left (Port of Portals) serves as a launchpad for other portals. The items in this portal are shortcuts for a “Create Portal from Folder” command which opens a portal from the associated folder. As currently implemented, this command requires the portals to be moved to their desired position and adjusted (resized, minimized, etc.) manually as desired. Making these adjustments for each portal can be done quickly with the current GUI but could be further automated if there was an “ApplyAdditionalLayout” command which could apply a layout with these settings for the individual portal. Supporting layouts in the CLI would also enable more complex layouts with multiple portals or individual portal customization (which I do not use) to be applied from the launchpad and could eliminate the need to implement support for multiple layouts from the Portals GUI.

The portals are launched unlocked and can be opened, adjusted, closed and relaunched without closing other portals. All this can be done directly on the desktop without having to open Setup which takes the user’s focus away from the individual portal and also occupies a significant amount of space on the desktop. I have also noticed that portals table in Setup can dynamically change the display order of active portals on the desktop. This would seem to indicate that it should be possible to add controls directly on the portals (e.g., on the content context menu as shown on the Scans portal at right side of the snapshot) to “Bring to front” and “Send to back” (of the stack on intersecting portals) to resolve issues with portal order more conveniently and intuitively than through the use of Setup.