Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document how to add custom keybindings with gsettings #561

Open
davidhedlund opened this issue Jul 31, 2023 · 8 comments
Open

Document how to add custom keybindings with gsettings #561

davidhedlund opened this issue Jul 31, 2023 · 8 comments

Comments

@davidhedlund
Copy link

davidhedlund commented Jul 31, 2023

Via gsettings

Big thanks to cwendling:

$ gsettings set org.mate.control-center.keybinding:/org/mate/desktop/keybindings/custom0/ action 'pluma'
$ gsettings set org.mate.control-center.keybinding:/org/mate/desktop/keybindings/custom0/ name 'Pluma'
$ gsettings set org.mate.control-center.keybinding:/org/mate/desktop/keybindings/custom0/ binding '<Primary><Alt>p'

Via .override

Suggested source for documentation

@davidhedlund davidhedlund changed the title Cannot add custom keybindings with commands Cannot add custom keybindings with gsettings Jul 31, 2023
@cwendling
Copy link
Member

cwendling commented Aug 1, 2023

$ gsettings set org.mate.control-center.keybinding:/org/mate/desktop/keybindings/custom0/ action 'pluma'
$ gsettings set org.mate.control-center.keybinding:/org/mate/desktop/keybindings/custom0/ name 'Pluma'
$ gsettings set org.mate.control-center.keybinding:/org/mate/desktop/keybindings/custom0/ binding '<Primary><Alt>p'

hint: having gnome in the schema path of a MATE setting usually means something's wrong 😉

@davidhedlund
Copy link
Author

davidhedlund commented Aug 1, 2023

$ gsettings set org.mate.control-center.keybinding:/org/mate/desktop/keybindings/custom0/ action 'pluma' $ gsettings set org.mate.control-center.keybinding:/org/mate/desktop/keybindings/custom0/ name 'Pluma' $ gsettings set org.mate.control-center.keybinding:/org/mate/desktop/keybindings/custom0/ binding 'p'

  • It is working in both Trisquel, and also Ubuntu MATE, you made my day!
  • Your solution and using the mate-keybinding-properties GUI gave identical output from dconf watch / and gsettings list-recursively > file1 && read -p "Make your Gsettings modification and hit Enter to compare the values" && gsettings list-recursively > file2 && diff file1 file2 (none)
  • Amazingly, I don't get a single exact match on gsettings set org.mate.control-center.keybinding on any web search.

How could I have found out that the proper scheme path was org.mate.control-center.keybinding?

@cwendling
Copy link
Member

I have no idea, short of looking at the code… maybe if you have an idea of where it should be documented you could submit an improvement.

@davidhedlund
Copy link
Author

I have no idea, short of looking at the code… maybe if you have an idea of where it should be documented you could submit an improvement.

Oh, that's cool!

I'd be super happy if you could document this for me as you seem to be involved with MATE. That will help a lot of people to script their keyboard shortcuts.

@cwendling
Copy link
Member

I don't know if that would help a "lot" of people, but documenting stuff is usually good indeed. I however probably won't have time to spend on this, and I don't even know where to document this… possibly in mate-user-guide? Yet I'm not sure if something so technical fits there.
Or in a README or so in mate-settings-deamon, but who's gonna look?

@davidhedlund
Copy link
Author

davidhedlund commented Aug 1, 2023

I don't know if that would help a "lot" of people, but documenting stuff is usually good indeed. I however probably won't have time to spend on this, and I don't even know where to document this… possibly in mate-user-guide? Yet I'm not sure if something so technical fits there. Or in a README or so in mate-settings-deamon, but who's gonna look?

Thank you very much again! Alright, do you think it would be useful to invite to this discussion to take a look?

@davidhedlund davidhedlund changed the title Cannot add custom keybindings with gsettings Document how to add custom keybindings with gsettings Aug 1, 2023
@davidhedlund
Copy link
Author

I just changed the title, can you please re-open?

@cwendling
Copy link
Member

Sure. Maybe somebody else will chime in with more knowledge or any opinion on this.

@cwendling cwendling reopened this Aug 1, 2023
@davidhedlund davidhedlund changed the title Document how to add custom keybindings with gsettings glib-compile-schemas doesn't compile relocatable schemas Aug 6, 2023
@davidhedlund davidhedlund changed the title glib-compile-schemas doesn't compile relocatable schemas Document how to add custom keybindings with gsettings Aug 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants