Page 1 of 1
Open URL Plugin: Brave Entries - Correct Tool 1-2 Handling - Wayland Sway Notifications
Posted: 29.10.2024 17:47
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!
Re: Open URL Plugin: Brave Entries - Correct Tool 1-2 Handling - Wayland Sway Notifications
Posted: 29.10.2024 19:43
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.
Re: Open URL Plugin: Brave Entries - Correct Tool 1-2 Handling - Wayland Sway Notifications
Posted: 30.10.2024 14:23
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.
Re: Open URL Plugin: Brave Entries - Correct Tool 1-2 Handling - Wayland Sway Notifications
Posted: 30.10.2024 17:30
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!
Re: Open URL Plugin: Brave Entries - Correct Tool 1-2 Handling - Wayland Sway Notifications
Posted: 30.10.2024 19:10
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