Frontlight API#
Note
The Frontlight API is only available on devices with a frontlight (reMarkable Paper Pro and reMarkable Paper Pro Move).
Name |
Specification |
Description |
|---|---|---|
brightness |
|
Current frontlight
brightness level.
Range is |
hasFrontlight |
|
Whether the device has a frontlight. |
extraBrightness |
|
Whether extra brightness mode is enabled. |
brightnessChanged |
signal
|
Signal sent when the brightness has changed. |
extraBrightnessChanged |
signal
|
Signal sent when the extraBrightness has changed. |
Note
All methods and property writes on the Frontlight API require the
frontlight permission.
Example Usage#
#include <liboxide/dbus.h>
using namespace codes::eeems::oxide1;
int main(int argc, char* argv[]){
QCoreApplication app(argc, argv);
auto bus = QDBusConnection::systemBus();
General api(OXIDE_SERVICE, OXIDE_SERVICE_PATH, bus);
qDebug() << "Requesting frontlight API...";
QDBusObjectPath path = api.requestAPI("frontlight");
if(path.path() == "/"){
qDebug() << "Unable to get frontlight API";
return EXIT_FAILURE;
}
qDebug() << "Got the frontlight API!";
Frontlight frontlight(OXIDE_SERVICE, path.path(), bus);
if(!frontlight.hasFrontlight()){
qDebug() << "Device does not have a frontlight";
return EXIT_FAILURE;
}
qDebug() << "Current brightness:" << frontlight.brightness();
frontlight.setBrightness(50);
return app.exec();
}
#!/bin/bash
echo "Current brightness:"
rot frontlight get brightness
echo "Setting brightness to 50:"
rot frontlight set brightness 50