[HN Gopher] Plotinus: A searchable command palette in every mode...
___________________________________________________________________
Plotinus: A searchable command palette in every modern GTK+
application
Author : ingve
Score : 125 points
Date : 2021-05-22 10:52 UTC (12 hours ago)
(HTM) web link (github.com)
(TXT) w3m dump (github.com)
| chris_wot wrote:
| How does this work exactly? Are there anythings that an app needs
| to do for it to work fully?
|
| "Nemo vir est qui mundum non reddat meliorem" translates to "No
| one man is that the world doesn't render better". Weird.
| marcodiego wrote:
| I'd translate it to portuguese like "Nao ha homem que nao torne
| o mundo melhor" -> "there is no man that doesn't make the world
| better".
| danohuiginn wrote:
| Nobody who does not improve the world is a man
| zxzax wrote:
| This code seems to be pretty hacky, it works by injecting a
| dynamic library into the program and then looping on a timeout
| to rescan every window and attach a key handler:
| https://github.com/p-e-w/plotinus/blob/master/src/Keybinder....
|
| Newer Gtk apps that use app menus with GAction and GMenuModel
| should work fine, and will be forward-compatible with other
| similar tools, since those will export the menu over d-bus.
| e12e wrote:
| >> How does this work exactly? Are there anythings that an app
| needs to do for it to work fully?
|
| > Plotinus brings that power to every application on your
| system (that is, to those that use the GTK+ 3 toolkit). It
| automatically extracts all available commands by introspecting
| a running application, instantly adapting to UI changes and
| showing only relevant actions. Using Plotinus requires no
| modifications to the application itself!
| formerly_proven wrote:
| This probably uses Gtk introspection to enumerate the main menu
| of the application.
|
| > Documentation on GTK+ modules is essentially nonexisting.
| Without gtkparasite and gnome-globalmenu to learn from, it
| would have been a lot harder to get this project off the
| ground.
|
| -
|
| > Nemo vir est qui mundum non reddat meliorem
|
| Going of my very unused latin knowledge. "Nemo vir est" =
| "There is no man", "qui mundum non reddat meliorem" -> "There
| is no man, who doesn't return betterment to the world" (had to
| look meliorem up tho)
| forgotpwd16 wrote:
| GIMP has such a feature for a while, specifically since 2.10
| released three years ago[0], accessible with slash key (/).
|
| [0]: https://www.gimp.org/release-notes/gimp-2.10.html#search-
| sys...
| space_ghost wrote:
| Long time Gimp user here who didn't know about this. Huge time
| saver.
| legulere wrote:
| I really like the direction this leads to: GUI Programs properly
| controllable with the keyboard.
| [deleted]
| merlinscholz wrote:
| This seems like an answer to KDE's KCommandBar
| https://pointieststick.com/2021/05/21/this-week-in-kde-kcomm...
| forgotpwd16 wrote:
| More like KCommandBar is the "answer" to this since Plotinus
| has existed since 2016 although it seems it has gone under the
| radar.
| XorNot wrote:
| Oh wow. This needs to start just being a part of GTK.
| [deleted]
| hawski wrote:
| Great idea! I must check it out when I'll be in front of
| computer.
|
| I lately wonder what amaizing tools could be written using
| accessibility APIs, but presenting things graphically. AFAIU this
| uses introspection abilities of GTK, but the idea is similar I
| guess.
| nathias wrote:
| as a fellow Plotinus and list fan: very nice
| smoldesu wrote:
| This looks awesome, but installing it on Manjaro caused my OS to
| crash whenever I logged in. Any possible solutions?
| marcodiego wrote:
| A new incarnation of the old ubuntu unity all over again.
| Actually a kind liked how unity worked on ubuntu 12.04, I could
| have many files open on gedit and easily switch them, it was easy
| to find plugins on gimp without needing to search the menus...
| Don't know why it didn't stay.
|
| This doesn't support gtk4 afaik and last commit if from 2017,
| seems abandoned.
| baybal2 wrote:
| I remember GTK had editable keyboard shortcuts, I wonder why it
| was axed together with "tear off" menus, and multi-column menus.
| zxzax wrote:
| Just my observations:
|
| - Editing shortcuts within the menus is not really
| discoverable, except by accident, it's too easy to accidentally
| change a shortcut that way and screw up your program, and the
| UI around saving/loading/resetting them is not good
|
| - Tearoff/multicolumn menus were seen as a workaround for
| programs that have too many huge and/or nested menus, where
| something like a toolbar or a command palette would be more
| appropriate
| formerly_proven wrote:
| KDE has a standard keyboard shortcut editing dialog, it's
| perhaps not the most beautifully designed dialog, but it
| certainly works quite nicely.
| formerly_proven wrote:
| I remember building something similar about ten years ago for
| Windows using the accessibility APIs to extract menus from
| applications.
|
| To my chagrin, a great many applications, including those
| shipping with Windows (even the explorer, iirc) and almost
| everything using fancy UIs or various toolkits (GTK, Tk and Java
| apps I think, Qt worked) don't expose their menus through them,
| which made it pretty useless.
| mastrsushi wrote:
| "modern GTK+ application"
| terhechte wrote:
| As a tip for macOS users who maybe don't know this: Theres a
| similar feature in every macOS app when you click the "Help"
| menubar entry of an app and enter text into the search field
| there.
| kitsunesoba wrote:
| I don't really use this as a command palette, but it's so good
| for finding specific bits of functionality in an app.
|
| It's also one of the reasons I'm a big fan of global menubars:
| they act as a sort of index of everything an app can do, and
| the menubar is always present anyway there's no point in devs
| not utilizing them.
| hawski wrote:
| Sadly not every application has something useful available
| there.
| paldepind2 wrote:
| There's a default binding for it as well: `command + /`.
| KillerRAK wrote:
| Such an under-appreciated feature by macOS users and devs
| alike.
| bobbylarrybobby wrote:
| It's actually command + shift + /, i.e., command + ?
| pokgak wrote:
| I love this kind of navigation in an application. Less looking
| through the menu bar for an action.
|
| VSCode has this with Ctrl+Shift+P which I use all the time. Not a
| big time JetBrains user but I think tapping Shift twice does the
| same in their IDEs.
| codethief wrote:
| Ditto. IMO _every_ application should have a searchable (and
| context-aware) command palette. (Gimp, Inkscape, I 'm looking
| at you in particular!)
| forgotpwd16 wrote:
| As I wrote in another comment GIMP has and is accessible with
| slash key (/).
| KitDuncan wrote:
| Also ctrl+shift+p in Sublime Text.
| pxc wrote:
| This kind of functionality is awesome. I have visual tracking
| problems for some reason. I get tunnelvision frequently, I often
| lose track of the mouse, and it's just generally hard for me to
| find things by physically scanning for them with my eyes.
|
| One of the things that I love about text/search-driven interfaces
| (like my terminal, global search tools (Spotlight, KRunner,
| whatever), Emacs, etc.) is that the information I need to see
| comes to ME. I fix my eyes on one part of the screen, and I know
| that exactly whatever I need to consider will appear exactly
| there. It's great!
|
| I really hope something like this can become a more
| standard/expected feature in most GUI environments.
| andrewshadura wrote:
| Oh, so it's like Unity's HUD, but DE-independent? Cool.
___________________________________________________________________
(page generated 2021-05-22 23:01 UTC)