Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 49 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true

env:
CCACHE_DIR: ${{ github.workspace }}/.ccache
CCACHE_MAXSIZE: 500M

jobs:
ubuntu-build:
name: Ubuntu build and tests
Expand All @@ -22,26 +26,39 @@ jobs:
- name: Check out source
uses: actions/checkout@v4

- name: Restore compiler cache
uses: actions/cache@v4
with:
path: .ccache
key: ${{ runner.os }}-${{ github.job }}-ccache-${{ github.sha }}
restore-keys: |
${{ runner.os }}-${{ github.job }}-ccache-

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
build-essential \
ccache \
cmake \
ninja-build \
libx11-dev \
libssl-dev \
pkg-config \
zlib1g-dev

- name: Configure
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
run: cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER_LAUNCHER=ccache

- name: Build
run: cmake --build build --parallel

- name: Test
run: ctest --test-dir build --output-on-failure

- name: Compiler cache stats
run: ccache --show-stats

fedora-build:
name: Fedora build and tests
runs-on: ubuntu-latest
Expand All @@ -55,32 +72,39 @@ jobs:
- name: Check out source
uses: actions/checkout@v4

- name: Restore compiler cache
uses: actions/cache@v4
with:
path: .ccache
key: ${{ runner.os }}-${{ github.job }}-ccache-${{ github.sha }}
restore-keys: |
${{ runner.os }}-${{ github.job }}-ccache-

- name: Install dependencies
run: |
dnf install -y \
ccache \
cmake \
gcc-c++ \
gtk3-devel \
libayatana-appindicator3-devel \
libX11-devel \
make \
ninja-build \
openssl-devel \
pkgconf-pkg-config \
rpm-build \
systemd-rpm-macros \
zlib-devel

- name: Validate RPM packaging skeleton
run: MWB_VALIDATE_RPM_BUILD=1 scripts/validate-rpm-packaging.sh

- name: Configure
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release

- name: Build
run: cmake --build build --parallel
- name: Validate RPM packaging, build, and tests
run: |
MWB_VALIDATE_RPM_BUILD=1 \
MWB_RPM_CMAKE_EXTRA_ARGS="-G Ninja -DCMAKE_CXX_COMPILER_LAUNCHER=ccache" \
scripts/validate-rpm-packaging.sh

- name: Test
run: ctest --test-dir build --output-on-failure
- name: Compiler cache stats
run: ccache --show-stats

sanitizers:
name: ASan and UBSan
Expand All @@ -90,26 +114,39 @@ jobs:
- name: Check out source
uses: actions/checkout@v4

- name: Restore compiler cache
uses: actions/cache@v4
with:
path: .ccache
key: ${{ runner.os }}-${{ github.job }}-ccache-${{ github.sha }}
restore-keys: |
${{ runner.os }}-${{ github.job }}-ccache-

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
build-essential \
ccache \
cmake \
ninja-build \
libx11-dev \
libssl-dev \
pkg-config \
zlib1g-dev

- name: Configure
run: cmake -S . -B build-sanitize -DCMAKE_BUILD_TYPE=Debug -DMWB_ENABLE_SANITIZERS=ON
run: cmake -S . -B build-sanitize -G Ninja -DCMAKE_BUILD_TYPE=Debug -DMWB_ENABLE_SANITIZERS=ON -DCMAKE_CXX_COMPILER_LAUNCHER=ccache

- name: Build
run: cmake --build build-sanitize --parallel

- name: Test
run: ctest --test-dir build-sanitize --output-on-failure

- name: Compiler cache stats
run: ccache --show-stats

static-checks:
name: Static checks
runs-on: ubuntu-latest
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,9 @@ User-facing beta operations:
This repository started as a fork of [chrischip/mwb-client-linux](https://github.com/chrischip/mwb-client-linux) and has been substantially expanded with service management, rich clipboard support, and recovery tooling.

### Configuration (`config.ini`)
Supports `key_file`, `key_secret_id` (keyring), `screen_width/height` overrides, `topology_enabled`, `topology_file`, experimental `android_peers_enabled`, and more. Default path: `~/.config/mwb-client/config.ini`.
Supports `connection_mode`, `key_file`, `key_secret_id` (keyring), `screen_width/height` overrides, `topology_enabled`, `topology_file`, experimental `android_peers_enabled`, and more. Default path: `~/.config/mwb-client/config.ini`.

`connection_mode=powertoys` is the default Windows PowerToys/MWB compatibility path. `connection_mode=inputflow` runs native InputFlow peer services without requiring a Windows host/key. `connection_mode=hybrid` enables both paths at once.

Display-level topology is a separate opt-in contract. The default runtime remains MWB-compatible machine placement unless topology is explicitly enabled; see [docs/topology.md](docs/topology.md) for examples, wrap policies, validation, and cross-machine handoff behavior.

Expand Down
3 changes: 2 additions & 1 deletion docs/android.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ InputFlow can expose an experimental Android controlled-peer relay. The Linux cl
Add these keys to `~/.config/mwb-client/config.ini`:

```ini
connection_mode=hybrid
android_peers_enabled=true
android_relay_port=15102
android_relay_secret=replace-with-a-long-random-secret
Expand All @@ -16,7 +17,7 @@ android_capture_backend=none

Then enable topology and add a machine/display whose machine id matches `android_peer_name`. When a cross-machine topology edge targets that machine, InputFlow forwards mouse events to Android. Keyboard events follow while the Android relay is active.

The relay is disabled by default. If `android_relay_secret` is empty, the relay does not start.
The relay is disabled by default. If `android_relay_secret` is empty, the relay does not start. Use `connection_mode=inputflow` for Android-only testing without a Windows PowerToys host, or `connection_mode=hybrid` when Windows and Android should both be active.

`android_capture_backend` controls Linux-local physical mouse capture:

Expand Down
8 changes: 8 additions & 0 deletions docs/compatibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@ InputFlow is a native Linux peer for Microsoft PowerToys Mouse Without Borders (
| Network trust model | Trusted LAN/subnet | Use on a trusted local network. Do not expose MWB ports to untrusted networks or the public internet. |
| Display-level topology config | Opt-in | The contract is documented in [Topology Config Contract](topology.md), and the default runtime remains MWB-compatible machine placement unless topology is enabled. |

## Connection Modes

`connection_mode=powertoys` is the default compatibility mode. It requires a Windows host plus one security-key source and runs the PowerToys/MWB socket protocol.

`connection_mode=inputflow` disables the PowerToys transport and runs native InputFlow peer services only. In the current beta, that mainly means Android relay/local capture paths; Linux-to-Linux native peer transport is still future work.

`connection_mode=hybrid` runs both. Use it when this Linux host should stay paired to Windows PowerToys while also exposing InputFlow-native peers such as Android.

## Linux Session Details

X11 is the simpler path because clipboard helpers and desktop automation policy are more predictable. Wayland can work, but compositor policy matters: even with `/dev/uinput` access, the compositor or desktop environment may restrict, gate, or prompt around synthetic input behavior.
Expand Down
Loading