Skip to content

Add globalshortcuts editing

dcz requested to merge dcz/gnome-control-center:main into main

This is a rough draft, and I'm looking for feedback on the high-level shape of it.

Most important is that I added another type of key, which exists to have its own gsettings interface, and to notify the compositor whenever the value changes.

The part where shortcuts are added is completely missing :) I have it as part of gnome-shell but I don't know how to turn it into standalone gjs (imports fail).

This is pretty much complete now.

To add a shortcut, install to a local prefix, and then do this:

git clone https://gitlab.gnome.org/dcz/portal-poker
cd portal-poker
git checkout optionallll
GSETTINGS_SCHEMA_DIR=../local/share/glib-2.0/schemas/ XDG_CURRENT_DESKTOP=GNOME ../g-c-c/globalshortcuts-provider/gnome-control-center-globalshortcuts-provider &
# if you wait too long here, the provider will exit. Just run it again
PORTAL_FILE=../gnome-control-center/globalshortcuts-provider/org.gnome.GlobalshortcutsProvider.xml ./portal-poker.py portal GccShortcuts BindShortcuts org.kde.ark a b 'ctrl+c'

To modify a shortcut and see a different UI, run:

GSETTINGS_SCHEMA_DIR=../local/share/glib-2.0/schemas/ XDG_CURRENT_DESKTOP=GNOME ./shell/gnome-control-center

Relevant discussions and resources:

xdg-desktop-portal-gnome#47

https://flatpak.github.io/xdg-desktop-portal/docs/doc-org.freedesktop.portal.GlobalShortcuts.html#org-freedesktop-portal-globalshortcuts-bindshortcuts

Edited by dcz

Merge request reports