xiota / geanylua-scripts

GeanyLua scripts to add some minor features to Geany. Hide the menubar. Show multiple long-line column markers.
GNU General Public License v2.0
3 stars 0 forks source link

"Toggle menu bar" as plugin for Geany #13

Open ralf3u opened 3 weeks ago

ralf3u commented 3 weeks ago

Toggle menu bar of geanylua works absolutely perfect and is so useful for me. So what about the idea to publish Toggle menu bar as plugin name for Geany? I think it would be good to offer no options for the plugin. That should make the plugin very simple to code. So, there should be not an option with a checkbox like: The menu bar will always appear when starting Geany. If users want options then they should take the geanylua-version. Something like the last sentence could be mentioned inside the plugin in a readme.txt-document. In the readme.txt-document there could be also some text like this: In case the shortcut to toggle the menu bar was forgotten, press Ctrl+Alt+P to let appear the Prefrences, and then click on the left side on "Keybindings" to search at the end of the list for "Toggle menu bar" to see which shortcut was set. An other way would be to open the document keybindings.conf that is loacated at .config/geany to search there for toggle_menu_bar to see which shortcut was set. The plugin would be user-friendly and also developer-friendly because everyone knows by its name what the plugin does. Another advantage is that once the plugin runs and is implemented in the official geany plugins there is no need to maintain the plugin.

In issue number 633 at geany, you wrote:

I already did write a plugin (1138) that addresses this and some other open issues. It was ignored for six months. [...] So I closed it for lack of interest.

Well, I'm sure that there is an interest because you wrote also at geany in 633:

The only agreement so far is that this feature is better implemented as a plugin.

I think 1138 was ingnored because there were too many things inside the plugin.

Today eth16 wrote a comment at geany-plugins 1380 with the title [Plugin Request] Toggle menu bar. And his words sound good to me:

Such a plugin already exist (though seems abandoned) as mentioned in 633. This could probably be used as a base.

If the plugin Toggle menu bar will exist, the next step could be to create the next plugin Tab title styles.

What do you think about the plugin Toggle menu bar?

xiota commented 3 weeks ago

Are you suggesting... add the lua script to the example plugins included with geanylua plugin? Or writing an entirely new plugin in C, C++, or other compiled language?

ralf3u commented 3 weeks ago

Are you suggesting... add the lua script to the example plugins included with geanylua plugin? Or writing an entirely new plugin in C, C++, or other compiled language?

I was thinking about a complete new plugin that would be listed as single plugin in the list of the "Plugin Manager" with the name Toggle menu bar.

xiota commented 3 weeks ago

I could consider it, but would be low priority. I am waiting on a bug fix PR for geanylua plugin before doing anything else upstream. geany/geany-plugins/pull/1234

ralf3u commented 3 weeks ago

I could consider it, but would be low priority. I am waiting on a bug fix PR for geanylua plugin before doing anything else upstream. geany-plugins 1234

What about to write something like this at geany-plugins 1380?

ralf3u commented 3 weeks ago

add the lua script to the example plugins included with geanylua plugin

What do you mean with "example plugins"?

xiota commented 3 weeks ago

These geanylua script examples: https://github.com/geany/geany-plugins/tree/master/geanylua/examples

ralf3u commented 3 weeks ago

Do the geanylua script examples exist in Geany 2.0? I can't find them.

xiota commented 3 weeks ago

On Ubuntu, they're installed at /usr/share/geany-plugins/geanylua/

ralf3u commented 3 weeks ago

On Ubuntu, they're installed at /usr/share/geany-plugins/geanylua/

Yes, I can see them. But how users will activate the "toggle menu bar" if it will be part of /usr/share/geany-plugins/geanylua/?

xiota commented 3 weeks ago

They should be loaded by default (when geanylua plugin activated) if user hasn't created a personal geanylua config.

ralf3u commented 3 weeks ago

They should be loaded by default (when geanylua plugin activated) if user hasn't created a personal geanylua config.

OK. Why not. It is less work than to program a whole plugin. It sounds simple and quite interesting. I didn't know that this was possible. The good thing is then that there is no need to copy and paste. So, users activate the plugin Lua Scripts in the Plugin Manager and then the only further step what need to be done is to define a shortcut in the Preferences in Keybindings in the Action "Lua Script" in "Toggle menu bar". Cool.

xiota commented 3 weeks ago

Mainly don't want to open bunch of PRs upstream that are never merged. So waiting for the bugfix PR to be merged before opening another one.

ralf3u commented 3 weeks ago

Mainly don't want to open bunch of PRs upstream that are never merged. So waiting for the bugfix PR to be merged before opening another one.

A step-by-step policy is always a good strategy. If toggle-menu-bar will be part of geanylua/examples, then it would be already a huge progress for users. Instead of building for 10 minutes the shortcut, the shortcut will be realized with some clicks.

If this month at geany-plugins 1234 will not me merged, then I intend to write during December a comment at geany-plugins 1380.