Warning: session_start(): open(/var/lib/php/sessions/sess_tf4snej6vtdga09nbldvcb8g1m, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
!7
cmodule BatteryTrayIcon > DynPrintLog {
transient S value;
transient JLabel lbl;
transient bool _startMinimized = true;
switchable double interval = 10.0; // restart to take effect
transient double level;
start {
dm_addTrayIcon(onLeftClick(rThreadEnter dm_showModule,
lbl = dm_fieldLabel_noAutoToolTip value()));
doEveryAndNow(interval, r actualUpdate);
dm_registerAs_direct batteryLevel();
}
void actualUpdate {
S value = "-";
level = oshi_batteryLevel_withZeroPercentFix();
if (!isNaN(level)) value = iround(level) + "%";
if (set_trueIfChanged(this, +value))
fireChangeWithoutPersisting();
toolTip(lbl, "Battery level: " + value);
}
}