zoukankan      html  css  js  c++  java
  • 树莓派配置记录——tmux

    tmux是一个linux的命令行分屏工具。将一个屏幕划分为多个区域,可以同时运行不同的程序。自从发现tmux以后,才在命令行下充分发挥了Linux的多进程,不再需要巨卡的树莓派桌面了,一个putty走天下

    我的tmux的配置文件如下

    #可以用鼠标动态拖动区域的分割线。缺点是tmux的鼠标选区复制受到影响,只能用putty的shift+左键选区复制功能。而putty的选取是横跨整个屏幕,不支持垂直分割的区域,复制以后需要手动调整
    set -g mouse on
    
    #缓存10000行历史,不怕刷屏
    set -g history-limit 10000
    
    #调一下任务栏颜色,太扎眼
    set -g status-bg colour236
    set -g status-fg white
    
    #ctrl+b,r立刻应用配置文件的修改
    bind r source ~/.tmux.conf ; display "Configuration reloaded!"

    另外,tmux可能无法显示彩色,需要在.bashrc最后添加一句:

    export TERM=xterm-256color

    常用的tmux按键

    先按Ctrl+B进入命令模式,再按具体的键

    Ctrl+B,%——垂直分屏

    Ctrl+B,“——水平分屏

    Ctrl+B,x——关闭当前区域

    Ctrl+B,d——保存分屏,退出tmux。退出以后在命令行输入 tmux a,就可以恢复退出前的分屏状态。重启则保存无效。。。

    小脚本用于测试颜色

     1 #!/bin/bash
     2 
     3 # This program is free software. It comes without any warranty, to
     4 # the extent permitted by applicable law. You can redistribute it
     5 # and/or modify it under the terms of the Do What The Fuck You Want
     6 # To Public License, Version 2, as published by Sam Hocevar. See
     7 # http://sam.zoy.org/wtfpl/COPYING for more details.
     8 
     9 for fgbg in 38 48 ; do # Foreground / Background
    10         for color in {0..255} ; do # Colors
    11                 # Display the color
    12                 printf "e[${fgbg};5;%sm  %3s  e[0m" $color $color
    13                 # Display 6 colors per lines
    14                 if [ $((($color + 1) % 6)) == 4 ] ; then
    15                         echo # New line
    16                 fi
    17         done
    18         echo # New line
    19 done
    20 
    21 exit 0

    测试结果

  • 相关阅读:
    USACO2.24 Party Lamps
    hdu3811 Permutation
    局部视图Partial
    动态修改a标签的css样式
    .net 记住用户名和密码
    C#枚举
    学习存储过程的时候参看的两个DVBBS的存储过程和两个初步了解后自己写的存储过程(带分页的)
    js 几种常用的表单输入判断
    AJAX+.net实现无刷新搜索,无须提交,边输边查
    ifream中的数据传递
  • 原文地址:https://www.cnblogs.com/cscat/p/9866938.html
Copyright © 2011-2022 走看看