![]() ![]() ![]() There is no particular reason for the order of the windows. Of course, I also often open new windows with prefix + c (tmux) for new stuff. It could also be a window with log files or whatever.Įverything after window 5 is very task-specific. In the example above, I have a couple of machines where I want to have at least one login opened at session startup. I usually also have a calendar or bc running there.Īfter the 5th window, things change continuously. The scratch window is for testing some code interactively. I have multiple panes in exec to run a script and the test and another script etc. The editor runs in full screen mode in window 3. This is where the edit-(compile-)run cycle takes place. The 3rd and 4th window are for real work. I switch to this window when I do work that has nothing to do with the current task at hand.įor example, I’d install software from there, update my dotfiles or walk around the system with ranger. I guess the only special thing about it might be wtig. Three are used for Git, the remaining runs htop just for fun. My first window, git, is obviously for version control. Let me explain the different windows one by one. The rest of the file contains the windows & pane definitions. The name and root entries are self-explanatory. windows : - git : layout : tiled panes : - wtig - htop - git status - ls - mgmnt : layout : tiled panes : - ranger - $EDITOR ~/.alias.local - edit : layout : main-vertical panes : - $EDITOR - exec : layout : tiled panes : - scratch : layout : tiled panes : - ipython - irb - ghci - bc - ssh : panes : - ssh - ssh Download) Each window has a name, potentially a layout and # one or more panes. The Tmuxinator defintion looks like this: # ~/.tmuxinator/dev.yml name : dev # the tmux session's name root : /path/to/repo # path to the root dir for all panes # Definition of all windows. You see my dev session’s first window above. With a single command ( mux start ), the whole session gets created and you’re ready to work! In Tmuxinator, one defines a session (windows, panes, layouts, commands to be executed, etc.) in a yaml file. There are a couple of tmux session managers, I just happen to use Tmuxinator. This tools lets you handle (predefine) tmux sessions easily. Tmux makes your terminal work flows so incredibly powerful you’re not gonna believe it.Īssuming, you know about tmux, you may have heard about Tmuxinator. If you’re unfamiliar with tmux: Go read about it, use it, learn it and come back a couple of months from now. In this post, I present my development session setup. I’m running tmux all the time and I couldn’t do without it. null or ~) in place of a named window key, which will cause the window to use its default name (usually the name of their shell).Most of my work day is spent in the terminal. *Users may optionally provide a null YAML value (e.g. Each window is denoted by a YAML array entry, followed by a name* and command to be run. ![]() The windows option allows the specification of any number of tmux windows. logs: tail -f log/development.log Windows # 'before' represents legacy functionality and will be deprecated in a future release, in favour of 'after' # synchronize: after panes: Layout: main-vertical # Synchronize all panes of this window, can be enabled before or after the pane commands run. # startup_pane: 1 # Controls whether the tmux session should be attached to automatically. # startup_window: editor # Specifies (by index) which pane of the specified window will be selected on project startup. # tmux_command: byobu # Specifies (by name or index) which window will be selected on project startup. ![]() This can be used by derivatives/wrappers like byobu. # tmux_options: -f ~/. # Change the command to call tmux. # pre_window: rbenv shell 2.0.0-p247 # Pass command line options to tmux. Useful for setting up interpreter versions. # Project hooks # Runs on project start, always # on_project_start: command # Run on project start, the first time # on_project_first_start: command # Run on project start, after the first time # on_project_restart: command # Run on project exit ( detaching from tmux session ) # on_project_exit: command # Run on project stop # on_project_stop: command # Runs in each window and pane before window/pane specific commands. # ~/.tmuxinator/sample.yml name: sample root: ~/ # Optional tmux socket # socket_name: foo # Note that the pre and post options have been deprecated and will be replaced by # project hooks. ![]()
0 Comments
Leave a Reply. |