Uses 911K of libraries. Click here for Pure Java version (9638L/49K).
!7 cmodule ELESystemWindows > ELESuggester { start { dm_onUserUtterance(lambda1 processUtterance); } void processUtterance(S s) { print("Got input: " + s); if (dm_moduleIsPoppedOut()) { if (l(suggestions) == 1) { S id = squareBracketStuff(first(suggestions)); if "activate" { print("Activating window " + first(suggestions); activateSystemWindow(wmctrl_EntryFromID(id)); ret; } if "close" { dm_confirmAction("Close window " + quote(afterSquareBracketStuff(first(suggestions))), rEnter { dm_closeSystemWindow(wmctrl_EntryFromID(id)); }); ret; } } else if (l(suggestions) > 1) { print("Filtering for: " + s); LS l = containingIC(suggestions, s); if (nempty(l)) showSuggestions(s, l); ret; } } if "system windows" { print("Showing suggestions and popping out"); showSuggestions(s, map(dm_windows(), w -> "[" + w.windowIdentity + "] " + w.windowTitle)); dm_popOutAndActivateModule(module()); assertEquals(dm_current_mandatory(), module()); } } }
Began life as a copy of #1026661
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1026771 |
Snippet name: | ELE: System Windows |
Eternal ID of this version: | #1026771/23 |
Text MD5: | 9b3df60e63efa59f2b52f7f284bfb345 |
Transpilation MD5: | faf782014883b1106adf6b6793163659 |
Author: | stefan |
Category: | javax / ele |
Type: | JavaX source code (Dynamic Module) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-01-22 02:08:09 |
Source code size: | 1223 bytes / 41 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 241 / 5281 |
Version history: | 22 change(s) |
Referenced in: | [show references] |