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

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

Re: Session Manager [v6.90]   —   Bookmarks of tabs and/or layouts

Post by FluxTorpedoe »

Hi’ and thanks for the feedback.
Glad it’s working as you needed it to!
And I did find an… elegant way ;) to prevent any button update in v7.00 (even when using tabsets or invalid sessions), and without burdening the interface with a new option. In your case, you won’t even have to change anything: the toolbar button from which Session Manager is launched won’t be updated if no custom icons are used, and the "Button: Display […]" option is ON.

Regarding the option(s) that could no be unset, I tried setting all ON then OFF in v6.80 and v6.90 but couldn’t reproduce… 🤔
Note that some options are grayed-out depending on the situation: e.g. no valid session active or no session at all, exclusive options…
e.g. "Layout: Always Load Default […]" and "Standard: Always Load Default […]" are only available resp. if you use layouts or not ("Use Session Layouts"); and "AutoUpdate All: Update Every Session […]" and "AutoUpdate Single: Autosave […]" are mutually exclusive.

In any case, lots of potential (and mostly very rare) issues are fixed/prevented in v7.00…
But don’t hesitate to raise issues or questions!

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

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

Post by FluxTorpedoe »

 
#####################
###  Session Manager v7.00  ###
#####################



Hi everyone,

Here comes a HUGE maintenance release, with a few enhancements, and lots of changes mainly under the hood.

Most notable  (full list and more details available below in changelog)  :
+++ Mouse modifiers (MM) when clicking on a session name
++ Append tabs: Now imports only non-duplicate tabs, only in visible pane(s), at the end, and with tab name colored
+* Temporary session: Now a single renamed action "Copy to Temporary Session" which behaves like a backup (no loading)
*** Cleaner interface (hopefully), with old "Options" menu now split and reorganized into "Actions" and "Options"
+! Case discrepancies fixed, when loading externally (e.g. Project instead of project), plus quickloading support
+++ New "Options > Maintenance Check..." that checks, optimizes and fixes several potential problems
   i.e. integrity and completeness of SessionManager.ini, XYplorer tweaks, orphan tabsets...
   Note: Also performed automatically on Session Manager update
+*! For better performance/experience, 6 XYplorer tweaks are now checked on Maintenance/Update (see full changelog)
+ "Layout Tools": Added "Toggle Dark Mode" for quick access
+ "Actions > Change Icon of Sessions...": Updated list with 6 new internal icons to choose from
*** Various optimizations, mainly to make things cleaner, but also marginally faster (gain of ~15ms here vs 6.90, YMMV)
!!! Lots of fixes and safeguards: mainly against improbable events (incl. tampering with panes folder or SessionManage.ini)
* Note: SessionManager.ini now always in UTF-16LE (converted on update if necessary)

Have a nice day! 8)
   Flux

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

• DOWNLOADS:   (previous versions available in Changelog)

› Script:
SessionManager.xys
(231.73 KiB) Downloaded 282 times
› Script in UTF-16 LE: (Special version for foreign languages who encounter "invalid character" issues)
SessionManager-UTF16.zip
(58.93 KiB) Downloaded 127 times
› Languages:
   Don’t forget to come back here to check when language files are updated.
   Installation: Just copy the (extracted) language file (eg. SessionManager.it) in the same folder as the script itself (SessionManager.xys).
   Note: All the following files work with Session Manager latest version (untranslated strings will just be displayed in English).
 — Čeština by Hogatyv6.50+
 — Dansk by Regmosv6.50+
 — Italiano by Flora_RMCv6.90+
 — Deutsche by Dean36v6.60+
 — Português (Brasil) by SkyFrontierv5.2+
 — Français by pseudozv4.b1+
 — 中文 by Haodeav6.80+

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

• REQUIREMENTS:
 — XYplorer >= 19.90.0112 (Recommended: XYplorer version >= 22.90.0107)

• INSTALLATION » for first-time users:
 — Please refer to first post

• UPDATE » for all users:
 — Overwrite your existing "SessionManager.xys" file with latest version
 — Note: On first run, an XYplorer and Session Manager maintenance check is done which may display a confirmation message, you can safely press OK.
      (Or run it later via "Options > Maintenance Check...")

• UPDATE » for non-english users:
 — Also download one of the language files and extract it into the same folder as SessionManager.xys (language detection is automatic)

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

• CHANGELOG – v7.00:
+++ 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


• CHANGELOG – all versions:
Don’t hesitate to browse the exhaustive changelog (with download links to previous versions) here: • Session Manager Changelog •

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

• TRANSLATORS:
 — New contributions are more than welcome!
 — please head to the dedicated post on the ML forum for the changelog and latest english language file
Last edited by FluxTorpedoe on 26 Sep 2022 15:24, edited 1 time in total.


oblivion
Posts: 141
Joined: 13 Apr 2011 11:35

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

Post by oblivion »

I've said it before, I think... this is the one script that has made my life soooooo easy. I can flip between different workflows, information sets, even styles of working so easily with this and it just goes on getting better!

Thank you for all your amazing work on this :appl: :appl: :appl: :appl: :appl:
-- bests, Tim

...This space unintentionally left blank.

Malarki
Posts: 109
Joined: 03 Dec 2019 02:51

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

Post by Malarki »

Yes, many thanks yet again. This makes what would be tedious and error-prone task / project switching reliable and predictable.

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

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

Post by FluxTorpedoe »

 
Thanks a lot for the feedback! :)

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

❖ Redirection of the thread Session Manager and Toolbar Button Sets
Ian wrote:I use session manager extensively and have also found the recent addition of toolbar button sets to XY a particularly useful additional benefit I seem to be using quite abit.
Whilst session manager allows a configuration of the toolbar set in the different sessions; when changing button sets the same session remains open.
So a wish for session manager that has raised itself a few times; is that when changing button sets it would be useful to have an option within session manager to hold different sessions within each button set, making it possible to change a session when changing a button set (Possibly by using different CTB's for session manager the same effect could be achievable), but this is looking to see if an incorporation of that functionality within session manager is desirable. If that is possible it would need to be an option, both because of the potential for confusion and some session uses need to remain within the same session when briefly opting for another button set to make an unforeseen task easier.
Is such an aleration to session manager possible, would it be sufficiently useful for others, and would FluxTorpedoe have the generosity and time to make such a change?
Quick note first: I didn’t reply earlier, was busy working on your other request and ironing out the new version of Power Opener (formerly known as Power Launcher). It will be online in a couple of days.
Now, regarding this request, if I understand correctly, it seems a little far fetched for an implementation in Session Manager… The way you suggest it, there would need to be some kind of monitoring (not resources-friendly) to see if there’s a toolbar change, that would then trigger the correct session change. Plus some "smartness" in it to guess which session? (because a same toolbar can be used by many sessions…)

A simpler way would be to use as many mini-scripts as you need, attached to different CTBs as you mention, or keyboard shortcuts, Catalog, etc.
Those scripts would consist of two lines: one that loads the toolbar, the other one that loads the intended session (details on how to do that in Session Manager menu > Options > Help: Cheat Sheet). e.g.

Code: Select all

toolbar("tbs,menu,back,ctb1,ctb2,…");
global $DYN_inpSess = "MySessionToLoad"; load "SessionManager.xys", "_Load";
Let me know if that’s what you were after somehow (if I understood correctly).

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

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

Post by klownboy »

To manage what Flux stated above, keep in mind that you can easily save toolbars (as many as you like) to text files making it easy to open your pre-made toolbars. So, the first line in Flux's post could simply be, toolbar(readfile("path to\MyUtilityToolbar.txt"))
You can write your new toolbars with a line like, writefile("MyFileOpsToolbar.txt", $TB_build); where $TB_build is the toolbar listing "tbs,menu,back,ctb1,ctb2,…"
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

Ian
Posts: 9
Joined: 03 Jul 2019 12:42

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

Post by Ian »

Thank you for the responses and suggestions. Although involving slightly more actions, I found a different route to answer my needs.
Using a small desktop application launcher, Launchy (from launchy.net - the web site can be slow) and using that, coupled with XY configurations, a second instance of XY is launched to carry out the work whilst retaining the original XY instance.
Durng the creation process for configurations things can at times appear complicated, especially when also mixing different scripts for different configurations, but it works well. Completely different toolbars, button sets, and script configurations become possible leading to endless possibilities. The joy of Xyplorer!
XY, session manager, power launcher (or the new power opener when released) and other scripts can all then contain very focused actions, reducing complexity in the main configuration and overcoming the difficulties outlined in monitoring which toolbar is showing. Excellent for focused tasks.
I made some notes whilst configuring XYplorer here, and if thought useful they can be made generic, tidied up and posted.
Time is short everywhere, but keep up the good work because a great deal of most useful software is produced.

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

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

Post by FluxTorpedoe »

Glad to know you’ve found a way!
And nice tip from klownboy. ;)
Indeed, it’s always impressive to see what can be done with XYplorer !…

Note: I’ll be offline for a few months, but will read all the posts when I’m back.

In the meantime, enjoy & have a nice day, 8)

   Flux

cwq23us
Posts: 2
Joined: 08 Jan 2023 20:39

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

Post by cwq23us »

I'd like the Info pane to focus on the Properties tab when I reset the session. Can I do that?

Previously it used to focus on the "Preview" tab all the time. Now it just stays focused on whatever tab is focused when I reset.

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

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

Post by klownboy »

Flux should answer this, but search SessionManager.xys for "#1023" without the quotes. There's only one and it should be on line #2799). Change #1023 to #1020 and see if that does what you want.
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

cwq23us
Posts: 2
Joined: 08 Jan 2023 20:39

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

Post by cwq23us »

Brilliant! 👍 Thank you! I never even thought to look in the script itself. Now I just have to remember this tweak whenever I version up. Or can I make it an official feature request?

WirlyWirly
Posts: 195
Joined: 21 Oct 2020 23:33
Location: Through the Looking-Glass

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

Post by WirlyWirly »

From viewtopic.php?t=25686
oblivion wrote: 16 Jan 2023 19:18 SessionManager has suddenly stopped working as expected -- since updating to the current beta this morning.

My workflow is lying in a corner, panting... basically, the list of defined sessions is no longer displayed.

I think the last beta I was using was 0412 -- I'm going back to that one and will report back if I'm wrong. :)
Just updated myself and noticed this too. The menu is empty, but I load my sessions using the global variable $DYN_inpSess = "Coding"; load "SessionManager.xys", "_Load"; and I get a message saying "No matching session found, check spelling".

------------------------------------

In the meantime, I modified my loading script to use XY's built-in tabset() function instead. Here's that script for anyone who might want to use it, replace the tabset names (such as §1§_Default) with those of your tabsets in the <xypanes> folder.

I noticed right-away how fast they load using tabset() instead of going through SessionsManager. I don't know if there's anything you'll be missing out on by not loading them through SessionsManager, but it is something I'm curious about @FluxTorpedoe. I use the same layout/toolbar/configuration across all tabsets saved through SessionManager, but if I didn't maybe I'd notice something not loading properly?

Code: Select all

/*
A quick switch-menu for loading tabsets

1 tab per submenu
DISPLAY|DATA (return value)|ICON|STATE

*/

    $menu = <<<MENU
0) Default|tabset('load', '§1§_Default', 1); tabset('load', '§2§_Default', 2);|<xyicons>\programs\xy.ico
1) Coding|tabset('load', '§1§_Coding', 1); tabset('load', '§2§_Coding', 2);|<xyicons>\code\sh.ico
2) FileBot|tabset('load', '§1§_FileBot', 1); tabset('load', '§2§_FileBot', 2);|<xypath>\..\FileBot\filebot.exe
3) Manga|tabset('load', '§1§_Manga', 1); tabset('load', '§2§_Manga', 2);|<xyicons>\other\manga.ico
4) Music|tabset('load', '§1§_Music', 1); tabset('load', '§2§_Music', 2);|<xyicons>\filetypes\audio.ico
5) AudioBooks|tabset('load', '§1§_AudioBooks', 1); tabset('load', '§2§_AudioBooks', 2);|<xyicons>\other\audiobooks.ico

MENU;

    // Get X/Y position of a control
    $position = controlposition('TAB 1', 0);
    $x_pos = gettoken($position, 1, '|');
    $y_pos = gettoken($position, 2, '|');

    // Display the context menu
    $command = popupnested($menu, $x_pos, $y_pos, 7:="|");

    // Run the selected command or skip if it uses an id #
    if ($command && !regexmatches($command, '^\#\d+$')) { load $command,, s; }

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

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

Post by klownboy »

You should be seeing faster and smoother session changes with beta v24.00.0301 and later. See viewtopic.php?t=25750
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

elbitjusticiero
Posts: 32
Joined: 11 Mar 2018 20:57

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

Post by elbitjusticiero »

Suddenly, whenever I try to change sessions, I get this error from XYplorer:

Code: Select all

Error:  	384 (0x00000180)
Desc:   	A form can't be moved or sized while minimized or maximized
Dll:    	0
Proc:   	script_Process: winpos

Source: 	XYplorer
XY ver: 	XYplorer 24.20.0000 - Lifetime License Enterprise
OS:     	Windows 10 Pro, 64-bit, Version 21H2, Build 19044.2604 (10.0)
Locale: 	3082 (es-ES)
ANSI:   	1252, ACP: 1252  (ANSI - Latin I)
Font:   	Ubuntu 8,75, Segoe UI 10,1, DBCS: No
DPI:    	110,769230769231 (115,384615384615%), 1920x1080

Date:   	2023-03-02 18:44:59
This had happened a few days ago, but the problem seemed to solve itself somehow. Now it has returned.

After clicking on "Close", the icon for the desired session is shown, but everything else remains the same. i.e. I stay in the original session.

Post Reply