![]() ![]() Maybe there is a way by playing with processes (using fg, bg.), but I still haven't figured it out. tmux new-window -d 'ping -c 5 8.8.8.8 tmux wait -S ping' & These instruction work for me on Ubuntu 11.04. Menu > Edit > Profile Preferences > Title and Command (Tab) Check Run a custom command instead of my shell. I tried the following, hoping it would work, but it doesn't either (the script doesn't resume). Here is how one can set tmux to launch with gnome-terminal: Launch gnome-terminal. Ulauncher will figure out what you meant. You can use wait-for but you need to give it a channel and signal that channel when your process is done, something like. Now the only issue is to block the main script until the command ends. Type in an application name without worrying about spelling. 21 Just run: echo 'set -g mouse on' > /.nf and you'll be able to scroll. Thanks to Nicholas Marriott for pointing out the -d option exists when creating a new window to avoid switching to it automatically. I've looked at different solutions in order to either send a command in background, or wait until a process has finished in an other pane, but I still haven't found a way to do both correctly. Any of the following should work: run tmux source /.nf run tmux set -g prefix C-a press the old prefix ( Ctrl B ), :source /. You are not supposed to source it within your shell, but rather tell tmux to source it. This plugin provides function to hide status-left / status-right as well, if you want to focus, pure silence environment. 1 Answer Sorted by: 38 nf is the configuration file for tmux. ![]() status-left / status-right part - Second line. I know the tmux commands here don't really have any sense like this, but this is just to illustrate. This is an plugin that split stats bar into 2 parts (lines) window part - First line. Tmux wait-for # display "Done!" only when ping command has finished Tmux new-window -d 'ping -c 5 8.8.8.8' # run command in new "background" window Here is some pseudo bash code to show more clearly what I'm trying to do: echo "Waiting for ping to finish."Įcho "Ctrl-b + p to switch pane and see running process" LaunchBar is an integral part of my computing environment, and being able to search. I'm trying to use tmux in a script, so that it runs a command that takes some time (let's say 'ping -c 5 8.8.8.8', for example) in a new hidden pane, while blocking the current script itself until the ping ends.īy "hidden pane", I mean running the command in a new pane that would be sent in background, and is still accessible by switching panes in order to monitor and/or interact with it (not necessarily ping). Configuration for various tools (git, NeoVim, dzil, plenv, tmux) and. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |