Giter Club home page Giter Club logo

Comments (20)

remi avatar remi commented on May 24, 2024

@kamelzcs Can you run teamocil --debug tc and paste the output here? We’re going to know exactly which commands are executed. Thanks!

from teamocil.

kamelzcs avatar kamelzcs commented on May 24, 2024
tmux rename-session 'teamocil-session-802042'
tmux new-window -n 'TC' -c '/home/kamel/Code/study'
tmux send-keys -t 1 'whoami'
tmux send-keys -t 1 'Enter'
tmux split-window -c '/home/kamel/Code/study'
tmux send-keys -t 2 'ls'
tmux send-keys -t 2 'Enter'
tmux split-window -c '/home/kamel/Code/study'
tmux send-keys -t 3 'vim'
tmux send-keys -t 3 'Enter'
tmux split-window -c '/home/kamel/Code/study'
tmux send-keys -t 4 'vim'
tmux send-keys -t 4 'Enter'
tmux select-layout 'tiled'
tmux select-pane -t 0

from teamocil.

kamelzcs avatar kamelzcs commented on May 24, 2024

.tmux.config file

set -g default-terminal "screen-256color"
# zsh is kinda tight
set-option -g default-shell $SHELL

# look good
#set -g default-terminal "screen-256color"

# act like GNU screen
unbind C-b
set -g prefix C-a

# Make shift+arrows, ctrl+arrows etc work in Vim.
set -g xterm-keys on
# See if this fixes slow ESC issues.
# http://unix.stackexchange.com/questions/23138/esc-key-causes-a-small-delay-in-terminal-due-to-its-alt-behavior
set -s escape-time 0

# a mouse
set -g mode-mouse on
setw -g mouse-select-window on
setw -g mouse-select-pane on

# act like vim
setw -g mode-keys vi
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind-key -r C-h select-window -t :-
bind-key -r C-l select-window -t :+
unbind [
bind Escape copy-mode
unbind p
bind p paste-buffer
bind -t vi-copy v begin-selection
bind -t vi-copy y copy-selection
bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|vim?)(diff)?$' && tmux send-keys C-h) || tmux select-pane -L"
bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|vim?)(diff)?$' && tmux send-keys C-j) || tmux select-pane -D"
bind -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|vim?)(diff)?$' && tmux send-keys C-k) || tmux select-pane -U"
bind -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|vim?)(diff)?$' && tmux send-keys C-l) || tmux select-pane -R"
bind -n C-\ run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|vim?)(diff)?$' && tmux send-keys 'C-\\') || tmux select-pane -l"

# Maximize pane, e.g. for copying.
bind-key z resize-pane -Z

# Reload tmux conf.
unbind r
bind r source-file ~/.tmux.conf\; display "Reloaded conf."

# move x clipboard into tmux paste buffer
bind C-p run "xclip -o | tmux load-buffer - ; tmux paste-buffer"
# move tmux copy buffer into x clipboard
bind C-y run "tmux save-buffer - | xclip -i"
# after copying to a tmux buffer, hit y again to copy to clipboard
#### COLOUR (Solarized 256)

# default statusbar colors
set-option -g status-bg colour235 #base02
set-option -g status-fg colour136 #yellow
set-option -g status-attr default

# default window title colors
set-window-option -g window-status-fg colour244 #base0
set-window-option -g window-status-bg default
#set-window-option -g window-status-attr dim

# active window title colors
set-window-option -g window-status-current-fg colour166 #orange
set-window-option -g window-status-current-bg default
#set-window-option -g window-status-current-attr bright

# pane border
set-option -g pane-border-fg colour235 #base02
set-option -g pane-active-border-fg colour240 #base01

# message text
set-option -g message-bg colour235 #base02
set-option -g message-fg colour166 #orange

# pane number display
set-option -g display-panes-active-colour colour33 #blue
set-option -g display-panes-colour colour166 #orange

# clock
set-window-option -g clock-mode-colour colour64 #green

from teamocil.

remi avatar remi commented on May 24, 2024

The --debug looks good. What version of tmux are you using?

from teamocil.

kamelzcs avatar kamelzcs commented on May 24, 2024

Tmux version: 1.9a

from teamocil.

remi avatar remi commented on May 24, 2024

Could you try to run the layout with teamocil using tmux with a blank .tmux.config file?

from teamocil.

kamelzcs avatar kamelzcs commented on May 24, 2024

When there are multiple commands in the Panel 0, only the first command being processed as well.

from teamocil.

remi avatar remi commented on May 24, 2024

Can you try adding set-window-option -g pane-base-index 1 in your .tmux.conf?

from teamocil.

kamelzcs avatar kamelzcs commented on May 24, 2024

I tried, but only the first command in the first panel being processed.

from teamocil.

kamelzcs avatar kamelzcs commented on May 24, 2024

Great! it works!

from teamocil.

remi avatar remi commented on May 24, 2024

Great! it works!

Awesome, now I need to make teamocil work without that option 😄 I’m going to close this issue and open up a new one! Thanks!

from teamocil.

kamelzcs avatar kamelzcs commented on May 24, 2024

But when I ssh to the remote server, only the first command of all the panels being processed now.
After ssh succeeded, the cd commands are listed, but not processed.
Is there anyway to fix this?

from teamocil.

kamelzcs avatar kamelzcs commented on May 24, 2024

ssh dev; cd zhao/src/migrate; vim migrate_run.py

But after ssh to the dev, the other two commands are not proceeded at all.

from teamocil.

remi avatar remi commented on May 24, 2024

You should use an array of commands:

windows:
  - name: TC
    root: /home/kamel/Code/study
    layout: tiled
    panes:
      - commands:
        - ssh
        - whoami
        - ls 
      - ls
      - vim
      - vim

from teamocil.

kamelzcs avatar kamelzcs commented on May 24, 2024
windows:
  - name: AWS
    root: /home/kamel/src/
    layout: tiled
    panes:
      - commands:
        - ssh dev
        - cd zhao/src/migrate
        - tail err_file

from teamocil.

kamelzcs avatar kamelzcs commented on May 24, 2024

It was in this way.
But it seems after ssh to the remote side, all the left commands are flushed.

from teamocil.

kamelzcs avatar kamelzcs commented on May 24, 2024

tmux rename-session 'teamocil-session-388545'
tmux new-window -n 'AWS' -c '/home/kamel/src/'
tmux send-keys -t 1 'ssh dev; cd zhao/src/migrate; tail err_file'
tmux send-keys -t 1 'Enter'
tmux select-layout 'tiled'
tmux select-pane -t 0

from teamocil.

remi avatar remi commented on May 24, 2024

The way teamocil sends the commands is actually the problem. ssh dev; cd zhao/src/migrate; tail err_file starts an SSH session and when it’s done (with CTRL-D, for example) it’s doing to run the other commands.

There’s no way to circumvent that currently.

from teamocil.

randyzhao avatar randyzhao commented on May 24, 2024

Just want to check if this issue happens to be solved now.

from teamocil.

yorkbai avatar yorkbai commented on May 24, 2024

I think can try this:
commands:
- ssh dev -t "cd zhao/src/migrate ; tail err_file; exec $SHELL -l"

from teamocil.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.