Skip to content

Logitech device configuration daemon for Linux - DPI, SmartShift, button remapping, hi-res scrolling via HID++ protocol. Rust rewrite of logiops.

Notifications You must be signed in to change notification settings

aydiler/logiops-rs

Repository files navigation

logiops-rs

CI Crates.io Crates.io Downloads AUR version Snap GitHub stars License: GPL-2.0

A Rust rewrite of logiops, a daemon for configuring Logitech mice and keyboards on Linux via the HID++ protocol.

logiops-rs GUI

Features

  • DPI Configuration - Set mouse sensitivity with slider or exact values
  • SmartShift - Configure scroll wheel auto-shift between ratchet and free-spin modes
  • Hi-Res Scrolling - Enable high-resolution scroll wheel mode
  • Thumb Wheel - Configure thumb wheel behavior (MX Master series)
  • Button Remapping - Remap mouse buttons to keyboard keys or actions
  • Battery Monitoring - View battery level and charging status
  • D-Bus Interface - Control devices programmatically via org.logiops.Manager1
  • GUI Application - Native egui desktop app for easy configuration
  • KDE Plasma Integration - Automatic scroll factor setting for Wayland

Supported Devices

Any Logitech device supporting HID++ 2.0 protocol should work, including:

  • MX Master 3 / 3S
  • MX Anywhere 3
  • MX Ergo
  • G502 / G502 HERO
  • G Pro series
  • And many more...

Note: Bluetooth connections have limited support due to Linux kernel driver conflicts. Use USB (direct or via Unifying/Bolt receiver) for full functionality.

Installation

From crates.io

cargo install logiops-daemon

From Source

# Build
cargo build --release

# Install daemon and system files
sudo cp target/release/logiops /usr/bin/
sudo cp data/dbus/org.logiops.conf /usr/share/dbus-1/system.d/
sudo cp data/systemd/logiops.service /etc/systemd/system/
sudo cp data/udev/99-logiops.rules /etc/udev/rules.d/

# Reload and start
sudo systemctl daemon-reload
sudo udevadm control --reload-rules
sudo systemctl enable --now logiops

# Optional: Install GUI
sudo cp target/release/logiops-gui /usr/bin/

Arch Linux (AUR)

# Stable release
yay -S logiops-rs

# Development version (git)
yay -S logiops-rs-git

Snap

sudo snap install logiops-rs

Configuration

Configuration uses TOML format at /etc/logiops/config.toml or ~/.config/logiops/config.toml:

[[devices]]
name = "MX Master 3S"
dpi = 1600

[devices.smartshift]
on = true
threshold = 30
torque = 50

[devices.hiresscroll]
hires = true
invert = false

[devices.thumbwheel]
divert = false
invert = false

# Button remapping
[[devices.buttons]]
cid = 0x00c3  # Gesture button
action = { type = "keypress", keys = ["KEY_LEFTMETA"] }

[[devices.buttons]]
cid = 0x00c4  # Thumb button
action = { type = "cycledpi", dpis = [800, 1600, 3200] }

KDE Plasma Wayland Scroll Fix

KDE Plasma on Wayland has a bug where scroll settings don't apply to hotplugged devices. logiops-rs can set the scroll factor automatically:

[[devices]]
name = "MX Master 3S"
kwin_scroll_factor = 1.8  # Applied via KWin D-Bus on device connect

Usage

Daemon

# Start via systemd (recommended)
sudo systemctl start logiops

# Or run directly
sudo logiops

# With debug logging
RUST_LOG=debug sudo logiops

GUI

The GUI connects to the daemon via D-Bus and doesn't need root privileges:

logiops-gui

D-Bus Interface

# List devices
busctl call org.logiops /org/logiops/Manager org.logiops.Manager1 ListDevices

# Get device info
busctl call org.logiops /org/logiops/Manager org.logiops.Manager1 GetDeviceInfo s "MX Master 3S"

# Set DPI
busctl call org.logiops /org/logiops/Manager org.logiops.Manager1 SetDpi sq "MX Master 3S" 1600

# Reload configuration
busctl call org.logiops /org/logiops/Manager org.logiops.Manager1 ReloadConfig

Migrating from C++ logiops

See the Migration Guide for converting your existing libconfig++ configuration to TOML format.

Documentation

Building

Requirements

  • Rust 1.82+
  • Linux with hidraw support

Build Commands

cargo build --release                    # Build all
cargo build -p logiops-daemon            # Build daemon only
cargo build -p logiops-gui               # Build GUI only
cargo test --lib                         # Run tests
cargo clippy -- -D warnings              # Lint

License

GPL-2.0 (matching original logiops)

Credits

  • logiops - Original C++ implementation
  • Solaar - HID++ protocol reference
  • libratbag - Device database reference

About

Logitech device configuration daemon for Linux - DPI, SmartShift, button remapping, hi-res scrolling via HID++ protocol. Rust rewrite of logiops.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •