170 Commits

Author SHA1 Message Date
Ivan Molodetskikh
b14b188053 Fix typo in comment 2022-03-20 12:03:00 +03:00
Ivan Molodetskikh
4336d9a731 Rename wl-clipboard-tools to wl-clipboard-rs-tools
Prepare for publication as a separate crate.
2022-03-20 12:03:00 +03:00
Ivan Molodetskikh
5838a39a89 Fix missing space 2022-03-20 12:03:00 +03:00
Ivan Molodetskikh
09ecc2832f CHANGELOG: Mention failure removal 2022-03-20 12:03:00 +03:00
Ivan Molodetskikh
3756a4df3d tools: Replace underscores back with dashes 2022-03-20 12:03:00 +03:00
Ivan Molodetskikh
b4555d70c1 CHANGELOG: Mention of dash-underscore replacement 2022-03-20 12:03:00 +03:00
piegames
45097706f8 Remove failure dependency from binary as well 2022-03-14 20:00:54 +03:00
piegames
d9829ccb2e Remove failure dependency
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.
2022-03-14 20:00:54 +03:00
Ivan Molodetskikh
da0e8d6dff Remove Travis badge from Cargo.toml 2022-03-14 11:39:53 +03:00
Ivan Molodetskikh
e7677e35ee Update CI badge 2022-03-14 11:18:50 +03:00
Ivan Molodetskikh
928cc71211 Fix Clippy warnings 2022-03-14 11:07:17 +03:00
Ivan Molodetskikh
f863149118 CI: Switch to GitHub Actions
Closes https://github.com/YaLTeR/wl-clipboard-rs/issues/21
2022-03-14 11:07:04 +03:00
Ivan Molodetskikh
a02b3225cb wl_clip: Remove unnecessary map() 2022-03-14 10:24:20 +03:00
Ivan Molodetskikh
afd3f193d9 Update wl-clipboard-tools source paths in the docs v0.5.0 2022-03-13 19:34:27 +03:00
Ivan Molodetskikh
c278c5bf13 Bump version to 0.5.0 2022-03-13 19:30:31 +03:00
Ivan Molodetskikh
c78c8a4758 Specify precise dependency versions 2022-03-13 19:23:05 +03:00
Ivan Molodetskikh
62cbe0ffff CHANGELOG: Fix v0.3.1 heading 2022-03-13 19:16:11 +03:00
Ivan Molodetskikh
0285afa45a Format code 2022-03-13 19:15:14 +03:00
Ivan Molodetskikh
53b3a63db1 Update deprecated key in rustfmt.toml 2022-03-13 19:14:53 +03:00
piegames
1882a1ecef Bump dependencies
Some of them had security advisories, which are now fixed in the newer versions.
2022-03-06 13:07:43 +03:00
piegames
12e4143d8b Make the fork call safe
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.
2022-03-06 13:07:43 +03:00
mike7b4
381555a459 Split binaries from the main crate. (Closes: issue#15) (#19)
* 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>
2022-01-15 20:44:26 +03:00
Alexander Kjäll
9d862d1aa3 The crate tree_magic have become unmaintained and tree_magic_mini seems to have taken over 2022-01-02 09:07:46 +03:00
Ivan Molodetskikh
b3818a5da1 Add extra sleep/answer to tests
This wayland-rs version has an issue with use_system_lib which requires
an extra sleep/answer cycle.
v0.4.1
2020-09-01 19:54:02 +03:00
Ivan Molodetskikh
2f21a9220c Bump version to 0.4.1 2020-09-01 19:45:13 +03:00
Ivan Molodetskikh
09a52caed0 Update to nix 0.18 2020-08-31 11:57:26 +03:00
Ivan Molodetskikh
8cd01a888b Update to wayland-rs 0.27 2020-08-31 11:47:24 +03:00
Ivan Molodetskikh
e04b139a80 Increase max_width to 120
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.
2020-08-31 11:26:22 +03:00
Ivan Molodetskikh
751d0063af Bump version to 0.4.0 v0.4.0 2019-12-13 22:10:44 +03:00
Ivan Molodetskikh
21529c021d Fix clippy warning 2019-12-13 22:01:12 +03:00
Ivan Molodetskikh
1229f07ddd Update dependencies 2019-12-13 22:01:03 +03:00
Ivan Molodetskikh
7c862cb95b Remove copy::Error::Fork
It's no longer used.
2019-12-13 21:22:16 +03:00
Ivan Molodetskikh
037fe5fe4a copy: fix comment going over the line length limit 2019-12-10 12:16:29 +03:00
Ivan Molodetskikh
e56bf4fff3 copy: clarify should_quit and error 2019-12-10 12:15:25 +03:00
Ivan Molodetskikh
f4e482646a copy: clarify error handling in the thread 2019-12-10 12:11:21 +03:00
Ivan Molodetskikh
bfc89c61db (#6): Make copy use a thread instead of forking
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.
2019-12-10 11:50:41 +03:00
Ivan Molodetskikh
84dbe308d0 Switch wl-copy and wl-clip to prepare_copy() 2019-12-10 11:50:41 +03:00
Ivan Molodetskikh
8089f7c25d Add copy::prepare_copy() 2019-12-10 11:50:41 +03:00
Ivan Molodetskikh
932994c929 Change copy::Source to own its value
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.
2019-12-10 11:50:38 +03:00
Ivan Molodetskikh
b886f152f5 Change copy::Seat to own its value
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.
2019-12-10 11:48:56 +03:00
Ivan Molodetskikh
939926e32d Bump version to 0.3.1 v0.3.1 2019-11-27 20:51:20 +03:00
Ivan Molodetskikh
4bd39d2969 Fix warnings 2019-11-27 20:51:20 +03:00
Ivan Molodetskikh
82b078ba56 Fix link in MimeSource doc 2019-11-04 13:23:56 +03:00
yory8
d223a49934 Implement copy_multi, see #9 (#10)
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
2019-11-04 12:33:23 +03:00
Ivan Molodetskikh
8bebab6837 Merge pull request #7 from YaLTeR/fixes
Fix using a deprecated method & ignoring pre-v6 seats
2019-10-13 22:44:28 +03:00
Sergey Bugaev
f4cda13fdf Fix ignoring wl_seat's older than v6
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>
2019-10-13 22:35:16 +03:00
Sergey Bugaev
79e84da677 Stop using a deprecated method
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>
2019-10-13 16:10:53 +03:00
Ivan Molodetskikh
2a0012b5ee Fix is_primary_selection_supported() documentation 2019-04-04 18:21:47 +03:00
Ivan Molodetskikh
4aea3c91c1 Bump version to 0.3.0 v0.3 2019-04-04 17:25:25 +03:00
Ivan Molodetskikh
fa5774df8a copy: clarify the behavior of ClipboardType::Both 2019-04-04 17:25:25 +03:00