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

[Feature request] TST in Separate Window (TSTSW) relay commands to "Main window"/window its the sidebar function of. #15

Closed
SHHSSH opened this issue Nov 20, 2023 · 16 comments
Labels
question Further information is requested

Comments

@SHHSSH
Copy link

SHHSSH commented Nov 20, 2023

Initially I thought that the TST separate window was recently capable of acknowledging that the user would prefer that the focus be directed to the main window after using a hotkey like Ctrl+T in the TST separate window. However, this is not the case and the user is unable to Ctrl+L or the likes for quick URL input.

I was almost under the impression that this was a feature but then I noticed that it was still focusing on the TST separate window. I was unable to Ctrl+L to the address bar, even though visually, one may be forgiven for perceiving the focus as being directed to the main window, due to the new tab page actually appearing.

I am writing this to request a potential feature of TSTSW relaying input commands to the main window that it is the sidebar for?
I will also reference the below thread for relevance, however, this does not allow(it seems for me) for the capability of hotkeying to your address bar, nor obviously any other TST custom commands. piroor/aggregate-tabs-to-main-window#9 (comment)

OK I've implemented the option with the commit 8f01178. But please note that it won't work with macOS (effective only with Linux or Windows) due to the detection method.

* Firefox doesn't expose the reason of new tabs to addons.

* On Linux and Windows, the browser window gets focus after a new tab is opened from external application, so we can detect tabs opened with no focused window are opened from external.

* On macOS, always the browser window gets focus before a new tab is opened from external application, so we can not separate cases about external applications and manual operations.

As with the hotkeys for collapse/expand all when used in the TST separate window it's not relayed/functional to the main window and this is rather conflicting intuitively when working within the sidebar.

I wonder if at all possible the Aggregate Tabs to Main Window add on could be relative/helpful here?

I know this is a substantial request @Lej77 & @piroor
I am, as we surely all are, endlessly thankful for the customisation you two put into these addons.
Thanks.

@Lej77
Copy link
Owner

Lej77 commented Nov 20, 2023

Does your setup look like this:
bild

And are you using the default settings:
TST sep win focus options

Because focus should be automatically moved to the parent window after you click on the separate TST window.
Tst sep win - Focus changes
(Notice how the title of the sidebar window is only white for a short time before it becomes grayed out again.

@Lej77 Lej77 added the question Further information is requested label Nov 20, 2023
@SHHSSH
Copy link
Author

SHHSSH commented Nov 23, 2023

Basically that doesn't occur on mine and my settings are as you posted.
When I Ctrl+T it will bring up a new tab in the smaller window which is only meant to be for the TST Separate window.
Even when using the + button it also doesn't refocus the main window.

@Lej77
Copy link
Owner

Lej77 commented Nov 23, 2023

Well, if the main window isn't refocused when you press on the sidebar window then I don't know why that would happen. I am running Firefox on Windows 10 so its possible that window focus isn't supported on some platforms. Here is another GIF that shows how I open a docked window:

Tst sep win - configure

@SHHSSH
Copy link
Author

SHHSSH commented Nov 29, 2023

Well, if the main window isn't refocused when you press on the sidebar window then I don't know why that would happen. I am running Firefox on Windows 10 so its possible that window focus isn't supported on some platforms. Here is another GIF that shows how I open a docked window:

Tst sep win - configure Tst sep win - configure

I'll touch base when I give it a bit more of a look into in weeks to come sir, I am using 11.
Thanks for your suggestions.

@SHHSSH
Copy link
Author

SHHSSH commented Jun 10, 2024

I'll give this another go sometime soon as I'm thinking it may be a Sophos HitmanPro issue as it often is with certain hooking issues and what not.

Currently I'm using a program called OnTopReplica to mirror with TST in Seperate Window then I force it Always on Top and nircmd its transparency to 0 and I am actually able to have a fullscreen browser again with just a little side overlay of the TST tree.

But it's such a bastard of a thing... as the functionality of a "Click Forwarding" feature within the OnTopReplica application is not properly functional for programs like Firefox... fml :|

Thanks for your clarification all those months ago though.

@SHHSSH
Copy link
Author

SHHSSH commented Jun 10, 2024

Tbh, I think yours may only work since it's "docked", I was not using that option because I found it semi-redundant as TST is already on that side.

But I believe I can utilise it in such a manner because I can just then F11 to fullscreen it away...
I think that's a better solution for me.

@SHHSSH
Copy link
Author

SHHSSH commented Jun 11, 2024

One of the most recent updates of TST with arrow key navigation has been a Godsend solution for this too.
I can now macro through the TST tree with ease without actually having to have the whole tree visible on the left and can just TSTSW and mirror its window then customise the window size to my preference and overlay :)

