8000 X11 as an optional dependency · Issue #39 · keyleds/keyleds · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

X11 as an optional dependency #39

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

Open
mneyrane opened this issue Jun 7, 2019 · 1 comment
Open

X11 as an optional dependency #39

mneyrane opened this issue Jun 7, 2019 · 1 comment

Comments

@mneyrane
Copy link
mneyrane commented Jun 7, 2019

To what extent would it be possible to make X11 an optional dependency for keyleds?

I'm having a blast with its current use, however it would be nice to have the effects persist in a TTY since this is usually what I log into and work with. I ask more for my own curiosity rather than suggesting a change, since I'm not too familiar with the X11 library (or X11 in general) or the structure of your project.

Thanks!

@spectras
Copy link
Member
spectras commented Jun 7, 2019

Hello,

X11 is used for 2 things:

  • For getting context information from the windows manager (X atoms on the root window, specifically). That's how it knows the current active window.
  • For keypresses through XInput2.

So in the current design, cutting X11 dependency would mean it can no longer detect context changes (which is not an issue in a tty I guess), nor could it detect keypresses (which might be more problematic).

The issue for keypresses is to get them straight from the device, keyleds would need root access. And it was a major design decision early on to run as a regular user. Nothing is impossible, but adding a root mode and evaluating the security implications would definitely be low priority.

Yet I could totally see someone using keyleds without keypresses. You could, for instance, have your shell send context information to keyleds manually through a dbus notification, kind of like console applications get title notifications. As long as not reactive effect is desired it could work.

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

No branches or pull requests

2 participants
0