The crate is deprecated and abandoned. It suggests using `thiserror` as a
replacement for the derive macros, but we already have `derive_more` which
can do the same, so use that instead. This very likely is an API breaking
change.
Instead of execvp, we now call execv. In order to a void having to do a
manual PATH lookup, we delegate this to `/usr/bin/env` whose absolute path
is usually present.
* Split binaries from the main crate. (Closes: issue#15)
The binaries is put in a new crate wl-clipboard-tools.
* Update .travis.yml
Co-authored-by: Ivan Molodetskikh <yalterz@gmail.com>
* Fix CR comments
* More CR fixes
* Some more CR fixes
* revert line
Co-authored-by: Mikael Hermansson <mike7b4@protonmail.com>
Co-authored-by: Ivan Molodetskikh <yalterz@gmail.com>
Gives some more breathing room with long wayland-rs invocations. Also
Visual formatting with max_width = 100 is impossible after wayland-rs
0.27 update due to even longer invocations required.
Things wl-clipboard-rs did past-fork were not async-signal-safe, which
means they were unsafe in multi-threaded programs. It also caused some
suprising behavior, like #6. In any case, forking is better left off to
the actual binaries, so this commit switches the background copying
support to use a regular thread and be more explicit.
We're switching to using a thread instead of forking, which means the
values passed to copy can outlive the copy call, so borrowed values
cannot be used.
We're switching to using a thread instead of forking, which means the
values passed to copy can outlive the copy call, so borrowed values
cannot be used.
Closes#9.
* try implementing copy_multi
* disable automatic text mimes for copy_multi
* add new struct type mimesource
* fix
* implement test
* fix macro
* avoid panic
* dbg
* always create multi text
* fix previous commit
* fix test
* remove dbg!
* filter mimes
* fix tempfileremove error
* fallback to text
* give priority to a copule text formats
* use map
* clippy
* clippy
* Revert "give priority to a copule text formats"
This reverts commit eaf1c02bdd.
* Revert "fallback to text"
This reverts commit 36687de30c.
* docs + change mime field to mime_type for consistency
* Cleanup and fixes
The version we actually need is v2, as we only care about the
name event. Technically, even this is not completely correct,
as we can still use a v1 seat seat perfectly well as long as
we're not trying to find a seat with a specific name, but v2
is sufficiently old to be considered mandatory with reason.
v2 is also the version wl-clipboard requires, for the same
reason.
This also adds a unit test for accepting a v2 seat.
Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
The mime_guess::guess_mime_type() function is deprecated in favor
of using from_path(path).first_or_octet_stream(). Instead of doing
that, let's have infer_mime_type() return a proper Option<Mime>.
Fixes https://github.com/YaLTeR/wl-clipboard-rs/issues/4
Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>