Session Manager [v7.00]  —  Bookmark your environments: locations and/or display (tabsets and layout)

Discuss and share scripts and script files...
Post Reply
FluxTorpedoe
Posts: 855
Joined: 05 Oct 2011 13:15

Session Manager [v7.00]  —  Bookmark your environments: locations and/or display (tabsets and layout)

Post by FluxTorpedoe »


• DOWNLOAD:

   — Latest version: Session Manager v7.00 — 2022-09-25 (publishing date)
   — Changelog and previous versions: Session Manager Changelog

———————————————————————————

• PURPOSE:


If you frequently open the same folders related to specific tasks, you can regroup them in a session.

⮞ With Session Manager, you can easily switch between work environments, called “sessions”, which remember:
   — the content you’re working on, and (optionally)
   — the way it’s displayed.

With a single click or keypress ⁽*⁾, or two clicks at most, you could load or switch between e.g.:
   — a session "Work": XYplorer as a half-screen window, in Light mode, with folders "My Documents", "This PC", "Downloads"… opened in details view, in dual pane and with tree and catalog visible
   — a session "Photos": XYplorer window maximized, in Dark mode, with folder "My Pictures" displaying WallOfPictures thumbails along with a large preview, and opened in single pane with no tree, no tabs, no menu, and the address bar collapsed with the toolbar in a single line

☛ Note that, just as easily, you could switch between :
   — these two locations only (the groups of tabs/tabsets), without any layout change
   — these two layouts only, without any change of tabs

⮞ In summary: You can save and load (or switch between) any number of any kind of session, with locations and/or layout.

Other examples:
   — Dual pane (with or without layout):
         Last year photos to sort out (with one folder Incoming and multiple folders SortedOut),
         Backup (with folders Sources and Destinations),
         Project Alpha (with folders Active, Resources, and Repository/Backup)…
   — Single pane:
         Last trip photos (very large thumbnails),
         Sheet music (list with a huge lateral preview),
         My Movies Collection (mid-size thumbnails with mid-size video preview)…


⁽*⁾ Mouse modifiers and keyboard shortcuts are supported.
(e.g. By default, CTRL+Click on Session Manager button switches between the last two sessions used.)


———————————————————————————

• OVERVIEW:

❖ A session remembers the content of each pane and the way it’s displayed.
(The content of a pane —each tab’s location, etc.— is called a tabset in XYplorer. Sessions remember the tabset of both panes, even if one is hidden or not used.)
   ☛ To save a session: click on Session Manager’s button, then "Save Session as..."

❖ A layout session can also remember the whole layout of XYplorer, i.e. the way you’ve changed the interface (Single or Dual pane, visibility of the tree, catalog, preview... —anything in XY’s "Window" menu! (and more…))
   ☛ To add a layout to a session: click on "Layout Tools > Save Layout of Current Session"

❖ XYplorer window size and position can be saved and restored with layouts.
   ☛ To remember window size and position: click on "Options > Layouts: Autosave Window Position and Size with Layouts"

❖ Sessions can also remember some extra features.
   Regular sessions can remember the state of visibility of Hidden (or System,...) files and folders
   Layout sessions can remember the Dark/Light mode, the state of syncing between panes (Sync Browse, Sync Scroll), and the thumbnails configuration (e.g. regular thumbs with large border for one session, or WallOfPictures enlarged with no padding for another...).
   ☛ To enable Dark/Light mode and these features: click on "Options > Layouts and Standard: Enable Autosave of Extra Settings"
        All the extra features will be saved automatically with their session (each time you save or update a session).

❖ Additionally, sessions can be associated with a script (which will launch each time the session is opened); and sessions can remember the state of XYplorer’s toolbar (so you can have dedicated Custom Toolbar Buttons associated with specific sessions).
   ☛ To associate a script: click on "Actions > Associate Script with Current Session..."
   ☛ To associate a toolbar: click on "Layout Tools > Save Toolbar with Session Layout..."

❖ There’s a lot more… which might be described here someday. In the meantime, have a look at the Cheat Sheet in "Options > Help: Cheat Sheet…"
 
SessionManager.png
SessionManager.png (12.69 KiB) Viewed 26323 times
 
Usual disclaimer: there's no reason this script should cause any trouble. But as they say, it's provided as-is, so backup & be wary, blablabla...

Finally, I'd like to take this opportunity to thank Don for the amazing program that is XYplorer! And big thanks also to the community.

Enjoy! 8)

   Flux

———————————————————————————

• INSTALLATION:

Download the script (link above) and copy it into XYplorer scripts folder: <xyscripts> , then either:
1. add    load "SessionManager.xys";    to "On left click:" of your custom button, or

2. use the following snippet:
   a) Paste    ::snippet;    into the address bar and press ENTER. A text box will open.
   b) Paste the following and press OK. A new button will be created at the right end of your toolbar.

Code: Select all

Snip: CTB 1
  XYplorer 19.90.0112, 18.4.2023 12:30:00
Action
  NewUserButton
Name
  Session Manager [Ctrl: Switch - Alt: Reset - Shift: QuickSave - C+A: LayoutReset - A+S: LoadFavorite - C+A+S: LayoutSwitch]
Icon
  text:‹ Tabsets ›
ScriptL
  load "SessionManager.xys";
ScriptR
  
ScriptM
  
FireClick
  1
Note: On first run, an XYplorer and SessionManager maintenance check is done, which may display a confirmation message, you can safely press OK.
   (Or run it later via "Options > Maintenance Check...")

———————————————————————————
### Extras ###
- The main "starcase" icon used in the screenshot is by kunkel321. You can get it here: Starcase Icon


———————————————————————————
### Old post - Work In Progress ###

