Maximus5 / ConEmu

Customizable Windows terminal with tabs, splits, quake-style, hotkeys and more
https://conemu.github.io/
BSD 3-Clause "New" or "Revised" License
8.64k stars 581 forks source link

conemu/conemuc/guimacro support for obtaining lists of titles of tabs (so can script switching to them) #1889

Open yakrider opened 5 years ago

yakrider commented 5 years ago

The goal here was to write a utility that can list a 'tree' of ConEmu windows and tabs in them, and allow activating the user-selected ConEmu window and tab. (Can think of it as a component of an intelligent task switcher app).

To do so, was trying to see if GuiMacro support using ConEmuC had options for that, but only see ways to change title but not to get it. There dont seem to be other ways of obtaining a list of windows/tabs and/or their titles from other command line options for conemu / conemuc either.

Is there an existing support for allowing something like that? What would be the possibility/effort for supporting this kind of workflow? (Basically to allow cmd-line querying for ConEmu windows/tab ids/titles and allowing cmd line support for activating those windows/tabs). Thanks!

Maximus5 commented 5 years ago

I'm going to create GuiMacro Tabs 12 to return list of tabs. Example:

# ConEmuC -GuiMacro tabs 12
1: cmd
2: cmd - ConEmuC  -GuiMacro tabs 12 (Admin)
3: mxmmsk@LENOVO: /mnt/e/Maks/Maximus5/Tools/vim81.base
4: powershell

Than you may parse the result and execute for example ConEmuC -GuiMacro tabs 7 4 to activate tab with powershell.