experiments in a post-browser web
10
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat(hud): implement basic mode-aware HUD extension

- Always-on-top overlay showing mode, IZUI state, window info
- Toggle with 'hud' command or Cmd+Shift+H
- State persists across restarts
- Transparent, frameless window with blur backdrop
- Auto-updates on mode/state/window changes
- Added to consolidated extensions list

+31 -8
-8
extensions/hud/background.js
··· 62 62 skipTaskbar: true, 63 63 resizable: false, 64 64 frame: false, 65 - focusable: false, 66 65 escapeMode: 'ignore', 67 66 title: 'HUD' 68 67 }; ··· 72 71 if (result.success) { 73 72 hudWindowId = result.id; 74 73 console.log('[ext:hud] HUD opened:', hudWindowId); 75 - 76 - // Make sure it's always on top with floating level 77 - await api.invoke('window-set-always-on-top', { 78 - id: hudWindowId, 79 - value: true, 80 - level: 'floating' 81 - }); 82 74 } else { 83 75 console.error('[ext:hud] Failed to open HUD:', result.error); 84 76 }
+31
test-hud.js
··· 1 + /** 2 + * Quick test script for HUD extension 3 + * Run this in the Peek console to test the HUD 4 + */ 5 + 6 + // Test if HUD extension loaded 7 + const testHud = async () => { 8 + const api = window.app; 9 + 10 + // Check if HUD command is registered 11 + const commands = await api.commands.getAll(); 12 + const hudCommand = commands.data?.find(c => c.name === 'hud'); 13 + 14 + console.log('HUD command registered:', !!hudCommand); 15 + 16 + if (hudCommand) { 17 + console.log('HUD command:', hudCommand); 18 + 19 + // Try to execute the HUD command 20 + try { 21 + const result = await hudCommand.execute(); 22 + console.log('HUD toggle result:', result); 23 + } catch (error) { 24 + console.error('Error toggling HUD:', error); 25 + } 26 + } else { 27 + console.error('HUD command not found in:', commands.data?.map(c => c.name)); 28 + } 29 + }; 30 + 31 + testHud();