diff --git a/.github/workflows/flatpak.yml b/.github/workflows/flatpak.yml index 81c0123..df8e529 100644 --- a/.github/workflows/flatpak.yml +++ b/.github/workflows/flatpak.yml @@ -23,8 +23,8 @@ jobs: - name: Build Flatpak uses: flatpak/flatpak-github-actions/flatpak-builder@v6 with: - bundle: cosmic-fprint.flatpak - manifest-path: flatpak/fi.joonastuomi.Fprint.yml + bundle: cosmic-utils-enroll.flatpak + manifest-path: flatpak/org.cosmic_utils.Enroll.yml cache-key: flatpak-builder-${{ github.sha }} - name: Get version @@ -39,7 +39,7 @@ jobs: with: tag_name: ${{ env.VERSION }} name: ${{ env.VERSION }} - files: cosmic-fprint.flatpak + files: cosmic-utils-enroll.flatpak draft: false prerelease: true env: diff --git a/CHANGES b/CHANGES index bdefbcf..fba90f5 100644 --- a/CHANGES +++ b/CHANGES @@ -29,3 +29,7 @@ 0.3.12: - Performance improvements - Updated icon +0.4.0: + - Moved project to COSMIC utils + - Renamed from Fprint to Enroll + - Redesigned icon svg diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..7cd103b --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,27 @@ +## Pull requests + +Expensive CI is run against every commit to main. That is why I ask you to open pull requests against the versioned branch that is most appropriate. Which at the time of writing is the only branch with version number. + +However if you are committing just translations and do those through GitHub or any other reason found yourself opening PR against main then no worries. I will edit it to target the correct release. + +## Translators + +[Fluent][fluent] is used for localization of the software. Fluent's translation files are found in the [i18n directory](./i18n). New translations may copy the [English (en) localization](./i18n/en) of the project, rename `en` to the desired [ISO 639-1 language code][iso-codes], and then translations can be provided for each [message identifier][fluent-guide]. If no translation is necessary, the message may be omitted. + +## Packaging + +### Apt + +If packaging for a Linux distribution, vendor dependencies locally with the `vendor` rule, and build with the vendored sources using the `build-vendored` rule. When installing files, use the `rootdir` and `prefix` variables to change installation paths. + +```sh +just vendor +just build-vendored +just rootdir=debian/cosmic-utils-enroll prefix=/usr install +``` + +It is recommended to build a source tarball with the vendored dependencies, which can typically be done by running `just vendor` on the host system before it enters the build environment. + +### Flatpak + +Every build generates a .flatpak artifact. \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index e692668..7634b86 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1019,8 +1019,8 @@ dependencies = [ ] [[package]] -name = "cosmic-ext-fprint" -version = "0.3.11" +name = "cosmic-utils-enroll" +version = "0.4.0" dependencies = [ "futures-util", "i18n-embed 0.15.4", diff --git a/Cargo.toml b/Cargo.toml index 381d00f..25bfd52 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,10 +1,10 @@ [package] -name = "cosmic-ext-fprint" +name = "cosmic-utils-enroll" version = "0.3.12" edition = "2024" license = "MPL-2.0" description = "GUI for fprintd fingerprint enrolling" -repository = "https://github.com/jotuel/cosmic-ext-fprint" +repository = "https://github.com/cosmic-utils/enroll" [build-dependencies] vergen = { version = "8", features = ["git", "gitcl"] } diff --git a/README.md b/README.md index c8360f1..07c6501 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# Fprint for COSMICâ„¢ DE +# COSMICâ„¢ Utils Enroll -GUI for fingerprint management. +GUI for fingerprint management. Designed for COSMIC DE. ## Prerequisites @@ -16,58 +16,18 @@ Choose which finger to register or delete by a tab. Change user from a menu (def - [x] Improve feedback given to user. Currently prints what daemon returns. - [x] Add a user dropdown to make it possible for admin to register for other users. -- [ ] Get project into cosmic-utils. +- [x] Get project into cosmic-utils. - [x] Package & distribute, most likely as a flatpak, but maybe as a deb package also. - [ ] Sherlock the application by adding all functionality directly into cosmic-settings. ## Installation -A [justfile](./justfile) is included by default for the [casey/just][just] command runner. +Download the .flatpak from latest release or build; + + +[justfile](./justfile) is included by default for the [casey/just][just] command runner. - `just` builds the application with the default `just build-release` recipe - `just run` builds and runs the application - `just install` installs the project into the system -- `just vendor` creates a vendored tarball -- `just build-vendored` compiles with vendored dependencies from that tarball -- `just check` runs clippy on the project to check for linter warnings -- `just check-json` can be used by IDEs that support LSP - -## Translators - -[Fluent][fluent] is used for localization of the software. Fluent's translation files are found in the [i18n directory](./i18n). New translations may copy the [English (en) localization](./i18n/en) of the project, rename `en` to the desired [ISO 639-1 language code][iso-codes], and then translations can be provided for each [message identifier][fluent-guide]. If no translation is necessary, the message may be omitted. - -## Packaging - -If packaging for a Linux distribution, vendor dependencies locally with the `vendor` rule, and build with the vendored sources using the `build-vendored` rule. When installing files, use the `rootdir` and `prefix` variables to change installation paths. - -```sh -just vendor -just build-vendored -just rootdir=debian/cosmic-ext-fprint prefix=/usr install -``` - -It is recommended to build a source tarball with the vendored dependencies, which can typically be done by running `just vendor` on the host system before it enters the build environment. - -### Flatpak - -A Flatpak manifest is included in the `flatpak` directory. To build and install the Flatpak: - -```sh -flatpak-builder --user --install --force-clean build flatpak/fi.joonastuomi.Fprint.yml -``` - -Note: The included manifest uses network access during build to fetch dependencies. For strict offline builds, you should generate a `cargo-sources.json` file using `flatpak-builder-tools`. - -## Developers - -Developers should install [rustup][rustup] and configure their editor to use [rust-analyzer][rust-analyzer]. To improve compilation times, disable LTO in the release profile, install the [mold][mold] linker, and configure [sccache][sccache] for use with Rust. The [mold][mold] linker will only improve link times if LTO is disabled. - -[fluent]: https://projectfluent.org/ -[fluent-guide]: https://projectfluent.org/fluent/guide/hello.html -[iso-codes]: https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes -[just]: https://github.com/casey/just -[rustup]: https://rustup.rs/ -[rust-analyzer]: https://rust-analyzer.github.io/ -[mold]: https://github.com/rui314/mold -[sccache]: https://github.com/mozilla/sccache diff --git a/THIRD_PARTY_LICENSES b/THIRD_PARTY_LICENSES index 3f1657a..d9dc340 100644 --- a/THIRD_PARTY_LICENSES +++ b/THIRD_PARTY_LICENSES @@ -18,7 +18,7 @@ GPL-3.0 (1): cosmic-protocols ISC (3): inotify, inotify-sys, libloading MIT (161): aliasable, android-properties, ashpd, atomicwrites, block, block2, block2, bytes, calloop, calloop-wayland-source, cfg_aliases, cfg_aliases, clipboard_x11, color_quant, com, com_macros, com_macros_support, combine, core_maths, cosmic-freedesktop-icons, crunchy, darling, darling_core, darling_macro, dispatch, dlib, drm, drm-ffi, drm-fourcc, drm-sys, endi, float-cmp, float_next_after, fontconfig-parser, fontdb, fontdb, fsevent-sys, generic-array, grid, hassle-rs, i18n-config, i18n-embed, i18n-embed-fl, i18n-embed-impl, iced, iced_core, iced_futures, iced_graphics, iced_renderer, iced_runtime, iced_tiny_skia, iced_wgpu, iced_widget, iced_winit, imagesize, ini_core, is-docker, is-wsl, kqueue, kqueue-sys, libm, libredox, locale_config, lru, malloc_buf, memoffset, memoffset, mio, nix, nix, objc, objc-foundation, objc-sys, objc2, objc2, objc2-app-kit, objc2-cloud-kit, objc2-contacts, objc2-core-data, objc2-core-image, objc2-core-location, objc2-encode, objc2-foundation, objc2-foundation, objc2-link-presentation, objc2-metal, objc2-quartz-core, objc2-symbols, objc2-ui-kit, objc2-uniform-type-identifiers, objc2-user-notifications, objc_id, open, orbclient, phf, phf_generator, phf_macros, phf_shared, pico-args, quick-xml, redox_syscall, redox_syscall, redox_syscall, redox_users, redox_users, rfd, rgb, rust-embed, rust-embed-impl, rust-embed-utils, rustybuzz, sctk-adwaita, simd-adler32, slab, smithay-client-toolkit, smithay-clipboard, strict-num, strsim, synstructure, taffy, tokio, tokio-macros, tokio-stream, tracing, tracing-attributes, tracing-core, uds_windows, urlencoding, wasm-timer, wayland-backend, wayland-client, wayland-csd-frame, wayland-cursor, wayland-protocols, wayland-protocols-plasma, wayland-protocols-wlr, wayland-scanner, wayland-server, wayland-sys, window_clipboard, winnow, winnow, x11-dl, xcursor, xdg-home, xkbcommon, xkbcommon-dl, xml-rs, xmlwriter, zbus, zbus, zbus_macros, zbus_macros, zbus_names, zbus_names, zvariant, zvariant, zvariant_derive, zvariant_derive, zvariant_utils, zvariant_utils MIT OR Unlicense (8): aho-corasick, byteorder, byteorder-lite, memchr, same-file, termcolor, walkdir, winapi-util -MPL-2.0 (4): cosmic-ext-fprint, option-ext, resvg, usvg +MPL-2.0 (3): option-ext, resvg, usvg N/A (9): cosmic-client-toolkit, cosmic-config, cosmic-config-derive, cosmic-settings-daemon, cosmic-theme, dnd, iced_accessibility, libcosmic, mime Unicode-3.0 (18): icu_collections, icu_locale_core, icu_normalizer, icu_normalizer_data, icu_properties, icu_properties_data, icu_provider, litemap, potential_utf, tinystr, writeable, yoke, yoke-derive, zerofrom, zerofrom-derive, zerotrie, zerovec, zerovec-derive Zlib (2): foldhash, slotmap diff --git a/flatpak/fi.joonastuomi.Fprint.yml b/flatpak/org.cosmic_utils.Enroll.yml similarity index 63% rename from flatpak/fi.joonastuomi.Fprint.yml rename to flatpak/org.cosmic_utils.Enroll.yml index 14849b9..7a19098 100644 --- a/flatpak/fi.joonastuomi.Fprint.yml +++ b/flatpak/org.cosmic_utils.Enroll.yml @@ -1,8 +1,8 @@ -app-id: fi.joonastuomi.Fprint +app-id: org.cosmic_utils.Enroll runtime: org.freedesktop.Platform runtime-version: '25.08' sdk: org.freedesktop.Sdk -command: cosmic-ext-fprint +command: cosmic-utils-enroll finish-args: - --socket=wayland - --socket=fallback-x11 @@ -23,23 +23,23 @@ build-options: - --share=network modules: - - name: cosmic-ext-fprint + - name: cosmic-utils-enroll buildsystem: simple build-commands: # Build the application - cargo build --release # Install the binary - - install -Dm0755 target/release/cosmic-ext-fprint /app/bin/cosmic-ext-fprint + - install -Dm0755 target/release/cosmic-utils-enroll /app/bin/cosmic-utils-enroll # Install the desktop file - - install -Dm0644 resources/fi.joonastuomi.Fprint.desktop /app/share/applications/fi.joonastuomi.Fprint.desktop + - install -Dm0644 resources/org.cosmic_utils.Enroll.desktop /app/share/applications/org.cosmic_utils.Enroll.desktop # Install the AppStream metadata - - install -Dm0644 resources/fi.joonastuomi.Fprint.metainfo.xml /app/share/appdata/fi.joonastuomi.Fprint.metainfo.xml + - install -Dm0644 resources/org.cosmic_utils.Enroll.metainfo.xml /app/share/appdata/org.cosmic_utils.Enroll.metainfo.xml # Install the icon - - install -Dm0644 resources/icons/hicolor/scalable/apps/icon.svg /app/share/icons/hicolor/scalable/apps/fi.joonastuomi.Fprint.svg + - install -Dm0644 resources/icons/hicolor/scalable/apps/icon.svg /app/share/icons/hicolor/scalable/apps/org.cosmic_utils.Enroll.svg sources: - type: dir diff --git a/i18n/en/cosmic_ext_fprint.ftl b/i18n/en/cosmic_utils_enroll.ftl similarity index 97% rename from i18n/en/cosmic_ext_fprint.ftl rename to i18n/en/cosmic_utils_enroll.ftl index e20dfd1..f94f093 100644 --- a/i18n/en/cosmic_ext_fprint.ftl +++ b/i18n/en/cosmic_utils_enroll.ftl @@ -1,7 +1,7 @@ -app-title = Fprint Enroll +app-title = Enroll Fingerprint about = About view = View -fprint = Register Fingerprint +fprint = Enroll Fingerprint welcome = Register and/or delete fingerprints git-description = Git commit {$hash} on {$date} register = Register diff --git a/i18n/fi/cosmic_ext_fprint.ftl b/i18n/fi/cosmic_utils_enroll.ftl similarity index 100% rename from i18n/fi/cosmic_ext_fprint.ftl rename to i18n/fi/cosmic_utils_enroll.ftl diff --git a/i18n/sv/cosmic_ext_fprint.ftl b/i18n/sv/cosmic_utils_enroll.ftl similarity index 100% rename from i18n/sv/cosmic_ext_fprint.ftl rename to i18n/sv/cosmic_utils_enroll.ftl diff --git a/justfile b/justfile index ad3cc29..4be75cc 100644 --- a/justfile +++ b/justfile @@ -1,5 +1,5 @@ -name := 'cosmic-ext-fprint' -appid := 'fi.joonastuomi.Fprint' +name := 'cosmic-utils-enroll' +appid := 'org.cosmic_utils.Enroll' rootdir := '' prefix := '/usr' diff --git a/resources/fi.joonastuomi.Fprint.desktop b/resources/app.desktop similarity index 72% rename from resources/fi.joonastuomi.Fprint.desktop rename to resources/app.desktop index ae6d403..7b40918 100644 --- a/resources/fi.joonastuomi.Fprint.desktop +++ b/resources/app.desktop @@ -1,9 +1,9 @@ [Desktop Entry] -Name=Fprint +Name=Enroll Comment=GUI for fprintd fingerprint enrolling Type=Application -Icon=fi.joonastuomi.Fprint -Exec=cosmic-ext-fprint %F +Icon=org.cosmic_utils.Enroll +Exec=cosmic-utils-enroll %F Terminal=false StartupNotify=true Categories=Utility;System; diff --git a/resources/icons/hicolor/scalable/apps/icon.svg b/resources/icons/hicolor/scalable/apps/icon.svg index 1f973a0..c16f19d 100644 --- a/resources/icons/hicolor/scalable/apps/icon.svg +++ b/resources/icons/hicolor/scalable/apps/icon.svg @@ -1,10 +1,23 @@ - - - - - - - - - \ No newline at end of file + + diff --git a/resources/org.cosmic_utils.Enroll.desktop b/resources/org.cosmic_utils.Enroll.desktop new file mode 100644 index 0000000..7b40918 --- /dev/null +++ b/resources/org.cosmic_utils.Enroll.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Name=Enroll +Comment=GUI for fprintd fingerprint enrolling +Type=Application +Icon=org.cosmic_utils.Enroll +Exec=cosmic-utils-enroll %F +Terminal=false +StartupNotify=true +Categories=Utility;System; +Keywords=Fingerprint;Security; +MimeType= diff --git a/resources/fi.joonastuomi.Fprint.metainfo.xml b/resources/org.cosmic_utils.Enroll.metainfo.xml similarity index 67% rename from resources/fi.joonastuomi.Fprint.metainfo.xml rename to resources/org.cosmic_utils.Enroll.metainfo.xml index 08d9106..aed3002 100644 --- a/resources/fi.joonastuomi.Fprint.metainfo.xml +++ b/resources/org.cosmic_utils.Enroll.metainfo.xml @@ -1,24 +1,24 @@ - fi.joonastuomi.Fprint + org.cosmic_utils.Enroll CC0-1.0 MPL-2.0 - Fprint + Enroll GUI built with COSMIC toolkit for fprintd fingerprint enrolling

- Fprint is an application for enrolling fingerprints using the fprintd daemon. It allows you to register and delete fingerprints for authentication on your Linux system. + Enroll is an application for enrolling fingerprints using the fprintd daemon. It allows you to register and delete fingerprints for authentication on your Linux system.

- https://github.com/jotuel/cosmic-ext-fprint/raw/main/resources/icons/hicolor/scalable/apps/icon.svg + https://github.com/cosmic-utils/enroll/raw/main/resources/icons/hicolor/scalable/apps/icon.svg - https://github.com/jotuel/cosmic-ext-fprint - fi.joonastuomi.Fprint.desktop + https://github.com/cosmic-utils/enroll + org.cosmic_utils.Enroll.desktop - fi.joonastuomi.Fprint + org.cosmic_utils.Enroll - cosmic-ext-fprint + cosmic-utils-enroll diff --git a/src/app/mod.rs b/src/app/mod.rs index cbc01cb..6c6970b 100644 --- a/src/app/mod.rs +++ b/src/app/mod.rs @@ -92,7 +92,7 @@ impl cosmic::Application for AppModel { type Message = Message; /// Unique identifier in RDNN (reverse domain name notation) format. - const APP_ID: &'static str = "fi.joonastuomi.Fprint"; + const APP_ID: &'static str = "org.cosmic_utils.Enroll"; fn core(&self) -> &cosmic::Core { &self.core