Comments (16)
I think enabling it as default in general makes sense - it sounds a feature might not even be needed.
from oculante.
This feature is already available. Could you try it out and see if it is working for you? It can be found in the menu to the right, then select "Paste".
from oculante.
I was expecting it to work with Ctrl V. Strange that it doesn't. Either way, clicking the menu button, tells me the clipboard does not contain an image. If I use wl-paste > image.png
I am able to open and view the image. It is from grim
.
from oculante.
Yes, that seems to be a bug - it should work with the key combination. I have not used wl-paste
myself - I have tried this by copying images from different graphics applications. Basically, there need to be bytes in the clipboard that the image
library can decode.
from oculante.
Well the data is put into the clipboard with grim
, using --copy -t png
from oculante.
If I copy the image with wl-copy -t image/png < "$image_path"
it does not work.
from oculante.
Have you tried copying from something like gimp or a screenshot utility as well? Does that produce a similar effect?
from oculante.
No it does not work.wkth himp or any program. The issue appears to not be that the keybimd.doesnt.work, it is that clipboard is broken on Wayland. Consider using another cross-desktop (XDG) compatible clipboard crate?
from oculante.
The keybinding is actually broken, so it is great you spotted that!
The library says:
There's also an optional wayland data control backend through the wl-clipboard-rs crate. This can be enabled using the wayland-data-control feature. When enabled this will be prioritized over the X11 backend, but if the initialization fails, the implementation falls back to using the X11 protocol automatically. Note that in my tests the wayland backend did not keep the clipboard contents after the process exited. (Although neither did the X11 backend on my Wayland setup).
I am not sure if there even is another cross-platform clipboard crate...
from oculante.
Could you please re-export the wayland-data-control
feature as wayland-clipboard
in the Cargo.toml
and maybe make it a default-features
?
from oculante.
There is currently:
- copypasta
- If we run into issues with the clipboard getting cleared for protocol reasons: copypasta-ex
The second one looks like a good option as I am not sure if the first (a fork of another crate, to add Wayland support) did it properly. For windowed applications, the clipboard is supposed to be associated with the window, and I see that some of these crates use the protocol intended for headless programs.
from oculante.
Arboard currently has a warning in the readme:
Note that in my tests the wayland backend did not keep the clipboard contents after the process exited. (Although neither did the X11 backend on my Wayland setup).
from oculante.
It does not look like copypasta supports image data as far as I see
from oculante.
If the feature flag works then it works but it might not behave as desired under all circumstances.
from oculante.
No matter what, seems like the answer is that no rust crates can talk to a WL clipboard using the window handle. https://smithay.github.io/smithay-clipboard/smithay_clipboard/struct.Clipboard.html Not even Smithay.
So maybe the protocol needs to be built manually for some reason? It is unstable?
https://docs.rs/eframe/latest/eframe/struct.Frame.html#method.window_handle
We can use a window handle from eframe and port wl-copy
code to Smithay's bindings:
https://github.com/bugaevc/wl-clipboard/blob/master/src/wl-copy.c
Obviously this is a separate crate now. Yet Another Clipboard Crate But With Proper Wayland Support
YACCBWPWS
from oculante.
I don't know what this does but it looks like it works to get around the other problem
https://github.com/Kirottu/watershot/blob/master/src/main.rs#L72-L90
from oculante.
Related Issues (20)
- Support 16-bit grayscale images? HOT 9
- Handle Associated alpha images HOT 11
- Oculante does not load single-channel EXR images HOT 4
- Use `image` internal formats
- Gifs piped into oculante do not animate HOT 3
- native wayland support HOT 2
- Ensure window size can't be too small HOT 1
- Webp images with large size don't get loaded HOT 1
- Image displayed wrong compared to other applications HOT 3
- Allow configurable min window size HOT 1
- No dependencies in Cargo.lock for build with options: --no-default-features notan/shaderc HOT 4
- error[E0599]: no variant or associated item named `get_mouse_position` found for enum `mouse_position::mouse_position::Mouse` in the current scope HOT 7
- heif support via avif-decode
- ERROR rfd::backend::xdg_desktop_portal HOT 5
- Transparency in images shows contents below oculante HOT 8
- GIFs increase in speed when workspace is switched HOT 1
- "Show checker background" option doesn't work" HOT 1
- A JPG file starting with 0x52 0x49 can't be opened HOT 2
- The executable icon on Windows is only available in 48x48px HOT 1
- Delete and overwrite operations should ask for a confirmation HOT 2
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 oculante.