Notes:
- Of course you can still use standard tabsets alone, combine them with sessions or use sessions only, and switch methods anytime depending on your needs.
- Each session is composed of two tabsets.
- When you save a new session, its two tabsets are automatically created with the name of the session, preceded by '§1§_' for pane 1 and '§2§_' for pane 2.
(e.g. Session 'Work' uses tabsets '§1§_Work' and '§2§_Work')
- A session is considered (i.e. 'shown as') valid, only when both tabsets are from the same session and in their right pane (e.g. tabset '§1§_Work' in Pane 1 and '§2§_Work' in Pane 2).
- A session is marked by a star icon (marked as active) only if it's a valid session.
- You can disable the confirmation dialog for Reset and Update in Menu "Configuration". Know that, even if disabled:
..."Session - Reset" ALWAYS asks for confirmation if a session isn't valid (but you can still reset your tabsets),
..."Session - Update" NEVER updates a non-valid session, and pops-up a warning instead.
- You can delete multiple sessions at once.
- You can't delete a session that is currently active (i.e. loaded even partially). To do so, just load another session before trying to delete.

Misc:
- 80%+ of the code and work went into imagining the worst mix-ups (i.e. intentional crazy manipulations of tabsets), and implementing safeguards.
- This was executed after I decided to share my original script, which explains why the code's probably not the cleanest one.
—————————
Finally, I'd like to take this opportunity to thank Don for the amazing program that is XYplorer - it's been a while since I had that much fun with a soft !
And thanks also to the community, but especially the "Club of the 4 digits posters". Your contributions were priceless to get up'n running with XY!
—————————

version 1.02:
SessionManager.xys
(20.82 KiB) Downloaded 1230 times
Last edited by FluxTorpedoe on 21 Apr 2023 18:12, edited 83 times in total.

FluxTorpedoe
Posts: 855
Joined: 05 Oct 2011 13:15

• Session Manager Changelog •

Post by FluxTorpedoe »

 
• CHANGELOG:

v7.00 — 2022-07-12Download here Minimum requirements: XYplorer ≥ 19.90.0112
+++ Mouse modifiers (MM) when clicking on a session name: Now a full feature with three possibilities
      While holding a MM, click on a session name to append its tabs (default MM: Shift)
      While holding a MM, click on a session name to only load its content, ignoring layout (default MM: Ctrl)
      While holding a MM, click on a session name to only load its layout, ignoring content (default MM: Ctrl+Shift)
            Note: Default layout is loaded if session has no layout
+ Mouse modifiers on session name: Ability to quickly reset current content only or current layout only
      Just hold the MM for content only or layout only, and click on the name of the current session (displayed in bold)
      Reminder: Clicking on the current session name without holding MM fully resets it (layout included if it has one)
++ Editable mouse modifiers on session name
      Access via Session Manager menu: Actions > Edit Mouse Modifiers (Used When Clicking on a Session Name)...
+ Cheat sheet: Mouse modifiers on session name are now also listed (as they’re currently set)
———————————————————————————
+ Append tabs: Only import and append to visible pane(s), ie. only active pane in single pane mode
+ Append tabs: For each (visible) pane, only import tabs that are not duplicates of existing tabs
+ Append tabs: Tabs are always appended last, regardless of XY setting "Open new tab" (much less confusing)
+ Append tabs: Now also possible to append (non-duplicate) tabs of same/current session (via menu or Shift+Click)
* Append tabs: Menu entry now always available and renamed "Append Tabs of a Session..." (since same session can be appended)
+ Append tabs: To differentiate the appended tabs, their name is now colored
      There’s a tweak to edit this color in SessionManager.ini: Settings | TabsAppendTxtColor
      I chose the current color (~Azure: 1F7AEB) as a compromise that works in both Light and Dark modes,
      but results will depend on your custom tab colors and/or if you never switch modes (also try ~Sienna: D17238)
———————————————————————————
+* Temporary session now supports all functions of regular sessions, incl. autosave and rename
+* Temporary session now has a single simpler menu entry: "Copy to Temporary Session" (greyed out if session is active)
      Reset and Update (when active) are done with the first two generic entries like any other session
      "Copy to Temporary Session" now behaves like a backup, without leaving the current session (or tabsets) to load it
      Useful to create a backup of your current environment (and opt. rename it) without breaking your workflow
———————————————————————————
+++ Maintenance / Optimization: New "Options > Maintenance Check..." that checks and fixes several potential problems
      i.e. integrity and completeness of SessionManager.ini, XYplorer tweaks, orphan tabsets...
+ Maintenance: Also performed automatically on Session Manager update
+++ 6 important XYplorer settings and tweaks are now checked for better performance and experience
      TabsetsNoPaneActivation, SaveMRULists, SavedMRULists, AutoSaveTabsets, TabsetsCanRevertAcrossSessions, ScriptRetainPVs
+ TabsetsNoPaneActivation: Ideal = ON (XY default = ON)
      With this OFF, flickering occurs when changing sessions or tabsets
      Only necessary if updating from _very_ old versions of XYplorer (probably obsolete)
+ SaveMRULists and SavedMRULists: Ideal = ON (XY default = ON)
      With this OFF, XYplorer always restarts with blank tabsets
      Corresponds to XYplorer settings: Tools > Configuration > General | Startup & Exit > Save Settings |
            | Include most-recently-used lists on save / Apply to > Tabs
+ AutoSaveTabsets: Ideal = OFF (XY default = OFF)
      With this ON, sessions are forcibly (but only partially) updated each time they’re changed
      Corresponds to XYplorer setting: Tools > Configuration > Tabs and Panes | Tabs > Auto-save tabsets on switch
+ TabsetsCanRevertAcrossSessions: Ideal = ON (XY default = ON for XYplorer < v19.80.0131 --but OFF since for new users!)
      With this OFF, the active session is forcibly (but only partially) updated each time XYplorer is closed / settings saved
+ ScriptRetainPVs: Ideal = ON (XY default = OFF)
      With this OFF, Session Manager takes much longer to open after a restart of XYplorer
      Corresponds to XYplorer setting: Tools > Configuration > General | Refresh, Icons, History > Scripting | Remember permanent variables
