Re: Configuring extension keyboard-shortcuts from gnome-control-center



Hey folks,

AFAIU you can now register new keyboard shortcuts from a shell
extension, by providing the relevant gsettings schema and calling
Main.wm.addKeyBinding to provide the handler for the binding.
Digging a bit further, it seems that just adding the schema to the
extension is not enough:
 - Inside the extension, the schema must be explicitely loaded to work.
   It seems convenience.js is commonly used for this. Shouldn't
   gnome-shell just expose some convenient API for its extensions for
   this kind of thing?
 - To edit the settings manually, e.g. through dconf-editor, the schema
   needs to be copied/installed into /usr/share/glib-2.0/schemas (or
   /usr/local/share/glib-2.0/schemas).
   I tried linking them into ~/.local/share/glib-2.0/schemas, but it
   turns out that both dconf-editor and gsettings only use
   get_system_data_dirs, not get_user_data_dir. They do use
   GSETTINGS_SCHEMA_DIR, which could solve things for my current
   usecase, but doesn't really help to make things work out of the
   box...

Gr.

Matthijs

Attachment: signature.asc
Description: Digital signature



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]