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

Could not import keybinder and Gtk #7

Closed
svHatch opened this issue Feb 1, 2018 · 8 comments
Closed

Could not import keybinder and Gtk #7

svHatch opened this issue Feb 1, 2018 · 8 comments
Labels

Comments

@svHatch
Copy link

svHatch commented Feb 1, 2018

Could not import Keybinder and Gtk. Error was: "Namespace Keybinder not available"
Global shortcuts will not work.

This fixed it (from http://www.webupd8.org/2013/07/fuzzy-window-switcher-for-ubuntu.html):
sudo apt-get install libkeybinder-3.0-0 gir1.2-keybinder-3.0

not sure if this was intended functionality, but it's pretty useless without the keybinder. Maybe this could be added to the requirements?

@JPRuehmann
Copy link

#4

@and3rson and3rson added the bug label Feb 3, 2018
@and3rson
Copy link
Owner

and3rson commented Feb 3, 2018

@svHatch does it fix your issue?

@JPRuehmann
Copy link

yes.

@svHatch
Copy link
Author

svHatch commented Feb 5, 2018

@and3rson - yes it does. My reason for opening the issue was to propose these packages as requirements. I wasn't able to get any functionality without these packages, so I thought they might be appropriate as requirements, rather than simply throwing a warning. I may be misunderstanding the warning.

@ValentijnvdBeek
Copy link
Collaborator

ValentijnvdBeek commented Feb 5, 2018

The bug is caused by the fact that Clay needs to use the official keybinder Python bindings which use PyGObject. The Keybinder bindings are as far as I can tell only in the distro's package manager and not on PyPy. This means that you need to install that separately and that you need to pass --system-site-packages to virtualenv so it can find it.

This is further complicated by the fact that the PyPy and AUR python3-keybinder packages are not the same bindings as the Ubuntu one. The former is a long gone unofficial version that will not work with Clay while the latter is because Ubuntu separates the bindings.

Pull request #10 should fix the issue.

@svHatch
Copy link
Author

svHatch commented Feb 6, 2018

@ValentijnvdBeek - understood.

Can Clay be used without a keybinder? If not, then can the installation of the keybinder be part of the Clay install documentation?

@ValentijnvdBeek
Copy link
Collaborator

ValentijnvdBeek commented Feb 6, 2018

@svHatch

Clay can be used without the Keybinder package but it will show an error. Keybinder makes global X bindings so you can control Clay from another window (or so is my understanding). So it should have no effect if you're using it as solely a terminal program. The use of keybinder should probably be optional and/or configurable so Clay doesn't rely on having X and GTK installed which is a big minus for headless systems.

I don't know why it is is not currently in the installation instructions but I've written some and filed a pull request.

@and3rson
Copy link
Owner

and3rson commented Feb 6, 2018

@svHatch fixed in #10 by @ValentijnvdBeek

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants