wiiznokes / clipboard-manager Goto Github PK
View Code? Open in Web Editor NEWClipboard manager for COSMIC™
License: GNU General Public License v3.0
Clipboard manager for COSMIC™
License: GNU General Public License v3.0
thread 'main' panicked at /rustc/c9f8f3438a8134a413aa5d4903e0196e44e37bbc/library/core/src/str/mod.rs:659:21:
byte index 50 is not a char boundary; it is inside 'r' (bytes 49..52) of `In Another Life 【slowed + reverb】`
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
^C
It is your formatted_value
function in utils.rs
pop-os/cosmic-launcher#114
Maybe show a list of images like kde
Currently, a clipboard value can be copied differently based on his mime type. So we can't just expose all mimetype that was used by source applications. We need to support the most commun one.
And see how this could be done.
For image, we need to check if the db is appropriate
the image is duplicated
$ /usr/bin/cosmic-ext-applet-clipboard-manager
2024-08-12T19:26:14.570739Z ERROR inside error: A required Wayland protocol (zwlr_data_control_manager_v1 version 1) is not supported by the compositor
2024-08-12T19:26:14.576757Z ERROR A required Wayland protocol (zwlr_data_control_manager_v1 version 1) is not supported by the compositor
Expected to see an app icon and a clipboard manager
build and install per readme.md
run /usr/bin/cosmic-ext-applet-clipboard-manager
Aug 12 15:26:14 dev cosmic-ext-applet-clipboard-manager[188903]: inside error: A required Wayland protocol (zwlr_data_control_manager_v1 version 1) is not supported by the compositor
Aug 12 15:26:14 dev cosmic-ext-applet-clipboard-manager[188903]: A required Wayland protocol (zwlr_data_control_manager_v1 version 1) is not supported by the compositor
[2024-04-13T14:18:20Z WARN iced_futures::subscription::tracker] Error sending event to subscription: TrySendError { kind: Full }
This will make the applet feel faster, while allowing scrolling the list with long press
When compiling I get the following error:
Compiling cosmic-ext-applet-clipboard-manager v0.1.0 (/home/theo/Applications/cosmic/clipboard-manager)
error[E0432]: unresolved import 'std::hash::DefaultHasher'
--> src/db.rs:7:12
|
7 | hash::{DefaultHasher, Hash, Hasher},
| ^^^^^^^^^^^^^ no 'DefaultHasher' in 'hash'
|
= help: consider importing this struct instead:
std::collections::hash_map::DefaultHasher
For more information about this error, try 'rustc --explain E0432'.
error: could not compile 'cosmic-ext-applet-clipboard-manager' (bin `"cosmic-ext-applet-clipboard-manager")` due to previous error
error: Recipe 'build-release' failed on line 33 with exit code 101
Finish compile
git clone https://github.com/wiiznokes/clipboard-manager.git
cd clipboard-manager
just build-release
sudo just install
--- No Entries ---
This would make the db crash
got this error on installation
cargo build -r
error: failed to parse manifest at /home/anik/cosmic-clipboard-manager/Cargo.toml
Caused by:
no targets specified in the manifest
either src/lib.rs, src/main.rs, a [lib] section, or [[bin]] section must be present
error: Recipe install
failed on line 5 with exit code 101
2 ways:
Hi,
Im just create this issue for help user if you have the same issue.
Best Regards
error: linking with `cc` failed: exit status: 1
= note: /usr/bin/ld: cannot find -lsqlite3: No such file or directory
collect2: error: ld returned 1 exit status
git clone https://github.com/wiiznokes/clipboard-manager.git
cd clipboard-manager
just build-release
sudo just install
https://users.rust-lang.org/t/how-to-fix-error-linking-with-cc-failed-exit-status-1/108922
Probably : sudo apt install -y sqlite3
but that not work for me... :(
Layout shifts are particular annoying, especially if the dock is not extended.
[src/app.rs:73:9] start.elapsed() = 40.576382ms
/etc/cosmic-comp/config.ron
is not a thing anymore
Env var now.
Command:
sudo sh -c 'mkdir -p /etc/environment.d/ && echo COSMIC_DATA_CONTROL_ENABLED=1 > /etc/environment.d/cosmic-ext-applet-clipboard-manager.conf'
For packaging on fedora, use /usr/lib/environment.d/*.conf
require reboot
After adding it to the panel from the settings, it only appears on one of the panels in a multi-monitor setup.
It should appear on all panels on all screens.
Apr 03 05:44:28 pop-os /usr/libexec/gdm-wayland-session[3497]: 2024-04-03T03:44:28.322726Z INFO cosmic-panel: cosmic_session::notifications: 2024-04-03T03:44:28.322652Z ERROR stderr{client=InnerClientId { ptr: 0x5f10f630da80, alive: false }}: com.wiiznokes.CosmicClipboardManager: 0: rust_begin_unwind
Apr 03 05:44:28 pop-os cosmic-session[3497]: 2024-04-03T03:44:28.319213Z ERROR stderr{client=InnerClientId { ptr: 0x5f10f630da80, alive: false }}: com.wiiznokes.CosmicClipboardManager: stack backtrace:
Apr 03 05:44:28 pop-os cosmic-session[3497]: 2024-04-03T03:44:28.319198Z ERROR stderr{client=InnerClientId { ptr: 0x5f10f630da80, alive: false }}: com.wiiznokes.CosmicClipboardManager: called Result::unwrap()
on an Err
value: Io(Custom { kind: Other, error: "could not acquire lock on "/tmp/welcome-to-sled/db": Os { code: 11, kind: WouldBlock, message: "Resource temporarily unavailable" }" })
Apr 03 05:44:28 pop-os cosmic-session[3497]: 2024-04-03T03:44:28.319164Z ERROR stderr{client=InnerClientId { ptr: 0x5f10f630da80, alive: false }}: com.wiiznokes.CosmicClipboardManager: thread 'main' panicked at src/app.rs:72:32:
KDE have this feature and it could be useful sometime
See if we can receive a wayland event for this.
If we receive such event, copy ourselve the content.
How can we do this?
This report details the failure encountered while attempting to install the clipboard manager application for COSMIC desktop environment.
Environment:
Operating System: Pop!_OS 22.04 LTS (x86_64)
Device Model: VivoBook ASUS Laptop X513IA_M513IA 1.0
Kernel Version: 6.9.3-76060903-generic
Desktop Environment: COSMIC
Rust Version: stable-x86_64-unknown-linux-gnu (unchanged - rustc 1.80.1)
Clipboard Manager Source: [invalid URL removed]
Steps Taken:
Cloned the clipboard manager source code from the provided GitHub repository.
Installed dependencies: sudo apt install libsqlite3-dev sqlite3
Executed build command: just build-release
Attempted installation: sudo just install
Error Encountered:
The build process failed during the build-release step with exit code 101. Recipe build-release
failed on line 28 with exit code 101
Maybe take inspiration on this gnome extension: https://github.com/oae/gnome-shell-pano
Was working well for me for the past two weeks, but no longer works. Running latest source build, and latest cosmic packages (popdev) the applet is no longer capturing items copied to clipboard.
On copy, a new entry is added to the clipboard manager
$ cat /etc/os-release
NAME="Pop!_OS"
VERSION="22.04 LTS"
ID=pop
ID_LIKE="ubuntu debian"
PRETTY_NAME="Pop!_OS 22.04 LTS"
VERSION_ID="22.04"
HOME_URL="https://pop.system76.com"
SUPPORT_URL="https://support.system76.com"
BUG_REPORT_URL="https://github.com/pop-os/pop/issues"
PRIVACY_POLICY_URL="https://system76.com/privacy"
VERSION_CODENAME=jammy
UBUNTU_CODENAME=jammy
LOGO=distributor-logo-pop-o
$ ps aux | grep cosmic-ext-applet-clipboard-manager
curious+ 9825 0.0 0.0 916820 23300 tty1 SNl+ 14:34 0:00 cosmic-ext-applet-clipboard-manager
$ cat /var/log/syslog | grep 'clipboard'
Jul 22 09:58:40 localhost cosmic-ext-applet-clipboard-manager[4752]: Failed to initialize viewporter: the requested global was not found in the registry
Jul 22 09:58:40 localhost cosmic-ext-applet-clipboard-manager[4752]: No `wp_viewporter`. Subsurfaces not supported.
Jul 22 09:58:40 localhost cosmic-ext-applet-clipboard-manager[4752]: inside error: A required Wayland protocol (zwlr_data_control_manager_v1 version 1) is not supported by the compositor
Jul 22 09:58:40 localhost cosmic-ext-applet-clipboard-manager[4752]: A required Wayland protocol (zwlr_data_control_manager_v1 version 1) is not supported by the compositor
Jul 22 13:26:39 localhost cosmic-ext-applet-clipboard-manager[76705]: Failed to initialize viewporter: the requested global was not found in the registry
Jul 22 13:26:42 localhost cosmic-ext-applet-clipboard-manager[76705]: No `wp_viewporter`. Subsurfaces not supported.
Jul 22 13:26:43 localhost cosmic-ext-applet-clipboard-manager[76705]: inside error: A required Wayland protocol (zwlr_data_control_manager_v1 version 1) is not supported by the compositor
Jul 22 13:26:43 localhost cosmic-ext-applet-clipboard-manager[77018]: Failed to initialize viewporter: the requested global was not found in the registry
Jul 22 13:26:43 localhost cosmic-ext-applet-clipboard-manager[77018]: No `wp_viewporter`. Subsurfaces not supported.
Jul 22 13:26:43 localhost cosmic-ext-applet-clipboard-manager[77018]: inside error: A required Wayland protocol (zwlr_data_control_manager_v1 version 1) is not supported by the compositor
Jul 22 13:26:43 localhost cosmic-ext-applet-clipboard-manager[77018]: A required Wayland protocol (zwlr_data_control_manager_v1 version 1) is not supported by the compositor
Jul 22 14:19:36 localhost cosmic-ext-applet-clipboard-manager[86429]: Failed to initialize viewporter: the requested global was not found in the registry
Jul 22 14:19:36 localhost cosmic-ext-applet-clipboard-manager[86429]: No `wp_viewporter`. Subsurfaces not supported.
Jul 22 14:19:36 localhost cosmic-ext-applet-clipboard-manager[86429]: inside error: A required Wayland protocol (zwlr_data_control_manager_v1 version 1) is not supported by the compositor
Jul 22 14:19:36 localhost cosmic-ext-applet-clipboard-manager[86429]: A required Wayland protocol (zwlr_data_control_manager_v1 version 1) is not supported by the compositor
Jul 22 14:20:19 localhost cosmic-ext-applet-clipboard-manager[86864]: Failed to initialize viewporter: the requested global was not found in the registry
Jul 22 14:20:20 localhost cosmic-ext-applet-clipboard-manager[86864]: No `wp_viewporter`. Subsurfaces not supported.
Jul 22 14:20:20 localhost cosmic-ext-applet-clipboard-manager[86864]: inside error: A required Wayland protocol (zwlr_data_control_manager_v1 version 1) is not supported by the compositor
Jul 22 14:20:20 localhost cosmic-ext-applet-clipboard-manager[86864]: A required Wayland protocol (zwlr_data_control_manager_v1 version 1) is not supported by the compositor
Jul 22 14:21:51 localhost cosmic-ext-applet-clipboard-manager[88076]: Failed to initialize viewporter: the requested global was not found in the registry
Jul 22 14:21:51 localhost cosmic-ext-applet-clipboard-manager[88076]: No `wp_viewporter`. Subsurfaces not supported.
Jul 22 14:21:51 localhost cosmic-ext-applet-clipboard-manager[88076]: inside error: A required Wayland protocol (zwlr_data_control_manager_v1 version 1) is not supported by the compositor
Jul 22 14:21:51 localhost cosmic-ext-applet-clipboard-manager[88076]: A required Wayland protocol (zwlr_data_control_manager_v1 version 1) is not supported by the compositor
Jul 22 15:47:05 localhost cosmic-ext-applet-clipboard-manager[101228]: Failed to initialize viewporter: the requested global was not found in the registry
Jul 22 15:47:39 localhost cosmic-ext-applet-clipboard-manager[101228]: No `wp_viewporter`. Subsurfaces not supported.
Jul 22 15:47:39 localhost cosmic-ext-applet-clipboard-manager[101228]: inside error: A required Wayland protocol (zwlr_data_control_manager_v1 version 1) is not supported by the compositor
Jul 22 15:47:39 localhost cosmic-ext-applet-clipboard-manager[101228]: A required Wayland protocol (zwlr_data_control_manager_v1 version 1) is not supported by the compositor
Jul 22 15:47:40 localhost cosmic-ext-applet-clipboard-manager[101611]: Failed to initialize viewporter: the requested global was not found in the registry
Jul 22 15:47:41 localhost cosmic-ext-applet-clipboard-manager[101611]: No `wp_viewporter`. Subsurfaces not supported.
Jul 22 15:47:41 localhost cosmic-ext-applet-clipboard-manager[101611]: inside error: A required Wayland protocol (zwlr_data_control_manager_v1 version 1) is not supported by the compositor
Jul 22 15:47:41 localhost cosmic-ext-applet-clipboard-manager[101611]: A required Wayland protocol (zwlr_data_control_manager_v1 version 1) is not supported by the compositor
Jul 22 23:57:32 localhost cosmic-ext-applet-clipboard-manager[3421]: Failed to initialize viewporter: the requested global was not found in the registry
Jul 22 23:57:32 localhost cosmic-ext-applet-clipboard-manager[3421]: No `wp_viewporter`. Subsurfaces not supported.
Jul 22 23:57:32 localhost cosmic-ext-applet-clipboard-manager[3421]: inside error: A required Wayland protocol (zwlr_data_control_manager_v1 version 1) is not supported by the compositor
Jul 22 23:57:32 localhost cosmic-ext-applet-clipboard-manager[3421]: A required Wayland protocol (zwlr_data_control_manager_v1 version 1) is not supported by the compositor
Jul 23 10:03:32 localhost cosmic-ext-applet-clipboard-manager[4299]: Failed to initialize viewporter: the requested global was not found in the registry
Jul 23 10:03:32 localhost cosmic-ext-applet-clipboard-manager[4299]: No `wp_viewporter`. Subsurfaces not supported.
Jul 23 10:03:32 localhost cosmic-ext-applet-clipboard-manager[4299]: inside error: A required Wayland protocol (zwlr_data_control_manager_v1 version 1) is not supported by the compositor
Jul 23 10:03:33 localhost cosmic-ext-applet-clipboard-manager[4299]: A required Wayland protocol (zwlr_data_control_manager_v1 version 1) is not supported by the compositor
Jul 23 12:16:49 localhost cosmic-ext-applet-clipboard-manager[39067]: Failed to initialize viewporter: the requested global was not found in the registry
Jul 23 12:16:49 localhost cosmic-ext-applet-clipboard-manager[39067]: No `wp_viewporter`. Subsurfaces not supported.
Jul 23 12:16:49 localhost cosmic-ext-applet-clipboard-manager[39067]: inside error: A required Wayland protocol (zwlr_data_control_manager_v1 version 1) is not supported by the compositor
Jul 23 12:16:49 localhost cosmic-ext-applet-clipboard-manager[39067]: A required Wayland protocol (zwlr_data_control_manager_v1 version 1) is not supported by the compositor
Jul 23 12:37:47 localhost cosmic-ext-applet-clipboard-manager[3384]: Failed to initialize viewporter: the requested global was not found in the registry
Jul 23 12:37:47 localhost cosmic-ext-applet-clipboard-manager[3384]: No `wp_viewporter`. Subsurfaces not supported.
Jul 23 12:37:47 localhost cosmic-ext-applet-clipboard-manager[3384]: inside error: A required Wayland protocol (zwlr_data_control_manager_v1 version 1) is not supported by the compositor
Jul 23 12:37:47 localhost cosmic-ext-applet-clipboard-manager[3384]: A required Wayland protocol (zwlr_data_control_manager_v1 version 1) is not supported by the compositor
Jul 23 12:38:11 localhost cosmic-ext-applet-clipboard-manager[5060]: Failed to initialize viewporter: the requested global was not found in the registry
Jul 23 12:38:11 localhost cosmic-ext-applet-clipboard-manager[5060]: No `wp_viewporter`. Subsurfaces not supported.
Jul 23 12:38:11 localhost cosmic-ext-applet-clipboard-manager[5060]: inside error: A required Wayland protocol (zwlr_data_control_manager_v1 version 1) is not supported by the compositor
Jul 23 12:38:11 localhost cosmic-ext-applet-clipboard-manager[5060]: A required Wayland protocol (zwlr_data_control_manager_v1 version 1) is not supported by the compositor
Jul 23 14:34:41 localhost cosmic-ext-applet-clipboard-manager[9825]: Failed to initialize viewporter: the requested global was not found in the registry
Jul 23 14:34:41 localhost cosmic-ext-applet-clipboard-manager[9825]: inside error: A required Wayland protocol (zwlr_data_control_manager_v1 version 1) is not supported by the compositor
Jul 23 14:34:41 localhost cosmic-ext-applet-clipboard-manager[9825]: No `wp_viewporter`. Subsurfaces not supported.
Jul 23 14:34:41 localhost cosmic-ext-applet-clipboard-manager[9825]: A required Wayland protocol (zwlr_data_control_manager_v1 version 1) is not supported by the compositor
$ apt list cosmic-*
Listing... Done
cosmic-app-library/jammy,now 0.1.0~1721054203~22.04~3489c53 amd64 [installed]
cosmic-applets/jammy,now 0.1.0~1721314847~22.04~0c7083e amd64 [installed]
cosmic-bg/jammy,jammy,now 0.1.0~1720050061~22.04~343410f amd64 [installed]
cosmic-comp/jammy 0.1~1721743951~22.04~4f04313 amd64 [upgradable from: 0.1~1721316717~22.04~ec5d89e]
cosmic-design-demo/jammy 0.1.0~1704748391~22.04~d58cfad amd64
cosmic-edit/jammy,now 0.1.0~1721650308~22.04~33d6522 amd64 [installed]
cosmic-ext-orderly/jammy,jammy 0.1.0-0pop1~1719848956~22.04~d76bd39 amd64
cosmic-files/jammy 0.1.0~1721748812~22.04~1820433 amd64 [upgradable from: 0.1.0~1721224248~22.04~ec4d734]
cosmic-greeter-daemon/jammy,now 0.1.0~1721052517~22.04~59e2eaa amd64 [installed]
cosmic-greeter/jammy,now 0.1.0~1721052517~22.04~59e2eaa amd64 [installed]
cosmic-icons/jammy,now 0.1.0~1721234019~22.04~73be037 amd64 [installed]
cosmic-launcher/jammy,now 0.1.0~1721275594~22.04~c188029 amd64 [installed]
cosmic-notifications/jammy,now 0.1.0~1721052308~22.04~2caf2fb amd64 [installed]
cosmic-osd/jammy,now 0.1.0~1721052322~22.04~27fc5e5 amd64 [installed]
cosmic-panel/jammy,now 0.1.0~1721052062~22.04~05420b2 amd64 [installed]
cosmic-randr/jammy,now 0.1.0~1721287742~22.04~e214fe9 amd64 [installed]
cosmic-screenshot/jammy,now 0.1.0~1721052047~22.04~08ac28d amd64 [installed]
cosmic-session/jammy,now 0.1.0~1721052030~22.04~577a181 amd64 [installed]
cosmic-settings-daemon/jammy,now 0.1.0~1721272193~22.04~54700df amd64 [installed]
cosmic-settings/jammy 0.1.0~1721708515~22.04~4908e38 amd64 [upgradable from: 0.1.0~1721311726~22.04~e8106a9]
cosmic-store/jammy 0.1.0~1721663818~22.04~5d73d53 amd64 [upgradable from: 0.1.0~1721657927~22.04~34050c0]
cosmic-tasks/jammy,jammy 0.1.0-0pop1~1719848956~22.04~d76bd39 amd64
cosmic-term/jammy,now 0.1.0~1721650276~22.04~0652001 amd64 [installed]
cosmic-wallpapers/jammy,jammy,jammy,jammy,now 1.0.0~1719415313~22.04~0f2f16d all [installed,automatic]
cosmic-webapps/jammy,jammy,now 0.4.0-0pop1~1715817408~22.04~afb141a amd64 [installed]
cosmic-workspaces/jammy,now 0.1.0~1721334536~22.04~2de3669 amd64 [installed]
https://extensions.gnome.org/extension/5278/pano/ have that and it's great. No need for disturbing notification
The current search implemenation have several problem.
Ideally, we would only need an LCS algo to search the database.
With an unicode and case normalization.
Currently, only match when the full block is found, and normalization have bugs:
é
and e
will match but not the next char.This should add the entry at the top of the applet, for text that you often copy
Probably need some change in the data_control protocol https://wayland.app/protocols/wlr-data-control-unstable-v1
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.