Uses 911K of libraries. Click here for Pure Java version (5084L/25K).
!7 cmodule FreeDiskSpaceTrayIcon > DynBigNumber { switchable bool inGigabytes = true; transient JLabel lbl; start { setDescription("FREE DISK"); dm_addTrayIcon(onLeftClick(rThread dm_showModule, lbl = jlabel())); componentPopupMenuItems(lbl, "Show Module", rThread dm_showModule, "Remove", rThread dm_deleteModule); doEveryAndNow(5000, r actualUpdate); } void actualUpdate { //time "FDS" { // 0-1 ms setValue(str_toGBorMB(inGigabytes, freeDiskSpace())); setText(lbl, "[" + value + "]"); toolTip(lbl, "Free space on home partition: " + value); //} } }
Began life as a copy of #1016860
download show line numbers debug dex old transpilations
Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1025678 |
| Snippet name: | Free Disk Space Tray Icon [checks home partition] |
| Eternal ID of this version: | #1025678/6 |
| Text MD5: | f4f2e03a6ea9612874d6493984406bb5 |
| Transpilation MD5: | ed8ce40808bb385e8d516329e6c39bf2 |
| Author: | stefan |
| Category: | javax / modules |
| Type: | JavaX source code (Dynamic Module) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2019-10-13 18:34:48 |
| Source code size: | 643 bytes / 23 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 414 / 566522 |
| Version history: | 5 change(s) |
| Referenced in: | [show references] |