Finally ditched LogiOptions and went with BBT configuration. Super happy so far, it's more responsive and introduces way more flexibility.
The only thing that I'm missing is a way to check the battery of the mouse. I'm connected via the 2.4GHz dongle so no bluetooth reporting.
Is it possible or something it could be implemented?
How do you want to show it? You could e.g. create some trigger and assign the predefined action "Run Real JavaScript" with this script (change the mouse name at the top). It will display a notification with the battery state once triggered:
async function checkBattery() {
const deviceName = "MX Master 4";
const battery = await logitech_get_battery_status({ deviceName });
if (battery.error) return `Error: ${battery.error}`;
// Use BTT to show a notification
await trigger_action({
json: JSON.stringify({
BTTPredefinedActionType: 371, // Show Notification
BTTAdditionalActionData: {
BTTActionSendNotificationTitle: "Mouse Battery",
BTTActionSendNotificationMessage: `${deviceName}: ${battery.level}%`
}
})
});
return `${deviceName}: ${battery.level}% (${battery.status})`;
}
You could also put the battery state in some menu bar item or floating menu - really depends on what you like
It works wonderfully. Thanks a lot.
Not sure how to put the battery state as text on a floating menu item. Any pointers?