Handling different application types #17

Closed
opened 2026-04-11 22:28:27 +00:00 by adam · 0 comments
Owner
  • commandChoice needs a ui enum field: "gui", "terminal-window", "terminal-tab". Then we pull all the wezterm invocations out of the commndChoice.commands values, and into the launch() function. The commands should just be strings, or string plus args. commandChoice also could use a workspace field (for btop and yazi).
  • We iterate over the selections, and switch on the ui field.
    • if gui, then just turn the string into a command and run it.
    • if terminal-window, then launch it into a new window. I can run wmctrl after the iteration, no harm noop if btop/yazi aren't running.
    • if terminal-tab, we should do something like know what window-id we're gonna put them in, and put them in its tabs. Although I think I'm overthinking this a bit. I should be able to just spawn the commands & they'll appear in new tabs of the breakfast window by default.
    • For joplin, I think I've gotta list as JSON, then get the tab-id, then change its title that way.
[ Sat 11 Apr 21:51:55 ] λ wezterm cli spawn --new-window
4

~
[ Sat 11 Apr 21:52:09 ] λ wezterm cli spawn --pane-id=4
5

~
[ Sat 11 Apr 21:52:53 ] λ wezterm cli spawn --pane-id=4
6
- `commandChoice` needs a `ui` enum field: "gui", "terminal-window", "terminal-tab". Then we pull all the wezterm invocations out of the commndChoice.commands values, and into the `launch()` function. The commands should just be strings, or string plus args. `commandChoice` also could use a workspace field (for btop and yazi). - We iterate over the selections, and switch on the ui field. - if gui, then just turn the string into a command and run it. - if terminal-window, then launch it into a new window. I can run wmctrl after the iteration, no harm noop if btop/yazi aren't running. - if terminal-tab, we should do something like know what window-id we're gonna put them in, and put them in its tabs. Although I think I'm overthinking this a bit. I should be able to just spawn the commands & they'll appear in new tabs of the breakfast window by default. - For joplin, I think I've gotta `list` as JSON, then get the tab-id, then change its title that way. ```text [ Sat 11 Apr 21:51:55 ] λ wezterm cli spawn --new-window 4 ~ [ Sat 11 Apr 21:52:09 ] λ wezterm cli spawn --pane-id=4 5 ~ [ Sat 11 Apr 21:52:53 ] λ wezterm cli spawn --pane-id=4 6 ```
adam closed this issue 2026-04-15 00:56:34 +00:00
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
adam/breakfast#17
No description provided.