regolith-linux / remontoire

A keybinding viewer for i3 and other programs.
GNU General Public License v3.0
68 stars 8 forks source link

Handling of large numbers of bindings #15

Closed bsamseth closed 3 years ago

bsamseth commented 3 years ago

Thanks for making this tool, I quite like the idea!

I wanted to use this for other tools beyond i3, so I generated remontoire comments for all my bindings in my IDE: lots_of_bindings.txt

I then run

cat lots_of_bindings.txt |  remontoire -i -p '"'

and get a great overview of my keybindings.

Then problem is that there are som many of them that if I expand one of the larger sections, the window goes off the screen like this (here I expanded the Buffers section):

image

This presents two issues

  1. I can't see all the bindings, there may or may not be more bindings that are cut off the top in the screenshot
  2. I can't close the section again, because the little arrow is also off the screen. I also can't seem to find where remontoire stores the state, so the only way I've been able to close this section is to first remove it from the list of bindings entirely and adding it back later.

Ideally, the window would be scrollable so that I could see any number of bindings at once. Less ideal, but still much better, would be the window moved so that the top of the expanded section was always on the screen.

As an immediate remedy, if you could tell me how to reset the state of all the sections (i.e get it back to the initial "all-collapsed" state), that would also help greatly!

Normally I'd offer to contribute a PR for this, but I'm not familiar with the language or the platform that remontoire is written in/on so I'm not sure how much help I could offer...

Thanks again for making a really nice tool (and distro!) 💯

kgilmer commented 3 years ago

Happy holidays @bsamseth . You've pushed Remontoire pretty far indeed! To answer your immediate question, dconf/gsettings is the backend data store which Remontoire uses to store its settings. So you can use gsettings to view and alter it's state. Examples:

kgilmer@clavin:~$ gsettings get org.regolith-linux.remontoire expanded-category-path-ids
',Other,Navigate,'
kgilmer@clavin:~$ gsettings get org.regolith-linux.remontoire collapsed-category-path-ids
'1,5,'
kgilmer@clavin:~$ gsettings list-recursively org.regolith-linux.remontoire
org.regolith-linux.remontoire expanded-category-path-ids ',Other,Navigate,'
org.regolith-linux.remontoire window-padding-width 6
org.regolith-linux.remontoire collapsed-category-path-ids '1,5,'
org.regolith-linux.remontoire window-position 'east'
org.regolith-linux.remontoire window-padding-height 6

The definitions for these settings is in the /data/org.regolith-linux.remontoire.gschema.xml file, FWIW.

Regarding your general issue, it seems that scrolling could work, but ideally IMHO the existing "collapsible sections" UI metaphor would scale to a larger number of categories as you have here. A few ideas would be to allow for a second level of nesting, or perhaps Remontoire could detect this overflow state and then only display a subset of all available categories. I'll have to think about it a bit more. Thanks for your detailed bug report.

bsamseth commented 3 years ago

Thanks a lot! Knowing that means I can probably get quite far with a little script to open close, open only parts of the bindings etc. If you end up implementing something towards this though, I'll be happy to test it out! Thanks again for making a very nice tool. Happy holidays to you too.

kgilmer commented 3 years ago

One way of scaling Remontoire which only occurred to me now is to launch it with subsets of all of your keybindings, such that each "launch profile" contains a limited set of categories that will render on your screen. And then (depending on how you launch Remontoire), assign each of those launch profiles to a different keybinding.

akerlund commented 3 years ago

My fresh install has a similar problem. I expand the "modify" tree which is so large I cannot see everything on a 1920*1080 screen. I had to change the position to north and reload in order to see "modify" again so I could collapse it.

kgilmer commented 3 years ago

I believe this issue is addressed by https://github.com/regolith-linux/remontoire/commit/96090d53661ca1e8723bb4ed6282b61657d72479. You can build from source or take a deb from the Regolith 2.0 alpha package repo. At this time I do not plan to update the 1.6 release.