———————————————————————————
*** "Options": Menu now split into "Actions" and "Options", with some entries reordered and/or slightly renamed
* "Rename Session..." moved from main menu to new Actions menu (as "Rename Current Session...")
* "Delete Sessions..." moved from main menu to new Actions menu
* "Layout Tools": Reorganized all entries in a single menu (with separators)
+ "Layout Tools": Added "Toggle Dark Mode" for quick access
! Some menu or submenus entries were not greyed out when they should (e.g. only 1 session available)
! Menu entry: "About Current [...]" would display "Session" instead of "Tabsets" in rare mix-up cases
———————————————————————————
* "Options > Layouts: Autosave Window Position and Size [...]" now always available, even with no use of layout sessions
* "Layout Tools > Reset Layout to Default" restores window position and size according to related option
* Dark/Light mode: When switching between two layouts with Dark and Light mode, mode is toggled earlier (smoother effect)
* Layout Alternate: not defined by default anymore (less confusing) => Must be saved once before use or layout switching
* [DISABLED] Layouts with thumbnails: Flickering removed (was caused by an XYplorer change in v22.60.0214)
      Only appeared in layout sessions with thumbnails, and "Options > Layouts and Standard: Enable Autosave of Extras Settings"
      --> On Maintenance/Update, extra flag added in SessionManager.ini to layouts with thumbsconf settings
      Note: Seems fixed in XYplorer v23.4x+, so fix via Session Manager disabled
! "Options > Layouts: Autosave Catalog Association with Layouts": Default XYplorer catalog now correctly reloaded if needed
~ XYplorer v23.30.0000 "Preview Pane to the Left" is automatically supported, but some layouts/sessions might need to be updated
———————————————————————————
+* Ability to prevent Session Manager toolbar button from being updated (even in case of invalid sessions)
      — No custom icons must be used (if necessary: "Actions > Change Icon of Sessions... > Select This to Remove Icons From All Sessions...")
      — Button must not display session name ("Options > Button: Display Generic Icon (Instead of Session Name) [...] > ON)
! Session not highlighted in main menu when loaded externally with a name in wrong case (e.g. Project instead of project)
+! Quickload: Correct session is now detected/loaded if name is typed (partially or fully) in wrong case
* Quick sessions now always remain listed last after separator, unless manually reordered to a higher position (or renamed)
+ "Actions > Change Icon of Sessions...": Updated list with 6 new internal icons to choose from
* Name displayed in titlebar or button now cleaned-up (removed extra spaces and enclosing "–—." if any)
! Session Name in Titlebar: Updates faster when not using valid sessions (but tabset(s))
!+ Session Name in Titlebar: Set to ON (on Maintenance/Update) if OFF but effectively ON (after SessionManager.ini edition/deletion)
!+ Session Name in Titlebar: Extra safeguard to prevent adding it several times (if SessionManager.ini edition/deletion)
! "Options > Button: Display Generic Icon [...]" would not correctly update button the first time it was toggled
! "Menu: Enable Confirmation Dialog for Reset and Update" not always working in rare cases (external calls with autosave...)
! If Confirmation ON and AutoUpdate ON and dialog (to update) is canceled on session change, new session loading not canceled anymore
! External call to Session Manager now stops (with warning) if Session Manager button exists but not on the toolbar (or if no button)
! External call to Session Manager now stops if trying to manually load a session with an empty name
* Menu code optimized, for a slight speed gain (less access to words, multilingual support being one of the speed bottlenecks)
* SessionManager.ini now always in UTF-16LE (converted on update if necessary)
! A few other fixes (mainly safeguards against improbable events)
* Reordered (and renamed) some internal labels --with no external use--, and variables


v6.90 — 2022-04-30Download here
+++ Append another session tabs to the current panes (appended tabs will have a grey background)
      — Either Shift+Click on a session name in Session Manager main session list
      — or Options > Append Tabs of Another Session...
      Note: Appended tabs will only load paths (without custom column order or size)
+++ Session name in button: Session Manager toolbar button can now display the name of the active session
      It will do so only with XYplorer version >= 22.90.0107, and if:
      1. the session has no custom icon defined
      2. the new option "Display Generic Icon (Instead of Session Name)..." is OFF (default setting)
      Note: To have the button always display the session name, all custom icons must be removed (see below)
+ New menu entry: Options > Button: Display Generic Icon (Instead of Session Name) If No Custom Icon Defined
+ If session is invalid, button will display an "Invalid Session" text or "?" icon (depending on previous setting)
+ New action: Options > Change Icon of Sessions... > Select This to Remove Icons From All Sessions...
++ Blacklist for AutoUpdate All: Sessions can now be excluded from this autoupdate by adding them to a blacklist
+ New menu entry: Options > AutoUpdate All: Edit Blacklist of Sessions to Exclude from AutoUpdate...
* Unified (and mostly enlarged) size of some dialog windows
! Fixed bug when last session may not be visible in some lists if there was a corruption in panes folder

v6.80 — 2022-01-02Download here
+ Mouse modifiers (default or custom) now displayed in menu and submenus (eg. "Reset to Original Session   Alt")
+ Added menu entry (previously only via external access): Options > Switch Between The Last Two Sessions
+ Added menu entry (previously only via external access): Layout Tools > Switch Between Default and Alternate Layouts
* Mouse modifier Ctrl+Alt+Shift now assigned by default to Switch Between Default and Alternat Layouts (only on new install or mouse modifiers reset)

v6.70 — 2020-06-18Download here
++ New option to display the name of the current session at the start of XYplorer title bar
      Available in Session Manager menu: Options > General: Display session Name in Titlebar...
      Note: When enabling or disabling this option, XYplorer will autosave its settings and restart (after a prompt)
      Benefit 1: Another way to know which session is currently in use, by just looking at XYplorer titlebar or Windows taskbar
      Benefit 2: If you're using several XYplorer windows, easily differentiate them by their name in Windows taskbar!
* Changed icon of "Reset Session [...]" to an Undo icon instead of a Tabset icon
* Options: Moved the AutoUpdate options below the separator with all other On/Off options
! Trying (but failing) to save new session with existing name of session with icon would still update toolbar icon
! Safeguard against saving new session with existing name would not popup if using name of first session
! Safeguard against renaming session with existing name would not popup if using name of first session

v6.60 — 2020-06-02Download here
+++ Options > AutoUpdate All: every session can now be updated automatically on session change
      Note: To discard any changes made to the current session, just Reset it before loading a new one
      Note: Using this option disables the ability to Autosave temporary version of specific session
+ Performance improvements (even more noticeable when clicking on toolbar button)
* Options > AutoUpdate Single: Previously Enable Autosave/Reset of Temporary Version of session
      This option now uses an ON/OFF checkbox, and disabling it now opens a confirmation dialog
      Note: Using this option disables the ability to AutoUpdate all sessions
* Options > Save Temporary Session is now disabled if no session exists
! Toolbar icon was changed (then not reset) when saving Temporary Session if no other icon used
! Leading spaces now always removed when saving new session (even with layout)

v6.51 — 2019-10-08 (internal)
! Changing icon of current session would not refresh toolbar button

v6.50 — 2019-08-28Download here
+++ Editable mouse modifiers
      Info: Clicking on Session Manager toolbar button while pressing mouse modifiers (Ctrl, Alt, Shift) will run a specific command,
      e.g. Switch between the last two sessions; Reset session; Reset layout to default, etc.
      Access via Session Manager menu: Options > Edit Mouse Modifiers (Used When Clicking On Session Manager Button)...
      Note: The tooltip of Session Manager toolbar button is updated automatically
++ Added menu entry (which opens a dialog with info) to set/unset current session as a the favorite
      Info: Setting a session as the favorite enables you to load it externally (via mouse modifiers, CKS, Catalog, scripts...)
      Note: command was previously only available via mouse modifiers or external access
      Access via Session Manager menu: Options > Set/Unset Current Session As The Favorite
* Favorite session now always unindented in list to help identification
- Removed default mouse modifier for "Set current session as the favorite" (previously Ctrl+Alt+Shift)
+ External access to Update command: load "SessionManager.xys", "_Update";
* Reorganized and updated Cheat sheet with full list of all external commands
      Access via Session Manager menu: Options > Help: Cheat Sheet
* Streamlined menu Layout Tools
      Renamed "Use Layouts" to "Use Session Layouts"
      All generic (non-session) layout options now always available
      Reintroduced menu info when layouts disabled or using non-layout session
* Slightly optimized menu display speed

v6.20 — 2019-05-11Download here Minimum requirements: XYplorer ≥ 19.90.0106
+ DarkMode state is saved with layouts when Extras enabled (Options > General: Enable Autosave of Extra Settings...)
* Options: renamed (shortened) Extra Settings entry, and added confirmation dialog which displays more info
* Optimized Options menu code (less lines)
! Fixed bug when wrong toolbar button name was updated

v6.10 — 2019-04-09 (internal)
+ Icons: added ability to select icon from list of XYplorer's internal icons
* Icons: streamlined icon management (add/remove) in single dialog
+ Alt+Ctrl on button > Reset layout to default
      Note: load favorite session remapped to Alt+Shift

v6.00 — 2019-01-09Download here
++ Automatically save/restore catalog association with layouts (enable in Options menu)
      Note: active catalog is automatically associated with Default Layout when option is enabled
      Note: existing layout sessions must be manually updated in order to remember their associated catalog

v5.90 — 2018-11-11 (internal)
++ Automatically save/restore XYplorer window position and size with layouts (enable in Options menu)
      Note: active window settings are automatically added to Default Layout when option is enabled
      Note: existing layout sessions must be manually updated in order to remember their window position and size
+ Option to manually save or reset default XYplorer window position and size (in Layout Tools menu)
* Slightly reorganized Layout Tools menu to accommodate Xyplorer window-related options

v5.81 — 2018-10-10 (internal)
! Added safeguards to disable external commands (e.g. Reset) when no active or valid session

v5.80 — 2018-10-01Download here
++ Layouts - Alternate layout available (independent of sessions)
+ Easily switch between Default and Alternate layouts via keyboard shortcut... (cf Cheat Sheet)
++ Noticeably optimized code to display main menu (by delaying Cheat Sheet language computation!)
+ Enhanced Temporary Session management/display
+ Clicking on About cleans-up Session Manager layout entries (removes entries now managed by XYplorer)
+ Icon assigned to temporary session (if icons are used)
* Button icon is updated earlier, faster/cleaner transition
* Menu - Main menu order: reverted to Reset before Update
* Menu - Regrouped Autosave action (re/set and enable/disable) in Options menu to clean main menu
* Menu - Reordered layout menu
* Menu - Removed Reduce Flickering option (obsolete, now XYplorer’s default since a few years)
* Some extras settings are not saved anymore when Extras not used
! Button icon not reset when saving Temporary session from session with icon
! Language inconsistencies

v5.73 — 2018-09-25Download Here
* Ability to associate script with session doesn’t require Extras enable anymore
* Ability to save toolbar with layout doesn’t require Extras enable anymore
   Reason: Script and Toolbar require manual input anyway (to associate/save, update...)
   Whereas Extras only enable features that will be saved automatically
      — with any kind of session (visibility state of Hidden/System/Protected items)
      — and with layout sessions (Sync Browse, Sync Scroll, Thumbnails configuration)
* Reset and Update (main menu first two entries) haved been switched with Update first
* Layout sessions with a saved toolbar now have enhanced Update and Reset menu entries,
   now it’s clear that updating such a session will update the session and its layout including its toolbar
* Layout menu has been further reorganized (plus, it’s always the same, whether or not Extras are enabled)
* Layout sessions are now always prefixed with   ·   (regardless of only layout sessions available, and/or no use of icons)
* Further enhanced CTB autodetection/management
! Active session could incorrectly be available for deletion in case of layout session with toolbar and autosave

v5.72 — 2018-09-18 (internal)
+ Clicking on About also resets CTB icon if needed (e.g. invalid session caused by manual tabset loading)
* Replaced all real ellipsis characters by three dots "..." (presumably more universally compliant)
! Greyed out some options when no session (or not enough sessions) available

v5.71 — 2018-09-12 (internal)
++ Thumbnails configuration can now be saved with layout (when Options > Extras are enabled)
+ Clicking on About does a silent cleanup of all invalid session entries
   (in case tabsets have been externally changed)
+ CTB name uses language file to display [mouse modifiers]
+ Clicking on About also resets/updates CTB full name (Session Manager [Modifiers...])
* Further enhanced CTB reset/update management
! Some Extras layout features not always reverting to last/default when leaving layout session

v5.50 — 2018-09-10 (internal)
++ XY's maximized state is now saved with layout (windowed state is restored on session change)
+ Added layout entry to reset layout (of a layout session) to its original saved state
+ Added option Go to tabsets folder
* Reordered entries in layout menu
! Mouse modifiers (Quick control) now only react if click on SM button
! Toolbar not always loaded/autoreset when switching sessions
! Deletion of sessions with associated toolbar and/or script not working correctly

v5.40 — 2018-06-27 (internal)
* Enhanced CTB management

v5.35 — 2018-02-27 (internal)
* Enhanced CTB

v5.30 — 2017-12-29 (internal)
++ Session Manager CTB icon (custom toolbar button) changes according to active session icon (when available)

v5.2 — 2017-03-15Download Here Minimum requirements: XYplorer ≥ 17.50.0211
! State of SyncBrowse/Scroll is now (re)activated correctly for matching sessions.
   Note: These states (Panes > Sync Browse / Sync Scroll) are only remembered:
   › for sessions with layout;
   › with layouts enabled (Layout Tools > Use Layouts: ON);
   › if Options > General: Enable Extras…SyncBrowseScroll… is checked.
   When switching to regular sessions, these states are reset to default (the states saved, if any, with your default layout — Layout Tools > Save/Update Default Layout).
* Slightly changed entry Options > General:Enable Extras… by reordering it and adding "Layout" before SyncBrowseScroll
(Note to translators, too minor a change to update now, we’ll wait for next update).

v5.1 — 2017-03-11
+++ Quick load dialog (assigned to shortcut): type the first meaningful letter(s) of a session name to open it, or just "Enter" to switch to previous session (Details in Menu "Options > Help: Cheat Sheet...").
++ Sessions can now remember visibility status of Hidden/System/Protected files (check menu "Options > General: Enable Extras...")
+ Menus "Layout Tools" and "Options" are now real "popup" menus
+ Added new entry "Save Auto-Named Quick Session..." in menu "Options" (previously only accessible via Shift+Click on SM toolbar icon)
* List of commands for quick control of Session Manager are now regrouped in (and renamed as) "Help: Cheat sheet..." in menu "Options"
* Reordered and renamed some entries of menu "Options"
* Quick Sessions: added year to date prefix (yy-mm-dd * instead of mm-dd *), better readability
* Changed suffix of sessions with script from ® to °
- removed saving of elevated state with Extras (too cumbersome)
! Delete dialog displayed wrong text when only two sessions available
! Enhanced strict syntax checking compliance

v4.53 — 2016-03-12 (internal)
++ Sessions now also remember visibility status of Hidden/System files
! On rename of ordered session _with autosave_, ordered position was lost
! On rename of session with icon, icon wasn't reassigned
! On session delete, potential metadata entry (icon) wasn’t deleted from INI

v4.51 — 2015-12-26Download Here Minimum requirements: XYplorer ≥ 15.00.0518
* Decreased size (and visibility) of bullet prefix used to distinguish layout sessions (when using icons)
+ Removed bullet prefix when all sessions are layout sessions
* Fixed wrong modifier name in "Options>Display commands…"
* Fixed unwanted creation of a non-existing (blank) AutoSave session when using only regular tabsets (no session) and AutoSave active

v4.5 — 2015-12-24
+++ Quick control (mouse modifiers)
   Press modifier (Ctrl/Shift/Alt) while clicking on Session Manager button for instant action (bypass menu).
   — Click and:
       Ctrl = Toggle between last two sessions
       Alt = Reset current session
       Shift = AutoSave Quick Session
       Alt+Ctrl = Load favorite session
       Ctrl+Alt+Shift = Set current session as favorite
   — Codes available for quick control through CKS/UDC/Catalog…
   — List of modifiers and codes available in "Options > Display commands…"
+++ Quick sessions
   Instant save (no dialog) of current session, autonamed with date and active tab.
   Currently only available via Shift+Click on SM button, or via CKS/UDC…
+++ Use icons
   Options > Change Icons of Sessions…: Assign specific icons to sessions
* Main menu: Enhanced visual listing of sessions. All session names —except active session— are now indented.
+ Main menu: Enhanced listing of sessions (when available). Standard ordered sessions first, then standard unordered sessions, then quick sessions, then temporary session
+ Main menu: Added auto-separator between list of standard ordered sessions, unordered sessions, quick sessions, and temporary session
+ Options > Reorder list of sessions: Enhanched. Now, empty line added between previously ordered sessions and rest of unordered sessions (standard and quick sessions, listed alphabetically)
* Main menu: Changed sessions identification/iconification
   — If icons are in use, layout sessions are now prefixed with "•" (and don’t have specific icon anymore)
   — The active session —regular or with layout— is now identified with a new default “checked” icon
   — Retrocompatibility: The active session can still use the previous custom icons, only if default and layout icons exist in XYplorer "Icons" subfolder (<xyicons>). (e.g. with SessionManager.xys: Data\Icons\SessionManager.ico AND Data\Icons\SessionManager_Layout.ico)
* Autosave is now ON on fresh installs (too good to be missed!)

v4.b1 — 2015-09-24Download Here
*** Fully strict scripting compliant (Menu "Scripting > Syntax Checking")
* Temporary Session is now always listed last, also in "Delete" Menu
! Fixed misbehavior when saving (regular or temporary) session just after enabling Autosave
* Changed behavior of "Reset Autosave of current session" just after enabling Autosave
! Alert not showing when saving session under existing name
* Clarified status info of all Temporary Session operations
* Renamed "– Autosave –" to "•• Autosave ••" in menu for better legibility (esp. if enabled for Temporary Session))

v4.a2 — 2015-08-18Download Here
+++ Multilingual support
+ Added automatic saving of SyncBrowse and SyncScroll to layout sessions (if Advanced Layout Tools ON)
+ Added Autosave support to Temporary Session
+ Added scripting support to Temporary Session
* Clarified Autosave reset/on/off behavior
! Various fixes (of unprobable situations)

v3.2 — 2015-06-23Download Here Minimum requirements: XYplorer ≥ 14.10.0104
+ Added a "Display Codes to Access Session Manager Externally" entry in Options menu
+ Added a "Display Separator Between List of Sessions and Rest of Menu" entry in Options menu
* Moved "About Current Session/Tabsets" entry at bottom of main menu when list of sessions on top

v3.1 — 2015-06-14Download Here
+ Added a "(Un)Hide XYplorer Main Menu" entry in options menu
* Renamed/reordered Autosave entries in main and options menus
* Re-introduced saving of active/inactive state of panes with layouts (had disappeared when switching to XY layout system)
* added more spaces before "—AutoSave—" session suffix for clarity

v3.0rc2 — 2014-10-19Download Here
+ Added option to display list of sessions on top
* Reordered list of options
* Cosmetic: Removed extra separator line •••• between session list and main menu

v3.0rc1 — 2014-10-14Download Here
+ Added option to enable or disable tree auto-optimization on session change
+ Added possibility to use own icons for active sessions w/ or w/o layouts
*! Rewrote "Reorder List of Sessions" code and fixed remaining rare bug
* Rearranged "Options" and "Layout Tools" menus, AutoSave entry…
! Fixed "Layouts: Activate Preview..." option
! Fixed extra feature of Toolbar saving with layout
* Set default of "Layouts: Activate Preview..." to ON for fresh installs
* Set default of "General: Enable Confirmation Dialog..." to OFF for fresh installs

