Open URL Plugin: Brave Entries - Correct Tool 1-2 Handling - Wayland Sway Notifications

Did you find any problems using this software? Please post here...
Post Reply
Random Void User
Posts: 22
Joined: 13.07.2024 21:19

Open URL Plugin: Brave Entries - Correct Tool 1-2 Handling - Wayland Sway Notifications

Post by Random Void User »

Open URL plugin needs entires for Brave Browser (normal and --incognito). Linux invocation is "brave-browser".

I tried Tool 1 and 2 slots. These tools are not actually invoked (see function "on_click_link"). I had to edit the code.

Rename "opt_tool1" to "opt_tool_1" (ditto tool 2) so that all related names match.

Any app sending a URL to the browser makes my desktop panel blink its icon for the browser's workspace. CudaText does not. It still sends the URL correctly. Maybe CudaText neglects a particular dbus call. Waybar manages these icons in Linux Sway.

Thanks!
main Alexey
Posts: 2245
Joined: 25.08.2021 18:15

Re: Open URL Plugin: Brave Entries - Correct Tool 1-2 Handling - Wayland Sway Notifications

Post by main Alexey »

>Rename "opt_tool1" to "opt_tool_1" (ditto tool 2) so that all related names match.
I don't understand why we need to rename opt_tool1 to opt_tool_1. some errors appear?
Maybe it is good to add fixed tool entry for Brave.
And for Vivaldi.
main Alexey
Posts: 2245
Joined: 25.08.2021 18:15

Re: Open URL Plugin: Brave Entries - Correct Tool 1-2 Handling - Wayland Sway Notifications

Post by main Alexey »

If you propose changes to support Brave, give the modified file __init__.py. without your changes I don't get the idea. do not rename opt_tool1 to opt_tool_1 as its useless. opt_tool1 gives no errors.
Random Void User
Posts: 22
Joined: 13.07.2024 21:19

Re: Open URL Plugin: Brave Entries - Correct Tool 1-2 Handling - Wayland Sway Notifications

Post by Random Void User »

Renaming is for style, not for errors. Names should match within and across both code and INI file.

Myself, I would rework the plugin. It should use arrays, not individual variables. An array of tuples might work well: (browser name, browser command, menu entry enabled/disabled). Arrays would shorten the code and allow the user to sort his preferred list within his INI, while eliminating unused entries cluttering the click menu.

Thanks!
main Alexey
Posts: 2245
Joined: 25.08.2021 18:15

Re: Open URL Plugin: Brave Entries - Correct Tool 1-2 Handling - Wayland Sway Notifications

Post by main Alexey »

you may try this change. but keep changes as little as possible. for the first patch. later you can rework more.

better post the patch to github, but forum is allowed too.
https://github.com/cudatext-addons/cuda_open_url
Post Reply