Comments (13)
is it the official dev distribution for wayland support?
libwayland is the official C library to connect to a Wayland compositor. It's like libX11 or libxcb.
What happens if a user is using X but also installed libwayland?
The WAYLAND_DISPLAY
env variable will be set if the user is inside a Wayland session.
Moreover, what happens if user changes the desktop environment (is this a possible case)?
Not really, not without quitting the terminal emulator.
from clipboard.
So I'll get to it :)
from clipboard.
I took a quick look at Wayland systems. It looks like it is fully compatible with X11 and the clipboard package works if we just install libx11-dev.
It seems we don't have to do anything else here.
Did I misunderstand anything?
from clipboard.
Hello, are there any plans to support wayland soon? or just implementing a temporary solution? thanks!
from clipboard.
Hi, thanks for writing it up. Yes, it should be a support to get in, the problem for me is I do not have Wayland to test it properly. VM might be an option but the disk space is quite tight at the moment :)
from clipboard.
Looks like nothing is needed for Wayland porting. Close.
(clarify if anything was a misunderstanding.)
from clipboard.
Can you elaborate a bit more on how this library supports wayland if I am trying to build an app to centralize (and act as a dispatcher - think greenclip on i3/xwindows or the copy/paste and snippets functionality of Alfred on OSX), copies and pastes from sway window manger on wayland.
Is it just the api for libx11-dev is the same if you are sending messages from wayland to the library, or it's actually using xwindows conventions (which for me would be a no go because of the xwindows security model which does not insulate apps.).
lemme know. Still in the investigative stage of how to build this, so it might just be me not understanding how the mechanics of this works on X11 or Wayland...
thanks!
from clipboard.
@wakatara Thanks for the inquiry. In fact, I am still suspect the support regarding Wayland support. As I remember from the last time, I tested the demo cli gclip
on Wayland (Switched to Wayland on an X11 Ubuntu). After I installed the libx11-dev
, the gclip is able to build and could work, although I lack the understanding of if x11 is running on the background or not.
Feel free to let me know if the package could really work from different feedback, as I lack much experience with Wayland systems, but also interested to support it if not yet.
from clipboard.
Just an idea. Have you considered using wl-clipboard?
Then just check if we are on wayland:
if os.Getenv("WAYLAND_DISPLAY") != "" {
//call wl-clipboard with os/exec
}
from clipboard.
Yes, I know about wl-clipboard, but it would be an external dependency.
Although it is a temporary solution, I don't have a Wayland environment for testing.
from clipboard.
So @emersion has pointed me to his blog post: https://emersion.fr/blog/2020/wayland-clipboard-drag-and-drop/
I'll try to do something from it. But first a quick question:
- Can I introduce a new dependency: libwayland (I try to load it dynamically as the libX11)
- In the
Init()
function, can I first try to load libwayland and if it fails, then libX11?
EDIT: new dependency for libwayland, not for wlroots
from clipboard.
Can I introduce a new dependency: wlroots (I try to load it dynamically as the libX11)
This really shouldn't be necessary. wlroots is a library for building compositors, clients must not depend on it.
from clipboard.
- Can I introduce a new dependency: libwayland (I try to load it dynamically as the libX11)
- In the
Init()
function, can I first try to load wlroots and if it fails, then libX11?
This sounds like a nice plan. Since I am not entirely familiar with libwayland, is it the official dev distribution for wayland support?
Another case is: What happens if a user is using X but also installed libwayland? When we load libwayland before libX11. In this case would result a successful libwayland loading, but I guess the user cannot really use the package as the user's desktop environment is X. Is there a way to determine which desktop environment is used at the moment? Moreover, what happens if user changes the desktop environment (is this a possible case)?
from clipboard.
Related Issues (20)
- Segmentation violation using the gclip tool on Fedora HOT 8
- ld: error: duplicate symbol: when using with Fyne Android HOT 2
- can't work in the win service HOT 5
- Build fails with "error: implicit declaration of function 'nanosleep'" HOT 1
- bug: Image Write Doesn't Seem to Work on Linux and Windows (Ubuntu 20.04) HOT 10
- PNG data overwritten on Windows HOT 4
- How to watch copy file in windows10 HOT 3
- First thanks for your contribution. Maybe it's a stupid question, may i ask why can`t copy jpg image HOT 1
- Feature Request: Support to read and write raw content (without any formatting) from and into clipboards
- Housekeeping: update golang version and library dependencies HOT 2
- Windows 32-bit system will get stuck when executing. HOT 3
- Windows: Write an image encoded to PNG after being loaded as JPEG messes up the image HOT 5
- TestClipboardMultipleWrites only write text,no image. HOT 1
- The shortcut key Ctrl+C cannot be detected when copying images. HOT 4
- Remove cgo requirements on macOS HOT 2
- suggestion: making `Write` blocking instead of returning a channel HOT 30
- Add *BSD support
- Hangs / slow on Linux
- Don't panic when headless HOT 1
- Is `clipboard.Write(clipboard.FmtImage, []byte)` not design to copy any other format than `PNG`? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from clipboard.