v3.0b1 — 2014-09-08Download Here
*/+ Rewrote layout management, which now recalls position of separator of Panes, InfoPanel, Catalog, etc...
Note: status of "Show sort headers in all view" is still saved with layout (not included in XY default layouts)
* Removed code that managed compatibility with old versions of XYplorer
* Cleaned code

v2.71 — 2014-09-04Download Here
+ Added direct access to Load Specific Session/Reset Session/Reset Layout/Save Temp Session (info in script header)
+ Added autorun of quick script on session load
+ Included SortHeaders to saving of layouts
+ Included Breadcrumbs to saving of layouts
*** Optimized code for faster loading of main menu
*** Rewrote code for reordering list of sessions
* Changed most icons for more unified look
* Changed menu entries for Temporary sessions
! Bug fixes

v2.6b7 — 2014-02-02Download Here
+++ AutoSave active session
+++ Associate scripts with sessions
+ Added possibility to save temporary session layout
* Cosmetic and lexical changes

v2.6b5 — 2014-01-22Download Here
+ Included SortHeaders to saving of layouts
+ Included Breadcrumbs to saving of layouts
+ Added (clearer) direct access to Reset Session/Reset Layout/Save Temp Session (details in script header)
*** Rewrote code for reordering list of sessions
* Changed most icons for more unified look
* Changed menu entries for Temporary sessions

v2.6b4 — 2013-06-18Download Here
* Relocated the entry "Layout loading: ON/OFF" from main menu to "Layout Tools" submenu. Reason: with the new possibility to reorder sessions with separators, the main menu was getting too crowded.
* Rename the "Temporary Session" without its weird ¤ signs
* Enhanced icon auto-selection for active session with layout
* Enhanced icon auto-selection for layouts and for inactive sessions with layout, in anticipation of Win7/Win8 (couldn't test yet under Win7)
! Fixed the new "Reorder List of Sessions" function, with newly added sessions possibly not visible
! Fixed half-toggling of NavigationPanel/Tree/Catalog, when switching between sessions with layouts, in very rare conditions.

v2.6b1 — 2013-05-19Download Here
+ Added a "Temporary Session"
+ Added ability to reorder sessions list

v2.5b2 — 2013-03-17Download Here
! Fixed some broken icon(s) since v2.5b1 Win7-Fix
! Fixed catalog above/below tree for sessions with layout (while keeping things smooth - tricky one!)

v2.5b1 — 2013-02-21Download Here
! Fixed missing active session and menus under Win7
* Streamlined code to use "_Initialize"
+ Abused said code, so SM subscripts can now be called directly

v2.5a2 — 2012-12-10Download Here
+++ Layout Extras
   A layout Extra is the state of the content of some of XYplorer's interface elements (Toolbar buttons, Catalog, Tags, PortableFileAssociations)

v2.0a1 — 2012-10-13 (internal)
+++ Sessions can now be saved with a layout
   A Layout is the state of the interface of XYplorer (Visibility of: Single/Dual Pane; Navigation Panel; Tree; Catalog; Toolbar; Addressbar; Tabbar; Menu; Info Panel)

v1.02 — 2012-10-21Download Here or Here (at bottom)
! Fixed bug when sessions had same base name
! Fixed potential bug of weird menu behavior
* Changed Main Menu readability (unusable lines are grayed-out)
* Changed Delete Window readability (current session information, etc.)

v1.00 — 2012-10-19
* Changed the Delete action from dropdown menu to multi-selectable list
+ Added an option to always activate dual pane when opening sessions.
+ Added &Accelerator keys on all menus.
+ Added a link to Session Manager post in XYplorer forum.

v0.97 — 2012-10-12
+ Added "Configuration" entry to Main Menu,
... to easily change Confirmation setting for Reset and Update,
... and leave room for other potential options.
* Active session is now written in bold for a much better legibility.

v0.96 — 2012-10-09
+ Added tweak to remove confirmation dialog for "Reset" and "Update":
... $CONFIRMATION = 0; (in header of SessionManager.xys)
...Confirmation is ON (i.e. 1) by default (See Notes for more info)
* Renamed "Save Session..." to "Save Session as..."

v0.95 — 2012-10-07
! Fixed "No session found to load" when no session exists.
* The "About..." is now named "About Current Session" when a valid session is active (both tabsets in their right pane).
...Otherwise the "About..." is now named "About Current Tabsets", and is 'starred' to draw attention to the non-valid-session state.

v0.93 — 2012-10-06Download here
* Removed dependency on script name. Now you can rename the script and even move it elsewhere (e.g. <xyscripts>\Extras\SessMngr.xys)

v0.92 — 2012-10-06
+ Integrated list of loadable sessions in "Main Menu".
- Removed "Load Menu".
* Changed script to XYS script file (needed for dynamic menu creation).
- Removed ability to integrate script to another menu (drawback of using a XYS).

v0.91 — 2012-10-05Download here
* Cosmetic. Removed "..." after session name in "Load Menu".

v0.90 — 2012-10-05
Public release

v0.0 ~ 2012-01-01 (internal)
Initial development
Last edited by FluxTorpedoe on 25 Sep 2022 15:03, edited 98 times in total.

kunkel321
Posts: 645
Joined: 10 Jun 2012 03:45
Location: Near Seattle

Re: Session Manager [v0.91]

Post by kunkel321 »

Wow that's awesome! Thanks so much for making and posting this.
It's far far beyond my scripting abilities, but it worked first try. :biggrin:

I was just thinking about how to save dual-pane bookmarks--this certainly does the trick.

Not sure if you're taking feature requests... But maybe have the names of the profiles in the main popup menu, with an arrow ">" pointing to which ever is the currently set one... I guess this would require the script to change as new profiles were added (?) But you must be writing to an INI anyway...
ste(phen|ve) kunkel

FluxTorpedoe
Posts: 855
Joined: 05 Oct 2011 13:15

Re: Session Manager [v0.91]

Post by FluxTorpedoe »

Glad you found it useful! :D
maybe have the names of the profiles in the main popup menu, with an arrow ">" pointing to which ever is the currently set one...
You mean like having the Load Menu, with the names of all your sessions, integrated in the Main Menu below the "About"?
That may be an interesting... but weird idea! :wink:
Because the cost to save one click would be to have the Main Menu quite crowded, which would render things confusing especially for those who already have it in another custom button. Or did you mean something else?

EDIT: And no, the script is currently self-contained (no INI or extra files).

FluxTorpedoe
Posts: 855
Joined: 05 Oct 2011 13:15

Re: Session Manager [v0.91]

Post by FluxTorpedoe »

Well, I couldn't help but give it a go... & I kinda like it! :biggrin:

This meant I had to switch to an xys script file, so it cannot be integrated to an already existing customized menu anymore (I guess).

I tried the ">" and indentation to mark the active session, which was ok, but then I remembered that Filehero had used star icons in its LayoutManager. So I took the liberty to borrow his idea, and it looks much better! :wink: . Well, it looks dirtier in my case because this icon (like the others) is drawn from the system shell. It's probably quite different under Win7.
SessionManager(Int).jpg
SessionManager(Int).jpg (25.64 KiB) Viewed 29370 times
Note: A session is "starred" (marked as loaded) only if it's a valid session (both tabsets in their right pane).

To use this version, first, copy the following file into XYplorer scripts folder: <xyscripts> ,
SessionManager.xys
(15.08 KiB) Downloaded 781 times
then either:
1. add load "SessionManager.xys"; to your custom button, or
2. use the following snippet:

Code: Select all

Snip: CTB 1
  XYplorer 11.60.0207, 05.10.2012 17:30:00
Action
  NewUserButton
Name
  Session Manager
Icon
  :tabsets
ScriptL
  load "SessionManager.xys";
ScriptR
  
FireClick
  1
[/size]
I'll wait till it's "validated" enough to update the first post.

Enjoy! 8)

FluxTorpedoe
Posts: 855
Joined: 05 Oct 2011 13:15

Re: Session Manager [v0.91]

Post by FluxTorpedoe »

====================
Session Manager v0.93 / Alternate
====================

Changelog:
v0.93

* Removed dependency on script name. Now you can rename the script and even move it elsewhere (e.g. <xyscripts>\Extras\SessMngr.xys)

I'll wait till it's "validated" enough to update the first post.
Attachments
SessionManager.xys
(15.06 KiB) Downloaded 776 times

klownboy
Posts: 4052
Joined: 28 Feb 2012 19:27

Re: Session Manager [v0.91]

Post by klownboy »

Hey FluxTorpedoe, great idea! I loaded your latest posted version 0.93 and received the XY message "No session found to load". Obviously, my first time loading the script and then on subsequent clicks but I never got the menu to load. I made a screen clip, but I figured it wouldn't be necessary to send it along. I had assigned the script to a TB button. I then loaded the original posted version (0.91) and it did work. I figured I'd pass that on.
Thanks and again, great idea,
Ken
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

Filehero
Posts: 2642
Joined: 27 Feb 2012 18:50
Location: Windows 10 Pro x64

Re: Session Manager [v0.91]

Post by Filehero »

Hi,

yep, a great idea.

I have an experimental - and less sophisticated - version of tab storage implemented in my LayoutManager for quite a long time but never dared to release it since tab sessions aren't really related to layouts. So, I'm happy that someone else started to take care of that. :)

