pax_global_header00006660000000000000000000000064147700561600014520gustar00rootroot0000000000000052 comment=a8c9df387eca69947d6f38a0827cca8caa45164f phrog-0.46.0/000077500000000000000000000000001477005616000127265ustar00rootroot00000000000000phrog-0.46.0/.gitattributes000066400000000000000000000000321477005616000156140ustar00rootroot00000000000000demo-video/ export-ignore phrog-0.46.0/.github/000077500000000000000000000000001477005616000142665ustar00rootroot00000000000000phrog-0.46.0/.github/Dockerfile000066400000000000000000000023011477005616000162540ustar00rootroot00000000000000# This image is used as the build environment in Github Actions. FROM registry.gitlab.gnome.org/world/phosh/phosh/debian:v0.0.2025-02-07 ARG PHOSH_REMOTE=https://gitlab.gnome.org/World/Phosh/phosh.git ARG PHOSH_REF=v0.45_rc1 ARG PHOC_REMOTE=https://gitlab.gnome.org/World/Phosh/phoc.git ARG PHOC_REF=v0.45_rc1 RUN export DEBIAN_FRONTEND=noninteractive \ && apt-get -y update \ && apt-get -y install --no-install-recommends \ dh-cargo \ foot \ rust-clippy \ wf-recorder \ && eatmydata git clone ${PHOC_REMOTE} \ && cd phoc \ && git checkout ${PHOC_REF} \ && DEB_BUILD_PROFILES=pkg.phoc.embedwlroots eatmydata apt-get --no-install-recommends -y build-dep . \ && eatmydata meson setup --prefix=/usr -Dembed-wlroots=enabled _build . \ && eatmydata meson compile -C _build \ && eatmydata meson install -C _build \ && cd .. \ && eatmydata git clone ${PHOSH_REMOTE} \ && cd phosh \ && git checkout ${PHOSH_REF} \ && eatmydata apt-get --no-install-recommends -y build-dep . \ && eatmydata meson setup --prefix=/usr -Dbindings-lib=true _build . \ && eatmydata meson compile -C _build \ && eatmydata meson install -C _build \ && eatmydata apt-get clean phrog-0.46.0/.github/workflows/000077500000000000000000000000001477005616000163235ustar00rootroot00000000000000phrog-0.46.0/.github/workflows/alpine.yml000066400000000000000000000057771477005616000203360ustar00rootroot00000000000000name: alpine on: workflow_dispatch: {} release: types: [published] concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true permissions: contents: write jobs: alpine: runs-on: ubuntu-24.04${{ matrix.arch == 'aarch64' && '-arm' || '' }} strategy: matrix: arch: - x86_64 - aarch64 steps: - uses: actions/checkout@v4 # Using fork (aarch64 branch from bgilbert/setup-alpine) until jirutka/setup-alpine#11 is resolved - uses: samcday/setup-alpine@main id: alpine with: arch: ${{ matrix.arch }} branch: edge packages: alpine-sdk - name: setup env: RSA_PRIV: ${{ secrets.RSA_PRIVATE_KEY }} RSA_PUB: ${{ secrets.RSA_PUBLIC_KEY }} run: | mkdir -p ~/.abuild echo "$RSA_PRIV" > ~/.abuild/key.rsa echo "$RSA_PUB" > ~/.abuild/key.rsa.pub cp ~/.abuild/key.rsa.pub /etc/apk/keys/key.rsa.pub abuild -F deps shell: alpine.sh --root {0} - name: update sha if: github.event_name != 'release' run: | sed -i -e "s/^_gitrev=main$/_gitrev=$GITHUB_SHA/" APKBUILD - name: release prep if: github.event_name == 'release' run: | # Remove _git suffix to indicate the stable release. # Assumes that the base (unsuffixed) pkgver was already updated to the new version in release commit. sed -i -e 's/^\(pkgver=.*\)_git$/\1/' APKBUILD # Delete _gitrev= var and rewrite usages to pkgver sed -i -e '/^_gitrev=/d' -e 's/_gitrev/pkgver/g' APKBUILD - name: build package run: | export PACKAGER_PRIVKEY=$HOME/.abuild/key.rsa abuild -F checksum abuild -F -P /packages mv APKBUILD /packages chmod -R 777 /packages for f in /packages/phrog/${{ matrix.arch }}/*.apk; do mv $f ${f%.apk}-${{ matrix.arch }}.apk done shell: alpine.sh --root {0} - uses: actions/upload-artifact@v4 if: matrix.arch == 'x86_64' with: name: APKBUILD path: ${{ steps.alpine.outputs.root-path }}/packages/APKBUILD - uses: actions/upload-artifact@v4 with: name: packages-${{ matrix.arch }} path: ${{ steps.alpine.outputs.root-path }}/packages/phrog/${{ matrix.arch }}/*.apk - name: upload .apk artifacts to release uses: softprops/action-gh-release@v2 if: github.event_name == 'release' with: name: ${{ github.event.release.name }} files: | ${{ steps.alpine.outputs.root-path }}/packages/phrog/${{ matrix.arch }}/*.apk - name: upload APKBUILD artifact to release uses: softprops/action-gh-release@v2 if: github.event_name == 'release' && matrix.arch == 'x86_64' with: name: ${{ github.event.release.name }} files: | ${{ steps.alpine.outputs.root-path }}/packages/APKBUILD phrog-0.46.0/.github/workflows/build-image.yml000066400000000000000000000020121477005616000212200ustar00rootroot00000000000000name: build-image on: workflow_dispatch: {} concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true permissions: contents: write packages: write pull-requests: write jobs: build-image: runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 - uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: get CI image hash id: hash run: | set -uexo pipefail echo "value=${{ hashFiles('.github/Dockerfile') }}" >> $GITHUB_OUTPUT - name: Build and push uses: docker/build-push-action@v6 with: context: .github/ file: .github/Dockerfile push: true tags: ghcr.io/samcday/phrog-ci:${{ steps.hash.outputs.value }} cache-from: type=gha cache-to: type=gha,mode=max phrog-0.46.0/.github/workflows/build.yml000066400000000000000000000124471477005616000201550ustar00rootroot00000000000000name: build on: push: branches: [main] pull_request_target: branches: [main] types: [labeled, opened, reopened, synchronize] release: types: [published] workflow_dispatch: {} concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true env: CARGO_TERM_COLOR: always RUSTFLAGS: "-Dwarnings" permissions: contents: write packages: write pull-requests: write jobs: image-hash: runs-on: ubuntu-24.04 outputs: hash: ${{ steps.hash.outputs.value }} steps: - uses: actions/checkout@v4 - name: get CI image hash id: hash run: | set -uexo pipefail echo "value=${{ hashFiles('.github/Dockerfile') }}" >> $GITHUB_OUTPUT build: needs: image-hash runs-on: ubuntu-24.04 container: ghcr.io/samcday/phrog-ci:${{ needs.image-hash.outputs.hash }} defaults: run: shell: bash steps: - if: | github.event_name == 'pull_request_target' && github.event.pull_request.author_association != 'COLLABORATOR' && github.event.pull_request.author_association != 'OWNER' && !contains(github.event.pull_request.labels.*.name, 'ci-ok') run: | echo This PR has not yet been marked as safe with a ci-ok label exit 1 - uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.sha }} - name: Build run: | set -uexo pipefail cargo build --all-targets --verbose - name: Lint run: | cargo clippy --all-targets --verbose - uses: actions/upload-artifact@v4 with: name: x86-64-debug path: target/debug/phrog - name: Test run: | set -uexo pipefail export XDG_RUNTIME_DIR=/tmp # run tests export RECORD_TESTS=`pwd`/demo-video/recordings/ export G_MESSAGES_DEBUG=all cat > phoc.ini < comment.txt <Demo video (shown on README and release notes)

HERE for f in demo-video/recordings/*.webp; do name="${f%.webp}" name="${name#demo-video/recordings/}" cat >> comment.txt <${name}

HERE done - uses: jakejarvis/s3-sync-action@master with: args: --content-type=b2/x-auto env: AWS_S3_BUCKET: samcday-phrog-videos AWS_ACCESS_KEY_ID: ${{ secrets.B2_APPLICATION_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.B2_APPLICATION_KEY }} AWS_S3_ENDPOINT: https://s3.eu-central-003.backblazeb2.com SOURCE_DIR: 'blob-upload' DEST_DIR: ${{ github.run_id }} - uses: marocchino/sticky-pull-request-comment@v2 if: github.event_name == 'pull_request_target' with: header: ci-recordings hide_and_recreate: true hide_classify: OUTDATED path: comment.txt phrog-0.46.0/.github/workflows/debian.yml000066400000000000000000000063261477005616000202770ustar00rootroot00000000000000# Currently broken, no idea why. Fuckin' thing sucks! # It dies immediately on running `dpkg-buildpackage`. Cargo complains it has # no valid certs to talk to crates.io, or something. The kicker is it's running # in a debian:trixie container and I don't see the same behaviour locally using # the same image and running the same commands. So. name: debian on: workflow_dispatch: {} release: types: [published] concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true permissions: contents: write jobs: debian: runs-on: ubuntu-24.04 container: debian:trixie steps: - uses: actions/checkout@v4 - name: setup Phosh nightly repo run: | cat </etc/apt/sources.list.d/phosh-nightly.sources Types: deb URIs: http://deb.phosh.mobi/nightly/ Suites: trixie-nightly Components: main Signed-By: -----BEGIN PGP PUBLIC KEY BLOCK----- mQINBGXoHOYBEAC/893ifemxPCa3l+46Vtpjiew4Eu+c3kXEj6sEOQZS8+ZvJ93O So3cEe7tqPM8AjqPjO6GsBjqr86swk5bbZ70GIqo1H2p9JdBaiQWqTDXxXRDvel5 0SaxbUQvLm880pjS/gcsBezRv8vb9dxDsPMzap6GuJnF5QqagfOX8B1aQKCywJNo QoFc3RL7c3j2hLRpI4kdfcjo2j3GtjKb+ojWja9dng/gsMlrHYEqS+aWg+eVFnLM XkwJXS/4AQjooH9qC+swtVNYYzt7wQdCm1mNFfrXDHSLse0ugyESqZ8AN5d9bUlB fAae7xv/lV3QfozSolFODvXlBjNaCDYb1r8Rag01eM83b1Wv/R23enFO18p/UW9k +/wk+kOqUfEd+0NBkXdRQiCrvwxHs51IqMFH5aAhM9lHmaHYmdPjETdeYPeKlA22 CYLCkApEazGNPZGt6Kv7XeBwiI+6DScbHxr+j9S/j9+7BuMs6MItE4J9EtavkFtr aw/ijGsifCKJWpkD28uZ3h83qi8diUwRde0zrX4SJAUi/T2UXPywep1z6bQ70Vaf YrciSOndw5zWiTYMUDl6q7iZR6vloiZMoGf7psLx1y0Vg4Sq8DPldXAMpaNPh8+Z UhqD94pBGg+iVaYII8MeWHaqtHc0ewQAKAq121rulOuZgaRbl/5LuQp8rQARAQAB tD1QaG9zaCBEZWJpYW4gUGFja2FnZXMgKEFyY2hpdmUgU2lnbmluZyBLZXkpIDxk ZWJzQHBob3NoLm1vYmk+iQJUBBMBCgA+AhsDBQsJCAcDBRUKCQgLBRYCAwEAAh4B AheAFiEEeHJPmfZ/wlY1lpbHLf0ViOUfQ7IFAmXoV34FCQlmPBgACgkQLf0ViOUf Q7JWNxAApMQeEKSto6LGZkdqoKXCZgaXg//2UeAnkhK9+Z1hZ2Do7RYhoOW994yi FqtZ92WVMqzbK0EqfEnFX8yVzM1cXo3PgouCDCgTy060YmH0OV2XxThr8fJ4uZfW vib9HE+W4o/dgoMSy3BlPtpB1y/gevgJGoHAtQbV6Ex4bRL89i8pOQJYPYRx5Xj0 4SADUWWjOnY9AZbykUlMuRFSOMBWITn8yqUCYPpw8bGbtFignfvK1iRcW5LIkrtY XsOlQCK5+ttNAMUkCeI93LGYhSZUqbpt87tdkbCP5qfV7o7Vkv8iObKw8fxKh2o1 oijY8S6ZqEl/CZjDtKcdvsQrEvY3Z1KX0xUNn01PFrHGzRiTn7eieXF4O3PCM2zJ 1TGva0gliKUgdN4y8W6Ul1H74T3rhZWpNO10rotfnvyX6AP/bLlkdMdSpL85mcqt PfSROQGcKOU6WmF1G2MvwzBY6sjP3IN95qqnaBKa1IJGBPFt5IsY8eoqdNuNkeRT W3OFcBQas+1RQdDzOZ7svJIX9fNBubebtnB20mRYIwESkhQMO2VpjyrBPzUP+bum kg/7Lx/Gr+OdH2SzNfeTr+28foyKExf2wdhbICErm+eRq1Bh4dFe6ljN/YBUVdEq MHjCZ4GQaiw5Uq+5sQTUWYkFeb/j3NeRadmSTshinPgTISGNYBo= =lIij -----END PGP PUBLIC KEY BLOCK----- EOF DEBIAN_FRONTEND=noninteractive apt-get update - name: apt-get build-dep run: | DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends -t trixie-nightly build-dep . - name: build package run: | dpkg-buildpackage -uc -us -rfakeroot -B phrog-0.46.0/.github/workflows/release.yml000066400000000000000000000010601477005616000204630ustar00rootroot00000000000000name: Create release from tag on: push: tags: ['*'] permissions: contents: write jobs: release: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - run: | cat > body.md < HERE - uses: softprops/action-gh-release@v2 with: body_path: body.md generate_release_notes: true token: ${{ secrets.RELEASE_GITHUB_TOKEN }} phrog-0.46.0/.gitignore000066400000000000000000000000331477005616000147120ustar00rootroot00000000000000target/ *.tar.gz *.src.rpm phrog-0.46.0/.gitmodules000066400000000000000000000000001477005616000150710ustar00rootroot00000000000000phrog-0.46.0/.packit.yaml000066400000000000000000000014761477005616000151530ustar00rootroot00000000000000# https://packit.dev/docs/configuration/ specfile_path: phrog.spec files_to_sync: - phrog.spec - .packit.yaml upstream_package_name: phrog downstream_package_name: phrog jobs: # Build PRs - job: copr_build manual_trigger: true trigger: pull_request additional_repos: - copr://samcday/phosh-nightly - copr://samcday/phrog-nightly targets: - fedora-41-aarch64 - fedora-41-x86_64 - fedora-rawhide-aarch64 - fedora-rawhide-x86_64 # Build main commits in samcday/phrog-nightly COPR - job: copr_build trigger: commit branch: main owner: samcday project: phrog-nightly additional_repos: - copr://samcday/phosh-nightly # Build tagged releases in samcday/phrog COPR - job: copr_build trigger: release owner: samcday project: phrog phrog-0.46.0/APKBUILD000066400000000000000000000030151477005616000140430ustar00rootroot00000000000000# Maintainer: Sam Day pkgname=greetd-phrog pkgver=0.45.0_git pkgrel=0 pkgdesc="Mobile device greeter" url=https://github.com/samcday/phrog # s390x: blocked by greetd # armhf: blocked by phosh arch="all !s390x !armhf" license="GPL-3.0-only" depends=" phosh greetd greetd-phrog-schemas libphosh" makedepends=" cargo cargo-auditable foot libphosh-dev" checkdepends="xvfb-run" _gitrev=main source="https://github.com/samcday/phrog/archive/$_gitrev/phrog-$_gitrev.tar.gz" subpackages="$pkgname-schemas::noarch" builddir="$srcdir/phrog-$_gitrev" # net: cargo fetch options="net" export RUSTFLAGS="$RUSTFLAGS --remap-path-prefix=$builddir=/build/" prepare() { default_prepare cargo fetch --target="$CTARGET" --locked } build() { cargo auditable build --release --frozen } package() { install -Dm644 data/mobi.phosh.phrog.gschema.xml -t "$pkgdir"/usr/share/glib-2.0/schemas/ install -Dm644 data/phrog.session -t "$pkgdir"/usr/share/gnome-session/sessions/ install -Dm644 data/mobi.phosh.Phrog.desktop -t "$pkgdir"/usr/share/applications/ install -Dm644 dist/alpine/greetd-config.toml -t "$pkgdir"/etc/phrog/ install -d "$pkgdir"/usr/share/phrog/autostart install -d "$pkgdir"/etc/phrog/autostart install -Dm755 target/release/phrog -t "$pkgdir"/usr/bin/ install -Dm755 data/phrog-greetd-session -t "$pkgdir"/usr/libexec/ } check() { export XDG_RUNTIME_DIR=/tmp dbus-run-session xvfb-run -a phoc -E "cargo test --frozen" } schemas() { pkgdesc="Phrog schema files" depends="" amove usr/share/glib-2.0/schemas } phrog-0.46.0/Cargo.lock000066400000000000000000001350111477005616000146340ustar00rootroot00000000000000# This file is automatically @generated by Cargo. # It is not intended for manual editing. version = 4 [[package]] name = "anstream" version = "0.6.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", "is_terminal_polyfill", "utf8parse", ] [[package]] name = "anstyle" version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" [[package]] name = "anstyle-parse" version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" dependencies = [ "windows-sys 0.52.0", ] [[package]] name = "anstyle-wincon" version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" dependencies = [ "anstyle", "windows-sys 0.52.0", ] [[package]] name = "anyhow" version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" [[package]] name = "async-broadcast" version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "20cd0e2e25ea8e5f7e9df04578dc6cf5c83577fd09b1a46aaf5c85e1c33f2a7e" dependencies = [ "event-listener", "event-listener-strategy", "futures-core", "pin-project-lite", ] [[package]] name = "async-channel" version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "89b47800b0be77592da0afd425cc03468052844aff33b84e33cc696f64e77b6a" dependencies = [ "concurrent-queue", "event-listener-strategy", "futures-core", "pin-project-lite", ] [[package]] name = "async-executor" version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d7ebdfa2ebdab6b1760375fa7d6f382b9f486eac35fc994625a00e89280bdbb7" dependencies = [ "async-task", "concurrent-queue", "fastrand", "futures-lite", "slab", ] [[package]] name = "async-fs" version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ebcd09b382f40fcd159c2d695175b2ae620ffa5f3bd6f664131efff4e8b9e04a" dependencies = [ "async-lock", "blocking", "futures-lite", ] [[package]] name = "async-global-executor" version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05b1b633a2115cd122d73b955eadd9916c18c8f510ec9cd1686404c60ad1c29c" dependencies = [ "async-channel", "async-executor", "async-io", "async-lock", "blocking", "futures-lite", "once_cell", ] [[package]] name = "async-io" version = "2.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "444b0228950ee6501b3568d3c93bf1176a1fdbc3b758dcd9475046d30f4dc7e8" dependencies = [ "async-lock", "cfg-if", "concurrent-queue", "futures-io", "futures-lite", "parking", "polling", "rustix", "slab", "tracing", "windows-sys 0.59.0", ] [[package]] name = "async-lock" version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff6e472cdea888a4bd64f342f09b3f50e1886d32afe8df3d663c01140b811b18" dependencies = [ "event-listener", "event-listener-strategy", "pin-project-lite", ] [[package]] name = "async-process" version = "2.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8a07789659a4d385b79b18b9127fc27e1a59e1e89117c78c5ea3b806f016374" dependencies = [ "async-channel", "async-io", "async-lock", "async-signal", "async-task", "blocking", "cfg-if", "event-listener", "futures-lite", "rustix", "tracing", "windows-sys 0.59.0", ] [[package]] name = "async-recursion" version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" dependencies = [ "proc-macro2", "quote", "syn 2.0.87", ] [[package]] name = "async-signal" version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "637e00349800c0bdf8bfc21ebbc0b6524abea702b0da4168ac00d070d0c0b9f3" dependencies = [ "async-io", "async-lock", "atomic-waker", "cfg-if", "futures-core", "futures-io", "rustix", "signal-hook-registry", "slab", "windows-sys 0.59.0", ] [[package]] name = "async-task" version = "4.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" [[package]] name = "async-trait" version = "0.1.81" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" dependencies = [ "proc-macro2", "quote", "syn 2.0.87", ] [[package]] name = "atk" version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4af014b17dd80e8af9fa689b2d4a211ddba6eb583c1622f35d0cb543f6b17e4" dependencies = [ "atk-sys", "glib 0.18.5", "libc", ] [[package]] name = "atk-sys" version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "251e0b7d90e33e0ba930891a505a9a35ece37b2dd37a14f3ffc306c13b980009" dependencies = [ "glib-sys 0.18.1", "gobject-sys 0.18.0", "libc", "system-deps 6.2.2", ] [[package]] name = "atomic-waker" version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "autocfg" version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "bitflags" version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "blocking" version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "703f41c54fc768e63e091340b424302bb1c29ef4aa0c7f10fe849dfb114d29ea" dependencies = [ "async-channel", "async-task", "futures-io", "futures-lite", "piper", ] [[package]] name = "cairo-rs" version = "0.18.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ca26ef0159422fb77631dc9d17b102f253b876fe1586b03b803e63a309b4ee2" dependencies = [ "bitflags", "cairo-sys-rs", "glib 0.18.5", "libc", "once_cell", "thiserror", ] [[package]] name = "cairo-sys-rs" version = "0.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "685c9fa8e590b8b3d678873528d83411db17242a73fccaed827770ea0fedda51" dependencies = [ "glib-sys 0.18.1", "libc", "system-deps 6.2.2", ] [[package]] name = "cc" version = "1.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57b6a275aa2903740dc87da01c62040406b8812552e97129a63ea8850a17c6e6" dependencies = [ "shlex", ] [[package]] name = "cfg-expr" version = "0.15.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d067ad48b8650848b989a59a86c6c36a995d02d2bf778d45c3c5d57bc2718f02" dependencies = [ "smallvec", "target-lexicon", ] [[package]] name = "cfg-expr" version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d0890061c4d3223e7267f3bad2ec40b997d64faac1c2815a4a9d95018e2b9e9c" dependencies = [ "smallvec", "target-lexicon", ] [[package]] name = "cfg-if" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "cfg_aliases" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "clap" version = "4.5.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed6719fffa43d0d87e5fd8caeab59be1554fb028cd30edc88fc4369b17971019" dependencies = [ "clap_builder", "clap_derive", ] [[package]] name = "clap_builder" version = "4.5.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "216aec2b177652e3846684cbfe25c9964d18ec45234f0f5da5157b207ed1aab6" dependencies = [ "anstream", "anstyle", "clap_lex", "strsim", ] [[package]] name = "clap_derive" version = "4.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "501d359d5f3dcaf6ecdeee48833ae73ec6e42723a1e52419c79abf9507eec0a0" dependencies = [ "heck 0.5.0", "proc-macro2", "quote", "syn 2.0.87", ] [[package]] name = "clap_lex" version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" [[package]] name = "colorchoice" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" [[package]] name = "concurrent-queue" version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" dependencies = [ "crossbeam-utils", ] [[package]] name = "crossbeam-utils" version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" [[package]] name = "dlib" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "330c60081dcc4c72131f8eb70510f1ac07223e5d4163db481a04a0befcffa412" dependencies = [ "libloading", ] [[package]] name = "downcast-rs" version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" [[package]] name = "endi" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a3d8a32ae18130a3c84dd492d4215c3d913c3b07c6b63c2eb3eb7ff1101ab7bf" [[package]] name = "enumflags2" version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d232db7f5956f3f14313dc2f87985c58bd2c695ce124c8cdd984e08e15ac133d" dependencies = [ "enumflags2_derive", "serde", ] [[package]] name = "enumflags2_derive" version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "de0d48a183585823424a4ce1aa132d174a6a81bd540895822eb4c8373a8e49e8" dependencies = [ "proc-macro2", "quote", "syn 2.0.87", ] [[package]] name = "equivalent" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" dependencies = [ "libc", "windows-sys 0.52.0", ] [[package]] name = "event-listener" version = "5.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6032be9bd27023a771701cc49f9f053c751055f71efb2e0ae5c15809093675ba" dependencies = [ "concurrent-queue", "parking", "pin-project-lite", ] [[package]] name = "event-listener-strategy" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0f214dc438f977e6d4e3500aaa277f5ad94ca83fbbd9b1a15713ce2344ccc5a1" dependencies = [ "event-listener", "pin-project-lite", ] [[package]] name = "fastrand" version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" [[package]] name = "field-offset" version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38e2275cc4e4fc009b0669731a1e5ab7ebf11f469eaede2bab9309a5b4d6057f" dependencies = [ "memoffset", "rustc_version", ] [[package]] name = "futures-channel" version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" dependencies = [ "futures-core", ] [[package]] name = "futures-core" version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" [[package]] name = "futures-executor" version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" dependencies = [ "futures-core", "futures-task", "futures-util", ] [[package]] name = "futures-io" version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" [[package]] name = "futures-lite" version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "52527eb5074e35e9339c6b4e8d12600c7128b68fb25dcb9fa9dec18f7c25f3a5" dependencies = [ "fastrand", "futures-core", "futures-io", "parking", "pin-project-lite", ] [[package]] name = "futures-macro" version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", "syn 2.0.87", ] [[package]] name = "futures-task" version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" [[package]] name = "futures-util" version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" dependencies = [ "futures-core", "futures-io", "futures-macro", "futures-task", "memchr", "pin-project-lite", "pin-utils", "slab", ] [[package]] name = "gdk" version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f5ba081bdef3b75ebcdbfc953699ed2d7417d6bd853347a42a37d76406a33646" dependencies = [ "cairo-rs", "gdk-pixbuf", "gdk-sys", "gio 0.18.4", "glib 0.18.5", "libc", "pango", ] [[package]] name = "gdk-pixbuf" version = "0.18.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "50e1f5f1b0bfb830d6ccc8066d18db35c487b1b2b1e8589b5dfe9f07e8defaec" dependencies = [ "gdk-pixbuf-sys", "gio 0.18.4", "glib 0.18.5", "libc", "once_cell", ] [[package]] name = "gdk-pixbuf-sys" version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9839ea644ed9c97a34d129ad56d38a25e6756f99f3a88e15cd39c20629caf7" dependencies = [ "gio-sys 0.18.1", "glib-sys 0.18.1", "gobject-sys 0.18.0", "libc", "system-deps 6.2.2", ] [[package]] name = "gdk-sys" version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "31ff856cb3386dae1703a920f803abafcc580e9b5f711ca62ed1620c25b51ff2" dependencies = [ "cairo-sys-rs", "gdk-pixbuf-sys", "gio-sys 0.18.1", "glib-sys 0.18.1", "gobject-sys 0.18.0", "libc", "pango-sys", "pkg-config", "system-deps 6.2.2", ] [[package]] name = "gio" version = "0.18.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d4fc8f532f87b79cbc51a79748f16a6828fb784be93145a322fa14d06d354c73" dependencies = [ "futures-channel", "futures-core", "futures-io", "futures-util", "gio-sys 0.18.1", "glib 0.18.5", "libc", "once_cell", "pin-project-lite", "smallvec", "thiserror", ] [[package]] name = "gio" version = "0.20.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8d999e8fb09583e96080867e364bc1e701284ad206c76a5af480d63833ad43c" dependencies = [ "futures-channel", "futures-core", "futures-io", "futures-util", "gio-sys 0.20.4", "glib 0.20.4", "libc", "pin-project-lite", "smallvec", ] [[package]] name = "gio-sys" version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "37566df850baf5e4cb0dfb78af2e4b9898d817ed9263d1090a2df958c64737d2" dependencies = [ "glib-sys 0.18.1", "gobject-sys 0.18.0", "libc", "system-deps 6.2.2", "winapi", ] [[package]] name = "gio-sys" version = "0.20.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4f7efc368de04755344f0084104835b6bb71df2c1d41e37d863947392a894779" dependencies = [ "glib-sys 0.20.4", "gobject-sys 0.20.4", "libc", "system-deps 7.0.3", "windows-sys 0.52.0", ] [[package]] name = "glib" version = "0.18.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "233daaf6e83ae6a12a52055f568f9d7cf4671dabb78ff9560ab6da230ce00ee5" dependencies = [ "bitflags", "futures-channel", "futures-core", "futures-executor", "futures-task", "futures-util", "gio-sys 0.18.1", "glib-macros 0.18.5", "glib-sys 0.18.1", "gobject-sys 0.18.0", "libc", "log", "memchr", "once_cell", "smallvec", "thiserror", ] [[package]] name = "glib" version = "0.20.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adcf1ec6d3650bf9fdbc6cee242d4fcebc6f6bfd9bea5b929b6a8b7344eb85ff" dependencies = [ "bitflags", "futures-channel", "futures-core", "futures-executor", "futures-task", "futures-util", "gio-sys 0.20.4", "glib-macros 0.20.4", "glib-sys 0.20.4", "gobject-sys 0.20.4", "libc", "memchr", "smallvec", ] [[package]] name = "glib-build-tools" version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7029c2651d9b5d5a3eea93ec8a1995665c6d3a69ce9bf6042ad9064d134736d8" dependencies = [ "gio 0.20.4", ] [[package]] name = "glib-macros" version = "0.18.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0bb0228f477c0900c880fd78c8759b95c7636dbd7842707f49e132378aa2acdc" dependencies = [ "heck 0.4.1", "proc-macro-crate 2.0.0", "proc-macro-error", "proc-macro2", "quote", "syn 2.0.87", ] [[package]] name = "glib-macros" version = "0.20.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a6bf88f70cd5720a6197639dcabcb378dd528d0cb68cb1f45e3b358bcb841cd7" dependencies = [ "heck 0.5.0", "proc-macro-crate 3.2.0", "proc-macro2", "quote", "syn 2.0.87", ] [[package]] name = "glib-sys" version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "063ce2eb6a8d0ea93d2bf8ba1957e78dbab6be1c2220dd3daca57d5a9d869898" dependencies = [ "libc", "system-deps 6.2.2", ] [[package]] name = "glib-sys" version = "0.20.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f9eca5d88cfa6a453b00d203287c34a2b7cac3a7831779aa2bb0b3c7233752b" dependencies = [ "libc", "system-deps 7.0.3", ] [[package]] name = "glob" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "gobject-sys" version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0850127b514d1c4a4654ead6dedadb18198999985908e6ffe4436f53c785ce44" dependencies = [ "glib-sys 0.18.1", "libc", "system-deps 6.2.2", ] [[package]] name = "gobject-sys" version = "0.20.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4c674d2ff8478cf0ec29d2be730ed779fef54415a2fb4b565c52def62696462" dependencies = [ "glib-sys 0.20.4", "libc", "system-deps 7.0.3", ] [[package]] name = "greetd_ipc" version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "700d2e5bfc91a042d1d531b46de245085c6a179debedf149aa97c7ca71492078" dependencies = [ "serde", "serde_json", "thiserror", ] [[package]] name = "gtk" version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93c4f5e0e20b60e10631a5f06da7fe3dda744b05ad0ea71fee2f47adf865890c" dependencies = [ "atk", "cairo-rs", "field-offset", "futures-channel", "gdk", "gdk-pixbuf", "gio 0.18.4", "glib 0.18.5", "gtk-sys", "gtk3-macros", "libc", "pango", "pkg-config", ] [[package]] name = "gtk-sys" version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "771437bf1de2c1c0b496c11505bdf748e26066bbe942dfc8f614c9460f6d7722" dependencies = [ "atk-sys", "cairo-sys-rs", "gdk-pixbuf-sys", "gdk-sys", "gio-sys 0.18.1", "glib-sys 0.18.1", "gobject-sys 0.18.0", "libc", "pango-sys", "system-deps 6.2.2", ] [[package]] name = "gtk3-macros" version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c6063efb63db582968fb7df72e1ae68aa6360dcfb0a75143f34fc7d616bad75e" dependencies = [ "proc-macro-crate 1.3.1", "proc-macro-error", "proc-macro2", "quote", "syn 2.0.87", ] [[package]] name = "hashbrown" version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" [[package]] name = "heck" version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] name = "heck" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "hermit-abi" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" [[package]] name = "hex" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "indexmap" version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93ead53efc7ea8ed3cfb0c79fc8023fbb782a5432b52830b6518941cebe6505c" dependencies = [ "equivalent", "hashbrown", ] [[package]] name = "input-event-codes" version = "6.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d437b85b6856c30525a380e2de28d630cd2f03b4eec8e8a043d71d7e223792dd" [[package]] name = "is_terminal_polyfill" version = "1.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" [[package]] name = "itoa" version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "libc" version = "0.2.158" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" [[package]] name = "libhandy" version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "215ba3371132b1535b8359b99ada6d2a538d53fdea498da91b4d62e1d0289dad" dependencies = [ "gdk", "gdk-pixbuf", "gio 0.18.4", "glib 0.18.5", "gtk", "libc", "libhandy-sys", "pango", ] [[package]] name = "libhandy-sys" version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d814ea1e409715aef1dd9885994cb6801f52129ba2898bfe74591b9547b998ad" dependencies = [ "gdk-pixbuf-sys", "gdk-sys", "gio-sys 0.18.1", "glib-sys 0.18.1", "gobject-sys 0.18.0", "gtk-sys", "libc", "pango-sys", "pkg-config", "system-deps 6.2.2", ] [[package]] name = "libloading" version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4" dependencies = [ "cfg-if", "windows-targets", ] [[package]] name = "libphosh" version = "0.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43a9fc0e0f3cadc21d2440b61acf24042b89e50879e858814bba381c653ddb33" dependencies = [ "gdk", "gio 0.18.4", "glib 0.18.5", "gtk", "libc", "libphosh-sys", ] [[package]] name = "libphosh-sys" version = "0.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38c25c00ea3180e94245ce3550ab29cee352ae767f740ef57ed7f954bec9288e" dependencies = [ "gdk-pixbuf-sys", "gdk-sys", "gio-sys 0.18.1", "glib-sys 0.18.1", "gobject-sys 0.18.0", "gtk-sys", "libc", "libhandy-sys", "pango-sys", "system-deps 6.2.2", ] [[package]] name = "linux-raw-sys" version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" [[package]] name = "log" version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "memchr" version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "memoffset" version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" dependencies = [ "autocfg", ] [[package]] name = "nix" version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" dependencies = [ "bitflags", "cfg-if", "cfg_aliases", "libc", "memoffset", ] [[package]] name = "once_cell" version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "ordered-stream" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9aa2b01e1d916879f73a53d01d1d6cee68adbb31d6d9177a8cfce093cced1d50" dependencies = [ "futures-core", "pin-project-lite", ] [[package]] name = "pango" version = "0.18.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ca27ec1eb0457ab26f3036ea52229edbdb74dee1edd29063f5b9b010e7ebee4" dependencies = [ "gio 0.18.4", "glib 0.18.5", "libc", "once_cell", "pango-sys", ] [[package]] name = "pango-sys" version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "436737e391a843e5933d6d9aa102cb126d501e815b83601365a948a518555dc5" dependencies = [ "glib-sys 0.18.1", "gobject-sys 0.18.0", "libc", "system-deps 6.2.2", ] [[package]] name = "parking" version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" [[package]] name = "phrog" version = "0.46.0" dependencies = [ "anyhow", "async-channel", "async-global-executor", "clap", "futures-util", "glib 0.18.5", "glib-build-tools", "glob", "greetd_ipc", "gtk", "input-event-codes", "libhandy", "libphosh", "log", "nix", "serde", "tempfile", "wayland-client", "wayland-protocols", "wayland-protocols-misc", "wayland-protocols-wlr", "zbus", ] [[package]] name = "pin-project-lite" version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" [[package]] name = "pin-utils" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "piper" version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96c8c490f422ef9a4efd2cb5b42b76c8613d7e7dfc1caf667b8a3350a5acc066" dependencies = [ "atomic-waker", "fastrand", "futures-io", ] [[package]] name = "pkg-config" version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" [[package]] name = "polling" version = "3.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cc2790cd301dec6cd3b7a025e4815cf825724a51c98dccfe6a3e55f05ffb6511" dependencies = [ "cfg-if", "concurrent-queue", "hermit-abi", "pin-project-lite", "rustix", "tracing", "windows-sys 0.59.0", ] [[package]] name = "proc-macro-crate" version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" dependencies = [ "once_cell", "toml_edit 0.19.15", ] [[package]] name = "proc-macro-crate" version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7e8366a6159044a37876a2b9817124296703c586a5c92e2c53751fa06d8d43e8" dependencies = [ "toml_edit 0.20.7", ] [[package]] name = "proc-macro-crate" version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" dependencies = [ "toml_edit 0.22.20", ] [[package]] name = "proc-macro-error" version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" dependencies = [ "proc-macro-error-attr", "proc-macro2", "quote", "syn 1.0.109", "version_check", ] [[package]] name = "proc-macro-error-attr" version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" dependencies = [ "proc-macro2", "quote", "version_check", ] [[package]] name = "proc-macro2" version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] [[package]] name = "quick-xml" version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f24d770aeca0eacb81ac29dfbc55ebcc09312fdd1f8bbecdc7e4a84e000e3b4" dependencies = [ "memchr", ] [[package]] name = "quote" version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] [[package]] name = "rustc_version" version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ "semver", ] [[package]] name = "rustix" version = "0.38.35" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a85d50532239da68e9addb745ba38ff4612a242c1c7ceea689c4bc7c2f43c36f" dependencies = [ "bitflags", "errno", "libc", "linux-raw-sys", "windows-sys 0.52.0", ] [[package]] name = "ryu" version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "scoped-tls" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" [[package]] name = "semver" version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" [[package]] name = "serde" version = "1.0.217" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "02fc4265df13d6fa1d00ecff087228cc0a2b5f3c0e87e258d8b94a156e984c70" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" version = "1.0.217" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0" dependencies = [ "proc-macro2", "quote", "syn 2.0.87", ] [[package]] name = "serde_json" version = "1.0.127" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8043c06d9f82bd7271361ed64f415fe5e12a77fdb52e573e7f06a516dea329ad" dependencies = [ "itoa", "memchr", "ryu", "serde", ] [[package]] name = "serde_repr" version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" dependencies = [ "proc-macro2", "quote", "syn 2.0.87", ] [[package]] name = "serde_spanned" version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d" dependencies = [ "serde", ] [[package]] name = "shlex" version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "signal-hook-registry" version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" dependencies = [ "libc", ] [[package]] name = "slab" version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" dependencies = [ "autocfg", ] [[package]] name = "smallvec" version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "static_assertions" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "strsim" version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "syn" version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" dependencies = [ "proc-macro2", "unicode-ident", ] [[package]] name = "syn" version = "2.0.87" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] [[package]] name = "system-deps" version = "6.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a3e535eb8dded36d55ec13eddacd30dec501792ff23a0b1682c38601b8cf2349" dependencies = [ "cfg-expr 0.15.8", "heck 0.5.0", "pkg-config", "toml", "version-compare", ] [[package]] name = "system-deps" version = "7.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "66d23aaf9f331227789a99e8de4c91bf46703add012bdfd45fdecdfb2975a005" dependencies = [ "cfg-expr 0.17.0", "heck 0.5.0", "pkg-config", "toml", "version-compare", ] [[package]] name = "target-lexicon" version = "0.12.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" [[package]] name = "tempfile" version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64" dependencies = [ "cfg-if", "fastrand", "once_cell", "rustix", "windows-sys 0.59.0", ] [[package]] name = "thiserror" version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", "syn 2.0.87", ] [[package]] name = "toml" version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" dependencies = [ "serde", "serde_spanned", "toml_datetime", "toml_edit 0.22.20", ] [[package]] name = "toml_datetime" version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" dependencies = [ "serde", ] [[package]] name = "toml_edit" version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ "indexmap", "toml_datetime", "winnow 0.5.40", ] [[package]] name = "toml_edit" version = "0.20.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70f427fce4d84c72b5b732388bf4a9f4531b53f74e2887e3ecb2481f68f66d81" dependencies = [ "indexmap", "toml_datetime", "winnow 0.5.40", ] [[package]] name = "toml_edit" version = "0.22.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" dependencies = [ "indexmap", "serde", "serde_spanned", "toml_datetime", "winnow 0.6.18", ] [[package]] name = "tracing" version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ "pin-project-lite", "tracing-attributes", "tracing-core", ] [[package]] name = "tracing-attributes" version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", "syn 2.0.87", ] [[package]] name = "tracing-core" version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ "once_cell", ] [[package]] name = "uds_windows" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "89daebc3e6fd160ac4aa9fc8b3bf71e1f74fbf92367ae71fb83a037e8bf164b9" dependencies = [ "memoffset", "tempfile", "winapi", ] [[package]] name = "unicode-ident" version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "utf8parse" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "version-compare" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "852e951cb7832cb45cb1169900d19760cfa39b82bc0ea9c0e5a14ae88411c98b" [[package]] name = "version_check" version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "wayland-backend" version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f90e11ce2ca99c97b940ee83edbae9da2d56a08f9ea8158550fd77fa31722993" dependencies = [ "cc", "downcast-rs", "rustix", "scoped-tls", "smallvec", "wayland-sys", ] [[package]] name = "wayland-client" version = "0.31.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7e321577a0a165911bdcfb39cf029302479d7527b517ee58ab0f6ad09edf0943" dependencies = [ "bitflags", "rustix", "wayland-backend", "wayland-scanner", ] [[package]] name = "wayland-protocols" version = "0.32.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62989625a776e827cc0f15d41444a3cea5205b963c3a25be48ae1b52d6b4daaa" dependencies = [ "bitflags", "wayland-backend", "wayland-client", "wayland-scanner", ] [[package]] name = "wayland-protocols-misc" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dfe44d48a0e51909c89da297f6b43bb814b881c78b69e254a4558a5fa8752887" dependencies = [ "bitflags", "wayland-backend", "wayland-client", "wayland-protocols", "wayland-scanner", ] [[package]] name = "wayland-protocols-wlr" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd993de54a40a40fbe5601d9f1fbcaef0aebcc5fda447d7dc8f6dcbaae4f8953" dependencies = [ "bitflags", "wayland-backend", "wayland-client", "wayland-protocols", "wayland-scanner", ] [[package]] name = "wayland-scanner" version = "0.31.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d7b56f89937f1cf2ee1f1259cf2936a17a1f45d8f0aa1019fae6d470d304cfa6" dependencies = [ "proc-macro2", "quick-xml", "quote", ] [[package]] name = "wayland-sys" version = "0.31.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43676fe2daf68754ecf1d72026e4e6c15483198b5d24e888b74d3f22f887a148" dependencies = [ "dlib", "log", "pkg-config", ] [[package]] name = "winapi" version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" dependencies = [ "winapi-i686-pc-windows-gnu", "winapi-x86_64-pc-windows-gnu", ] [[package]] name = "winapi-i686-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows-sys" version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ "windows-targets", ] [[package]] name = "windows-sys" version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" dependencies = [ "windows-targets", ] [[package]] name = "windows-targets" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ "windows_aarch64_gnullvm", "windows_aarch64_msvc", "windows_i686_gnu", "windows_i686_gnullvm", "windows_i686_msvc", "windows_x86_64_gnu", "windows_x86_64_gnullvm", "windows_x86_64_msvc", ] [[package]] name = "windows_aarch64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] name = "windows_i686_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" version = "0.5.40" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" dependencies = [ "memchr", ] [[package]] name = "winnow" version = "0.6.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68a9bda4691f099d435ad181000724da8e5899daa10713c2d432552b9ccd3a6f" dependencies = [ "memchr", ] [[package]] name = "winnow" version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "59690dea168f2198d1a3b0cac23b8063efcd11012f10ae4698f284808c8ef603" dependencies = [ "memchr", ] [[package]] name = "xdg-home" version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec1cdab258fb55c0da61328dc52c8764709b249011b2cad0454c72f0bf10a1f6" dependencies = [ "libc", "windows-sys 0.59.0", ] [[package]] name = "zbus" version = "5.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cbddd8b6cb25d5d8ec1b23277b45299a98bfb220f1761ca11e186d5c702507f8" dependencies = [ "async-broadcast", "async-executor", "async-fs", "async-io", "async-lock", "async-process", "async-recursion", "async-task", "async-trait", "blocking", "enumflags2", "event-listener", "futures-core", "futures-util", "hex", "nix", "ordered-stream", "serde", "serde_repr", "static_assertions", "tracing", "uds_windows", "windows-sys 0.59.0", "winnow 0.7.2", "xdg-home", "zbus_macros", "zbus_names", "zvariant", ] [[package]] name = "zbus_macros" version = "5.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dac404d48b4e9cf193c8b49589f3280ceca5ff63519e7e64f55b4cf9c47ce146" dependencies = [ "proc-macro-crate 3.2.0", "proc-macro2", "quote", "syn 2.0.87", "zbus_names", "zvariant", "zvariant_utils", ] [[package]] name = "zbus_names" version = "4.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7be68e64bf6ce8db94f63e72f0c7eb9a60d733f7e0499e628dfab0f84d6bcb97" dependencies = [ "serde", "static_assertions", "winnow 0.7.2", "zvariant", ] [[package]] name = "zvariant" version = "5.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2df9ee044893fcffbdc25de30546edef3e32341466811ca18421e3cd6c5a3ac" dependencies = [ "endi", "enumflags2", "serde", "static_assertions", "winnow 0.7.2", "zvariant_derive", "zvariant_utils", ] [[package]] name = "zvariant_derive" version = "5.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74170caa85b8b84cc4935f2d56a57c7a15ea6185ccdd7eadb57e6edd90f94b2f" dependencies = [ "proc-macro-crate 3.2.0", "proc-macro2", "quote", "syn 2.0.87", "zvariant_utils", ] [[package]] name = "zvariant_utils" version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e16edfee43e5d7b553b77872d99bc36afdda75c223ca7ad5e3fbecd82ca5fc34" dependencies = [ "proc-macro2", "quote", "serde", "static_assertions", "syn 2.0.87", "winnow 0.7.2", ] phrog-0.46.0/Cargo.toml000066400000000000000000000020121477005616000146510ustar00rootroot00000000000000[package] name = "phrog" version = "0.46.0" edition = "2021" [dependencies] glob = "0.3.1" greetd_ipc = { version = "0.10.0", features = ["sync-codec"] } async-channel = "2.2.1" anyhow = "1.0.82" libphosh = "0.0.6" clap = { version = "4.5.4", features = ["derive"] } wayland-client = "0.31" zbus = { version = "5", default-features = false, features = ["blocking", "async-io"] } nix = { version = "0.29", features = ["signal"] } async-global-executor = "2.4.1" futures-util = "0.3.30" log = "0.4.22" [dependencies.glib] version = "0.18" features = ["log_macros"] [dependencies.gtk] version = "0.18" features = ["v3_24"] [dependencies.libhandy] version = "0.11" features = ["v1_6"] [build-dependencies] glib-build-tools = "0" [dev-dependencies] input-event-codes = "6.2.0" wayland-client = "0.31" wayland-protocols = { version = "0.32", features = ["client"] } wayland-protocols-misc = { version = "0.3", features = ["client"] } wayland-protocols-wlr = { version = "0.3", features = ["client"] } tempfile = "3" serde = "1.0.217" phrog-0.46.0/LICENSE000066400000000000000000001045151477005616000137410ustar00rootroot00000000000000 GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . phrog-0.46.0/README.md000066400000000000000000000046021477005616000142070ustar00rootroot00000000000000## 🐸 (phrog)


A greeter that works on mobile devices and also other kinds of computers. 🤓 `phrog` uses [Phosh][] to conduct a [greetd][] conversation. It is the spiritual successor of [phog][].
## Usage ### Alpine/postmarketOS ``` sudo apk add greetd-phrog # Configure greetd to run phrog: cat < "" The last user that successfully launched a session "" The name of the last session that successfully launched "" A path to a binary that should be executed when phrog starts up, before displaying the main login screen. phrog-0.46.0/data/phrog-greetd-session000066400000000000000000000031071477005616000176330ustar00rootroot00000000000000#!/bin/bash # This simple wrapper script is intended to be used directly by greetd to # start up the phrog greeter session. # Your distribution packaging should have already set something up for you, # but if you're doing this manually you can make use of this script by # adding something like this to your config.toml: # [default_session] # command = "/usr/libexec/phrog-greetd-session" # We prefer phoc.ini from phrog, falling back to Phosh otherwise PHOC_INI=/etc/phrog/phoc.ini [ ! -f $PHOC_INI ] && PHOC_INI=/usr/share/phrog/phoc.ini [ ! -f $PHOC_INI ] && PHOC_INI=/etc/phosh/phoc.ini [ ! -f $PHOC_INI ] && PHOC_INI=/usr/share/phosh/phoc.ini # Need to set XDG_CURRENT_DESKTOP now, otherwise gnome-session defaults it to # "GNOME", which is a problem because default desktop files for Squeekboard and # phosh-osk-stub specify "OnlyShowIn=Phosh;" export XDG_CURRENT_DESKTOP=Phosh:GNOME export GNOME_SESSION_AUTOSTART_DIR=/usr/share/phrog/autostart:/etc/phrog/autostart # greetd swallows all output from the greeters it spawns. We don't want that. # Redirect all output to journald or syslog. if command -v systemd-cat >/dev/null 2>&1; then exec > >(systemd-cat --identifier=phrog) 2>&1 elif command -v logger >/dev/null 2>&1; then exec > >(logger -s -t phrog) 2>&1 fi # phoc needs a dbus session bus present or it fails to initialize. Since a # healthy greeter session needs one anyway, let's ensure it's started now. dbus_command="" if [ -z "$DBUS_SESSION_BUS_ADDRESS" ]; then dbus_command=dbus-run-session fi exec $dbus_command phoc -S -C "${PHOC_INI}" -E 'gnome-session --session=phrog' phrog-0.46.0/data/phrog.session000066400000000000000000000003371477005616000163660ustar00rootroot00000000000000[GNOME Session] Name=phrog # Keep this in sync with systemd/user/gnome-session@phrog.target.d/session.conf RequiredComponents=mobi.phosh.Phrog;org.gnome.SettingsDaemon.MediaKeys;org.gnome.SettingsDaemon.Power;sm.puri.OSK0; phrog-0.46.0/data/systemd-session.conf000066400000000000000000000002121477005616000176520ustar00rootroot00000000000000[Unit] # Keep this in sync with phrog.session Wants=org.gnome.SettingsDaemon.MediaKeys.target Wants=org.gnome.SettingsDaemon.Power.target phrog-0.46.0/debian/000077500000000000000000000000001477005616000141505ustar00rootroot00000000000000phrog-0.46.0/debian/changelog000066400000000000000000000036461477005616000160330ustar00rootroot00000000000000phrog (0.46.0-1) unstable; urgency=medium * See https://github.com/samcday/phrog/releases/tag/0.46.0 -- Sam Day Sat, 22 Mar 2025 16:40:21 +0100 phrog (0.45.0-1) unstable; urgency=medium * See https://github.com/samcday/phrog/releases/tag/0.45.0 -- Sam Day Sun, 02 Mar 2025 15:52:06 +0100 phrog (0.44.1-1) unstable; urgency=medium * New upstream version * d/patches: update for new upstream release * d/control: update build dependencies for current Debian packages. Also add some more packages needed only for running tests, now that we can re-enable them. * d/rules: re-enable build tests. Those were previously relying on downstream libphosh-rs features, which have now been upstreamed. We can therefore re-enable those, adding the corresponding build-dependencies. * debian: install new files provided by phrog. Upstream now provides a wrapper script making use of `systemd-cat` so we can both drop our own wrapper and make our `greetd` config a bit simpler. Also install the new files found under `data/` such as the `.desktop` file and session configurations. * debian: acknowledge repacking is no longer needed. Upstream no longer ships the problematics files nor do they vendor `libphosh-rs` anymore. While at it, update `d/copyright` for the new release. * d/patches: require bash for wrapper script. It isn't POSIX-compliant, potentially leading to runtime problems if the default shell doesn't implement the corresponding bashisms. * debian: reload systemd on installation/removal. Otherwise the systemd config, especially for `greetd.service`, might be out-of-sync. -- Arnaud Ferraris Tue, 11 Feb 2025 11:58:40 +0100 phrog (0.10.0+ds1-1) unstable; urgency=medium * Initial Debian packaging (Closes: #1082766) -- Arnaud Ferraris Wed, 18 Dec 2024 09:12:27 +0100 phrog-0.46.0/debian/config/000077500000000000000000000000001477005616000154155ustar00rootroot00000000000000phrog-0.46.0/debian/config/greetd/000077500000000000000000000000001477005616000166675ustar00rootroot00000000000000phrog-0.46.0/debian/config/greetd/phrog.toml000066400000000000000000000002261477005616000207030ustar00rootroot00000000000000[terminal] vt = 7 # The default session, also known as the greeter. [default_session] command = "/usr/libexec/phrog-greetd-session" user = "_greetd" phrog-0.46.0/debian/config/phoc.ini000066400000000000000000000006101477005616000170440ustar00rootroot00000000000000#[core] #xwayland=false #[output:DSI-1] #scale = 2 [output:Virtual-1] # For the x86 VM using QXL to get a phone like geometry modeline = 87.25 720 776 848 976 1440 1443 1453 1493 -hsync +vsync mode = 720x1440 scale = 2 [output:X11-1] mode = 360x720 #rotate = 90 #scale = 1 [output:WL-1] mode = 360x720 #rotate = 90 #scale = 1 [output:HEADLESS-1] mode = 720x1440 #rotate = 90 scale = 2 phrog-0.46.0/debian/config/systemd/000077500000000000000000000000001477005616000171055ustar00rootroot00000000000000phrog-0.46.0/debian/config/systemd/phrog.conf000066400000000000000000000001461477005616000210740ustar00rootroot00000000000000[Unit] Conflicts=phosh.service [Service] ExecStart= ExecStart=greetd --config /etc/greetd/phrog.toml phrog-0.46.0/debian/control000066400000000000000000000036411477005616000155570ustar00rootroot00000000000000Source: phrog Section: x11 Priority: optional Maintainer: DebianOnMobile Maintainers Uploaders: Arnaud Ferraris Build-Depends: cargo, debhelper-compat (= 13), libphosh-0.45-dev | libphosh-dev, # Dependencies cargo culted from phosh gsettings-desktop-schemas-dev (>= 47), libadwaita-1-dev, libappstream-dev, libcallaudio-dev, libevince-dev, libgirepository1.0-dev, libjson-glib-dev, libsecret-1-dev, libsystemd-dev, libfeedback-dev (>= 0.4.0), libfribidi-dev, libgcr-3-dev, libgmobile-dev, libgnome-bluetooth-3.0-dev, libgnome-desktop-3-dev, libgtk-3-dev, libgtk-4-dev, libgudev-1.0-dev, libhandy-1-dev (>= 1.1.90), libmm-glib-dev, libnm-dev, libpam0g-dev, libpolkit-agent-1-dev, libpulse-dev, libsoup-3.0-dev, libupower-glib-dev, libwayland-dev, libxml2-utils, linux-libc-dev (>= 5.12) [arm64], # Dependencies needed only for tests at-spi2-core , dbus-x11 , foot , gnome-settings-daemon , phoc , # phosh is needed until the gschema is shipped with the lib package phosh , xauth , xvfb , Standards-Version: 4.7.0 Homepage: https://github.com/samcday/phrog/ Vcs-Browser: https://salsa.debian.org/DebianOnMobile-team/phrog Vcs-Git: https://salsa.debian.org/DebianOnMobile-team/phrog.git Rules-Requires-Root: no Package: phrog Architecture: any Depends: ${misc:Depends}, ${shlibs:Depends}, fonts-lato, gnome-shell-common, greetd, librsvg2-common, phoc, polkitd, phosh-osk-stub |squeekboard, Conflicts: phog Description: Greetd-compatible greeter for mobile phones Phrog is a graphical greeter speaking the `greetd` protocol and aimed at mobile devices like smart phones and tablets using touch based inputs and small screens. . It was initially designed for the Phosh Mobile Environment based on GNOME/GTK but can spawn any graphical session. phrog-0.46.0/debian/copyright000066400000000000000000000517771477005616000161240ustar00rootroot00000000000000Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: phrog Upstream-Contact: Sam Day Source: https://github.com/samcday/phrog/ Files: * Copyright: 2024-2025 Sam Day License: GPL-3 Files: debian/* Copyright: 2024-2025 Arnaud Ferraris License: GPL-3 Files: tests/fixtures/guido.png tests/fixtures/phoshi.png Copyright: 2022 Guido Günther License: CC-BY-SA-4.0 License: GPL-3 This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 3 of the License. . This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . You should have received a copy of the GNU General Public License along with this program. If not, see . On Debian systems, the complete text of the GNU General Public License version 3 can be found in "/usr/share/common-licenses/GPL-3". License: CC-BY-SA-4.0 Attribution-ShareAlike 4.0 International . ======================================================================= . Creative Commons Corporation ("Creative Commons") is not a law firm and does not provide legal services or legal advice. Distribution of Creative Commons public licenses does not create a lawyer-client or other relationship. Creative Commons makes its licenses and related information available on an "as-is" basis. Creative Commons gives no warranties regarding its licenses, any material licensed under their terms and conditions, or any related information. Creative Commons disclaims all liability for damages resulting from their use to the fullest extent possible. . Using Creative Commons Public Licenses . Creative Commons public licenses provide a standard set of terms and conditions that creators and other rights holders may use to share original works of authorship and other material subject to copyright and certain other rights specified in the public license below. The following considerations are for informational purposes only, are not exhaustive, and do not form part of our licenses. . Considerations for licensors: Our public licenses are intended for use by those authorized to give the public permission to use material in ways otherwise restricted by copyright and certain other rights. Our licenses are irrevocable. Licensors should read and understand the terms and conditions of the license they choose before applying it. Licensors should also secure all rights necessary before applying our licenses so that the public can reuse the material as expected. Licensors should clearly mark any material not subject to the license. This includes other CC- licensed material, or material used under an exception or limitation to copyright. More considerations for licensors: wiki.creativecommons.org/Considerations_for_licensors . Considerations for the public: By using one of our public licenses, a licensor grants the public permission to use the licensed material under specified terms and conditions. If the licensor's permission is not necessary for any reason--for example, because of any applicable exception or limitation to copyright--then that use is not regulated by the license. Our licenses grant only permissions under copyright and certain other rights that a licensor has authority to grant. Use of the licensed material may still be restricted for other reasons, including because others have copyright or other rights in the material. A licensor may make special requests, such as asking that all changes be marked or described. Although not required by our licenses, you are encouraged to respect those requests where reasonable. More_considerations for the public: wiki.creativecommons.org/Considerations_for_licensees . ======================================================================= . Creative Commons Attribution-ShareAlike 4.0 International Public License . By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-ShareAlike 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions. . . Section 1 -- Definitions. . a. Adapted Material means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image. . b. Adapter's License means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License. . c. BY-SA Compatible License means a license listed at creativecommons.org/compatiblelicenses, approved by Creative Commons as essentially the equivalent of this Public License. . d. Copyright and Similar Rights means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights. . e. Effective Technological Measures means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements. . f. Exceptions and Limitations means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material. . g. License Elements means the license attributes listed in the name of a Creative Commons Public License. The License Elements of this Public License are Attribution and ShareAlike. . h. Licensed Material means the artistic or literary work, database, or other material to which the Licensor applied this Public License. . i. Licensed Rights means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license. . j. Licensor means the individual(s) or entity(ies) granting rights under this Public License. . k. Share means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them. . l. Sui Generis Database Rights means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world. . m. You means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning. . . Section 2 -- Scope. . a. License grant. . 1. Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to: . a. reproduce and Share the Licensed Material, in whole or in part; and . b. produce, reproduce, and Share Adapted Material. . 2. Exceptions and Limitations. For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions. . 3. Term. The term of this Public License is specified in Section 6(a). . 4. Media and formats; technical modifications allowed. The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a) (4) never produces Adapted Material. . 5. Downstream recipients. . a. Offer from the Licensor -- Licensed Material. Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License. . b. Additional offer from the Licensor -- Adapted Material. Every recipient of Adapted Material from You automatically receives an offer from the Licensor to exercise the Licensed Rights in the Adapted Material under the conditions of the Adapter's License You apply. . c. No downstream restrictions. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material. . 6. No endorsement. Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i). . b. Other rights. . 1. Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise. . 2. Patent and trademark rights are not licensed under this Public License. . 3. To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties. . . Section 3 -- License Conditions. . Your exercise of the Licensed Rights is expressly made subject to the following conditions. . a. Attribution. . 1. If You Share the Licensed Material (including in modified form), You must: . a. retain the following if it is supplied by the Licensor with the Licensed Material: . i. identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated); . ii. a copyright notice; . iii. a notice that refers to this Public License; . iv. a notice that refers to the disclaimer of warranties; . v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable; . b. indicate if You modified the Licensed Material and retain an indication of any previous modifications; and . c. indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License. . 2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information. . 3. If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable. . b. ShareAlike. . In addition to the conditions in Section 3(a), if You Share Adapted Material You produce, the following conditions also apply. . 1. The Adapter's License You apply must be a Creative Commons license with the same License Elements, this version or later, or a BY-SA Compatible License. . 2. You must include the text of, or the URI or hyperlink to, the Adapter's License You apply. You may satisfy this condition in any reasonable manner based on the medium, means, and context in which You Share Adapted Material. . 3. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, Adapted Material that restrict exercise of the rights granted under the Adapter's License You apply. . . Section 4 -- Sui Generis Database Rights. . Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material: . a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database; . b. if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material, . including for purposes of Section 3(b); and c. You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database. . For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights. . . Section 5 -- Disclaimer of Warranties and Limitation of Liability. . a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. . b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. . c. The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability. . . Section 6 -- Term and Termination. . a. This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically. . b. Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates: . 1. automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or . 2. upon express reinstatement by the Licensor. . For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License. . c. For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License. . d. Sections 1, 5, 6, 7, and 8 survive termination of this Public License. . . Section 7 -- Other Terms and Conditions. . a. The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed. . b. Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License. . . Section 8 -- Interpretation. . a. For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License. . b. To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions. . c. No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor. . d. Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority. . . ======================================================================= . Creative Commons is not a party to its public licenses. Notwithstanding, Creative Commons may elect to apply one of its public licenses to material it publishes and in those instances will be considered the "Licensor." Except for the limited purpose of indicating that material is shared under a Creative Commons public license or as otherwise permitted by the Creative Commons policies published at creativecommons.org/policies, Creative Commons does not authorize the use of the trademark "Creative Commons" or any other trademark or logo of Creative Commons without its prior written consent including, without limitation, in connection with any unauthorized modifications to any of its public licenses or any other arrangements, understandings, or agreements concerning use of licensed material. For the avoidance of doubt, this paragraph does not form part of the public licenses. . Creative Commons may be contacted at creativecommons.org. phrog-0.46.0/debian/gbp.conf000066400000000000000000000004471477005616000155740ustar00rootroot00000000000000[DEFAULT] debian-branch = main upstream-vcs-tag = %(version)s pristine-tar = True [tag] sign-tags = True [dch] multimaint-merge = True commit-msg = d/changelog: release version %(version)s [import-orig] postimport = dch -v%(version)s New upstream version; git add debian/changelog; debcommit phrog-0.46.0/debian/patches/000077500000000000000000000000001477005616000155775ustar00rootroot00000000000000phrog-0.46.0/debian/patches/series000066400000000000000000000000001477005616000170020ustar00rootroot00000000000000phrog-0.46.0/debian/phrog.install000066400000000000000000000006701477005616000166620ustar00rootroot00000000000000# Upstream files data/mobi.phosh.phrog.gschema.xml usr/share/glib-2.0/schemas data/phrog.session usr/share/gnome-session/sessions data/mobi.phosh.Phrog.desktop usr/share/applications data/systemd-session.conf usr/lib/systemd/user/gnome-session@phrog.target.d # Debian-specific config debian/config/greetd/phrog.toml etc/greetd debian/config/phoc.ini usr/share/phrog debian/config/systemd/phrog.conf usr/lib/systemd/system/greetd.service.d phrog-0.46.0/debian/phrog.postinst000066400000000000000000000003261477005616000170750ustar00rootroot00000000000000#!/bin/sh set -e if [ "$1" = "configure" ]; then # Ensure our config fragments are taken into account deb-systemd-invoke --system daemon-reload deb-systemd-invoke --user daemon-reload fi #DEBHELPER# phrog-0.46.0/debian/phrog.postrm000066400000000000000000000003631477005616000165370ustar00rootroot00000000000000#!/bin/sh set -e if [ "$1" = "remove" ] || [ "$1" = "purge" ]; then # Ensure our config fragments are no longer taken into account deb-systemd-invoke --system daemon-reload deb-systemd-invoke --user daemon-reload fi #DEBHELPER# phrog-0.46.0/debian/rules000077500000000000000000000020021477005616000152220ustar00rootroot00000000000000#!/usr/bin/make -f export DEB_BUILD_MAINT_OPTIONS = hardening=+all include /usr/share/dpkg/default.mk export INSTALL_DIR=$(CURDIR)/debian/phrog %: dh $@ # The custom build.rs works under $HOME to ensure the glib schemas # compile cleanly, so let's ensure there's a valid/writable $HOME # during build and delete it afterwards override_dh_auto_build: HOME=$(CURDIR)/debian/tmp_home cargo build override_dh_auto_install: install -D -m0755 target/$(DEB_HOST_RUST_TYPE)/debug/phrog \ $(INSTALL_DIR)/usr/bin/phrog install -D -m0755 data/phrog-greetd-session \ $(INSTALL_DIR)/usr/libexec/phrog-greetd-session override_dh_auto_test: ifeq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),) mkdir -p $(CURDIR)/debian/tmp_home $(CURDIR)/debian/tmp_run LC_ALL=C.UTF-8 XDG_RUNTIME_DIR=$(CURDIR)/debian/tmp_run \ HOME=$(CURDIR)/debian/tmp_home dbus-run-session xvfb-run -a \ phoc -C $(CURDIR)/debian/config/phoc.ini -E "cargo test" endif execute_after_dh_auto_clean: rm -rf $(CURDIR)/debian/tmp_home $(CURDIR)/debian/tmp_run phrog-0.46.0/debian/salsa-ci.yml000066400000000000000000000002461477005616000163710ustar00rootroot00000000000000--- include: - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/recipes/debian.yml variables: SALSA_CI_DISABLE_BLHC: 1 SALSA_CI_DISABLE_REPROTEST: 1 phrog-0.46.0/debian/source/000077500000000000000000000000001477005616000154505ustar00rootroot00000000000000phrog-0.46.0/debian/source/format000066400000000000000000000000141477005616000166560ustar00rootroot000000000000003.0 (quilt) phrog-0.46.0/debian/upstream/000077500000000000000000000000001477005616000160105ustar00rootroot00000000000000phrog-0.46.0/debian/upstream/metadata000066400000000000000000000003271477005616000175150ustar00rootroot00000000000000--- Bug-Database: https://github.com/samcday/phrog/issues Bug-Submit: https://github.com/samcday/phrog/issues/new Repository: https://github.com/samcday/phrog.git Repository-Browse: https://github.com/samcday/phrog phrog-0.46.0/debian/watch000066400000000000000000000002241477005616000151770ustar00rootroot00000000000000version=4 opts=filenamemangle=s/.+\/v?(\d\S*)\.tar\.gz/@PACKAGE@-$1\.tar\.gz/ \ https://github.com/samcday/phrog/tags .*/v?@ANY_VERSION@\.tar\.gz phrog-0.46.0/dist/000077500000000000000000000000001477005616000136715ustar00rootroot00000000000000phrog-0.46.0/dist/alpine/000077500000000000000000000000001477005616000151415ustar00rootroot00000000000000phrog-0.46.0/dist/alpine/greetd-config.toml000066400000000000000000000004161477005616000205540ustar00rootroot00000000000000# This is a greetd config.toml preconfigured to run phrog. # You can use it by adding the following line to /etc/conf.d/greetd: # cfgfile="/etc/phrog/greetd-config.toml" [terminal] vt = 7 [default_session] command = "/usr/libexec/phrog-greetd-session" user = "greetd" phrog-0.46.0/dist/fedora/000077500000000000000000000000001477005616000151315ustar00rootroot00000000000000phrog-0.46.0/dist/fedora/greetd-config.toml000066400000000000000000000004511477005616000205430ustar00rootroot00000000000000# This is a greetd config.toml preconfigured to run phrog. # It's intended to be used with phrog.service # But you can also use it directly by running greetd --config=/etc/phrog/greetd-config.toml [terminal] vt = 1 [default_session] command = "/usr/libexec/phrog-greetd-session" user = "greetd" phrog-0.46.0/dist/fedora/phrog.service000066400000000000000000000006721477005616000176370ustar00rootroot00000000000000[Unit] Description=Phrog greeter daemon After=systemd-user-sessions.service plymouth-quit-wait.service After=getty@tty1.service Conflicts=getty@tty1.service greetd.service gdm.service [Service] Type=simple ExecStart=greetd --config=/etc/phrog/greetd-config.toml IgnoreSIGPIPE=no SendSIGHUP=yes TimeoutStopSec=30s KeyringMode=shared Restart=always RestartSec=1 StartLimitBurst=5 StartLimitInterval=30 [Install] Alias=display-manager.service phrog-0.46.0/phrog.spec000066400000000000000000000047731477005616000147340ustar00rootroot00000000000000%bcond_without check %global cargo_install_lib 0 Name: phrog Version: 0.46.0 Release: %autorelease Summary: Mobile-friendly greeter for greetd License: GPL-3.0-only URL: https://github.com/samcday/phrog Source: %{url}/archive/%{version}/%{name}-%{version}.tar.gz ExcludeArch: %{ix86} BuildRequires: cargo-rpm-macros >= 24 # for dbus-run-session in %check BuildRequires: dbus-daemon # for xvfb-run in %check BuildRequires: xorg-x11-server-Xvfb # first-run test uses foot BuildRequires: foot Requires: squeekboard Requires: gnome-session Requires: greetd Requires: phoc %description Phrog uses Phosh and greetd to provide a graphical login manager. %prep %autosetup -p1 %cargo_prep # tests need a writable XDG_RUNTIME_DIR mkdir -p /tmp/runtime-dir chmod 0700 /tmp/runtime-dir %generate_buildrequires %cargo_generate_buildrequires %build %cargo_build %{cargo_license_summary} %{cargo_license} > LICENSE.dependencies %install %{__install} -Dpm 0644 data/mobi.phosh.phrog.gschema.xml -t %{buildroot}%{_datadir}/glib-2.0/schemas/ %{__install} -Dpm 0644 data/phrog.session -t %{buildroot}%{_datadir}/gnome-session/sessions/ %{__install} -Dpm 0644 data/mobi.phosh.Phrog.desktop -t %{buildroot}%{_datadir}/applications/ %{__install} -Dpm 0644 dist/fedora/greetd-config.toml -t %{buildroot}%{_sysconfdir}/phrog/ %{__install} -Dpm 0644 dist/fedora/phrog.service -t %{buildroot}%{_unitdir}/ %{__install} -Dpm 0644 data/systemd-session.conf -T %{buildroot}%{_userunitdir}/gnome-session@phrog.target.d/session.conf %{__install} -Dpm 0755 data/phrog-greetd-session -t %{buildroot}%{_libexecdir}/ %{__install} -d %{buildroot}%{_datadir}/phrog/autostart %{__install} -d %{buildroot}%{_sysconfdir}/phrog/autostart %cargo_install %if %{with check} %check export G_MESSAGES_DEBUG=all export XDG_RUNTIME_DIR=/tmp/runtime-dir cat > test.sh < phrog-0.46.0/resources/phrog.css000066400000000000000000000021671477005616000165770ustar00rootroot00000000000000phosh-top-panel.debug { background-color: red; animation: red-pulse 2s linear infinite; } .phosh-fader-default-fade { animation-duration: 500ms; } @keyframes red-pulse { 0% {background-color: @phosh_bg_color;} 50% {background-color: red;} 100% {background-color: @phosh_bg_color;} } phrog-user-session-page list { background-color: transparent; } phrog-user-session-page .users row:not(:selected) { background-color: @phosh_action_bg_color; } phrog-user-session-page .users row:selected { background-color: @theme_selected_bg_color; } phrog-user-session-page .sessions { background-color: @phosh_action_bg_color; } phrog-user-session-page row:first-child { -gtk-outline-top-left-radius: 7px; -gtk-outline-top-right-radius: 7px; border-top-left-radius: 8px; border-top-right-radius: 8px; } phrog-user-session-page row:not(:last-child) { border-width: 1px 1px 0px 1px; } phrog-user-session-page row:last-child { -gtk-outline-bottom-left-radius: 7px; -gtk-outline-bottom-right-radius: 7px; border-bottom-left-radius: 8px; border-bottom-right-radius: 8px; } phrog-0.46.0/resources/phrog.gresources.xml000066400000000000000000000005631477005616000207650ustar00rootroot00000000000000 lockscreen-user-session.ui shuffle-keypad-quick-setting.ui phrog.css phrog-0.46.0/resources/shuffle-keypad-quick-setting.ui000066400000000000000000000006521477005616000227760ustar00rootroot00000000000000 phrog-0.46.0/src/000077500000000000000000000000001477005616000135155ustar00rootroot00000000000000phrog-0.46.0/src/dbus.rs000066400000000000000000000176401477005616000150300ustar00rootroot00000000000000#![allow(non_snake_case)] #![allow(clippy::type_complexity)] pub mod accounts { //! # D-Bus interface proxy for: `org.freedesktop.Accounts` //! //! This code was generated by `zbus-xmlgen` `4.1.0` from D-Bus introspection data. use zbus::proxy; #[proxy( interface = "org.freedesktop.Accounts", default_service = "org.freedesktop.Accounts", default_path = "/org/freedesktop/Accounts" )] pub trait Accounts { /// CacheUser method fn cache_user(&self, name: &str) -> zbus::Result; /// CreateUser method fn create_user( &self, name: &str, fullname: &str, accountType: i32, ) -> zbus::Result; /// DeleteUser method fn delete_user(&self, id: i64, removeFiles: bool) -> zbus::Result<()>; /// FindUserById method fn find_user_by_id(&self, id: i64) -> zbus::Result; /// FindUserByName method fn find_user_by_name(&self, name: &str) -> zbus::Result; /// GetUsersLanguages method fn get_users_languages(&self) -> zbus::Result>; /// ListCachedUsers method fn list_cached_users(&self) -> zbus::Result>; /// UncacheUser method fn uncache_user(&self, name: &str) -> zbus::Result<()>; /// UserAdded signal #[zbus(signal)] fn user_added(&self, user: zbus::zvariant::ObjectPath<'_>) -> zbus::Result<()>; /// UserDeleted signal #[zbus(signal)] fn user_deleted(&self, user: zbus::zvariant::ObjectPath<'_>) -> zbus::Result<()>; /// AutomaticLoginUsers property #[zbus(property)] fn automatic_login_users(&self) -> zbus::Result>; /// DaemonVersion property #[zbus(property)] fn daemon_version(&self) -> zbus::Result; /// HasMultipleUsers property #[zbus(property)] fn has_multiple_users(&self) -> zbus::Result; /// HasNoUsers property #[zbus(property)] fn has_no_users(&self) -> zbus::Result; } } pub mod user { //! # D-Bus interface proxy for: `org.freedesktop.Accounts.User` //! //! This code was generated by `zbus-xmlgen` `4.1.0` from D-Bus introspection data. use zbus::proxy; #[proxy( default_service = "org.freedesktop.Accounts", interface = "org.freedesktop.Accounts.User" )] pub trait User { /// GetPasswordExpirationPolicy method fn get_password_expiration_policy(&self) -> zbus::Result<(i64, i64, i64, i64, i64, i64)>; /// SetAccountType method fn set_account_type(&self, accountType: i32) -> zbus::Result<()>; /// SetAutomaticLogin method fn set_automatic_login(&self, enabled: bool) -> zbus::Result<()>; /// SetEmail method fn set_email(&self, email: &str) -> zbus::Result<()>; /// SetHomeDirectory method fn set_home_directory(&self, homedir: &str) -> zbus::Result<()>; /// SetIconFile method fn set_icon_file(&self, filename: &str) -> zbus::Result<()>; /// SetLanguage method fn set_language(&self, language: &str) -> zbus::Result<()>; /// SetLanguages method fn set_languages(&self, languages: &[&str]) -> zbus::Result<()>; /// SetLocation method fn set_location(&self, location: &str) -> zbus::Result<()>; /// SetLocked method fn set_locked(&self, locked: bool) -> zbus::Result<()>; /// SetPassword method fn set_password(&self, password: &str, hint: &str) -> zbus::Result<()>; /// SetPasswordExpirationPolicy method fn set_password_expiration_policy( &self, min_days_between_changes: i64, max_days_between_changes: i64, days_to_warn: i64, days_after_expiration_until_lock: i64, ) -> zbus::Result<()>; /// SetPasswordHint method fn set_password_hint(&self, hint: &str) -> zbus::Result<()>; /// SetPasswordMode method fn set_password_mode(&self, mode: i32) -> zbus::Result<()>; /// SetRealName method fn set_real_name(&self, name: &str) -> zbus::Result<()>; /// SetSession method fn set_session(&self, session: &str) -> zbus::Result<()>; /// SetSessionType method fn set_session_type(&self, session_type: &str) -> zbus::Result<()>; /// SetShell method fn set_shell(&self, shell: &str) -> zbus::Result<()>; /// SetUserExpirationPolicy method fn set_user_expiration_policy(&self, expiration_time: i64) -> zbus::Result<()>; /// SetUserName method fn set_user_name(&self, name: &str) -> zbus::Result<()>; /// SetXSession method #[zbus(name = "SetXSession")] fn set_xsession(&self, x_session: &str) -> zbus::Result<()>; /// Changed signal #[zbus(signal)] fn changed(&self) -> zbus::Result<()>; /// AccountType property #[zbus(property)] fn account_type(&self) -> zbus::Result; /// AutomaticLogin property #[zbus(property)] fn automatic_login(&self) -> zbus::Result; /// Email property #[zbus(property)] fn email(&self) -> zbus::Result; /// HomeDirectory property #[zbus(property)] fn home_directory(&self) -> zbus::Result; /// IconFile property #[zbus(property)] fn icon_file(&self) -> zbus::Result; /// Language property #[zbus(property)] fn language(&self) -> zbus::Result; /// Languages property #[zbus(property)] fn languages(&self) -> zbus::Result>; /// LocalAccount property #[zbus(property)] fn local_account(&self) -> zbus::Result; /// Location property #[zbus(property)] fn location(&self) -> zbus::Result; /// Locked property #[zbus(property)] fn locked(&self) -> zbus::Result; /// LoginFrequency property #[zbus(property)] fn login_frequency(&self) -> zbus::Result; /// LoginHistory property #[zbus(property)] fn login_history( &self, ) -> zbus::Result< Vec<( i64, i64, std::collections::HashMap, )>, >; /// LoginTime property #[zbus(property)] fn login_time(&self) -> zbus::Result; /// PasswordHint property #[zbus(property)] fn password_hint(&self) -> zbus::Result; /// PasswordMode property #[zbus(property)] fn password_mode(&self) -> zbus::Result; /// RealName property #[zbus(property)] fn real_name(&self) -> zbus::Result; /// Saved property #[zbus(property)] fn saved(&self) -> zbus::Result; /// Session property #[zbus(property)] fn session(&self) -> zbus::Result; /// SessionType property #[zbus(property)] fn session_type(&self) -> zbus::Result; /// Shell property #[zbus(property)] fn shell(&self) -> zbus::Result; /// SystemAccount property #[zbus(property)] fn system_account(&self) -> zbus::Result; /// Uid property #[zbus(property)] fn uid(&self) -> zbus::Result; /// UserName property #[zbus(property)] fn user_name(&self) -> zbus::Result; /// XSession property #[zbus(property, name = "XSession")] fn xsession(&self) -> zbus::Result; } } phrog-0.46.0/src/lib.rs000066400000000000000000000032601477005616000146320ustar00rootroot00000000000000pub mod lockscreen; pub mod shell; pub mod supervised_child; mod dbus; pub mod session_object; mod sessions; mod user; mod user_session_page; use anyhow::{anyhow, Context}; use gtk::{gdk, gio}; use wayland_client::protocol::wl_registry; pub const APP_ID: &str = "mobi.phosh.phrog"; struct DetectPhoc(bool); impl wayland_client::Dispatch for DetectPhoc { fn event( state: &mut Self, _: &wl_registry::WlRegistry, event: wl_registry::Event, _: &(), _: &wayland_client::Connection, _: &wayland_client::QueueHandle, ) { if let wl_registry::Event::Global { interface, .. } = event { if interface == "phosh_private" { state.0 = true; } } } } fn is_phoc_detected() -> anyhow::Result { let conn = wayland_client::Connection::connect_to_env()?; let display = conn.display(); let mut event_queue = conn.new_event_queue(); let qh = event_queue.handle(); let _registry = display.get_registry(&qh, ()); let detect = &mut DetectPhoc(false); event_queue.roundtrip(detect)?; Ok(detect.0) } pub fn init() -> anyhow::Result<()> { gio::resources_register_include!("phrog.gresource").context("failed to register resources.")?; if !is_phoc_detected().context("failed to detect Wayland compositor globals")? { return Err(anyhow!("Phoc parent compositor not detected")); } gdk::set_allowed_backends("wayland"); gdk::init(); let display = gdk::Display::default(); if display.is_none() { return Err(anyhow!("failed GDK init")); } gtk::init()?; libhandy::init(); Ok(()) } phrog-0.46.0/src/lockscreen.rs000066400000000000000000000360521477005616000162210ustar00rootroot00000000000000use glib::Object; use greetd_ipc::AuthMessageType::Secret; use greetd_ipc::ErrorType::AuthError; use greetd_ipc::{Request, Response}; use gtk::glib; static G_LOG_DOMAIN: &str = "phrog-lockscreen"; glib::wrapper! { pub struct Lockscreen(ObjectSubclass) @extends libphosh::Lockscreen, gtk::Widget, gtk::Window, gtk::Bin; } impl Lockscreen { pub fn new() -> Self { Object::builder().build() } } impl Default for Lockscreen { fn default() -> Self { Self::new() } } mod imp { use super::G_LOG_DOMAIN; use crate::lockscreen::fake_greetd_interaction; use crate::shell::Shell; use crate::user_session_page::UserSessionPage; use crate::APP_ID; use anyhow::{anyhow, Context}; use async_channel::{Receiver, Sender}; use glib::{error, info, warn}; use greetd_ipc::codec::SyncCodec; use greetd_ipc::{AuthMessageType, ErrorType, Request, Response}; use gtk::gio::Settings; use gtk::glib::{clone, closure_local, timeout_add_once, ObjectExt, Properties}; use gtk::prelude::SettingsExtManual; use gtk::prelude::*; use gtk::subclass::prelude::*; use gtk::{gio, glib}; use libphosh::prelude::*; use libphosh::subclass::lockscreen::LockscreenImpl; use libphosh::LockscreenPage; use std::cell::{OnceCell, RefCell}; use std::os::unix::net::UnixStream; use std::time::Duration; #[derive(Default, Properties)] #[properties(wrapper_type = super::Lockscreen)] pub struct Lockscreen { #[property(get, set)] pub user_session_page: OnceCell, greetd: RefCell, Receiver)>>, session: RefCell>, } #[glib::object_subclass] impl ObjectSubclass for Lockscreen { const NAME: &'static str = "PhrogLockscreen"; type Type = super::Lockscreen; type ParentType = libphosh::Lockscreen; } fn run_greetd() -> (Sender, Receiver) { let (greetd_req_send, greetd_req_recv) = async_channel::bounded::(1); let (greetd_resp_send, greetd_resp_recv) = async_channel::bounded(1); gio::spawn_blocking(move || { let mut sock = std::env::var("GREETD_SOCK") .ok() .and_then(|path| UnixStream::connect(path).ok()); while let Ok(req) = greetd_req_recv.recv_blocking() { let resp = if let Some(ref mut sock) = sock { req.write_to(sock) .and_then(|_| Response::read_from(sock)) .unwrap_or_else(|err| Response::Error { error_type: ErrorType::Error, description: err.to_string(), }) } else { Response::Error { error_type: ErrorType::Error, description: "Greetd not connected".into(), } }; if let Err(err) = greetd_resp_send.send_blocking(resp) { error!("error sending greetd response on channel: {}", err); continue; } } }); (greetd_req_send, greetd_resp_recv) } #[glib::derived_properties] impl ObjectImpl for Lockscreen { fn constructed(&self) { let self_obj = self.obj(); let usp = UserSessionPage::new(); // Default unlock status in PhoshLockscreen is "Enter Passcode", which doesn't make // sense in our case. self_obj.set_unlock_status(""); // Insert the UserSessionPage widget into the "extra page" of Phosh.Lockscreen. // This sits in-between the Info and Unlock (keypad) pages. // We default to this page (which means inactivity bounces user back to it). self_obj.add_extra_page(&usp); self_obj.set_default_page(LockscreenPage::Extra); // Add a signal handler for when Phosh.Lockscreen active page changes. // We hook up greetd session initiation/cancellation to this. self_obj.connect_page_notify(clone!(@weak self as this => move |ls| { glib::spawn_future_local(clone!(@weak ls => async move { // Page is lockscreen, begin greetd conversation. if ls.page() == LockscreenPage::Unlock { this.obj().set_default_page(LockscreenPage::Unlock); this.create_session().await; } else { // No longer on unlock, cancel session. this.obj().set_default_page(LockscreenPage::Extra); this.cancel_session().await; this.session.replace(None); // Make absolutely sure that lockscreen is sensitive again. // This should already be taken care of elsewhere, but if we somehow hit // an edge case in the convoluted dance with greetd, we really don't want // the user to end up with a lockscreen that cannot be interacted with, as // that deadlocks the whole UI, basically. this.obj().set_sensitive(true); } })); })); // Add a handler for the UserSessionPage notifying of readiness, which happens when // all user+sessions on the system have been loaded. At this point we can decide if // the "trivial flow" is suitable (jump straight to keypad if there's only one user and // session choice available). usp.connect_ready_notify(clone!(@weak self_obj => move |usp| { let shell = Shell::default(); let user_count = usp.imp().box_users.children().len(); let session_count = shell.sessions().map_or(0, |s| s.n_items()); // If there's only one user and one session, set the default + active page to the keypad. if session_count == 1 && user_count == 1 { self_obj.set_page(LockscreenPage::Unlock); } })); usp.connect_closure( "login", false, closure_local!(@watch self_obj => move |_: UserSessionPage| { self_obj.set_page(LockscreenPage::Unlock); }), ); self.user_session_page.set(usp).unwrap(); self.parent_constructed(); } } impl Lockscreen { // Whenever user swipes away from keypad entry page, and after an auth failure, fire off a // CancelSession. async fn cancel_session(&self) { if self.session.borrow().is_none() { // no session to cancel return; } if let Err(err) = self.greetd_req(Request::CancelSession).await { warn!("greetd CancelSession failed: {}", err); } } async fn create_session(&self) { let user = self.user_session_page.get().unwrap().username(); if user.is_none() || self.session.borrow().eq(&user) { // no user selected, or the session for that user is already started return; } self.session.replace(user.clone()); let username = user.unwrap(); info!("creating greetd session for user {}", username); self.obj().set_unlock_status("Please wait..."); self.obj().set_sensitive(false); let mut req = Some(Request::CreateSession { username }); while let Some(next_req) = req.take() { req = self.greetd_interaction(next_req).await; } } async fn start_session(&self) -> anyhow::Result<()> { let session = self.user_session_page.get().unwrap().session(); let settings = Settings::new(APP_ID); if let Err(err) = settings.set("last-user", self.session.clone().take().unwrap_or_default()) { warn!("setting last-user failed {}", err); } if let Err(err) = settings.set("last-session", session.id()) { warn!("setting last-session failed {}", err); } self.greetd_req(Request::StartSession { cmd: vec![session.command()], env: vec![ format!("XDG_SESSION_TYPE={}", session.session_type()), format!("XDG_CURRENT_DESKTOP={}", session.desktop_names()), format!("XDG_SESSION_DESKTOP={}", session.id()), format!("GDMSESSION={}", session.id()), ], }) .await .context("start session")?; Ok(()) } async fn greetd_req(&self, req: Request) -> anyhow::Result { if Shell::default().fake_greetd() { return fake_greetd_interaction(req); } if self.greetd.borrow().is_none() { self.greetd.set(Some(run_greetd())); } let (sender, receiver) = self.greetd.clone().take().unwrap(); sender.send(req).await.context("send greetd request")?; match receiver.recv().await.context("receive greetd response")? { Response::Error { error_type: ErrorType::Error, description, } => Err(anyhow!("greetd error: {}", description)), resp => Ok(resp), } } async fn greetd_interaction(&self, req: Request) -> Option { let resp = self.greetd_req(req).await; if let Err(err) = resp { error!("failed to send greetd request: {:?}", err); self.obj().set_unlock_status("Error, please try again"); self.obj().set_sensitive(true); return None; } match resp.unwrap() { Response::AuthMessage { auth_message_type, auth_message, } => { self.obj().set_unlock_status(&auth_message); if let AuthMessageType::Error = auth_message_type { self.obj().shake_pin_entry(); // Lockscreen will be made sensitive at the end of PIN shake. // We can only communicate status via the unlock status label. // As soon as we PostAuthMessageResponse below, that will move to the next // auth attempt and likely a new auth message that will overwrite this one. // So we wait here a second before dismissing the message, to ensure the // user has a chance to notice the message. glib::timeout_future_seconds(1).await; } else { self.obj().set_sensitive(true); } match auth_message_type { AuthMessageType::Info | AuthMessageType::Error => { // Dismiss the message and move on to the next auth question. // TODO: This might mean that some info messages are swallowed. // Currently, we only care about fprintd's Info message, which blocks // on the response until fingerprint reader is deactivated. return Some(Request::PostAuthMessageResponse { response: None }) } _ => { // TODO: set GtkEntry input-purpose depending on AuthMessageType. } } } Response::Success => { self.obj().set_unlock_status("Success. Logging in..."); self.start_session().await.unwrap(); Shell::default().fade_out(0); // Keep this timeout in sync with fadeout animation duration in phrog.css timeout_add_once(Duration::from_millis(500), || { gtk::main_quit(); }); } Response::Error { error_type: ErrorType::AuthError, description, } => { warn!("auth error: '{}'", description); self.obj().set_unlock_status("Login failed, please try again"); self.obj().shake_pin_entry(); // Greetd IPC dox seem to suggest that this isn't necessary, but then agreety // does this, and if we don't we get a "session is already being configured" // error. So. self.cancel_session().await; // We hold here for a second, so that the login failure message has a chance // to marinate in users' gray meat. Otherwise, the caller driving this // interaction will fire off the CreateSession immediately, which will then // result in a new AuthMessage that overwrites the unlock status. glib::timeout_future_seconds(1).await; return Some(Request::CreateSession { username: self.user_session_page.get()?.username()?, }); } v => error!("unexpected response to start session: {:?}", v), } None } } impl WidgetImpl for Lockscreen {} impl ContainerImpl for Lockscreen {} impl BinImpl for Lockscreen {} impl WindowImpl for Lockscreen {} impl LockscreenImpl for Lockscreen { fn unlock_submit(&self) { glib::spawn_future_local(clone!(@weak self as this => async move { this.obj().set_unlock_status("Please wait..."); this.obj().set_sensitive(false); let mut req = Some(Request::PostAuthMessageResponse { response: Some(this.obj().pin_entry().to_string()) }); while let Some(next_req) = req.take() { req = this.greetd_interaction(next_req).await; } this.obj().clear_pin_entry(); })); } } } fn fake_greetd_interaction(req: Request) -> anyhow::Result { match req { Request::CreateSession { .. } => anyhow::Ok(Response::AuthMessage { auth_message_type: Secret, auth_message: "Password:".into(), }), Request::PostAuthMessageResponse { response } => { if response.is_none() || response.unwrap() != "0" { anyhow::Ok(Response::Error { error_type: AuthError, description: String::from("Incorrect password (hint: it's '0')"), }) } else { anyhow::Ok(Response::Success) } } _ => anyhow::Ok(Response::Success), } } phrog-0.46.0/src/main.rs000066400000000000000000000024501477005616000150100ustar00rootroot00000000000000use clap::Parser; use gtk::glib::*; use gtk::Application; use libphosh::prelude::*; use libphosh::WallClock; use nix::libc::SIGTERM; use phrog::shell::Shell; static G_LOG_DOMAIN: &str = "phrog"; static GLIB_LOGGER: GlibLogger = GlibLogger::new(GlibLoggerFormat::Plain, GlibLoggerDomain::CrateTarget); #[derive(Parser, Debug)] #[command(version, about, long_about = None)] struct Args { #[arg( short, long, default_value = "false", help = "Fake interactions with greetd (useful for local testing)" )] fake: bool, } fn main() -> anyhow::Result<()> { log::set_logger(&GLIB_LOGGER).unwrap(); log::set_max_level(log::LevelFilter::Debug); let args = Args::parse(); // TODO: check XDG_RUNTIME_DIR here? Angry if not set? Default? phrog::init()?; let _app = Application::builder().application_id(phrog::APP_ID).build(); let wall_clock = WallClock::new(); wall_clock.set_default(); let shell: Shell = Object::builder() .property("fake-greetd", args.fake) .property("overview-visible", false) .build(); shell.set_default(); shell.connect_ready(|_| { info!("Shell is ready"); }); unix_signal_add_local_once(SIGTERM, || { gtk::main_quit(); }); gtk::main(); Ok(()) } phrog-0.46.0/src/session_object.rs000066400000000000000000000027201477005616000170750ustar00rootroot00000000000000use gtk::glib; use gtk::glib::Object; glib::wrapper! { pub struct SessionObject(ObjectSubclass); } impl SessionObject { pub fn new( id: &str, name: &str, session_type: &str, command: &str, desktop_names: &str, ) -> Self { Object::builder() .property("id", id.to_string()) .property("name", name.to_string()) .property("session-type", session_type.to_string()) .property("command", command.to_string()) .property("desktop-names", desktop_names.to_string()) .build() } } mod imp { use gtk::glib; use gtk::glib::Properties; use gtk::prelude::*; use gtk::subclass::prelude::*; use std::cell::OnceCell; #[derive(Properties, Default)] #[properties(wrapper_type = super::SessionObject)] pub struct SessionObject { #[property(get, set)] id: OnceCell, #[property(get, set)] name: OnceCell, #[property(get, set)] session_type: OnceCell, #[property(get, set)] command: OnceCell, #[property(get, set)] desktop_names: OnceCell, } #[glib::object_subclass] impl ObjectSubclass for SessionObject { const NAME: &'static str = "PhrogSessionObject"; type Type = super::SessionObject; } #[glib::derived_properties] impl ObjectImpl for SessionObject {} } phrog-0.46.0/src/sessions.rs000066400000000000000000000032301477005616000157270ustar00rootroot00000000000000use crate::session_object::SessionObject; use glib::warn; use glob::glob; use gtk::gio::DesktopAppInfo; use gtk::prelude::*; use std::collections::HashMap; static G_LOG_DOMAIN: &str = "phrog-sessions"; pub fn sessions() -> Vec { let mut sessions = HashMap::new(); session_list( "/usr/share/wayland-sessions/*.desktop", "wayland", &mut sessions, ); session_list("/usr/share/xsessions/*.desktop", "x11", &mut sessions); sessions.values().cloned().collect() } fn session_list(path: &str, session_type: &str, sessions: &mut HashMap) { for f in match glob(path) { Err(e) => { warn!("couldn't check sessions in {}: {}", path, e); return; } Ok(iter) => iter, } .flatten() { let id = f.file_stem().unwrap().to_string_lossy().to_string(); if sessions.contains_key(&id) { continue; } let info = if let Some(info) = DesktopAppInfo::from_filename(&f) { info } else { warn!("Unable to parse session file {:?}", f); continue; }; sessions.insert( id.clone(), SessionObject::new( &id, info.name().as_ref(), session_type, &info .commandline() .map_or(String::new(), |v| v.to_string_lossy().to_string()), &info .string("DesktopNames") .map(|v| v.trim_end_matches(';').replace(';', ":")) .unwrap_or(String::new()), ), ); } } phrog-0.46.0/src/shell.rs000066400000000000000000000072131477005616000151750ustar00rootroot00000000000000use glib::{Cast, Object}; use gtk::glib; static G_LOG_DOMAIN: &str = "phrog"; glib::wrapper! { pub struct Shell(ObjectSubclass) @extends libphosh::Shell, gtk::gio::ActionGroup; } impl Shell { #[allow(clippy::new_without_default)] pub fn new() -> Self { Object::builder().build() } } impl Default for Shell { fn default() -> Self { libphosh::Shell::default().downcast::().unwrap() } } mod imp { use super::G_LOG_DOMAIN; use crate::lockscreen::Lockscreen; use crate::session_object::SessionObject; use crate::sessions; use glib::{clone, spawn_future_local, warn}; use gtk::gio::Settings; use gtk::gio::{spawn_blocking, ListStore}; use gtk::glib::{Properties, Type}; use gtk::prelude::StaticType; use gtk::prelude::*; use gtk::subclass::prelude::*; use gtk::subclass::prelude::{ObjectImpl, ObjectSubclass}; use gtk::{gdk, glib, CssProvider, StyleContext}; use libphosh::subclass::shell::ShellImpl; use std::cell::RefCell; use std::cell::{Cell, OnceCell}; use std::process::Command; use libphosh::prelude::ShellExt; #[derive(Default, Properties)] #[properties(wrapper_type = super::Shell)] pub struct Shell { #[property(get, set)] fake_greetd: Cell, #[property(get, set)] pub sessions: RefCell>, provider: Cell, pub dbus_connection: OnceCell, } #[glib::object_subclass] impl ObjectSubclass for Shell { const NAME: &'static str = "PhrogShell"; type Type = super::Shell; type ParentType = libphosh::Shell; } #[glib::derived_properties] impl ObjectImpl for Shell { fn constructed(&self) { let system_dbus = async_global_executor::block_on(zbus::Connection::system()).unwrap(); self.dbus_connection.set(system_dbus).unwrap(); self.parent_constructed(); if self.obj().sessions().is_none() { let sessions_store = ListStore::new::(); sessions_store.extend_from_slice(&sessions::sessions()); self.obj().set_sessions(sessions_store); } let provider = CssProvider::new(); provider.load_from_resource("/mobi/phosh/phrog/phrog.css"); StyleContext::add_provider_for_screen( &gdk::Screen::default().unwrap(), &provider, // Slightly hacky, we want to be above phosh to override some stuff gtk::STYLE_PROVIDER_PRIORITY_APPLICATION + 5, ); self.provider.set(provider); let settings = Settings::new(crate::APP_ID); let shell = self.to_owned(); glib::idle_add_local_once(move || { let first_run = settings.string("first-run"); if !first_run.is_empty() { spawn_future_local(clone!(@weak shell as this => async move { if let Err(err) = spawn_blocking(|| { Command::new(first_run).spawn().and_then(|mut child| child.wait()) }).await { warn!("Failed to execute first-run app: {:?}", err); } this.obj().set_locked(true); })); } else { shell.obj().set_locked(true); } }); } } impl ShellImpl for Shell { fn get_lockscreen_type(&self) -> Type { Lockscreen::static_type() } } } phrog-0.46.0/src/supervised_child.rs000066400000000000000000000027251477005616000174250ustar00rootroot00000000000000use glib::{error, info, warn}; use nix::sys::signal::SIGTERM; use nix::unistd::Pid; use std::process::Child; use std::thread::sleep; use std::time::{Duration, Instant}; static G_LOG_DOMAIN: &str = "phrog-supervised-child"; pub struct SupervisedChild { pub child: Child, name: String, } impl SupervisedChild { pub fn new(name: &str, child: Child) -> Self { Self { child, name: name.to_string(), } } pub fn stop(&mut self) { let pid = Pid::from_raw(self.child.id() as _); let label = format!("{} ({})", self.name, pid); info!("Stopping process {} with SIGTERM", label); // First try to SIGTERM, allowing maximum of 5 seconds for graceful exit. match nix::sys::signal::kill(pid, SIGTERM) { Ok(_) => { let start = Instant::now(); while start.elapsed() < Duration::from_secs(5) { if self.child.try_wait().is_ok() { return; } sleep(Duration::from_secs(1)); } warn!("Process {} ignored SIGTERM. Killing...", label); } Err(err) => warn!("Failed to SIGTERM process {}: {}", label, err), } if let Err(err) = self.child.kill() { error!("Failed to kill process {}: {}", label, err); } } } impl Drop for SupervisedChild { fn drop(&mut self) { self.stop(); } } phrog-0.46.0/src/user.rs000066400000000000000000000122011477005616000150350ustar00rootroot00000000000000use crate::dbus::user::UserProxy; use futures_util::StreamExt; use futures_util::select; use glib::warn; use gtk::gdk_pixbuf::Pixbuf; use gtk::gio::Cancellable; use gtk::glib::{Object, clone, spawn_future_local}; use gtk::prelude::{FileExt, ObjectExt}; use gtk::{gio, glib}; use zbus::zvariant::{ObjectPath, OwnedObjectPath}; static G_LOG_DOMAIN: &str = "phrog-user"; glib::wrapper! { pub struct User(ObjectSubclass); } impl User { pub fn new(conn: zbus::Connection, path: ObjectPath) -> Self { let obj: Self = Object::builder().property("path", path.as_str()).build(); let path = OwnedObjectPath::from(path); spawn_future_local(clone!(@weak obj => async move { let user_proxy = if let Ok(proxy) = UserProxy::builder(&conn) .path(&path) .unwrap_or_else(|_| panic!("failed to construct UserProxy for {}", path)) .build() .await { proxy } else { warn!("failed to construct UserProxy for {}", path); return; }; if let Ok(v) = user_proxy.user_name().await { obj.set_username(v); } if let Ok(v) = user_proxy.real_name().await { obj.set_name(v); } if let Ok(v) = user_proxy.icon_file().await { obj.set_icon_file(v); } obj.emit_by_name::<()>("loaded", &[]); let mut name_stream = user_proxy.receive_real_name_changed().await.fuse(); let mut username_stream = user_proxy.receive_user_name_changed().await.fuse(); let mut icon_stream = user_proxy.receive_icon_file_changed().await.fuse(); loop { select! { name = name_stream.next() => if let Some(name) = name { if let Ok(v) = name.get().await { obj.set_name(v); } }, username = username_stream.next() => if let Some(username) = username { if let Ok(v) = username.get().await { obj.set_username(v); } }, icon = icon_stream.next() => if let Some(icon) = icon { if let Ok(v) = icon.get().await { obj.set_icon_file(v); } }, } } })); obj } pub fn load_pixbuf(&self, f: &gio::File) { let c = Cancellable::current(); if let Ok(input) = f.read(c.as_ref()) { if let Ok(pixbuf) = Pixbuf::from_stream_at_scale(&input, 32, 32, true, c.as_ref()) { self.set_icon_pixbuf(pixbuf); } } } } mod imp { use super::G_LOG_DOMAIN; use glib::warn; use gtk::gdk_pixbuf::Pixbuf; use gtk::gio::{Cancellable, FileMonitorFlags}; use gtk::glib::subclass::Signal; use gtk::glib::{Properties, clone}; use gtk::prelude::*; use gtk::subclass::prelude::*; use gtk::{gio, glib}; use std::cell::RefCell; use std::sync::OnceLock; #[derive(Properties, Default)] #[properties(wrapper_type = super::User)] pub struct User { #[property(get, set)] path: RefCell, #[property(get, set)] name: RefCell, #[property(get, set)] username: RefCell, #[property(get, set)] icon_file: RefCell>, #[property(get, set)] icon_monitor: RefCell>, #[property(get, set)] icon_pixbuf: RefCell>, } #[glib::object_subclass] impl ObjectSubclass for User { const NAME: &'static str = "PhrogUser"; type Type = super::User; } #[glib::derived_properties] impl ObjectImpl for User { fn constructed(&self) { self.parent_constructed(); self.obj().connect_icon_file_notify(move |user| { if let Some(path) = user.icon_file() { let file = gio::File::for_path(&path); user.load_pixbuf(&file); let c = Cancellable::current(); match file.monitor(FileMonitorFlags::empty(), c.as_ref()) { Ok(monitor) => user.set_icon_monitor(monitor.clone()), Err(err) => { warn!("error starting file monitor on {}: {}", path, err) } } } }); self.obj().connect_icon_monitor_notify(move |user| { if let Some(monitor) = user.icon_monitor() { monitor.connect_changed(clone!(@weak user => move |_, f, _, _| { user.load_pixbuf(f); })); } }); } fn signals() -> &'static [Signal] { static SIGNALS: OnceLock> = OnceLock::new(); SIGNALS.get_or_init(|| vec![Signal::builder("loaded").build()]) } } } phrog-0.46.0/src/user_session_page.rs000066400000000000000000000174651477005616000176150ustar00rootroot00000000000000use crate::session_object::SessionObject; use gtk::glib; use gtk::glib::{Cast, CastNone, Object}; use gtk::prelude::*; use gtk::subclass::prelude::ObjectSubclassIsExt; use libhandy::prelude::{ActionRowExt, ComboRowExt}; use libhandy::ActionRow; use crate::shell::Shell; glib::wrapper! { pub struct UserSessionPage(ObjectSubclass) @extends gtk::Widget, gtk::Box; } impl Default for UserSessionPage { fn default() -> Self { Self::new() } } impl UserSessionPage { pub fn new() -> Self { Object::builder().build() } pub fn session(&self) -> SessionObject { let shell = Shell::default(); let session_idx = self.imp().row_sessions.selected_index() as u32; shell.sessions().unwrap() .item(session_idx) .clone() .and_downcast::() .unwrap() } pub fn username(&self) -> Option { self.imp() .box_users .selected_row() .and_then(|row| row.downcast_ref::().unwrap().subtitle()) .map(|str| str.to_string()) } } mod imp { use crate::dbus::accounts::AccountsProxy; use crate::session_object::SessionObject; use crate::shell::Shell; use crate::user::User; use crate::APP_ID; use futures_util::select; use futures_util::StreamExt; use glib::subclass::InitializingObject; use gtk::gio::{ListStore, Settings}; use gtk::glib::subclass::Signal; use gtk::glib::{clone, closure_local}; use gtk::prelude::*; use gtk::subclass::prelude::*; use gtk::{glib, CompositeTemplate, Image, ListBox, ListBoxRow}; use libhandy::prelude::*; use libhandy::ActionRow; use std::cell::{Cell, OnceCell}; use std::sync::OnceLock; use glib::{GString, Properties}; #[derive(CompositeTemplate, Default, Properties)] #[properties(wrapper_type = super::UserSessionPage)] #[template(resource = "/mobi/phosh/phrog/lockscreen-user-session.ui")] pub struct UserSessionPage { #[template_child] pub box_users: TemplateChild, #[template_child] pub row_sessions: TemplateChild, users: OnceCell, #[property(get, set)] ready: Cell, } #[glib::object_subclass] impl ObjectSubclass for UserSessionPage { const NAME: &'static str = "PhrogUserSessionPage"; type Type = super::UserSessionPage; type ParentType = gtk::Box; fn class_init(klass: &mut Self::Class) { Self::bind_template(klass); klass.set_css_name("phrog-user-session-page"); } fn instance_init(obj: &InitializingObject) { obj.init_template(); } } #[glib::derived_properties] impl ObjectImpl for UserSessionPage { fn constructed(&self) { self.parent_constructed(); let settings = Settings::new(APP_ID); let shell = Shell::default(); let conn = shell.imp().dbus_connection.clone().into_inner().unwrap(); self.box_users .connect_row_activated(clone!(@weak self as this => move |_, _| { this.obj().emit_by_name::<()>("login", &[]); })); self.row_sessions.bind_name_model( Some(shell.sessions().as_ref().unwrap()), Some(Box::new(|v| { v.downcast_ref::().unwrap().name() })), ); let mut last_session = settings.string("last-session"); if last_session.is_empty() { // No preference for a session exists, so let's default to Phosh. last_session = GString::from("phosh"); } for (idx, session) in shell.sessions() .as_ref().unwrap() .iter::() .flatten() .enumerate() { if session.id() == last_session { self.row_sessions.set_selected_index(idx as _); break; } } let users = ListStore::new::(); let last_user = settings.string("last-user"); self.box_users.bind_model(Some(&users), clone!(@weak self as this, @strong last_user => @default-panic, move |v| { let user = v.downcast_ref::().unwrap(); let row = ActionRow::builder().activatable(true).build(); user.bind_property("username", &row, "subtitle").build(); user.bind_property("name", &row, "title").build(); let image = Image::new(); row.add_prefix(&image); image.show(); user.bind_property("icon-pixbuf", &image, "pixbuf").build(); user.connect_closure("loaded", false, closure_local!(@strong this, @strong last_user, @strong row => move |obj: glib::Object| { if let Ok(user) = obj.downcast::() { if user.username() == last_user { this.box_users.select_row(Some(&row)); } } })); row.upcast() })); self.users.set(users.clone()).unwrap(); glib::spawn_future_local(clone!(@weak self as this, @strong last_user => async move { let accounts_proxy = AccountsProxy::new(&conn).await.unwrap(); for path in accounts_proxy.list_cached_users().await.unwrap() { users.append(&User::new(conn.clone(), path.into())); } // The initial user list has been populated. Select the first item in the list to // ensure something is selected. // This will be overridden by the "loaded" signal handler, if the appropriate user // matching the last-user setting was discovered. this.box_users.select_row( this .box_users .children() .first() .and_then(|v| v.downcast_ref::()), ); this.obj().set_ready(true); let mut added_stream = accounts_proxy.receive_user_added().await.unwrap(); let mut deleted_stream = accounts_proxy.receive_user_deleted().await.unwrap(); loop { select! { added = added_stream.next() => if let Some(added) = added { if let Some(path) = added.args().ok().map(|v| v.user) { users.append(&User::new(conn.clone(), path)); } }, deleted = deleted_stream.next() => if let Some(deleted) = deleted { if let Some(path) = deleted.args().ok().map(|v| v.user) { for (idx, user) in users.iter::().flatten().enumerate() { if user.path() == path.as_str() { users.remove(idx as _); break; } } } }, } } })); } fn signals() -> &'static [Signal] { static SIGNALS: OnceLock> = OnceLock::new(); SIGNALS.get_or_init(|| { vec![ Signal::builder("login").build(), ] }) } } impl WidgetImpl for UserSessionPage {} impl ContainerImpl for UserSessionPage {} impl BoxImpl for UserSessionPage {} } phrog-0.46.0/tests/000077500000000000000000000000001477005616000140705ustar00rootroot00000000000000phrog-0.46.0/tests/accent_colours.rs000066400000000000000000000014061477005616000174420ustar00rootroot00000000000000pub mod common; use gtk::glib; use libphosh::prelude::ShellExt; use common::*; use gtk::prelude::*; use std::time::Duration; #[test] fn test_accent_colours() { let mut test = test_init(None); test.shell.set_locked(true); let ready_rx = test.ready_rx.clone(); let if_settings = test.if_settings.clone(); test.start("accent-colours", glib::spawn_future_local(async move { let (_, _) = ready_rx.recv().await.unwrap(); glib::timeout_future(Duration::from_millis(1500)).await; for color in ["red", "slate", "pink", "teal", "red", "purple", "blue"] { if_settings.set_string("accent-color", color).unwrap(); glib::timeout_future(Duration::from_millis(500)).await; } fade_quit(); })); } phrog-0.46.0/tests/common/000077500000000000000000000000001477005616000153605ustar00rootroot00000000000000phrog-0.46.0/tests/common/dbus.rs000066400000000000000000000104251477005616000166650ustar00rootroot00000000000000use crate::common::SupervisedChild; use anyhow::Context; use std::path::{Path, PathBuf}; use std::process::Stdio; use std::time::{Duration, Instant}; use zbus::zvariant::ObjectPath; pub fn dbus_daemon(kind: &str, tmpdir: &Path) -> SupervisedChild { let config_path = tmpdir.join(format!("{}-dbus.xml", kind)); let sock_path = tmpdir.join(format!("{}.sock", kind)); let dbus_path = format!("unix:path={}", sock_path.display()); std::fs::write( &config_path, format!( r#" {} {} "#, kind, dbus_path ), ) .expect("failed to write dbus config"); std::env::set_var( format!("DBUS_{}_BUS_ADDRESS", kind.to_uppercase()), dbus_path, ); let child = std::process::Command::new("dbus-daemon") .arg(format!("--config-file={}", config_path.to_str().unwrap())) .stdout(Stdio::null()) .stdin(Stdio::null()) .stderr(Stdio::null()) .spawn() .expect("failed to launch dbus-daemon"); let start = Instant::now(); while !sock_path.exists() { if start.elapsed() > Duration::from_secs(5) { panic!("dbus-daemon failed to launch"); } std::thread::sleep(Duration::from_millis(50)); } SupervisedChild::new("dbus-daemon", child) } struct AccountsFixture { num_users: Option, } struct UserFixture { name: String, username: String, icon_file: String, } #[zbus::interface(name = "org.freedesktop.Accounts")] impl AccountsFixture { async fn list_cached_users(&self) -> Vec { let mut users = vec![ ObjectPath::from_static_str_unchecked("/org/freedesktop/Accounts/phoshi"), ObjectPath::from_static_str_unchecked("/org/freedesktop/Accounts/agx"), ObjectPath::from_static_str_unchecked("/org/freedesktop/Accounts/sam"), ]; if let Some(num_users) = self.num_users { users.truncate(num_users as _); } users } } impl UserFixture { fn new(name: &str, username: &str, icon_file: &str) -> Self { Self { name: name.into(), username: username.into(), icon_file: PathBuf::from(env!("CARGO_MANIFEST_DIR")) .join("tests/fixtures/") .join(icon_file) .display() .to_string(), } } } #[zbus::interface(name = "org.freedesktop.Accounts.User")] impl UserFixture { #[zbus(property)] async fn real_name(&self) -> &str { &self.name } #[zbus(property)] async fn user_name(&self) -> &str { &self.username } #[zbus(property)] async fn icon_file(&self) -> &str { &self.icon_file } } pub async fn run_accounts_fixture( connection: zbus::Connection, num_users: Option, ) -> anyhow::Result<()> { connection .object_server() .at("/org/freedesktop/Accounts", AccountsFixture { num_users }) .await .context("failed to serve org.freedesktop.Accounts")?; connection .object_server() .at( "/org/freedesktop/Accounts/agx", UserFixture::new("Guido", "agx", "guido.png"), ) .await .context("failed to serve org.freedesktop.Accounts.User")?; connection .object_server() .at( "/org/freedesktop/Accounts/phoshi", UserFixture::new("Phoshi", "phoshi", "phoshi.png"), ) .await .context("failed to serve org.freedesktop.Accounts.User")?; connection .object_server() .at( "/org/freedesktop/Accounts/sam", UserFixture::new("Sam", "samcday", "samcday.jpeg"), ) .await .context("failed to serve org.freedesktop.Accounts.User")?; connection .request_name("org.freedesktop.Accounts") .await .context("failed to request name")?; Ok(()) } phrog-0.46.0/tests/common/mod.rs000066400000000000000000000231151477005616000165070ustar00rootroot00000000000000pub mod dbus; pub mod virtual_keyboard; pub mod virtual_pointer; use crate::common::virtual_keyboard::VirtualKeyboard; use async_channel::Receiver; use glib::{JoinHandle, Object, g_critical, spawn_future_local}; use greetd_ipc::AuthMessageType::Secret; use greetd_ipc::codec::SyncCodec; use greetd_ipc::{Request, Response}; use gtk::gio::{ListStore, Settings}; use gtk::glib::{clone, timeout_add_once}; use gtk::prelude::*; use gtk::{Button, Grid, Revealer}; use libhandy::Carousel; use libphosh::WallClock; use libphosh::prelude::ShellExt; use libphosh::prelude::WallClockExt; use phrog::lockscreen::Lockscreen; use phrog::session_object::SessionObject; use phrog::shell::Shell; use phrog::supervised_child::SupervisedChild; use std::env::temp_dir; use std::os::unix::net::UnixListener; use std::path::PathBuf; use std::process::Stdio; use std::sync::Arc; use std::sync::atomic::{AtomicBool, Ordering}; use std::time::{Duration, SystemTime, UNIX_EPOCH}; use tempfile::TempDir; pub use virtual_pointer::VirtualPointer; #[allow(dead_code)] pub struct Test { pub session_dbus_conn: zbus::Connection, system_dbus_conn: zbus::Connection, pub if_settings: Settings, pub logged_in: Arc, pub ready_called: Arc, pub ready_rx: Receiver<(VirtualPointer, VirtualKeyboard)>, recording: Option, pub shell: Shell, system_dbus: SupervisedChild, session_dbus: SupervisedChild, tmp: TempDir, wall_clock: WallClock, } impl Test { pub fn start(&mut self, name: &str, jh: JoinHandle<()>) { if let Ok(base_path) = std::env::var("RECORD_TESTS") { if let Ok(child) = std::process::Command::new("wf-recorder") .arg("-f") .arg(PathBuf::from(base_path).join(format!("{}.mp4", name))) .stdout(Stdio::null()) .stdin(Stdio::null()) .stderr(Stdio::null()) .spawn() { self.recording = Some(SupervisedChild::new("wf-recorder", child)); } } let timed_out = Arc::new(AtomicBool::new(false)); timeout_add_once( Duration::from_secs(60), clone!(@strong timed_out => move || { timed_out.store(true, Ordering::SeqCst); g_critical!("phrog", "Test timed out!"); gtk::main_quit(); }), ); let failed = Arc::new(AtomicBool::new(false)); spawn_future_local(clone!(@strong failed => async move { if jh.await.is_err() { g_critical!("phrog", "Test failed!"); gtk::main_quit(); failed.store(true, Ordering::SeqCst); } })); gtk::main(); assert!(!timed_out.load(Ordering::SeqCst)); assert!(!failed.load(Ordering::SeqCst)); assert!(self.ready_called.load(Ordering::Relaxed)); } } #[derive(Default)] pub struct TestOptions { pub num_users: Option, pub sessions: Option>, pub last_user: Option, pub last_session: Option, pub first_run: Option, } pub fn test_init(options: Option) -> Test { std::env::set_var("GSETTINGS_BACKEND", "memory"); let tmp = tempfile::tempdir().unwrap(); let system_dbus = dbus::dbus_daemon("system", tmp.path()); let session_dbus = dbus::dbus_daemon("session", tmp.path()); phrog::init().unwrap(); if let Some(ref options) = options { let phrog_settings = Settings::new("mobi.phosh.phrog"); phrog_settings .set_string( "last-user", &options.last_user.clone().unwrap_or(String::new()), ) .unwrap(); phrog_settings .set_string( "last-session", &options.last_session.clone().unwrap_or(String::new()), ) .unwrap(); phrog_settings .set_string( "first-run", &options.first_run.clone().unwrap_or(String::new()), ) .unwrap(); } let if_settings = Settings::new("org.gnome.desktop.interface"); // use a more appropriate (moar froggy) accent color if_settings.set_string("accent-color", "green").unwrap(); let num_users = options.as_ref().and_then(|opts| opts.num_users); let (system_dbus_conn, session_dbus_conn) = async_global_executor::block_on(async move { let system = zbus::Connection::system() .await .expect("failed to connect to system bus"); dbus::run_accounts_fixture(system.clone(), num_users) .await .unwrap(); let session = zbus::Connection::session() .await .expect("failed to connect to session bus"); (system, session) }); let logged_in = Arc::new(AtomicBool::new(false)); fake_greetd(&logged_in); let mut shell_builder = Object::builder(); let sessions_store = ListStore::new::(); sessions_store.extend_from_slice(&options.and_then(|opts| opts.sessions.clone()).unwrap_or( vec![ SessionObject::new("gnome", "GNOME", "", "", ""), SessionObject::new("phosh", "Phosh", "", "", ""), ], )); shell_builder = shell_builder.property("sessions", sessions_store); let wall_clock = WallClock::new(); wall_clock.set_default(); let shell: Shell = shell_builder.build(); shell.set_default(); let ready_called = Arc::new(AtomicBool::new(false)); let ready_called2 = ready_called.clone(); let (ready_tx, ready_rx) = async_channel::bounded(1); shell.connect_ready(clone!(@strong ready_called2 => move |shell| { ready_called2.store(true, Ordering::Relaxed); let (_, _, width, height) = shell.usable_area(); let vp = VirtualPointer::new(wayland_client::Connection::connect_to_env().unwrap(), width as _, height as _); let kb = VirtualKeyboard::new(wayland_client::Connection::connect_to_env().unwrap()); ready_tx.send_blocking((vp, kb)).expect("notify ready failed"); })); Test { system_dbus_conn, session_dbus_conn, if_settings, logged_in, ready_called, ready_rx, recording: None, shell, system_dbus, session_dbus, tmp, wall_clock, } } pub fn fake_greetd(logged_in: &Arc) { let path = temp_dir().join(format!( ".phrog-test-greetd-{}.sock", SystemTime::now() .duration_since(UNIX_EPOCH) .unwrap() .as_secs() )); std::env::set_var("GREETD_SOCK", &path); std::thread::spawn(clone!(@strong logged_in => move || { let listener = UnixListener::bind(&path).unwrap(); loop { let (mut stream, _addr) = listener .accept() .expect("failed to accept greetd connection"); match Request::read_from(&mut stream).unwrap() { Request::CreateSession { .. } => Response::AuthMessage { auth_message_type: Secret, auth_message: "Password:".to_string(), } .write_to(&mut stream) .unwrap(), req => panic!("wrong request: {:?}", req), } match Request::read_from(&mut stream).unwrap() { Request::PostAuthMessageResponse { response: Some(password), } => { assert_eq!(password, "0451"); Response::Success.write_to(&mut stream).unwrap(); } req => panic!("wrong request: {:?}", req), } match Request::read_from(&mut stream).unwrap() { Request::StartSession { .. } => { Response::Success.write_to(&mut stream).unwrap(); logged_in.store(true, Ordering::Relaxed); } req => panic!("wrong request: {:?}", req), } } })); } pub fn get_lockscreen_bits(lockscreen: &mut Lockscreen) -> (Grid, Button) { // Here we do some yucky traversal of the UI structure in phosh/src/ui/lockscreen.ui in the // name of "art". We drill through to find the keypad, and then pick out the individual // digits + submit button to drive the UI interactions entirely via mouse. // This looks nice for the video recording. let carousel = lockscreen.child().unwrap().downcast::().unwrap(); let keypad_page = carousel .children() .get(2) .unwrap() .clone() .downcast::() .unwrap(); let keypad_revealer = keypad_page .children() .get(2) .unwrap() .clone() .downcast::() .unwrap(); let keypad = keypad_revealer.child().unwrap().downcast::().unwrap(); let submit_box = keypad_page .children() .get(3) .unwrap() .clone() .downcast::() .unwrap(); let submit_btn = submit_box .children() .first() .unwrap() .clone() .downcast::