mirror of
https://github.com/gustavosett/Windows-11-Clipboard-History-For-Linux
synced 2026-04-25 17:15:35 +02:00
* fix(clipboard): improve linux reliability - Implemented robust text and HTML setting using xclip and wl-copy - Added fallback to arboard for better compatibility on Linux distros - Updated package-lock.json with peer dependency metadata * refactor(clipboard): remove unused variables - Clean up unused variables to resolve compiler warnings - Remove redundant system clipboard initialization in paste_item * fix(clipboard): improve linux external tool handling - Added target OS guards to prevent executing Linux-specific commands on other platforms - Enhanced error reporting by capturing stderr when external tools like xclip or wl-copy fail - Updated HTML clipboard logic to attempt setting both HTML and plain text formats sequentially" * fix(linux): improve multi-format clipboard copy - Ensure plain text is set robustly after HTML content on Wayland and X11 - Prevents potential race conditions or overwrites when using external tools * fix(clipboard): explicitly set UTF-8 targets to prevent mojibake on browsers Browsers strictly enforce X11/Wayland clipboard target MIME types and atoms. When clipboard data is set with `text/plain`, browsers default to decoding it as ISO-8859-1 or ASCII, which breaks special characters, icons, and emojis such as kaomoji (e.g. they show as `ðð§(。â¥â¿â¥ï½¡)`). This commit resolves the mojibake issue on Linux by: - Explicitly appending `;charset=utf-8` to the target when using `wl-copy`. - Explicitly using the `UTF8_STRING` atom instead of `text/plain` for `xclip` to conform with X11 conventions.