[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-82669":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":8,"htmlUrl":8,"language":9,"languages":8,"totalLinesOfCode":8,"stars":10,"forks":11,"watchers":12,"openIssues":13,"contributorsCount":13,"subscribersCount":13,"size":13,"stars1d":13,"stars7d":14,"stars30d":15,"stars90d":13,"forks30d":13,"starsTrendScore":12,"compositeScore":16,"rankGlobal":8,"rankLanguage":8,"license":17,"archived":18,"fork":18,"defaultBranch":19,"hasWiki":20,"hasPages":18,"topics":21,"createdAt":8,"pushedAt":8,"updatedAt":22,"readmeContent":23,"aiSummary":24,"trendingCount":13,"starSnapshotCount":13,"syncStatus":25,"lastSyncTime":26,"discoverSource":27},82669,"BlinkenDisk","davepl\u002FBlinkenDisk","davepl",null,"Swift",116,5,1,0,10,15,45.83,"Other",false,"main",true,[],"2026-06-12 04:01:38","# BlinkenDisk\n\nA tiny macOS utility that puts a red LED in your menu bar and lights it up\nwhenever there's I\u002FO activity on the local drives you choose to monitor.\n\nIt's the modern-era equivalent of the activity light on the front of an old\ndesktop tower.\n\n## Features\n\n- **Menu bar LEDs.** Lives in the menu bar (\"clock bar\"), not as a floating\n  window — though it's a normal `NSStatusItem`, so it behaves like any other\n  menu-bar utility. Each monitored drive gets its own LED.\n- **Realistic LED.** Drawn as a small dome with a specular highlight; \"off\"\n  is a dim tinted state so you can always see where the indicator is.\n- **Small status menu.** Click any LED to open a menu with Settings... and\n  Quit BlinkenDisk. Settings opens a window with a grid of local block-storage\n  devices.\n- **Per-drive selection.** The settings grid lets you enable each drive and\n  choose its LED color; each LED's tooltip shows its drive name.\n- **Per-drive ordering.** Drag rows in the settings grid to control the order\n  of the menu-bar LEDs.\n- **Configurable flash duration.** Default 10 ms.\n- **Per-drive LED color.** Choose red, green, yellow, amber, or blue for each\n  monitored drive.\n- **No Dock icon, no menu bar of its own.** Built as an `LSUIElement` agent app.\n- **Persistent.** Your drive selections, LED colors, order, and chosen duration survive restarts\n  (stored in `~\u002FLibrary\u002FPreferences\u002Flocal.blinkendisk.plist` once installed).\n\n## Requirements\n\n- macOS 12 (Monterey) or later\n- Xcode 14+ command line tools (`xcode-select --install`) — the Swift toolchain\n  is what builds it; you don't need the full Xcode IDE.\n\n## License\n\nBlinkenDisk is licensed for personal, non-commercial use only. Commercial use,\norganizational use, and commercial redistribution require prior written\npermission. See [LICENSE](LICENSE) for the full terms and warranty disclaimers.\n\n## Build\n\nFrom the project directory:\n\n```sh\n.\u002Fbuild.sh\n```\n\nThis runs `swift build -c release` and assembles `BlinkenDisk.app`. Then:\n\n```sh\nopen BlinkenDisk.app\n```\n\n…or just double-click it in Finder. Move it to `\u002FApplications` if you want it\nto live there. To launch on login, drag it into **System Settings → General →\nLogin Items**.\n\nTo reset saved drive selections, colors, order, and duration:\n\n```sh\nopen BlinkenDisk.app --args \u002Freset\n```\n\n### Quick run without bundling\n\nIf you just want to try it without making a `.app`:\n\n```sh\nswift run -c release BlinkenDisk\n```\n\nThe accessory activation policy is set in code, so you still won't get a Dock\nicon — but you'll need to keep the terminal open, and `Cmd-Tab` may briefly\nshow the binary on launch. The proper `.app` is cleaner.\n\n## How it works\n\n- A Foundation `Timer` polls every **50 ms**.\n- For each monitored disk it reads the `Statistics` dictionary from the\n  matching `IOBlockStorageDriver` IOKit service (cumulative `Bytes (Read)`,\n  `Bytes (Write)`, `Operations (Read)`, `Operations (Write)`).\n- If any counter changed since the previous sample, that drive's LED is set to \"on\"\n  and an off-timer is scheduled for the configured duration. Sustained I\u002FO\n  keeps rescheduling that timer, so the LED stays solidly lit during heavy\n  activity and flickers briefly during small bursts.\n- Drive list is built by iterating `IOBlockStorageDriver` services; this\n  covers the whole disk (e.g. `disk0`), so all of its partitions are included\n  by monitoring the disk once. Human-readable names come from DiskArbitration\n  (`DADiskCopyDescription`).\n\n### A note on short flashes\n\n10 ms is below one frame at 60 Hz (~16.7 ms), so the LED is *programmatically*\non for the configured duration but the **visible** flash is floored by your\ndisplay's refresh rate. On a 120 Hz ProMotion display the floor is ~8 ms;\neither way you'll always see at least one frame of red for every detected\nsample.\n\n## Project layout\n\n```\nBlinkenDisk\u002F\n├── Package.swift\n├── build.sh                                  ← builds and bundles BlinkenDisk.app\n├── README.md\n└── Sources\u002FBlinkenDisk\u002F\n    ├── main.swift                            ← entry point\n    ├── AppDelegate.swift\n    ├── StatusController.swift                ← NSStatusItem, polling\n    ├── SettingsWindowController.swift        ← settings dialog\n    ├── DiskMonitor.swift                     ← IOKit + DiskArbitration\n    └── LEDRenderer.swift                     ← draws the LED\n```\n\n## Limitations \u002F things you might want to add\n\n- Whole disks only (e.g. `disk0`), not individual partitions. The IOKit\n  statistics are exposed at the `IOBlockStorageDriver` level which sits above\n  the partition map, so this is the natural granularity. Per-volume monitoring\n  would need a different data source (e.g. parsing `iostat` or `fs_usage`).\n- No separate read\u002Fwrite indication. Easy to add: render two LEDs (green for\n  read, red for write) by comparing `bytesRead` and `bytesWritten` deltas\n  separately in `StatusController.poll()`.\n- Network volumes don't show up — they're not block-storage drivers.\n","BlinkenDisk 是一个 macOS 小工具，它在菜单栏中添加了一个红色 LED 指示灯，当所选本地磁盘有 I\u002FO 活动时会点亮。该项目采用 Swift 语言开发，其核心功能包括：为每个被监控的驱动器提供独立的 LED 灯、支持自定义 LED 颜色和闪烁持续时间、以及通过简单的设置界面调整驱动器的选择与排序。BlinkenDisk 适用于需要直观了解硬盘活动状态的用户，如开发者或系统管理员，在日常使用或调试过程中帮助快速识别磁盘活跃情况。",2,"2026-06-11 04:08:54","CREATED_QUERY"]