-
-
Notifications
You must be signed in to change notification settings - Fork 246
IPC: Expose all terminal actions #1404
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Display battery percentage (macOS/Linux) and current time (HH:MM) in the top-right corner of the tab bar. The status info is cached and updated every 30 seconds to avoid expensive system calls on every frame.
- Icon now uses Rio's signature orange color scheme - Welcome screen credits Rio Terminal with orange highlighting - App metadata credits Raphael Amorim and rioterm.com
Two icon options saved: - Option A: horizontal gradient line (pink→purple→cyan) - Option B: three horizontal bars with Rio colours (red, yellow, cyan) Currently using Option B as the dock icon.
- Session save/restore (Cmd+Shift+S/O) - SSH profile manager (Cmd+G / Cmd+Shift+G) - Snippets system (Cmd+/ / Cmd+Shift+N) - Command completion notifications via OSC 133 shell integration - Updated harness state tracking
- IPC system for programmatic terminal control via Unix socket - --action, --dump-screen, --status, --list-actions, --send, --wait-for CLI flags - TriggerAction, DumpScreen, GetStatus, ListActions, SendInput, ScreenContains commands - Git status in tab titles (branch name + dirty indicator) - Danger paste detection with confirmation dialogs - Broadcast input mode (send to all splits simultaneously) - Directory jumper with frecency-based sorting (Cmd+J)
Implemented comprehensive IPC expansion including: 1. **All Actions Exposed**: Updated ListActions to return all ~50 actions from bindings/mod.rs including search, scrolling, tabs, splits, bookmarks, SSH, snippets, broadcast mode, and directory jumper 2. **Generic Action Execution**: Refactored TriggerAction to use Action::from(String) for universal action parsing, with new execute_action() method in screen/mod.rs that handles all action types 3. **JSON Screen Dumps**: Added ScreenDumpJson response with structured cell data (character, bold, italic, underline flags) and optional line range selection 4. **Line Selection**: DumpScreen now supports start_line and end_line parameters for partial screen dumps 5. **Tab Information**: New ListTabs command returns tab index, title, and current status for all tabs Changes: - ipc.rs: Added ScreenCell, TabInfo structs; updated IpcCommand/IpcResponse enums; added JSON output handlers - application.rs: Implemented comprehensive DumpScreen with format/line selection and ListTabs handler - screen/mod.rs: Added execute_action() method with complete action dispatch for 50+ actions This enables full programmatic control of the terminal via IPC for automation and testing.
|
hey thanks for the pr, but the pr is for your fork no? it even rename the app. Thanks for the pr 🙏 |
|
Hey, you're right - sorry about that. I'm working on a personal fork called Midterm, just customising things for my own use. GitHub's PR UI defaulted to upstream and I didn't catch it before submitting. I've now properly separated my fork so this won't happen again. If I do build anything useful that might benefit Rio, happy to share it with you to incorporate if you'd like. I'm crediting Rio in my repo description as "Powered by Rio" and linking back to your repo. Let me know if you'd prefer a different attribution. |
|
No stress with it! Best luck in the fork work btw 🙏 |
Summary
Expands the IPC system to expose ALL terminal actions (~50 total) and adds advanced screen dump capabilities.
This PR builds on the existing IPC foundation to enable comprehensive programmatic control of the terminal for automation, testing, and external integrations.
Changes
1. All Actions Exposed via IPC
bindings/mod.rsselecttab(N),gotobookmark(N),run(COMMAND), etc.2. Generic Action Execution
Action::from(String)for universal action parsingexecute_action()method inscreen/mod.rsprovides centralized action dispatch3. JSON Screen Dumps
4. Line Selection for Screen Dumps
start_lineandend_lineparametersformat: "text"(default) andformat: "json"5. Tab Information
is_currentflagFiles Changed
frontends/rioterm/src/ipc.rs: Updated command/response enums, added ScreenCell and TabInfo structsfrontends/rioterm/src/application.rs: Implemented DumpScreen format/line selection and ListTabs handlerfrontends/rioterm/src/screen/mod.rs: Added comprehensive execute_action() methodUsage Examples
Testing
cargo build -p riotermFuture Enhancements