diff --git a/Cargo.lock b/Cargo.lock index 693bd23..f15ecbf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -153,9 +153,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.82" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f538837af36e6f6a9be0faa67f9a314f8119e4e4b5867c6ab40ed60360142519" +checksum = "25bdb32cbbdce2b519a9cd7df3a678443100e265d5e25ca763b7572a5104f5f3" [[package]] name = "apply" @@ -698,9 +698,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.96" +version = "1.0.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "065a29261d53ba54260972629f9ca6bffa69bac13cd1fed61420f7fa68b9f8bd" +checksum = "099a5357d84c4c61eb35fc8eafa9a79a902c2f76911e5747ced4e032edd8d9b4" [[package]] name = "cfg-expr" @@ -1003,7 +1003,7 @@ dependencies = [ [[package]] name = "cosmic-panel-config" version = "0.1.0" -source = "git+https://github.com/pop-os/cosmic-panel#8a6ab265610107dc8aaee00f94379fa49b174042" +source = "git+https://github.com/pop-os/cosmic-panel#683a204ef81bd17c2b35264521e5145df3518ee5" dependencies = [ "anyhow", "cosmic-config", @@ -1676,9 +1676,9 @@ checksum = "8bf7cc16383c4b8d58b9905a8509f02926ce3058053c056376248d958c9df1e8" [[package]] name = "fluent" -version = "0.16.0" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61f69378194459db76abd2ce3952b790db103ceb003008d3d50d97c41ff847a7" +checksum = "bb74634707bebd0ce645a981148e8fb8c7bccd4c33c652aeffd28bf2f96d555a" dependencies = [ "fluent-bundle", "unic-langid", @@ -1686,9 +1686,9 @@ dependencies = [ [[package]] name = "fluent-bundle" -version = "0.15.2" +version = "0.15.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e242c601dec9711505f6d5bbff5bedd4b61b2469f2e8bb8e57ee7c9747a87ffd" +checksum = "7fe0a21ee80050c678013f82edf4b705fe2f26f1f9877593d13198612503f493" dependencies = [ "fluent-langneg", "fluent-syntax", @@ -1711,9 +1711,9 @@ dependencies = [ [[package]] name = "fluent-syntax" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0abed97648395c902868fee9026de96483933faa54ea3b40d652f7dfe61ca78" +checksum = "2a530c4694a6a8d528794ee9bbd8ba0122e779629ac908d15ad5a7ae7763a33d" dependencies = [ "thiserror", ] @@ -2035,9 +2035,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "libc", @@ -2715,9 +2715,9 @@ dependencies = [ [[package]] name = "intl-memoizer" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c310433e4a310918d6ed9243542a6b83ec1183df95dff8f23f87bb88a264a66f" +checksum = "fe22e020fce238ae18a6d5d8c502ee76a52a6e880d99477657e6acc30ec57bda" dependencies = [ "type-map", "unic-langid", @@ -3288,9 +3288,9 @@ dependencies = [ [[package]] name = "num-iter" -version = "0.1.44" +version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d869c01cc0c455284163fd0092f1f93835385ccab5a98a0dcc497b2f8bf055a9" +checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" dependencies = [ "autocfg", "num-integer", @@ -4768,7 +4768,7 @@ dependencies = [ "serde", "serde_spanned", "toml_datetime", - "winnow 0.6.7", + "winnow 0.6.8", ] [[package]] @@ -4824,9 +4824,9 @@ checksum = "17f77d76d837a7830fe1d4f12b7b4ba4192c1888001c7164257e4bc6d21d96b4" [[package]] name = "type-map" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6d3364c5e96cb2ad1603037ab253ddd34d7fb72a58bdddf4b7350760fc69a46" +checksum = "deb68604048ff8fa93347f02441e4487594adc20bb8a084f9e564d2b827a0a9f" dependencies = [ "rustc-hash", ] @@ -5597,9 +5597,9 @@ dependencies = [ [[package]] name = "winnow" -version = "0.6.7" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14b9415ee827af173ebb3f15f9083df5a122eb93572ec28741fb153356ea2578" +checksum = "c3c52e9c97a68071b23e836c9380edae937f17b9c4667bd021973efc689f618d" dependencies = [ "memchr", ] @@ -5668,7 +5668,7 @@ dependencies = [ [[package]] name = "xdg-shell-wrapper-config" version = "0.1.0" -source = "git+https://github.com/pop-os/xdg-shell-wrapper#224ada13d8ac53fec7854e82a731919366f5c74c" +source = "git+https://github.com/pop-os/xdg-shell-wrapper#4e1da2cab5a9dc7067d51b3def4d85c9dd94667f" dependencies = [ "serde", "wayland-protocols-wlr", @@ -5806,18 +5806,18 @@ checksum = "dd15f8e0dbb966fd9245e7498c7e9e5055d9e5c8b676b95bd67091cd11a1e697" [[package]] name = "zerocopy" -version = "0.7.32" +version = "0.7.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" +checksum = "087eca3c1eaf8c47b94d02790dd086cd594b912d2043d4de4bfdd466b3befb7c" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.32" +version = "0.7.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" +checksum = "6f4b6c273f496d8fd4eaf18853e6b448760225dc030ff2c485a786859aea6393" dependencies = [ "proc-macro2", "quote", diff --git a/cosmic-clipboard-manager.spec b/cosmic-clipboard-manager.spec index 64ef2af..658ef20 100644 --- a/cosmic-clipboard-manager.spec +++ b/cosmic-clipboard-manager.spec @@ -53,8 +53,8 @@ just rootdir=%{buildroot} prefix=%{_prefix} install %license LICENSE.dependencies %license cargo-vendor.txt %{_bindir}/cosmic-clipboard-manager -%{_datadir}/applications/com.wiiznokes.CosmicClipboardManager.desktop -%{_datadir}/com.wiiznokes.CosmicClipboardManager/icons/assignment24.svg +%{_datadir}/applications/io.github.wiiznokes.cosmic-clipboard-manager.desktop +%{_datadir}/share/icons/hicolor/scalable/apps/io.github.wiiznokes.cosmic-clipboard-manager.svg %changelog %autochangelog diff --git a/justfile b/justfile index 8e4aef7..ea8e2a5 100644 --- a/justfile +++ b/justfile @@ -1,5 +1,5 @@ name := 'cosmic-clipboard-manager' -export APPID := 'com.wiiznokes.CosmicClipboardManager' +export APPID := 'io.github.wiiznokes.cosmic-clipboard-manager' rootdir := '' prefix := '/usr' @@ -11,24 +11,18 @@ export INSTALL_DIR := base-dir / 'share' bin-src := 'target' / 'release' / name bin-dst := base-dir / 'bin' / name -desktop := APPID + '.desktop' -desktop-src := 'res' / desktop -desktop-dst := clean(rootdir / prefix) / 'share' / 'applications' / desktop +desktop-src := 'res' / 'desktop_entry.desktop' +desktop-dst := clean(rootdir / prefix) / 'share' / 'applications' / APPID + '.desktop' -metainfo := APPID + '.metainfo.xml' -metainfo-src := 'res' / metainfo -metainfo-dst := clean(rootdir / prefix) / 'share' / 'metainfo' / metainfo +metainfo-src := 'res' / 'metainfo.xml' +metainfo-dst := clean(rootdir / prefix) / 'share' / 'metainfo' / APPID + '.metainfo.xml' res-src := 'res' -res-dst := clean(rootdir / prefix) / 'share' / APPID +res-dst := clean(rootdir / prefix) / 'share' # Default recipe which runs `just build-release` default: build-release -clean: - cargo clean - - # Compiles with debug profile build-debug *args: @@ -41,13 +35,18 @@ build-release *args: install: install -Dm0755 {{bin-src}} {{bin-dst}} install -Dm0644 {{desktop-src}} {{desktop-dst}} - install -Dm0644 {{res-src}}/icons/assignment24.svg {{res-dst}}/icons/assignment24.svg + install -Dm0644 {{res-src}}/app_icon.svg {{res-dst}}/icons/hicolor/scalable/apps/{{APPID}}.svg # Uninstalls installed files uninstall: rm {{bin-dst}} rm {{desktop-dst}} - rm -r {{res-dst}} + rm {{res-dst}}/icons/hicolor/scalable/apps/{{APPID}}.svg + + +clean: + cargo clean + pull: fmt prettier fix diff --git a/res/icons/assignment24.svg b/res/app_icon.svg similarity index 100% rename from res/icons/assignment24.svg rename to res/app_icon.svg diff --git a/res/com.wiiznokes.CosmicClipboardManager.desktop b/res/com.wiiznokes.CosmicClipboardManager.desktop deleted file mode 100644 index e643ad5..0000000 --- a/res/com.wiiznokes.CosmicClipboardManager.desktop +++ /dev/null @@ -1,13 +0,0 @@ -[Desktop Entry] -Name=Clipboard Manager -Comment=A wayland clipboard manager. -Type=Application -Exec=cosmic-clipboard-manager -Terminal=false -Categories=Cosmic;Iced; -Keywords=Cosmic;Iced; -# Translators: Do NOT translate or transliterate this text (this is an icon file name)! -Icon=com.system76.CosmicStore -StartupNotify=true -NoDisplay=true -X-CosmicApplet=true \ No newline at end of file diff --git a/res/desktop_entry.desktop b/res/desktop_entry.desktop new file mode 100644 index 0000000..368486d --- /dev/null +++ b/res/desktop_entry.desktop @@ -0,0 +1,15 @@ +[Desktop Entry] +Name=Clipboard Manager +Comment=A wayland clipboard manager +Keywords=Cosmic;Iced;history; + +# translators: do not translate this part +Icon=io.github.wiiznokes.cosmic-clipboard-manager +Categories=Cosmic;Iced; +Type=Application +Exec=cosmic-clipboard-manager +Terminal=false +StartupNotify=true +NoDisplay=true +X-CosmicApplet=true +X-CosmicHoverPopup=true diff --git a/res/metainfo.xml b/res/metainfo.xml new file mode 100644 index 0000000..e69de29 diff --git a/src/app.rs b/src/app.rs index 2437574..ab9b352 100644 --- a/src/app.rs +++ b/src/app.rs @@ -29,9 +29,9 @@ use std::sync::atomic::{self, AtomicBool}; // todo: converge this 4 strings pub static QUALIFIER: &str = "com"; pub static ORG: &str = "wiiznokes"; -pub static APP: &str = "CosmicClipboardManager"; +pub static APP: &str = "cosmic-clipboard-manager"; -pub const APP_ID: &str = "com.wiiznokes.CosmicClipboardManager"; +pub const APP_ID: &str = "com.wiiznokes.cosmic-clipboard-manager"; pub struct Window { core: Core, @@ -304,7 +304,7 @@ impl cosmic::Application for Window { let icon = self .core .applet - .icon_button("/usr/share/com.wiiznokes.CosmicClipboardManager/icons/assignment24.svg") + .icon_button("io.github.wiiznokes.cosmic-clipboard-manager") .on_press(AppMessage::TogglePopup); MouseArea::new(icon)