Add Project Tracker desklet#1845
Conversation
Desktop widget to track VS Code projects. Shows last edited time, git stats (commits, repo size, last commit), pinning, scrollable list, and full color customization via settings.
Best-practices scannerThis is a regex-based check for API usage that can pose security, performance or This check is not perfect and will not replace a normal review.Found 22 potential issue(s):
|
Each source can be enabled/disabled independently in settings. Projects are deduplicated across editors.
Best-practices scannerThis is a regex-based check for API usage that can pose security, performance or This check is not perfect and will not replace a normal review.Found 25 potential issue(s):
|
- Replace GLib.spawn_command_line_sync with Gio.Subprocess (argv-style) - Replace GLib.file_test + file_get_contents with Gio.File.load_contents - Replace file_test existence checks with query_info try/catch - Use GLib.get_user_config_dir() instead of hardcoded .config paths - Replace deprecated Lang.bind with Function.prototype.bind - Use Gio.Subprocess.new for async launch instead of spawn_command_line_async - Remove unused Lang import
Best-practices scannerThis is a regex-based check for API usage that can pose security, performance or This check is not perfect and will not replace a normal review.Found 7 potential issue(s):
|
The desklet caused Cinnamon to freeze video playback for ~1 second on every refresh tick. Three causes, all fixed: 1. Synchronous subprocess spawns. Each refresh ran up to 41 spawn_command_line_sync calls (find + 4 git/du per project x 10). Each one blocked the JS thread — which is also the compositor thread — until the subprocess exited. Replaced with a Gio.Subprocess communicate_utf8_async helper so all spawns are non-blocking. 2. Synchronous workspaceStorage scan. file_get_contents + JSON.parse + query_info per workspace.json (often 50-100 entries) ran on the main thread. Converted to load_contents_async + query_info_async, yielding via Mainloop.idle_add between entries. 3. Widget churn. Every refresh called destroy_all_children on the row container and rebuilt ~80 St widgets, each with a CSS-parsed inline style. Restructured into an ensureShell + buildRow + updateRow pattern: row widgets are created once and refreshes only mutate label text in place. Also added an mtime-keyed cache so unchanged projects skip the 4 subprocess calls on subsequent refreshes. Default refresh bumped from 120s to 600s — frequent refresh is no longer needed now that updates are cheap.
New Desklet: Project Tracker
Desktop widget to track your VS Code projects at a glance.
Features
Screenshot
Settings