-
-
Notifications
You must be signed in to change notification settings - Fork 527
Reuse existing tabs in bookmarks plugin #4189
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
Open
andrzejmartyna
wants to merge
36
commits into
Flow-Launcher:dev
Choose a base branch
from
andrzejmartyna:feat/reuse-tabs-in-bookmarks-plugin
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+998
−9
Open
Changes from all commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
c4549d6
Implement reusing of existing tabs
andrzejmartyna 02248eb
Add ReuseTabs to Settings
andrzejmartyna 20f898c
Additional attribution
andrzejmartyna df900f5
small tweaks
andrzejmartyna c8bf643
Merge branch 'dev' into feat/reuse-tabs-in-bookmarks-plugin
andrzejmartyna 9a2e340
remove self-marketing
andrzejmartyna 382dd79
Update THIRD_PARTY_NOTICES
andrzejmartyna ecfe8c3
Resolved: TabsTracker is not disposed - potential resource leak.
andrzejmartyna f2dd4d9
Resolved: Fix grammar: use 'its' instead of 'it's'.
andrzejmartyna 944e3d7
Resolved: Minor grammar and style corrections.
andrzejmartyna 951ef81
Resolved: Populate or clarify empty Type and Commit fields for Browse…
andrzejmartyna f8c1780
Resolved: Populate empty PackageUrl and Copyright fields for Flow.Lau…
andrzejmartyna 7890102
Resolved: Incorrect ClassName - copy-paste error.
andrzejmartyna b390645
Resolved: Revert changes in Non-English language. They will be update…
andrzejmartyna 876cbfd
Resolved: a few issues reported by coderabbitai
andrzejmartyna 1f45c02
Added TODO.md for ideas to improve
andrzejmartyna 1bac95d
Resolved: Use the wrapper property for consistent binding. by coderab…
andrzejmartyna 0f7ef77
typo
andrzejmartyna 791ff47
Fix typos
Jack251970 a6acdd4
Fix typos
Jack251970 d1e5b70
Fix typos
Jack251970 9d27bcf
feat: added cleaning cache on tabs and windows closing
andrzejmartyna 736e376
Resolved: several issues reported in PR
andrzejmartyna 75a03d0
Fix typos
Jack251970 cdb2d9e
Take Thread.Sleep out of OnFocusChanged
andrzejmartyna a472725
Resolved: Thread-safety concern: _browserWindowsTracked modified with…
andrzejmartyna 36b7799
small tweaks
andrzejmartyna 42a91fb
Refactor tab tracking for thread safety and nullability
Jack251970 9fadec3
Remove null check from _tabsTracker.Dispose() call
Jack251970 6c5695b
Unify logging messages
andrzejmartyna 680de61
Significant improvements in handling tabs in multi-browsers, multi-wi…
andrzejmartyna a30180c
doc: README.md updated as known issue was resolved
andrzejmartyna f901836
improve _structureInvalidations handling
andrzejmartyna c75cb1a
Resolved: a few PR issues reported by coderabbitai
andrzejmartyna 37c7337
fixed: fixed KeyNotFoundException and improvement
andrzej-martyna-he 84ef5aa
Remove 'experimental' label from reuse tabs option
andrzejmartyna File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
104 changes: 104 additions & 0 deletions
104
Plugins/Flow.Launcher.Plugin.BrowserBookmark/THIRD_PARTY_NOTICES.json
Jack251970 marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,104 @@ | ||
| [ | ||
| { | ||
| "PackageName": "BrowserTabs", | ||
| "PackageVersion": "0.2.0", | ||
| "PackageUrl": "https://github.com/jjw24/BrowserTabs", | ||
| "Copyright": "Jeremy Wu", | ||
| "Authors": [ | ||
| "Jeremy Wu" | ||
| ], | ||
| "Description": "Library for retrieving all opened browser tabs in Chromium-based and Firefox-based browsers", | ||
| "LicenseUrl": "https://licenses.nuget.org/Apache-2.0", | ||
| "LicenseType": "Apache-2.0", | ||
| "Repository": { | ||
| "Type": "git", | ||
| "Url": "https://github.com/jjw24/BrowserTabs", | ||
| "Commit": "8d81f8f686e82ddceb3e1a8a49e698cec56b5e3d" | ||
| } | ||
| }, | ||
| { | ||
| "PackageName": "CommunityToolkit.Mvvm", | ||
| "PackageVersion": "8.4.0", | ||
| "PackageUrl": "https://github.com/CommunityToolkit/dotnet", | ||
| "Copyright": "(c) .NET Foundation and Contributors. All rights reserved.", | ||
| "Authors": [ | ||
| "Microsoft" | ||
| ], | ||
| "Description": "This package includes a .NET MVVM library with helpers such as:\r\n - ObservableObject: a base class for objects implementing the INotifyPropertyChanged interface.\r\n - ObservableRecipient: a base class for observable objects with support for the IMessenger service.\r\n - ObservableValidator: a base class for objects implementing the INotifyDataErrorInfo interface.\r\n - RelayCommand: a simple delegate command implementing the ICommand interface.\r\n - AsyncRelayCommand: a delegate command supporting asynchronous operations and cancellation.\r\n - WeakReferenceMessenger: a messaging system to exchange messages through different loosely-coupled objects.\r\n - StrongReferenceMessenger: a high-performance messaging system that trades weak references for speed.\r\n - Ioc: a helper class to configure dependency injection service containers.", | ||
| "LicenseUrl": "https://licenses.nuget.org/MIT", | ||
| "LicenseType": "MIT", | ||
| "Repository": { | ||
| "Type": "git", | ||
| "Url": "https://github.com/CommunityToolkit/dotnet", | ||
| "Commit": "638b41dad30dffabb123a39aa38eabc7e3721371" | ||
| } | ||
| }, | ||
| { | ||
| "PackageName": "Flow.Launcher.Localization", | ||
| "PackageVersion": "0.0.6", | ||
| "PackageUrl": "https://github.com/Flow-Launcher/Flow.Launcher.Localization", | ||
| "Copyright": "Flow-Launcher", | ||
| "Authors": [ | ||
| "Flow-Launcher" | ||
| ], | ||
| "Description": "Localization toolkit for Flow Launcher and its plugins", | ||
| "LicenseUrl": "https://licenses.nuget.org/MIT", | ||
| "LicenseType": "MIT", | ||
| "Repository": { | ||
| "Type": "git", | ||
| "Url": "https://github.com/Flow-Launcher/Flow.Launcher.Localization", | ||
| "Commit": "456bdc7a986487d691a3ae8d36f8bce7b88b9bc7" | ||
| } | ||
| }, | ||
| { | ||
| "PackageName": "Microsoft.Data.Sqlite", | ||
| "PackageVersion": "10.0.1", | ||
| "PackageUrl": "https://docs.microsoft.com/dotnet/standard/data/sqlite/", | ||
| "Copyright": "© Microsoft Corporation. All rights reserved.", | ||
| "Authors": [ | ||
| "Microsoft" | ||
| ], | ||
| "Description": "Microsoft.Data.Sqlite is a lightweight ADO.NET provider for SQLite.\r\n\r\nCommonly Used Types:\r\nMicrosoft.Data.Sqlite.SqliteCommand\r\nMicrosoft.Data.Sqlite.SqliteConnection\r\nMicrosoft.Data.Sqlite.SqliteConnectionStringBuilder\r\nMicrosoft.Data.Sqlite.SqliteDataReader\r\nMicrosoft.Data.Sqlite.SqliteException\r\nMicrosoft.Data.Sqlite.SqliteFactory\r\nMicrosoft.Data.Sqlite.SqliteParameter\r\nMicrosoft.Data.Sqlite.SqliteTransaction", | ||
| "LicenseUrl": "https://licenses.nuget.org/MIT", | ||
| "LicenseType": "MIT", | ||
| "Repository": { | ||
| "Type": "git", | ||
| "Url": "https://github.com/dotnet/dotnet", | ||
| "Commit": "fad253f51b461736dfd3cd9c15977bb7493becef" | ||
| } | ||
| }, | ||
| { | ||
| "PackageName": "SkiaSharp", | ||
| "PackageVersion": "3.119.1", | ||
| "PackageUrl": "https://go.microsoft.com/fwlink/?linkid=868515", | ||
| "Copyright": "© Microsoft Corporation. All rights reserved.", | ||
| "Authors": [ | ||
| "Microsoft" | ||
| ], | ||
| "Description": "SkiaSharp is a cross-platform 2D graphics API for .NET platforms based on Google's Skia Graphics Library.\r\nIt provides a comprehensive 2D API that can be used across mobile, server and desktop models to render images.", | ||
|
Check warning on line 78 in Plugins/Flow.Launcher.Plugin.BrowserBookmark/THIRD_PARTY_NOTICES.json
|
||
| "LicenseUrl": "https://licenses.nuget.org/MIT", | ||
| "LicenseType": "MIT", | ||
| "Repository": { | ||
| "Type": "git", | ||
| "Url": "https://go.microsoft.com/fwlink/?linkid=868515", | ||
| "Commit": "cc78b5933d23e6383db5d246e70db915770d55d6" | ||
| } | ||
| }, | ||
| { | ||
| "PackageName": "Svg.Skia", | ||
| "PackageVersion": "3.2.1", | ||
| "PackageUrl": "https://github.com/wieslawsoltes/Svg.Skia", | ||
| "Copyright": "Copyright © Wiesław Šoltés 2025", | ||
| "Authors": [ | ||
| "Wiesław Šoltés" | ||
| ], | ||
| "Description": "An SVG rendering library.", | ||
| "LicenseUrl": "https://licenses.nuget.org/MIT", | ||
| "LicenseType": "MIT", | ||
| "Repository": { | ||
| "Type": "git", | ||
| "Url": "https://github.com/wieslawsoltes/Svg.Skia", | ||
| "Commit": "0164d01769a8b577f6dcc678f25d4802a06ff8c0" | ||
| } | ||
| } | ||
| ] | ||
32 changes: 32 additions & 0 deletions
32
Plugins/Flow.Launcher.Plugin.BrowserBookmark/THIRD_PARTY_NOTICES.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| # Third-party notices | ||
|
|
||
| This project uses third-party NuGet packages. | ||
|
|
||
| | Reference | Version | License Type | License | | ||
| |---------------------------------------------------------------------------------------------| | ||
| | BrowserTabs | 0.2.0 | Apache-2.0 | https://licenses.nuget.org/Apache-2.0 | | ||
| | CommunityToolkit.Mvvm | 8.4.0 | MIT | https://licenses.nuget.org/MIT | | ||
| | Flow.Launcher.Localization | 0.0.6 | MIT | https://licenses.nuget.org/MIT | | ||
| | Microsoft.Data.Sqlite | 10.0.1 | MIT | https://licenses.nuget.org/MIT | | ||
| | SkiaSharp | 3.119.1 | MIT | https://licenses.nuget.org/MIT | | ||
| | Svg.Skia | 3.2.1 | MIT | https://licenses.nuget.org/MIT | | ||
|
|
||
| Detailed information (package id, version, license, repository URL) is available in [THIRD_PARTY_NOTICES.json](THIRD_PARTY_NOTICES.json). | ||
|
|
||
| # Additional credits | ||
|
|
||
| Initially there was a plan to integrate [Browser Bookmarks plugin](https://github.com/Flow-Launcher/Flow.Launcher/tree/dev/Plugins/Flow.Launcher.Plugin.BrowserBookmark) and [Browser Tabs plugin](https://github.com/Flow-Launcher/Flow.Launcher.Plugin.BrowserTabs) but it looks like inter-plugin communication or integration of plugins is not possible. | ||
| Finally Browser Tabs plugin wasn't used but **its code had great impact on this final solution**. | ||
|
|
||
| # How to generate the list | ||
|
|
||
| 1. Install `dotnet-project-licenses` | ||
| 1. Use the tool as below | ||
| 1. Copy markdown above | ||
| 1. Rename `licenses.json` to `THIRD_PARTY_NOTICES.json` and format the json | ||
|
|
||
| ``` | ||
| cd Plugins\Flow.Launcher.Plugin.BrowserBookmark | ||
| dotnet tool install --global dotnet-project-licenses | ||
| dotnet-project-licenses --input Flow.Launcher.Plugin.BrowserBookmark.csproj --json | ||
| ``` | ||
27 changes: 27 additions & 0 deletions
27
Plugins/Flow.Launcher.Plugin.BrowserBookmark/Tabs/README.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| # Context | ||
|
|
||
| Existing plugins focus on their areas of operation - e.g. Browser Bookmarks on bookmarks only, Browser Tabs on tabs only. | ||
| Why not join these two worlds to create synergy? | ||
| Especially if one works with **tens or hundreds of bookmarks and open tabs** (I do and I constantly struggle finding the correct tab. It is underestimated mental cost of finding, clicking several times, etc.). | ||
|
|
||
| That's where "Reuse tabs" setting in Browser Bookmarks plugin makes sense. | ||
|
|
||
| I believe it is in line with why Flow Launcher was created in the first place. | ||
| I strongly believe in a higher-level concept of **"just take me to THIS place - as fast as possible, as easy as possible"**. | ||
| Thus making bridges between plugins may sometimes produce huge value! BTW wouldn't it be nice to allow inter-plugin communication to create this kind of "bridges" more easily? | ||
|
|
||
| # How it works | ||
|
|
||
| The core is Browser Bookmarks plugin, unchanged by default. | ||
| You may enable "Reuse tabs" in the plugin settings. | ||
| Then, whenever one opens a bookmark, it also registers a new tab in its cache. | ||
| Next, each time the bookmark is triggered again, it just switches to the existing tab instead of launching a new one. | ||
| **It takes milliseconds instead of long seconds** (or sometimes close to half a minute in corporate environments where all is slow even if you have a high-end laptop - you won't believe it until you live it!). | ||
|
|
||
| # Alternatives | ||
|
|
||
| Reading URLs of existing tabs was tried. It would make mapping of bookmarks to tabs more reliable. | ||
| However due to security reasons it has several limitations: | ||
|
|
||
| - different browsers expose internals differently | ||
| - it is not easily accessible (e.g. you cannot make Chrome expose internal details on a dev TCP port from default profile so user would have to take care about special settings). |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.