Thanks for all the help you gave mate, really enjoy a few of your addons.

@SHHSSH SHHSSH closed this as completed Jun 11, 2024
@Lej77
Copy link
Owner

Lej77 commented Jun 11, 2024

Glad my addons can be useful to others as well!

Also wanted to mention that this addon will only take control of "docked" windows. So those are the only windows for which I attempt to re-focus the parent window. If you don't want the docked window to be beside the parent window then you could disable the Control the position and size of docked sidebar windows option.

@SHHSSH
Copy link
Author

SHHSSH commented Jun 12, 2024

Yep, definitely will only attempt to work with it being docked from now on and separate its position.
I did notice much better functionality with it being docked.

Random question regarding another addon I've used of yours for ages too since it provides a hotkey to unload tabs; are you using the tab hiding feature of your other addon - Tab Unloader for Tree Style Tab?

I tried it a year or so ago and I didn't mind it but one thing I ran into which made it totally unusable was that I wasn't particularly able to toggle its option with ease? I was having to keep the options open to toggle it...
If you were to integrate a hotkey for toggling that, I think it would be used by a lot of people tbh.
Albeit, I am pretty vigilant in not having more than a few hundred tabs, it would still be very useful to hide many of the unloaded ones.

@Lej77
Copy link
Owner

Lej77 commented Jun 12, 2024

Actually I never ended up using that feature because its performance was a bit too slow for me. I usually have about 5000 tabs open (with about 1000 per window) and it was a bit slow to hide that many tabs. The feature is a bit niche since it is not that useful unless you change TST to show hidden tabs. That is mostly possible by enabling the hidden renderHiddenTabs option and overriding the default CSS rules but its somewhat hacky and might have some rough edges.

I guess toggling hidden tabs on and off with a keybinding might make the feature useful even when TST isn't showing hidden tabs (but it would run into the performance issue of hiding many tabs more often). Anyway I will put that on my todo list, not sure when I get around to updating the addon though.

@SHHSSH
Copy link
Author

SHHSSH commented Jun 12, 2024

That is crazy, lol... I have had too many cases where Firefox stuffs up(often due to an update that I've set to manual recently) where I lose all my tabs :|

But otherwise I'd probably do that too.
Yep I am aware of the required TST option for it to work :)

Thanks for the consideration mate, be well.

@Lej77
Copy link
Owner

Lej77 commented Jun 12, 2024

I actually backup my sessionstore data from %AppData%\Mozilla\Firefox\Profiles\PROFILE_NAME\sessionstore-backups\recovery.jsonlz4 every 20 minutes. So if my session is destroyed, which has happened a couple of times, then I can just go back into a previous working state.

@SHHSSH
Copy link
Author

SHHSSH commented Jun 12, 2024

How do you that? Every month or so I do backup my profiles, however, to mitigate risk of loss in the past I've just copied all URLs to clipboard prior to exiting for an update etc.

@Lej77
Copy link
Owner

Lej77 commented Jun 12, 2024

I actually use Cobian Backup 11 (Not its successor Cobian Reflector) and set it to make a full backup of only that recovery file every 20 minutes. But if you just wanted to backup that file I guess you could use a script and run it using something like Windows' Task Scheduler.

To restore the file I close my browser then copy and rename the backup to %AppData%\Mozilla\Firefox\Profiles\PROFILE_NAME\sessionstore.jsonlz4 and start the browser.

@SHHSSH
Copy link
Author

SHHSSH commented Jun 12, 2024

Oh actually I use a program called Syncovery for backups and syncing of folders -
capture_005_13062024_014557

I should have thought of that but yep, thanks for the recommendation and clarification of what to backup :)

I'm really enjoying a recently added feature in TST of Arrow Key navigation, it's great, you should check it out.
Here's a discussion I'm currently having with piroor about it - piroor/treestyletab#3574 (reply in thread)

Lej77 added a commit to Lej77/tab-unloader-for-tree-style-tab that referenced this issue Jul 26, 2024
fixes #42 and fixes #45.

Also adds keyboard shortcut as suggested in Lej77/tree-style-tab-in-separate-window#15
@SHHSSH
Copy link
Author

SHHSSH commented Jul 26, 2024

Cheers for the implementation mate, works well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants