-
Notifications
You must be signed in to change notification settings - Fork 252
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
Cli support for general wayland environment #1322
Conversation
Use wl-clipboard for supports on general wayland environment
Use ydotool for general wayland environment
This allows gsconnect-preferences to be excuted when it is symbolically linked to another path.
Use `wtype` for unicode input
Dbus skips the activations of wl-clipboard component due to the lose of environment variables.
Relying on environment variables for the determination of gnome-shell is not stable when run as a d-bus service.
Please tell me if you have intention to extend this plugin to non-gnome environment, @ferdnyc @andyholmes . |
I don't have much of an opinion on this. GSConnect was intended to be specifically for GNOME Shell, but if another maintainer wants to give it a 👍 I won't stand in the way 🙂 |
I have limited time for maintenance, so if making it more generic comes with associated maintenance effort on an ongoing basis I'm all for it. I'll read through the code hopefully soon. |
Mouse scroll in ydotool is now possible in a pull request: ReimuNotMoe/ydotool#151
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry this sat around for so long. I don't see any reason not to merge at this point, so a few fixups and I will accept this.
Oh, just one more thing: add the SPDX comments to // SPDX-FileCopyrightText: GSConnect Developers https://github.com/GSConnect
//
// SPDX-License-Identifier: GPL-2.0-or-later |
Pull request for mouse scroll (ReimuNotMoe/ydotool#151) is already accepted
Thanks to the review in GSConnect#1322
Thanks for reviewing. |
Okay, no problem. I don't expect many folks will start using this for a little while, at least. If you can get it working for you, we can merge and you can be "codeowner" for that module, if you like. |
I test it on my machine with both sway and gnome-shell sessions, and there is no problem. (It turned out that I forgot to start ydotoold in sway.) Notes for usersWhen
|
9008dfd
to
171b52d
Compare
I found that the env GNOME_SETUP_DISPLAY is specially set by gnome, which can thus be used to detect gnome. Now this pull request should pass all tests without problems, you can merge it. P.S. it might be interesting to write a test for non-gnome envirment, maybe in the future. |
The environment variable is only set by GNOME
Definitely, I saw somewhere I think Google Chrome or Chromium had a Wayland version of xvfb built with python or something. I never had time to really get into it though. |
Thanks to the review in #1322
As a note, I add the wiki page of its usage: CLI usage without Gnome. It will be helpful to put some instructions described there into the meson build process. |
That's great, thanks for writing all that up! |
This PR introduces a check that uses imports to determine, as far as I understand, if it's running inside gnome shell. What was the problem with that? And when it was replaced, why was it replaced with a check for the
So I'm guessing the concern is that checks like the above will break gsconnect if it's run inside a gnome session but not as a gnome shell extension? Because if so, then I believe the current check has the same weakness. As I mentioned in #1706 (comment) now that |
Given what said by @pobrn , it is better not to use environment variable for detecting the 'Gnome'. |
FWIW, this was my suggestion:
|
@andyholmes Thanks for mentioning it, I totally forgot it. So I guess we may use the existence of the directory Or, alternatively, is there a way to communicate bewteen the |
I propose to use |
This commit use
wl-clipboard
andydotool
to support general wayland environment, such as sway.