/tablet-assist

Tablet-mode assistance for convertible laptops.

Primary LanguageRust

Tablet-mode assistance

github MIT CI

This software intended to support convertible and tablet devices with Linux. Current status still work-in-progress but main features already implemented.

Packages

  • tablet-assist-service - system service which interacts with hardware (tablet switch and accelerometer sensors) and provides D-Bus properties to be able detect current device usage
  • tablet-assist-agent - user session service which configures screen orientation and input devices according to settings and current device usage
  • tablet-assist-ui - simple GTK-based UI to interact with agent for switching modes and configuring

Service

Features:

  • Support for Libinput tablet-mode switches
  • Support for Industrial IO accelerometers
  • Support tablet-mode detection using two accelerometers

System D-Bus service properties:

  • HasTabletMode - tablet-mode detection supported by service
    • true - detection supported
    • false - detection not supported
  • TabletMode - detected mode
    • true - currently in tablet mode
    • false - currently in laptop mode
  • HasOrientation - screen orientation detection supported by service
    • true - detection supported
    • false - detection not supported
  • Orientation - detected orientation
    • top-up
    • bottom-up
    • left-up
    • right-up

Agent

Features:

  • Enabling/disabling input devices when tablet-mode switched
  • Changing screen orientation when orientation changed
  • Auto and manual tablet-mode switching
  • Auto and manual screen orientation changing

UI

  • Tray indicator for quick controls
  • Input devices configuration dialog

Installation

Service

cargo build --release -p tablet-assist-service
cp target/release/tablet-assist-service /usr/sbin
cp data/tablet-assist.service /usr/lib/systemd/system
cp data/tablet.assist.Service.conf /usr/share/dbus-1/system.d
cp data/tablet.assist.Service.service /usr/share/dbus-1/system-services

Agent

cargo build --release -p tablet-assist-agent
cp target/release/tablet-assist-agent /usr/sbin
cp data/tablet-assist-agent.service /usr/share/systemd/user
cp data/tablet.assist.Agent.service /usr/share/dbus-1/services

UI

cargo build --release -p tablet-assist-ui
cp target/release/tablet-assist-ui /usr/bin
cp data/tablet-assist.desktop /etc/xdg/autostart

Supported devices

  • Lenovo ThinkPad X1
    • Gen4 (tested)
  • Teclast F5

Welcome for issues and PRs with support for other devices!