Gnome_Terminal

  1 快捷键
  2 
  3 
  4 ctrl shift  m        我自定义的快捷键,可以给终端命名
  5 ctrl shift  t        新建标签页,并且目录为当前目录
  6 ctrl shift  pageup    标签页往前移
  7 ctrl shift  pagedown    标签页往后移
  8 ctrl shift  +        放大屏幕
  9 ctrl  -            缩小屏幕
 10 ctrl  c            终止程序
 11 ctrl  d            输入文件结束符,或退出bash
 12 ctrl  h            隐藏光标
 13 ctrl  l            刷新屏幕
 14 ctrt  n            向下浏览历史命令,相当于下方向键
 15 ctrl  p            向上浏览历史命令,相当于上方向键
 16 ctrl  r            搜索历史命令
 17 ctrl  z            将程序挂起
 18 ctrl  pageup        光标移到前一个标签页,会循环
 19 ctrl    pagedown        光标移到后一个标签页
 20 shift  pageup        缓冲区向上翻页
 21 shift  pagedown        向下翻页
 22 
 23 
 24 
 25 背景颜色
 26 
 27 #91D2B3
 28 
 29 
 30 
 31 字符编码
 32 
 33 
 34 gnome terminal 设置中似乎没有设置项来改变终端显示编码,只有一个菜单名显示编码的设置,并没有什么用处额。很多人推荐改变终端显示的编码可以用luit这个软件,我试了下,并没有什么作用。我的解决方案是将所有的文件编码改为系统默认的编码 utf-8 ,这样无论在哪都不会出现乱码了。
 35 
 36 
 37 
 38 改变终端光标的显示
 39 
 40 
 41 echo -e "33[?25l"                    隐藏光标;033 (八进制)是输入字符的值
 42 printf("033[?25l");                    隐藏光标
 43 echo -e "33[?25h"                    显示光标
 44 printf("033[?25h");                    显示光标
 45 
 46 
 47 033[0m                            关闭所有属性
 48 033[1m                            设置高亮度
 49 033[4m                            下划线
 50 033[5m                            闪烁
 51 033[7m                            反显
 52 033[8m                            消隐
 53 033[30m -- 033[37m                     设置前景色
 54 033[40m -- 033[47m                     设置背景色
 55 
 56 033[nA                            光标上移 n 行
 57 033[nB                            光标下移 n 行
 58 033[nC                            光标右移 n 行
 59 033[nD                            光标左移 n 行
 60 033[y;xH                        设置光标位置
 61 echo -ne "33[3;1H"                    可以将光标移到第 3 行第 1 列处
 62 
 63 033[2J                            清屏
 64 033[K                            清除从光标到行尾的内容
 65 033[s                            保存光标位置
 66 033[u                            恢复光标位置
 67 033[?25l                        隐藏光标
 68 033[?25h                        显示光标
 69 
 70 字颜色
 71 30 72 31 73 32                            绿
 74 33 75 34                            蓝色
 76 35                            紫色
 77 36                            深绿
 78 37                            白色
 79 
 80 字背景颜色范围
 81 40 82 41                            深红
 83 42                            绿
 84 43                            黄色
 85 44                            蓝色
 86 45                            紫色
 87 46                            深绿
 88 47                            白色
 89 echo -ne "33[32m" 可以将字符的显示颜色改为绿色
 90 
 91 
 92 
 93 更改默认的终端大小
 94 
 95 新终端的默认大小可以在编辑 > 配置文件首选项 中调整
 96 
 97 
 98 
 99 新终端采用当前目录
100 
101 By default new terminals open in the $HOME directory. To have new terminals adopt the current working directory: source /etc/profile.d/vte.sh. Add the command to the shell configuration to retain the behaviour.
102 
103 
104 Pad the terminal
105 
106 To pad the terminal (create a small, invisible border between the window edges and the terminal contents) create the file below:
107 ~/.config/gtk-3.0/gtk.css
108 
109 VteTerminal,
110 TerminalScreen {
111     padding: 10px 10px 10px 10px;
112     -VteTerminal-inner-border: 10px 10px 10px 10px;
113 }
114 
115 
116 
117 禁用光标闪烁
118 
119 Since GNOME 3.8 and the migration to GSettings and DConf the key required to modify in order to disable the blinking cursor in the Terminal differs slightly in contrast to the old GConf key. To disable the blinking cursor in GNOME 3.8 and above use:
120 $ gsettings set org.gnome.desktop.interface cursor-blink false
121 
122 To disable the blinking cursor in Terminal only use (make sure profile uid is correct one):
123 $ dconf write /org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/cursor-blink-mode "'off'"
124 
125 Note that gnome-settings-daemon, from the package of the same name, must be running for this and other settings changes to take effect in GNOME applications - see GNOME#Configuration.
126 
127 
128 
129 关闭终端时,禁用确认窗口
130 
131 试图关闭该窗口,终端中正在运行一个程序时,终端将始终显示一个确认窗口。为了避免这种情况,执行以下命令:
132 $ gsettings set org.gnome.Terminal.Legacy.Settings confirm-close false
133 
134 
135 
136 参考:
137 
138 
139 https://wiki.archlinux.org/index.php/GNOME_%28%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87%29#.E7.A6.81.E7.94.A8.E5.85.89.E6.A0.87.E9.97.AA.E7.83.81
原文地址:https://www.cnblogs.com/little-snake/p/4932583.html