!7 set flag OshiNotSticky. cmodule MemoryTrayIcon > DynPrintLog { transient S value; // OS size in MB + free memory transient JLabel lbl; transient bool _startMinimized = true; switchable bool countSwap = true; transient long processSize; start { dm_addTrayIcon(onLeftClick(rThread dm_verboseGC, lbl = dm_fieldLabel_noAutoToolTip('value))); componentPopupMenuItems(lbl, "Garbage Collect", rThread { dm_gc(); actualUpdate(); }, "Show Module", rThread dm_showModule, "Remove", rThread dm_deleteModule); doEveryAndNow(10.0, r actualUpdate); dm_registerAs_direct processSize(); } void actualUpdate { processSize = oshi_currentProcessResidentSize(); long mb = toM(processSize); GlobalMemory mem = oshi_systemMemory(); long mb2 = freeSystemMemory(mem); if (countSwap) mb2 -= mem.getSwapUsed(); mb2 = toM(mb2); if (set_trueIfChanged(this, value := mb + " / " + mb2)) fireChangeWithoutPersisting(); toolTip(lbl, "OS size in memory: " + mb + " MB, free system memory: " + mb2 + " MB"); } }