Merge remote-tracking branch 'LCTT/master'

This commit is contained in:
Xingyu.Wang 2019-02-02 14:04:15 +08:00
commit 2747212770
11 changed files with 305 additions and 293 deletions

View File

@ -0,0 +1,159 @@
Linux 下如何避免重复性压迫损伤RSI
======
![workrave-image][1]
<ruby>[重复性压迫损伤][2]<rt>Repetitive Strain Injury</rt></ruby>RSI是职业性损伤综合症非特异性手臂疼痛或工作引起的上肢障碍。RSI 是由于过度使用双手从事重复性任务导致的,如打字、书写和使用鼠标. 不幸的是,大部分人不了解什么是 RSI 以及它的危害有多大。你可以使用名叫 Workrave 的开源软件轻松的预防 RSI。
### RSI 有哪些症状?
我从这个[页面][3]引用过来的,看看哪些你被说中了:
1. 疲惫缺乏忍耐力?
2. 手掌及上肢乏力
3. 疼痛麻木甚至失去知觉?
4. 沉重:你有没有感觉手很沉?
5. 笨拙: 你有没有感觉抓不紧东西?
6. 你有没有感觉手上无力?很难打开罐子或切菜无力?
7. 缺乏协调和控制?
8. 手总是冰凉的?
9. 健康意识有待提高?稍不注意身体就发现有毛病了。
10. 是否过敏?
11. 频繁的自我按摩(潜意识的)?
12. 共鸣的疼痛?当别人在谈论手痛的时候,你是否也感觉到了手疼?
### 如何减少发展为 RSI 的风险
* 使用计算机的时候每隔 30 分钟间隔休息一下。借助软件如 workrave 预防 RSI。
* 有规律的锻炼可以预防各种损伤,包括 RSI。
* 使用合理的姿势。调整你的电脑桌和椅子使身体保持一个肌肉放松状态。
### Workrave
Workrave 是一款预防计算机用户发展为 RSI 或近视的自由开源软件。软件会定期锁屏为一个动画: “Workrave 小姐”,引导用户做各种伸展运动并敦促其休息一下。这个软件经常提醒你暂停休息一下,并限制你每天的限度。程序可以运行在 MS-Window、Linux 以及类 UNIX 操作系统下。
#### 安装 workrave
在 Debian/Ubuntu Linux 系统运行以下 [apt 命令][4]/[apt-get 命令][5]
```
$ sudo apt-get install workrave
```
Fedora Linux 发行版用户运行以下 dnf 命令:
```
$ sudo dnf install workrave
```
RHEL/CentOS Linux 用户可以启动 EPEL 仓库并用 [yum 命令][6]安装:
```
### [ **在CentOS/RHEL 7.x 及衍生版本上测试** ] ###
$ sudo yum install epel-release
$ sudo yum install https://rpms.remirepo.net/enterprise/remi-release-7.rpm
$ sudo yum install workrave
```
Arch Linux 用户运行以下 pacman 命令来安装:
```
$ sudo pacman -S workrave
```
FreeBSD 用户可用以下 pkg 命令安装:
```
# pkg install workrave
```
OpenBSD 用户可用以下 pkg_add 命令安装:
```
$ doas pkg_add workrave
```
#### 如何配置 workrave
Workrave 以一个小程序运行,它的用户界面位于面板中。你可以为 workrave 增加一个面板来控制软件的动作和外观。
增加一个新 workrave 对象到面板:
* 在面板空白区域右键,打开面板弹出菜单
* 选择新增到面板
* 新增面板对话框打开,在加载器顶部,可以看到可用的面板对象按照字母排列。选中 workrave 程序并单击新增。
![图 01新增 workrave 对象到面板][7]
*图 01新增 workrave 对象到面板*
如果修改 workrave 对象的属性,执行以下步骤:
* 右键 workrave 对象打开面板对象弹出
* 选中偏好。使用属性对话框修改对应属性
![图 02修改 Workrave 对象属性](https://www.cyberciti.biz/media/new/tips/2009/11/linux-gnome-workwave-preferences-.png)
*图 02修改 Workrave 对象属性*
#### Workrave 运行展示
主窗口显示下一次提醒休息的剩余时间,这个窗口可以关闭,时间提示窗口会显示在面板上。
![图 03时间计数器][8]
*图 03时间计数器*
![图 04Workrave 小姐 - 引导你做伸展运动的动画][9]
*图 04Workrave 小姐 - 引导你做伸展运动的动画*
休息提示窗口,请求你暂停一下工作:
![图 05休息提示倒计时][10]
*图 05休息提示倒计时*
![图 06你可以跳过休息][11]
*图 06你可以跳过休息*
#### 参考链接:
1. [Workrave 项目][12] 主页
2. [pokoy][13] 防止 RSI 和其他计算机压力的轻量级守护进程
3. GNOME3 下的 [Pomodoro][14] 计数器
4. [RSI][2] 的维基百科
### 关于作者
作者是 nixCraft 创始人,经验丰富的系统管理员,同时也是一个 Linux/Unix 系统下的 shell 脚本培训师。他曾服务于全球客户,并与多个行业合作包括 IT、教育、国防和航天研究以及非盈利机构。可以在 [Twitter][15]、[Facebook][16]、[Google+][17] 上关注他。
--------------------------------------------------------------------------------
via: https://www.cyberciti.biz/tips/repetitive-strain-injury-prevention-software.html
作者:[Vivek Gite][a]
译者:[guevaraya](https://github.com/guevaraya)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:https://www.cyberciti.biz/
[1]:https://www.cyberciti.biz/media/new/tips/2009/11/workrave-image.jpg
[2]:https://en.wikipedia.org/wiki/Repetitive_strain_injury
[3]:https://web.eecs.umich.edu/~cscott/rsi.html##symptoms
[4]:https://www.cyberciti.biz/faq/ubuntu-lts-debian-linux-apt-command-examples/
[5]:https://www.cyberciti.biz/tips/linux-debian-package-management-cheat-sheet.html
[6]:https://www.cyberciti.biz/faq/rhel-centos-fedora-linux-yum-command-howto/
[7]:https://www.cyberciti.biz/media/new/tips/2009/11/add-workwave-to-panel.png
[8]:https://www.cyberciti.biz/media/new/tips/2009/11/screenshot-workrave.png
[9]:https://www.cyberciti.biz/media/new/tips/2009/11/miss-workrave.png
[10]:https://www.cyberciti.biz/media/new/tips/2009/11/time-for-micro-pause.gif
[11]:https://www.cyberciti.biz/media/new/tips/2009/11/Micro-break.png
[12]:http://www.workrave.org/
[13]:https://github.com/ttygde/pokoy
[14]:http://gnomepomodoro.org
[15]:https://twitter.com/nixcraft
[16]:https://facebook.com/nixcraft
[17]:https://plus.google.com/+CybercitiBiz

View File

@ -1,4 +1,3 @@
Moelf translating
Managing Digital Files (e.g., Photographs) in Files and Folders
======
Update 2014-05-14: added real world example

View File

@ -1,5 +1,5 @@
[#]: collector: (lujun9972)
[#]: translator: (fuowang)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: subject: (An introduction to the Flask Python web app framework)

View File

@ -1,5 +1,5 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: translator: (HankChow)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )

View File

@ -1,5 +1,5 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: translator: (MjSeven)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )

View File

@ -1,5 +1,5 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )

View File

@ -1,55 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Get started with eDEX-UI, a Tron-influenced terminal program for tablets and desktops)
[#]: via: (https://opensource.com/article/19/1/productivity-tool-edex-ui)
[#]: author: (Kevin Sonney https://opensource.com/users/ksonney (Kevin Sonney))
Get started with eDEX-UI, a Tron-influenced terminal program for tablets and desktops
======
Make work more fun with eDEX-UI, the 15th in our series on open source tools that will make you more productive in 2019.
![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/button_push_open_keyboard_file_organize.png?itok=KlAsk1gx)
There seems to be a mad rush at the beginning of every year to find ways to be more productive. New Year's resolutions, the itch to start the year off right, and of course, an "out with the old, in with the new" attitude all contribute to this. And the usual round of recommendations is heavily biased towards closed source and proprietary software. It doesn't have to be that way.
Here's the 15th of my picks for 19 new (or new-to-you) open source tools to help you be more productive in 2019.
### eDEX-UI
I was 11 years old when [Tron][1] was in movie theaters. I cannot deny that, despite the fantastical nature of the film, it had an impact on my career choice later in life.
![](https://opensource.com/sites/default/files/uploads/edex-ui-1.png)
[eDEX-UI][2] is a cross-platform terminal program designed for tablets and desktops that was inspired by the user interface in Tron. It has five terminals in a tabbed interface, so it is easy to switch between tasks, as well as useful displays of system information.
At launch, eDEX-UI goes through a boot sequence with information about the ElectronJS system it is based on. After the boot, eDEX-UI shows system information, a file browser, a keyboard (for tablets), and the main terminal tab. The other four tabs (labeled EMPTY) don't have anything loaded and will start a shell when you click on one. The default shell in eDEX-UI is Bash (if you are on Windows, you will likely have to change it to either PowerShell or cmd.exe).
![](https://opensource.com/sites/default/files/uploads/edex-ui-2.png)
Changing directories in the file browser will change directories in the active terminal and vice-versa. The file browser does everything you'd expect, including opening associated applications when you click on a file. The one exception is eDEX-UI's settings.json file (in .config/eDEX-UI by default), which opens the configuration editor instead. This allows you to set the shell command for the terminals, change the theme, and modify several other settings for the user interface. Themes are also stored in the configuration directory and, since they are also JSON files, creating a custom theme is pretty straightforward.
![](https://opensource.com/sites/default/files/uploads/edex-ui-3.png)
eDEX-UI allows you to run five terminals with full emulation. The default terminal type is xterm-color, meaning it has full-color support. One thing to be aware of is that the keys light up on the keyboard while you type, so if you're using eDEX-UI on a tablet, the keyboard could present a security risk in environments where people can see the screen. It is better to use a theme without the keyboard on those devices, although it does look pretty cool when you are typing.
![](https://opensource.com/sites/default/files/uploads/edex-ui-4.png)
While eDEX-UI supports only five terminal windows, that has been more than enough for me. On a tablet, eDEX-UI gives me that cyberspace feel without impacting my productivity. On a desktop, eDEX-UI allows all of that and lets me look cool in front of my co-workers.
--------------------------------------------------------------------------------
via: https://opensource.com/article/19/1/productivity-tool-edex-ui
作者:[Kevin Sonney][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/ksonney (Kevin Sonney)
[b]: https://github.com/lujun9972
[1]: https://en.wikipedia.org/wiki/Tron
[2]: https://github.com/GitSquared/edex-ui

View File

@ -1,88 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: (HankChow)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (More About Angle Brackets in Bash)
[#]: via: (https://www.linux.com/blog/learn/2019/1/more-about-angle-brackets-bash)
[#]: author: (Paul Brown https://www.linux.com/users/bro66)
More About Angle Brackets in Bash
======
![](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/bash-angles.png?itok=mVFnxPzF)
In the previous article, we [introduced the subject of angle brackets][1] (`< >`) and demonstrated some of their uses. Here, we'll look at the topic from a few more angles. Let's dive right in.
You can use `<` to trick a tool into believing the output of a command is data from a file.
Let's say you are not sure your backup is complete, and you want to check that a certain directory contains all the files copied over from the original. You can try this:
```
diff <(ls /original/dir/) <(ls /backup/dir/)
```
[`diff`][2] is a tool that typically compares two text files line by line, looking for differences. Here it gets the output from two `ls` commands and treats them as if coming from a file and compares them as such.
Note that there is no space between the `<` and the `(...)`.
Running that on the original and backup of a directory where I save pretty pictures, I get:
```
diff <(ls /My/Pictures/) <(ls /My/backup/Pictures/) 5d4 < Dv7bIIeUUAAD1Fc.jpg:large.jpg
```
The `<` in the output is telling me that there is file ( _Dv7bIIeUUAAD1Fc.jpg:large.jpg_ ) on the left side of the comparison (in _/My/Pictures_ ) that is not on the right side of the comparison (in _/My/backup/Pictures_ ), which means copying over has failed for some reason. If `diff` didn't cough up any output, it would mean that the list of files were the same.
So, you may be wondering, if you can take the output of a command or command line, make it look like the contents of a file, and feed it to an instruction that is expecting a file, that means that in the _sorting by favorite actor_ example from above, you could've done away with the intermediate file and just piped the output from the loop into `sort`.
In short, yep! The line:
```
sort -r <(while read -r name surname films;do echo $films $name $surname ; done < CBactors)
```
does the trick nicely.
### Here string! Good string!
There is one more case for redirecting data using angle brackets (or arrows, or whatever you want to call them).
You may be familiar with the practice of passing variables to commands using `echo` and a pipe (`|`). Say you want to convert a variable containing a string to uppercase characters because... I don't know... YOU LIKE SHOUTING A LOT. You could do this:
```
myvar="Hello World" echo $myvar | tr '[:lower:]' '[:upper:]' HELLO WORLD
```
The [`tr`][3] command _tr_ anslates strings to different formats. In the example above, you are telling `tr` to change all the lowercase characters that come along in the string to uppercase characters.
It is important to know that you are not passing on the variable, but only its contents, that is, the string " _Hello World_ ". This is called the _here string_ , as in " _it is here, in this context, that we know what string we are dealing with_ ". But there is shorter, clearer, and all round better way of delivering _here strings_ to commands. Using
```
tr '[:lower:]' '[:upper:]' <<< $myvar
```
does the same thing with no need to use echo or a pipe. It also uses angle brackets, which is the whole obsessive point of this article.
### Conclusion
Again, Bash proves to give you lots of options with very little. I mean, who would've thunk that you could do so much with two simple characters like `<` and `>`?
The thing is we aren't done. There are plenty of more characters that bring meaning to chains of Bash instructions. Without some background, they can make shell commands look like gibberish. Hopefully, post by post, we can help you decipher them. Until next time!
--------------------------------------------------------------------------------
via: https://www.linux.com/blog/learn/2019/1/more-about-angle-brackets-bash
作者:[Paul Brown][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.linux.com/users/bro66
[b]: https://github.com/lujun9972
[1]: https://www.linux.com/blog/learn/2019/1/understanding-angle-brackets-bash
[2]: https://linux.die.net/man/1/diff
[3]: https://linux.die.net/man/1/tr

View File

@ -1,145 +0,0 @@
如何在Linux下开发避免重复性压迫损伤
======
![workrave-image][1]
[重复性压迫损伤][2] RSI是职业性损伤综合征, 非特异性手臂疼痛或工作引起的上肢障碍。重复性压迫损伤 (RSI) 是由于过度使用双手从事重复性任务,如打字,写和使用鼠标. 不幸的是,大部分人不了解什么是重复性压迫损伤 (RSI)以及它的危害有多大。你可以使用名叫Workrave的开源软件轻松的预防重复性压迫损伤 (RSI)。
### 重复性压迫损伤 (RSI)有哪些症状?
我从[page][3]引用过来的, 看看哪些你被说中了:
1. 疲惫缺乏忍耐力?
2. 手掌及上肢乏力
3. 疼痛麻木甚至失去知觉?
4. 沉重:你有没有感觉手很沉?
5. 笨拙: 你有没有感觉抓不紧东西?
6. 你有没有感觉手上无力?很难打开罐子或切菜无力?
7. 缺乏协调和控制?
8. 手总是冰凉的?
9. 健康意识有待提高?稍不注意身体就发现有毛病了。
10. 是否过敏?
11. 频繁的自我按摩(潜意识的)
12. 共鸣的疼痛? 当别人在谈论手痛的时候,你是否也感觉到了手疼?
### 如何减少开发者的重复性压迫损伤风险RSI
* 使用计算机的时候每个30分钟间隔休息一下。借助软件如 workrave 预防重复性压迫损伤风险RSI
* 有规律的锻炼可以预防各种损伤,包括重复性压迫损伤
* 使用合理的姿势。调整你的电脑桌和椅子使身体保持一个肌肉放松状态
### Workrave
Workrave 是一款预防计算机用户患重复性损伤RSI或近视。软件会定期锁屏为一个动画 "Workrave 小姐" 引导用户做各种伸展运动并敦促其休息一下。这个软件经常提醒你暂停休息一下并限制你每天的活动。程序可以运行在 MS-Window Linux以及类UNIX操作系统下。
#### 安装 workrave
在Debian/Ubuntu Linux系统运行以下 [apt 命令][4]/[apt-get 命令][5]
`$ sudo apt-get install workrave`
Fedora Linux 发行版用户运行一下dnf命令
`$ sudo dnf install workrave`
RHEL/CentOS Linux 用户可以启动EPEL repo并用[yum 命令][6]安装:
```
### [ **在CentOS/RHEL 7.x 及衍生版本上测试** ] ###
$ sudo yum install epel-release
$ sudo yum install https://rpms.remirepo.net/enterprise/remi-release-7.rpm
$ sudo yum install workrave
```
Arch Linux用户运行以下pacman命令来安装
`$ sudo pacman -S workrave`
FreeBSD 用户可用一下pkg命令安装
`# pkg install workrave`
OpenBSD 用户可用一下pkg_add命令安装
```
$ doas pkg_add workrave
```
#### 如何配置 workrave
Workrave 以一个小程序运行,他的用户界面位于面板中。你可以为 workrave 增加一个面板来控制软件的动作和外观。
##### 增加一个新workrave对象到面板
* 在面板空白区域右键,打开面板弹出菜单
* 选择新增到面板
* 新增面板对话框打开,在加载器顶部,可以看到可用的面板对象按照字母排列。选中 workrave 程序并单击新增。
![Fig.01: 添加workrave对象到面板][7]
Fig.01: 新增workrave对象到面板
##### 如何设置 Workrave 属性?
如果修改 workrave 对象的属性,执行以下步骤:
* 右键 workrave 对象打开面板对象弹出
* 选中偏好。使用属性对话框修改对应属性
![](https://www.cyberciti.biz/media/new/tips/2009/11/linux-gnome-workwave-preferences-.png)
Fig.02: 修改 Workrave 对象属性
#### Workrave 运行展示
主窗口显示下一次提醒休息的剩余时间,这个窗口可以关闭,时间提示窗口会在面板上。
![Fig.03: 时间计数器 ][8]
Fig.03:时间计数器
![Fig.04: Workrave 小姐- 引导你做伸展运动的动画][9]
Fig.04: Workrave 小姐- 引导你做伸展运动的动画
休息提示窗口,请求你暂停一下工作
![Fig.05: 休息提示倒计时 ][10]
Fig.05: 休息提示倒计时
![Fig.06: 你可以跳过休息按钮 ][11]
Fig.06: 你可以跳过休息按钮
##### 参考链接:
1. [Workrave 项目][12] 主页
2. [pokoy][13] 轻量级防止重复性压迫损伤RSI和其他计算机压力的程序
3. GNOME3下的[Pomodoro][14] 计数器 .
4. [RSI][2] 的维基百科
### 关于作者
作者是nixCraft创始人经验丰富的系统管理员同时也是一个Linux/Unix系统下的shell脚本培训师。他曾服务于全球客户并与多个行业合作包括IT教育国防和航天研究以及非盈利机构。可以[Twitter][15], [Facebook][16], [Google+][17]关注他。
--------------------------------------------------------------------------------
via: https://www.cyberciti.biz/tips/repetitive-strain-injury-prevention-software.html
作者:[Vivek Gite][a]
译者:[guevaraya](https://github.com/guevaraya)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:https://www.cyberciti.biz/
[1]:https://www.cyberciti.biz/media/new/tips/2009/11/workrave-image.jpg
[2]:https://en.wikipedia.org/wiki/Repetitive_strain_injury
[3]:https://web.eecs.umich.edu/~cscott/rsi.html##symptoms
[4]:https://www.cyberciti.biz/faq/ubuntu-lts-debian-linux-apt-command-examples/
[5]:https://www.cyberciti.biz/tips/linux-debian-package-management-cheat-sheet.html
[6]:https://www.cyberciti.biz/faq/rhel-centos-fedora-linux-yum-command-howto/
[7]:https://www.cyberciti.biz/media/new/tips/2009/11/add-workwave-to-panel.png
[8]:https://www.cyberciti.biz/media/new/tips/2009/11/screenshot-workrave.png
[9]:https://www.cyberciti.biz/media/new/tips/2009/11/miss-workrave.png
[10]:https://www.cyberciti.biz/media/new/tips/2009/11/time-for-micro-pause.gif
[11]:https://www.cyberciti.biz/media/new/tips/2009/11/Micro-break.png
[12]:http://www.workrave.org/
[13]:https://github.com/ttygde/pokoy
[14]:http://gnomepomodoro.org
[15]:https://twitter.com/nixcraft
[16]:https://facebook.com/nixcraft
[17]:https://plus.google.com/+CybercitiBiz

View File

@ -0,0 +1,55 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Get started with eDEX-UI, a Tron-influenced terminal program for tablets and desktops)
[#]: via: (https://opensource.com/article/19/1/productivity-tool-edex-ui)
[#]: author: (Kevin Sonney https://opensource.com/users/ksonney (Kevin Sonney))
开始使用 eDEX-UI一款受《创战纪》影响的平板电脑和台式机终端程序
======
使用 eDEX-UI 让你的工作更有趣,这是我们开源工具系列中的第 15 个工具,它将使你在 2019 年更高效。
![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/button_push_open_keyboard_file_organize.png?itok=KlAsk1gx)
每年年初似乎都有疯狂的冲动想提高工作效率。新年的决心,渴望开启新的一年,当然,“抛弃旧的,拥抱新的”的态度促成了这一切。通常这时的建议严重偏向闭源和专有软件,但事实上并不用这样。
这是我挑选出的 19 个新的(或者对你而言新的)开源工具中的第 15 个工具来帮助你在 2019 年更有效率。
### eDEX-UI
当[《创:战纪》][1]上映时我才 11是岁。我不能否认尽管这部电影充满幻想但它对我后来的职业选择产生了影响。
![](https://opensource.com/sites/default/files/uploads/edex-ui-1.png)
[eDEX-UI][2] 是一款专为平板电脑和台式机设计的跨平台终端程序,它受到《创:战纪》用户界面的启发。它在选项卡式界面中有五个终端,因此可以轻松地在任务之间切换,以及显示有用的系统信息。
在启动时eDEX-UI 会启动一系列的东西,其中包含它所基于的 ElectronJS 系统的信息。启动后eDEX-UI 会显示系统信息、文件浏览器、键盘(用于平板电脑)和主终端选项卡。其他四个选项卡(被标记为 EMPTY没有加载任何内容并且当你单击它时将启动一个 shell。eDEX-UI 中的默认 shell 是 Bash如果在 Windows 上,则可能需要将其更改为 PowerShell 或 cmd.exe
![](https://opensource.com/sites/default/files/uploads/edex-ui-2.png)
更改文件浏览器中的目录将更改活动终端中的目录,反之亦然。文件浏览器可以执行你期望的所有操作,包括在单击文件时打开关联的应用。唯一的例外是 eDEX-UI 的 settings.json 文件(默认是 .config/eDEX-UI它会打开配置编辑器。这允许你为终端设置 shell 命令、更改主题以及修改用户界面的其他几个设置。主题也保存在配置目录中,因为它们也是 JSON 文件,所以创建自定义主题非常简单。
![](https://opensource.com/sites/default/files/uploads/edex-ui-3.png)
eDEX-UI 允许你使用完全仿真运行五个终端。默认终端类型是 xterm-color这意味着它支持全色彩。需要注意的一点是输入时键盘会亮起因此如果你在平板电脑上使用 eDEX-UI键盘可能会在人们看见屏幕的环境中带来安全风险。因此最好在这些设备上使用没有键盘的主题尽管在打字时看起来确实很酷。
![](https://opensource.com/sites/default/files/uploads/edex-ui-4.png)
虽然 eDEX-UI 仅支持五个终端窗口但这对我来说已经足够了。在平板电脑上eDEX-UI 给了我网络空间的感觉而不会影响我的效率。在桌面上eDEX-UI 支持所有功能,并让我在我的同事面前显得很酷。
--------------------------------------------------------------------------------
via: https://opensource.com/article/19/1/productivity-tool-edex-ui
作者:[Kevin Sonney][a]
选题:[lujun9972][b]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/ksonney (Kevin Sonney)
[b]: https://github.com/lujun9972
[1]: https://en.wikipedia.org/wiki/Tron
[2]: https://github.com/GitSquared/edex-ui

View File

@ -0,0 +1,87 @@
[#]: collector: (lujun9972)
[#]: translator: (HankChow)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (More About Angle Brackets in Bash)
[#]: via: (https://www.linux.com/blog/learn/2019/1/more-about-angle-brackets-bash)
[#]: author: (Paul Brown https://www.linux.com/users/bro66)
Bash 中尖括号的更多用法
======
![](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/bash-angles.png?itok=mVFnxPzF)
在[上一篇文章][1]当中,我们介绍了尖括号(`<>`)以及它们的一些用法。在这篇文章,我们继续来深入探讨尖括号的更多其它用法。
通过使用 `<`,可以实现“欺骗”的效果,让其它命令认为某个命令的输出是一个文件。
例如,在进行备份文件的时候不确定备份是否完整,就需要去确认某个目录是否已经包含从原目录中复制过去的所有文件。你可以试一下这样操作:
```
diff <(ls /original/dir/) <(ls /backup/dir/)
```
[`diff`][2] 命令是一个逐行比较两个文件之间差异的工具。在上面的例子中,就使用了 `<``diff` 认为两个 `ls` 命令输出的结果都是文件,从而能够比较它们之间的差异。
要注意,在 `<``(...)` 之间是没有空格的。
我尝试在我的图片目录和它的备份目录执行上面的命令,输出的是以下结果:
```
diff <(ls /My/Pictures/) <(ls /My/backup/Pictures/) 5d4 < Dv7bIIeUUAAD1Fc.jpg:large.jpg
```
输出结果中的 `<` 表示 `Dv7bIIeUUAAD1Fc.jpg:large.jpg` 这个文件存在于左边的目录(`/My/Pictures`)但不存在于右边的目录(`/My/backup/Pictures`)中。也就是说,在备份过程中可能发生了问题,导致这个文件没有被成功备份。如果 `diff` 没有显示出任何输出结果,就表明两个目录中的文件是一致的。
看到这里你可能会想到,既然可以通过 `<` 将一些命令行的输出内容作为一个文件,提供给一个需要接受文件格式的命令,那么在上一篇文章的“最喜欢的演员排序”例子中,就可以省去中间的一些步骤,直接对输出内容执行 `sort` 操作了。
确实如此,这个例子可以简化成这样:
```
sort -r <(while read -r name surname films;do echo $films $name $surname ; done < CBactors)
```
### Here string
除此以外,尖括号的重定向功能还有另一种使用方式。
使用 `echo` 和管道(`|`)来传递变量的用法,相信大家都不陌生。假如想要把一个字符串变量转换为全大写形式,你可以这样做:
```
myvar="Hello World" echo $myvar | tr '[:lower:]' '[:upper:]' HELLO WORLD
```
[`tr`][3] 命令可以将一个字符串转换为某种格式。在上面的例子中,就使用了 `tr` 将字符串中的所有小写字母都转换为大写字母。
要理解的是,这个传递过程的重点不是变量,而是变量的值,也就是字符串 `Hello World`。这样的字符串叫做 here string含义是“这就是我们要处理的字符串”。但对于上面的例子还可以用更直观的方式的处理就像下面这样
```
tr '[:lower:]' '[:upper:]' <<< $myvar
```
这种简便方式并不需要使用到 `echo` 或者管道,而是使用了我们一直在说的尖括号。
### 总结
使用 `<``>` 这两个简单的符号原来可以实现这么多功能Bash 又一次为工作的灵活性提供了很多选择。
当然,我们的介绍还远远没有完结,因为还有很多别的符号可以为 Bash 命令带来更多便利。不过如果没有充分理解它们,充满符号的 Bash 命令看起来只会像是一堆乱码。接下来我会解读更多类似的 Bash 符号,下次见!
--------------------------------------------------------------------------------
via: https://www.linux.com/blog/learn/2019/1/more-about-angle-brackets-bash
作者:[Paul Brown][a]
选题:[lujun9972][b]
译者:[HankChow](https://github.com/HankChow)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.linux.com/users/bro66
[b]: https://github.com/lujun9972
[1]: https://www.linux.com/blog/learn/2019/1/understanding-angle-brackets-bash
[2]: https://linux.die.net/man/1/diff
[3]: https://linux.die.net/man/1/tr