If I find some time tomorrow I'm gonna give it a try.


Cheers,
Filehero

kunkel321
Posts: 645
Joined: 10 Jun 2012 03:45
Location: Near Seattle

Re: Session Manager [v0.91]

Post by kunkel321 »

Awesome thanks! 091 seems to work here....
Image

I haven't tried the self-creating one... I just put a User Button on my toolbar and made the On-Click cmd = Load "your file in my script folder"

Note that newly created (saved) Sessions didn't show up in the list until I restarted XYplorer...

The little star is better than the ">" :biggrin: I think it's a nice feature, because if a person goes to do a 'Session Update' they'll first get a quick reminder of which profile is about to be over-written.
ste(phen|ve) kunkel

kunkel321
Posts: 645
Joined: 10 Jun 2012 03:45
Location: Near Seattle

Re: Session Manager [v0.91]

Post by kunkel321 »

Sorry, I meant the above is v0.93, not 91! (I'm putting this comment as a reply, because I've found that when I edit an existing post, it doesn't always show up.)

Also: I can try the more automated one if no one else does... I just don't want to mess up my setup by doing both versions...
ste(phen|ve) kunkel

FluxTorpedoe
Posts: 855
Joined: 05 Oct 2011 13:15

Re: Session Manager [v0.91]

Post by FluxTorpedoe »

@klownboy
I loaded your latest posted version 0.93 and received the XY message "No session found to load".
Dang! A remnant of the original design, thanks for pointing this out. Fixed in v0.95.

@kunkel321
The little star is better than the ">" I think it's a nice feature, because if a person goes to do a 'Session Update' they'll first get a quick reminder of which profile is about to be over-written.
Indeed...
In general, I so like the new 'integrated' method that I decided to make it the official one! 8) (I'll leave the previous available just in case, but no need to test it if you don't use it.)

@Filehero
For my personal needs, I'd made my "Session Manager" pretty soon after Don created the tabsets, so I was using it and didn't look further... But it was seeing your "LayoutManager" that gave me the incentive to share it! :biggrin:

FluxTorpedoe
Posts: 855
Joined: 05 Oct 2011 13:15

Re: Session Manager [v0.95]

Post by FluxTorpedoe »

Note that newly created (saved) Sessions didn't show up in the list until I restarted XYplorer...
Can't repro here...
If you save a session e.g. "Test", the menu is closed, the status bar reads "Session 'Test' saved successfully", and this session is automatically 'active' behind the scenes (that's the way tabsets work). So if you click again on the SessionManager button, you should have the menu with session "Test" marked by a star.
There shouldn't be any relation nor need to close XY, because the sessions list is 'guessed' by directly reading the folders available from the "Panes" folder.

Please confirm, or if someone else can reproduce...

& BTW, any request is welcome! (as long as I can manage to get online :lol: )

klownboy
Posts: 4052
Joined: 28 Feb 2012 19:27

Re: Session Manager [v0.95]

Post by klownboy »

Hey FluxTorpedoe, v.95 loaded like a charm. The first thing I did was to save my tabset configuration, or I should say Session, as "Original" (What an original idea!). I checked in the Panes sub folder and saw how the two panes were saved and also noticed that my pre-existing panes were still there in tack.

However, after performing some operations and I think I may have also did an update using Simple Updater (by serendipity) I noticed that all the icon for my tabs were a exclamation point triangle!!!! as if I had an improperly assigned icons (but mine were all fine at least initially). I don't know if this is because the script didn't save the configuration properly or I didn't "save all" at some point? I closed and reopened XY and the icons were still missing. I then clicked on my Session Manager Toolbar button and clicked on the my new "Original" session and the tab icons came back. Note: I do not have my configuration saving automatically. I'm not sure what happened there, but I figured I'd pass it on. I don't seem to be having a problem now after exiting and re-starting XY a number of times.

Separate question; when saving the current session (with the same name), is it best to use "session - update..." as oppose to "save session...". It seems that save session is more appropriate to save the existing configuration "session" with a new session name (i.e., a "save as" situation).
Thanks again,
Ken
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

kunkel321
Posts: 645
Joined: 10 Jun 2012 03:45
Location: Near Seattle

Re: Session Manager [v0.91]

Post by kunkel321 »

My previous post wrote:Note that newly created (saved) Sessions didn't show up in the list until I restarted XYplorer...
Hmmm... I can't reproduce it either... Not sure what happened.
Interestingly, I tried a fresh copy of XYplorer, by making myself a "Program Files/XYtemp" folder, and copying xyplorer.exe into it (a tip I got from another forum member). This allows me to run a copy of XY that is as though it were just installed for the first time. Anyway, it creates its own scripts file so I put 093 in there and pointed a button to it (same setup as above). It doesn't launch at all... I just get an error message "No session found to load." Probably its a problem with my setup and not your script--I dunno... [edit] Note that I did save a TabSet in XY, expecting that the SesMan script would maybe read access it, and also I restarted my temp XY... No luck.

So I tried recreating the above problem by using my normal registered version of XY. Deleted all but one Session, then created a couple more... All of them showed up in the list immediately, as expected.
Last edited by kunkel321 on 07 Oct 2012 19:47, edited 1 time in total.
ste(phen|ve) kunkel

kunkel321
Posts: 645
Joined: 10 Jun 2012 03:45
Location: Near Seattle

Re: Session Manager [v0.95]

Post by kunkel321 »

klownboy wrote:Separate question; when saving the current session (with the same name), is it best to use "session - update..." as oppose to "save session...". It seems that save session is more appropriate to save the existing configuration "session" with a new session name (i.e., a "save as" situation).
Hmm.. Good point. Not sure on this... klownboy has a good point though. Maybe the nomenclature should be

Session -- Reset...
Session -- Redefine Current...
--------------------------
- Save New Session
- etc

I dunno.
ste(phen|ve) kunkel

Post Reply