-
-
Notifications
You must be signed in to change notification settings - Fork 798
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
detecting wezterm and calling create tab from console #230
Comments
Regarding detection, literally interpreting your requestFor spawning a new tab, some of the plumbing exists in the multiplexer protocol, but it hasn't been exposed to the
Alternatively, use OSC 7If you set up vim to emit OSC 7 for the directory containing the file when you eg: |
actually this could be lot easier if wezterm supports subcommand to split. silent call system('tmux split-window -h \; send-keys "cd ''' . l:dir . ''' && clear" C-m')
Wezterm would need a sub command to open new tab, split tab horizontally or vertically and send keys. wezterm split-tab -h \; send-keys "cd '/home'" && clear |
When spawning processes, export the local pane_id. refs: #230
This is the initial pass; the output from the command needs some thought, but it basically operates. refs: #230
When running the GUI, we generate a unix domain socket path for the current process and start up a mux server for that path. This allows `wezterm cli list` and `wezterm cli split-pane` to work implicitly inside the GUI session. When started in this way, the mux server is not persistent; when the GUI process is terminated, all of its windows, tabs and panes are terminated. refs: #230
@basbebe since I don't use those tools, I don't know what sorts of features should be prioritized. I'd appreciate it if you could identify the key things that would help unlock those workflows here in the wezterm issue tracker so that I can prioritize. What I mean by that is: eg: Regarding this particular issue: the title talks about creating a tab, but the example was using panes. Current master (as of about a week ago) now supports running @prabirshrestha what is left to do before you'd consider this closed? |
@wez sorry for not being more specific.
it therefore needs to open a new pane in the current window and execute a given command in it. It also offers the possibility to focus a given client (pane).
So I think most of the needed functionality probably would now be there. |
Panes were not supported when I filed this issue hence I mentioned new tabs. I personally prefer opening in new pane. I will try this on weekend. @wez wondering if you have instead thought of running lua script instead adding these new commands to console. This way instead of adding new commands you get the full lua api support. $ wezterm --run "wezterm.newtab()" |
Finally got time to work on this. Sent a pr to vim-gtfo at justinmk/vim-gtfo#55. I'm closing this for now. |
That does not work over ssh or in WSL without extra work and TERM is a special variable which is treated special by a lot of software. So this should only be used as a fallback and not by default. |
How about we have wezterm set or otherwise update WSLENV to include something like |
I think that would be a good idea. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
I use vim-gtfo which allows me to use
got
which opens a new terminal pane in the current directory of the file. Is there similar commands to detect and open tabs in wezterm. People use$TMUX
environment variable to detect it is running inside tmux and then usetmux split-window
. Would be good if wezterm has something similarwezterm split-window
.This feature might be better once #157 is implemented.
The text was updated successfully, but these errors were encountered: