Ubuntu下使用tumxp一键启动多个窗口

使用流程:

  1. 安装tmuxp
  2. 新建启动脚本yaml文件,如zlocs.yaml,并如下所示根据实际情况配置,一个window可以分为多个pane,同时又可以使用多个window
  3. 在 /home/用户名/ 目录下新建.tmux.conf配置文件,并如下所示根据实际情况配置
  4. 使用命令tmuxp load zlocs.yaml即可启动

启动脚本yaml文件示例:zlocs.yaml

session_name: alltmuxp
windows:
  - window_name: debug
    layout: tiled
    panes:
    - shell_command:
      # rostopic list
      - "2" 
      - sleep 4  
      - ros2 topic list
      
  - window_name: zl
    layout: tiled
    panes: 
    - shell_command:
     # start roscore
      - "3"
      - roscore
    - shell_command:
     # start 1to2 bridge
      - "2"
      - cd /home/dell/code/ros2/ros1_bridge
      - source /opt/ros/noetic/setup.bash 
      - source /opt/ros/galactic/setup.bash
      - source bridge_ws/install/setup.bash 
      - sleep 1
      - ros2 run ros1_bridge dynamic_bridge --bridge-all-1to2-topics
    - shell_command:
      # start dead reckoning
      - "2"
      - cd /home/dell/autoware
      - source install/setup.bash 
      - sleep 2
      - ros2 launch dead_reckoning dead_reckoning.launch.xml 
    - shell_command:
      # play bag
      - "3"
      - cd /home/dell/data_set
      - sleep 3
      - rosbag play 2022-10-24-14-16-14.bag -s 50 

Home目录下配置文件示例:.tmux.conf

# Mouse mode
set -g mouse on

# Use Alt-arrow keys to switch panes
bind -n C-Left select-pane -L
bind -n C-Right select-pane -R
bind -n C-Up select-pane -U
bind -n C-Down select-pane -D
# bind -n M-Left select-pane -L
# bind -n M-Right select-pane -R
# bind -n M-Up select-pane -U
# bind -n M-Down select-pane -D

# Set easier window split keys
bind-key = split-window -h
bind-key - split-window -v

# Shift arrow to switch windows
bind -n S-Left previous-window
bind -n S-Right next-window
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值