mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-03-21 02:10:11 +08:00
Merge remote-tracking branch 'LCTT/master'
This commit is contained in:
commit
33d77ff851
@ -1,4 +1,5 @@
|
||||
Cgo and Python
|
||||
[#] MonkeyDEcho translating
|
||||
============================================================
|
||||
|
||||

|
||||
|
@ -1,171 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (MonkeyDEcho )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: subject: (5 Minimal Web Browsers for Linux)
|
||||
[#]: via: (https://www.linux.com/blog/intro-to-linux/2018/11/5-minimal-web-browsers-linux)
|
||||
[#]: author: (Jack Wallen https://www.linux.com/users/jlwallen)
|
||||
[#]: url: ( )
|
||||
|
||||
5 Minimal Web Browsers for Linux
|
||||
======
|
||||
linux上的五种微型浏览器
|
||||
======
|
||||
|
||||

|
||||
|
||||
There are so many reasons to enjoy the Linux desktop. One reason I often state up front is the almost unlimited number of choices to be found at almost every conceivable level. From how you interact with the operating system (via a desktop interface), to how daemons run, to what tools you use, you have a multitude of options.
|
||||
有太多理由去选择使用linux系统。很重要的一个理由是,我们可以按照我们自己的想法去选择想要的。从操作系统的交互方式(桌面系统)到守护系统的运行方式,在到使用的工具,你用更多的选择。
|
||||
|
||||
The same thing goes for web browsers. You can use anything from open source favorites, such as [Firefox][1] and [Chromium][2], or closed sourced industry darlings like [Vivaldi][3] and [Chrome][4]. Those options are full-fledged browsers with every possible bell and whistle you’ll ever need. For some, these feature-rich browsers are perfect for everyday needs.
|
||||
web浏览器也是如此。你可以使用开源的[火狐][1],[Chromium][2];或者未开源的[Vivaldi][3],[Chrome][4]。这些功能强大的浏览器有你需要的各种功能。对于某些人,这些功能完备的浏览器是日常必需的。
|
||||
|
||||
There are those, however, who prefer using a web browser without all the frills. In fact, there are many reasons why you might prefer a minimal browser over a standard browser. For some, it’s about browser security, while others look at a web browser as a single-function tool (as opposed to a one-stop shop application). Still others might be running low-powered machines that cannot handle the requirements of, say, Firefox or Chrome. Regardless of the reason, Linux has you covered.
|
||||
但是,有些人更喜欢没有冗余功能的纯粹的浏览器。实际上,有很多原因导致你会选择微型的浏览器而不选择上述功能完备的浏览器。对于某些人来说,与浏览器的安全有关;而有些人则将浏览器当作一种简单的工具(而不是一站式商店应用程序);还有一些可能运行在低功率的计算机上,这些计算机无法满足火狐,chrome浏览器的运行要求。无论出于何种原因,在linux系统上都可以满足你的要求。
|
||||
|
||||
Let’s take a look at five of the minimal browsers that can be installed on Linux. I’ll be demonstrating these browsers on the Elementary OS platform, but each of these browsers are available to nearly every distribution in the known Linuxverse. Let’s dive in.
|
||||
让我们看一下可以在linux上安装运行的五种微型浏览器。我将在 Elementary 的操作系统平台上演示这些浏览器,在已知的linux发型版中几乎每个版本都可以使用这些浏览器。让我们一起来看一下吧!
|
||||
|
||||
### GNOME Web
|
||||
|
||||
GNOME Web (codename Epiphany, which means [“a usually sudden manifestation or perception of the essential nature or meaning of something”][5]) is the default web browser for Elementary OS, but it can be installed from the standard repositories. (Note, however, that the recommended installation of Epiphany is via Flatpak or Snap). If you choose to install via the standard package manager, issue a command such as sudo apt-get install epiphany-browser -y for successful installation.
|
||||
GNOME web (Epiphany 含义:[顿悟][5])是Elementary系统默认的web浏览器,也可以从标准存储库中安装。(注意,建议通过使用 Flatpak 或者 Snap 工具安装),如果你想选择标准软件包管理器进行安装,请执行 ```sudo apt-get install epiphany-browser -y``` 命令成功安装。
|
||||
|
||||
Epiphany uses the WebKit rendering engine, which is the same engine used in Apple’s Safari browser. Couple that rendering engine with the fact that Epiphany has very little in terms of bloat to get in the way, you will enjoy very fast page-rendering speeds. Epiphany development follows strict adherence to the following guidelines:
|
||||
|
||||
* Simplicity - Feature bloat and user interface clutter are considered evil.
|
||||
|
||||
* Standards compliance - No non-standard features will ever be introduced to the codebase.
|
||||
|
||||
* Software freedom - Epiphany will always be released under a license that respects freedom.
|
||||
|
||||
* Human interface - Epiphany follows the [GNOME Human Interface Guidelines][6].
|
||||
|
||||
* Minimal preferences - Preferences are only added when they make sense and after careful consideration.
|
||||
|
||||
* Target audience - Non-technical users are the primary target audience (which helps to define the types of features that are included).
|
||||
|
||||
|
||||
|
||||
|
||||
GNOME Web is as clean and simple a web browser as you’ll find (Figure 1).
|
||||
|
||||
![GNOME Web][8]
|
||||
|
||||
Figure 1: The GNOME Web browser displaying a minimal amount of preferences for the user.
|
||||
|
||||
[Used with permission][9]
|
||||
|
||||
The GNOME Web manifesto reads:
|
||||
|
||||
A web browser is more than an application: it is a way of thinking, a way of seeing the world. Epiphany's principles are simplicity, standards compliance, and software freedom.
|
||||
|
||||
### Netsurf
|
||||
|
||||
The [Netsurf][10] minimal web browser opens almost faster than you can release the mouse button. Netsurf uses its own layout and rendering engine (designed completely from scratch), which is rather hit and miss in its rendering (Figure 2).
|
||||
|
||||

|
||||
|
||||
Although you might find Netsurf to suffer from rendering issues on certain sites, understand the Hubbub HTML parser is following the work-in-progress HTML5 specification, so there will be issues popup now and then. To ease those rendering headaches, Netsurf does include HTTPS support, web page thumbnailing, URL completion, scale view, bookmarks, full-screen mode, keyboard shorts, and no particular GUI toolkit requirements. That last bit is important, especially when you switch from one desktop to another.
|
||||
|
||||
For those curious as to the requirements for Netsurf, the browser can run on a machine as slow as a 30Mhz ARM 6 computer with 16MB of RAM. That’s impressive, by today’s standard.
|
||||
|
||||
### QupZilla
|
||||
|
||||
If you’re looking for a minimal browser that uses the Qt Framework and the QtWebKit rendering engine, [QupZilla][11] might be exactly what you’re looking for. QupZilla does include all the standard features and functions you’d expect from a web browser, such as bookmarks, history, sidebar, tabs, RSS feeds, ad blocking, flash blocking, and CA Certificates management. Even with those features, QupZilla still manages to remain a very fast lightweight web browser. Other features include: Fast startup, speed dial homepage, built-in screenshot tool, browser themes, and more.
|
||||
One feature that should appeal to average users is that QupZilla has a more standard preferences tools than found in many lightweight browsers (Figure 3). So, if going too far outside the lines isn’t your style, but you still want something lighter weight, QupZilla is the browser for you.
|
||||
|
||||
![QupZilla][13]
|
||||
|
||||
Figure 3: The QupZilla preferences tool.
|
||||
|
||||
[Used with permission][9]
|
||||
|
||||
### Otter Browser
|
||||
|
||||
Otter Browser is a free, open source attempt to recreate the closed-source offerings found in the Opera Browser. Otter Browser uses the WebKit rendering engine and has an interface that should be immediately familiar with any user. Although lightweight, Otter Browser does include full-blown features such as:
|
||||
|
||||
* Passwords manager
|
||||
|
||||
* Add-on manager
|
||||
|
||||
* Content blocking
|
||||
|
||||
* Spell checking
|
||||
|
||||
* Customizable GUI
|
||||
|
||||
* URL completion
|
||||
|
||||
* Speed dial (Figure 4)
|
||||
|
||||
* Bookmarks and various related features
|
||||
|
||||
* Mouse gestures
|
||||
|
||||
* User style sheets
|
||||
|
||||
* Built-in Note tool
|
||||
|
||||
|
||||
![Otter][15]
|
||||
|
||||
Figure 4: The Otter Browser Speed Dial tab.
|
||||
|
||||
[Used with permission][9]
|
||||
|
||||
Otter Browser can be run on nearly any Linux distribution from an [AppImage][16], so there’s no installation required. Just download the AppImage file, give the file executable permissions (with the command chmod u+x otter-browser-*.AppImage), and then launch the app with the command ./otter-browser*.AppImage.
|
||||
|
||||
Otter Browser does an outstanding job of rendering websites and could function as your go-to minimal browser with ease.
|
||||
|
||||
### Lynx
|
||||
|
||||
Let’s get really minimal. When I first started using Linux, back in ‘97, one of the web browsers I often turned to was a text-only take on the app called [Lynx][17]. It should come as no surprise that Lynx is still around and available for installation from the standard repositories. As you might expect, Lynx works from the terminal window and doesn’t display pretty pictures or render much in the way of advanced features (Figure 5). In fact, Lynx is as bare-bones a browser as you will find available. Because of how bare-bones this web browser is, it’s not recommended for everyone. But if you happen to have a gui-less web server and you have a need to be able to read the occasional website, Lynx can be a real lifesaver.
|
||||
|
||||
![Lynx][19]
|
||||
|
||||
Figure 5: The Lynx browser rendering the Linux.com page.
|
||||
|
||||
[Used with permission][9]
|
||||
|
||||
I have also found Lynx an invaluable tool when troubleshooting certain aspects of a website (or if some feature on a website is preventing me from viewing the content in a regular browser). Another good reason to use Lynx is when you only want to view the content (and not the extraneous elements).
|
||||
|
||||
### Plenty More Where This Came From
|
||||
|
||||
There are plenty more minimal browsers than this. But the list presented here should get you started down the path of minimalism. One (or more) of these browsers are sure to fill that need, whether you’re running it on a low-powered machine or not.
|
||||
|
||||
Learn more about Linux through the free ["Introduction to Linux" ][20]course from The Linux Foundation and edX.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.linux.com/blog/intro-to-linux/2018/11/5-minimal-web-browsers-linux
|
||||
|
||||
作者:[Jack Wallen][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/jlwallen
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://www.mozilla.org/en-US/firefox/new/
|
||||
[2]: https://www.chromium.org/
|
||||
[3]: https://vivaldi.com/
|
||||
[4]: https://www.google.com/chrome/
|
||||
[5]: https://www.merriam-webster.com/dictionary/epiphany
|
||||
[6]: https://developer.gnome.org/hig/stable/
|
||||
[7]: /files/images/minimalbrowsers1jpg
|
||||
[8]: https://www.linux.com/sites/lcom/files/styles/rendered_file/public/minimalbrowsers_1.jpg?itok=Q7wZLF8B (GNOME Web)
|
||||
[9]: /licenses/category/used-permission
|
||||
[10]: https://www.netsurf-browser.org/
|
||||
[11]: https://qupzilla.com/
|
||||
[12]: /files/images/minimalbrowsers3jpg
|
||||
[13]: https://www.linux.com/sites/lcom/files/styles/rendered_file/public/minimalbrowsers_3.jpg?itok=O8iMALWO (QupZilla)
|
||||
[14]: /files/images/minimalbrowsers4jpg
|
||||
[15]: https://www.linux.com/sites/lcom/files/styles/rendered_file/public/minimalbrowsers_4.jpg?itok=5bCa0z-e (Otter)
|
||||
[16]: https://sourceforge.net/projects/otter-browser/files/
|
||||
[17]: https://lynx.browser.org/
|
||||
[18]: /files/images/minimalbrowsers5jpg
|
||||
[19]: https://www.linux.com/sites/lcom/files/styles/rendered_file/public/minimalbrowsers_5.jpg?itok=p_Lmiuxh (Lynx)
|
||||
[20]: https://training.linuxfoundation.org/linux-courses/system-administration-training/introduction-to-linux
|
@ -1,71 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (PaperWM: tiled window management for GNOME)
|
||||
[#]: via: (https://jvns.ca/blog/2020/01/05/paperwm/)
|
||||
[#]: author: (Julia Evans https://jvns.ca/)
|
||||
|
||||
PaperWM: tiled window management for GNOME
|
||||
======
|
||||
|
||||
When I started using Linux on my personal computer, one of the first things I got excited about was tiny lightweight window managers, largely because my laptop at the time had 32MB of RAM and anything else was unusable.
|
||||
|
||||
Then I got into tiling window managers like [xmonad][1]! I could manage my windows with my keyboard! They were so fast! I could configure xmonad by writing a Haskell program! I could customize everything in all kinds of fun ways (like using [dmenu][2] as a launcher)! I used 3 or 4 different tiling window managers over the years and it was fun.
|
||||
|
||||
About 6 years ago I decided configuring my tiling window manager wasn’t fun for me anymore and switched to using the Ubuntu stock desktop environment: Gnome. (which is much faster now that I have 500x more RAM in my laptop :) )
|
||||
|
||||
So I’ve been using Gnome for a long time, but I still kind of missed tiling window managers. Then 6 months ago a friend told me about [PaperWM][3], which lets you tile your windows in Gnome! I installed it immediately and I’ve been using it ever since.
|
||||
|
||||
### PaperWM: tiling window management for Gnome
|
||||
|
||||
The basic idea of [PaperWM][3] is: you want to keep using Gnome (because all kinds of things Just Work in Gnome) but you also kinda wish you were using a tiling window manager.
|
||||
|
||||
It’s a Gnome extension (instead of being a standalone window manager) and it’s in Javascript.
|
||||
|
||||
### “Paper” means all of your windows are in a line
|
||||
|
||||
The main idea in PaperWM is it puts all your windows in a line, which is actually quite different from traditional tiling window managers where you can tile your windows any way you want. Here’s a gif of me moving between / resizing some windows while writing this blog post (there’s a browser and two terminal windows):
|
||||
|
||||
![][4]
|
||||
|
||||
PaperWM’s Github README links to this video: <http://10gui.com/video/>, which describes a similar system as a “linear window manager”.
|
||||
|
||||
I’d never heard of this way of organizing windows before but I like the simplicity of it – if I’m looking for a specific window I just move left/right until I find it.
|
||||
|
||||
### everything I do in PaperWM
|
||||
|
||||
there are lots of other features but these are the only ones I use:
|
||||
|
||||
* move left and right between windows (`Super + ,`, `Super + .`)
|
||||
* move the window left/right in the ordering (`Super+Shift+,`, `Super+Shift+.`)
|
||||
* full screen a window (`Super + f`)
|
||||
* make a window smaller (`Super + r`)
|
||||
|
||||
|
||||
|
||||
### I like tools that I don’t have to configure
|
||||
|
||||
I’ve been using PaperWM for 6 months on a laptop and I really like it! I also really appreciate that even though it’s configurable (by writing a Javascript configuration file), it does the things I want out of the box without me having to research how to configure it.
|
||||
|
||||
The [fish shell][5] is another delightful tool like that – I basically don’t configure fish at all (except to set environment variables etc) and I really like the default feature set.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://jvns.ca/blog/2020/01/05/paperwm/
|
||||
|
||||
作者:[Julia Evans][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://jvns.ca/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://xmonad.org/
|
||||
[2]: https://wiki.archlinux.org/index.php/Dmenu
|
||||
[3]: https://github.com/paperwm/PaperWM
|
||||
[4]: https://jvns.ca/images/paperwm.gif
|
||||
[5]: https://jvns.ca/blog/2017/04/23/the-fish-shell-is-awesome/
|
@ -1,5 +1,5 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
|
@ -0,0 +1,140 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Bash Script to Send eMail With a List of User Accounts Expiring in “X” Days)
|
||||
[#]: via: (https://www.2daygeek.com/bash-script-to-check-user-account-password-expiry-linux/)
|
||||
[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/)
|
||||
|
||||
Bash Script to Send eMail With a List of User Accounts Expiring in “X” Days
|
||||
======
|
||||
|
||||
The password enforcement policy is common to all operating systems and applications.
|
||||
|
||||
If you want to **[implement a password enforcement policy on Linux][1]**, go to the following article.
|
||||
|
||||
The password enforcement policy will be enforced by most companies by default, but the time period will be different depending on the company’s requirements.
|
||||
|
||||
Usually everyone uses a 90-days password cycle.
|
||||
|
||||
The user will only **[change the password][2]** on some of the servers they use, and they won’t change the password on the servers they don’t use often.
|
||||
|
||||
In particular, most team forget to change the service account password, which can lead to breaking regular jobs even if they are configured to work with **[SSH key-based authentication][3]**.
|
||||
|
||||
SSH key-based authentication and **[cronjobs][4]** will not work if the user account password expires.
|
||||
|
||||
To avoid this situation, we have created a **[shell script][5]** that sends you a list of user accounts that expire within 10 days.
|
||||
|
||||
There are two **[bash scripts][6]** included in this tutorial that will help you collect information about user expiration days on your system.
|
||||
|
||||
### 1) Bash Script to Check List of User Accounts Expiring in 10 Days
|
||||
|
||||
This script will help you to check the list of user accounts that expire in 10 days on your terminal.
|
||||
|
||||
```
|
||||
# vi /opt/script/user-password-expiry.sh
|
||||
|
||||
#!/bin/sh
|
||||
/tmp/user-expiry-1.txt
|
||||
/tmp/user-expiry.txt
|
||||
echo "-------------------------------------------------"
|
||||
echo "UserName The number of days the password expires"
|
||||
echo "-------------------------------------------------"
|
||||
for usern in u1 u2 u3 u4
|
||||
do
|
||||
today=$(date +%s)
|
||||
userexpdate=$(chage -l $usern | grep 'Password expires' |cut -d: -f2)
|
||||
passexp=$(date -d "$userexpdate" "+%s")
|
||||
exp=`expr \( $passexp - $today \)`
|
||||
expday=`expr \( $exp / 86400 \)`
|
||||
echo "$usern $expday" >> /tmp/user-expiry.txt
|
||||
done
|
||||
cat /tmp/user-expiry.txt | awk '$2 <= 10' > /tmp/user-expiry-1.txt
|
||||
cat /tmp/user-expiry-1.txt | column -t
|
||||
```
|
||||
|
||||
Set an executable Linux file permission to **“user-password-expiry.sh”** file.
|
||||
|
||||
```
|
||||
# chmod +x /opt/script/user-password-expiry.sh
|
||||
```
|
||||
|
||||
You will get an output like the one below. But the username and days may be different
|
||||
|
||||
```
|
||||
# sh /opt/script/user-password-expiry.sh
|
||||
|
||||
-------------------------------------------------
|
||||
UserName The number of days the password expires
|
||||
-------------------------------------------------
|
||||
u1 -25
|
||||
u2 9
|
||||
u3 3
|
||||
u4 5
|
||||
```
|
||||
|
||||
### 2) Bash Script to Send eMail With a List of User Accounts Expiring in 10 Days
|
||||
|
||||
This script will send a mail with a list of user accounts expiring in 10 days.
|
||||
|
||||
```
|
||||
# vi /opt/script/user-password-expiry-mail.sh
|
||||
|
||||
#!/bin/sh
|
||||
SUBJECT="Information About User Password Expiration on "`date`""
|
||||
MESSAGE="/tmp/user-expiry.txt"
|
||||
MESSAGE1="/tmp/user-expiry-1.txt"
|
||||
TO="[email protected]"
|
||||
echo "-------------------------------------------------" >> $MESSAGE1
|
||||
echo "UserName The number of days the password expires" >> $MESSAGE1
|
||||
echo "-------------------------------------------------" >> $MESSAGE1
|
||||
for usern in u1 u2 u3 u4
|
||||
do
|
||||
today=$(date +%s)
|
||||
userexpdate=$(chage -l $usern | grep 'Password expires' |cut -d: -f2)
|
||||
passexp=$(date -d "$userexpdate" "+%s")
|
||||
exp=`expr \( $passexp - $today \)`
|
||||
expday=`expr \( $exp / 86400 \)`
|
||||
echo "$usern $expday" >> $MESSAGE
|
||||
done
|
||||
cat $MESSAGE | awk '$2 <= 10' >> $MESSAGE1
|
||||
mail -s "$SUBJECT" "$TO" < $MESSAGE1
|
||||
rm $MESSAGE
|
||||
rm $MESSAGE1
|
||||
```
|
||||
|
||||
Set an executable Linux file permission to **“user-password-expiry-mail.sh”** file.
|
||||
|
||||
```
|
||||
# chmod +x /opt/script/user-password-expiry-mail.sh
|
||||
```
|
||||
|
||||
Finally add a **[cronjob][4]** to automate this. It runs once in a day at 8AM.
|
||||
|
||||
```
|
||||
# crontab -e
|
||||
0 8 * * * /bin/bash /opt/script/user-password-expiry-mail.sh
|
||||
```
|
||||
|
||||
You will receive a mail similar to the first shell script output.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.2daygeek.com/bash-script-to-check-user-account-password-expiry-linux/
|
||||
|
||||
作者:[Magesh Maruthamuthu][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.2daygeek.com/author/magesh/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://www.2daygeek.com/how-to-set-password-complexity-policy-on-linux/
|
||||
[2]: https://www.2daygeek.com/linux-passwd-chpasswd-command-set-update-change-users-password-in-linux-using-shell-script/
|
||||
[3]: https://www.2daygeek.com/configure-setup-passwordless-ssh-key-based-authentication-linux/
|
||||
[4]: https://www.2daygeek.com/linux-crontab-cron-job-to-schedule-jobs-task/
|
||||
[5]: https://www.2daygeek.com/category/shell-script/
|
||||
[6]: https://www.2daygeek.com/category/bash-script/
|
167
translated/tech/20181105 5 Minimal Web Browsers for Linux.md
Normal file
167
translated/tech/20181105 5 Minimal Web Browsers for Linux.md
Normal file
@ -0,0 +1,167 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (MonkeyDEcho )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: subject: (5 Minimal Web Browsers for Linux)
|
||||
[#]: via: (https://www.linux.com/blog/intro-to-linux/2018/11/5-minimal-web-browsers-linux)
|
||||
[#]: author: (Jack Wallen https://www.linux.com/users/jlwallen)
|
||||
[#]: url: ( )
|
||||
|
||||
|
||||
linux上的五种微型浏览器
|
||||
======
|
||||
|
||||

|
||||
|
||||
有太多理由去选择使用linux系统。很重要的一个理由是,我们可以按照我们自己的想法去选择想要的。从操作系统的交互方式(桌面系统)到守护系统的运行方式,在到使用的工具,你用更多的选择。
|
||||
|
||||
web浏览器也是如此。你可以使用开源的[火狐][1],[Chromium][2];或者未开源的[Vivaldi][3],[Chrome][4]。这些功能强大的浏览器有你需要的各种功能。对于某些人,这些功能完备的浏览器是日常必需的。
|
||||
|
||||
但是,有些人更喜欢没有冗余功能的纯粹的浏览器。实际上,有很多原因导致你会选择微型的浏览器而不选择上述功能完备的浏览器。对于某些人来说,与浏览器的安全有关;而有些人则将浏览器当作一种简单的工具(而不是一站式商店应用程序);还有一些可能运行在低功率的计算机上,这些计算机无法满足火狐,chrome浏览器的运行要求。无论出于何种原因,在linux系统上都可以满足你的要求。
|
||||
|
||||
让我们看一下可以在linux上安装运行的五种微型浏览器。我将在 Elementary 的操作系统平台上演示这些浏览器,在已知的linux发型版中几乎每个版本都可以使用这些浏览器。让我们一起来看一下吧!
|
||||
|
||||
### GNOME Web
|
||||
|
||||
GNOME web (Epiphany 含义:[顿悟][5])是Elementary系统默认的web浏览器,也可以从标准存储库中安装。(注意,建议通过使用 Flatpak 或者 Snap 工具安装),如果你想选择标准软件包管理器进行安装,请执行 ```sudo apt-get install epiphany-browser -y``` 命令成功安装。
|
||||
|
||||
Epiphany 使用WebKit的渲染引擎,该引擎与Apple的Safari浏览器中使用的引擎相同。这个引擎和Epiphany非常契合,可以达到非常快的页面渲染速度。Epiphany严格遵守以下准则:
|
||||
|
||||
* 简单性 - 功能复杂和用户界面混乱都是不被允许的.
|
||||
|
||||
* 规范性 - 任何非标准特性都不会引入到代码库中。
|
||||
|
||||
* 软件开源 - Epiphany始终遵守自由开源许可证。
|
||||
|
||||
* 人机交互 - Epiphany 始终遵守[GNOME的人机交互指南][6]。
|
||||
|
||||
* 最小首选项 - 经过慎重考虑才添加首选项。
|
||||
|
||||
* 受众群体 - 非技术用户是主要的受众目标,(有助于定义所包含功能的类型)。
|
||||
|
||||
|
||||
|
||||
|
||||
GNOME web浏览器就像看到的一样干净简洁 (Figure 1)。
|
||||
|
||||
|
||||
![GNOME Web][8]
|
||||
|
||||
Figure 1: GNOME 浏览器为用户展示最少的首选项.
|
||||
|
||||
[许可证书][9]
|
||||
|
||||
GNOME Web 的声明如下:
|
||||
|
||||
web 浏览器它不仅仅是一个应用程序,还是一种思维方式,一种看世界的方式。 Epiphany 的原则是简洁,标准和自由。
|
||||
### Netsurf
|
||||
|
||||
[Netsurf][10] 浏览器是最小的浏览器,他的打开速度几乎和你松开鼠标一样。Netsurf 使用自己的布局和渲染引擎(完全从零开始设计的) 在渲染过程的设计中屡屡碰壁(Figure 2).
|
||||
|
||||

|
||||
|
||||
尽管你可能在特定的站点上发现 Netsurf的问题,但如果你了解Hubbub解析器的话,知道它正在兼容html5规范,是不是的会有一点问题。Netsurf对https的支持,网页缩略图,URL解析,缩放视图,书签,全屏模式,快捷键和GUI的工具包的功能;最后一点十分重要,当你桌面来回切换时,为了缓解渲染带来的问题。
|
||||
|
||||
对于那些对Netsurf 存在好奇的人来说,以现在的标准,他能在 16MB内存,30Mhz的ARM cpu的机器上运行,是让人惊奇的。
|
||||
|
||||
### QupZilla
|
||||
|
||||
如果你找寻使用Qt Framework 和 the QtWebKit 渲染引擎的最小浏览器,QupZilla][11]是你最佳的选择。QupZilla 包含web浏览所有的标准功能,例如:书签,历史记录,侧边栏,选项卡,RSS,广告屏蔽,flash屏蔽,和CA证书管理。及时拥有这么多的功能,QupZilla 仍然是快速,轻量级的浏览器。另外还有其他的功能:快速启动,快速拨号主页,内置屏幕截图工具,浏览器主题等。
|
||||
吸引用户的一点是,与许多轻量级浏览器相比,QupZilla有更标准的首选项工具(图3)。所以,如果你很多功能,但你仍然想要更轻量,那么QupZilla就是你最好的选择。
|
||||
|
||||
![QupZilla][13]
|
||||
|
||||
Figure 3: QupZilla 首选项工具.
|
||||
|
||||
[许可证书][9]
|
||||
|
||||
### Otter Browser
|
||||
|
||||
Otter 浏览器是一种免费开源的,旨在重建Opera 12.x的浏览器。它使用WebKit渲染引擎,并且有用户的熟悉界面。虽然它轻量,但它有丰富的功能:
|
||||
|
||||
* 密码管理
|
||||
|
||||
* 插件管理
|
||||
|
||||
* 内容拦截
|
||||
|
||||
* 拼写检查
|
||||
|
||||
* 自定义界面
|
||||
|
||||
* 网址补全
|
||||
|
||||
* 快速访问 (Figure 4)
|
||||
|
||||
* 书签和其他相关功能
|
||||
|
||||
* 鼠标手势
|
||||
|
||||
* 用户样式表
|
||||
|
||||
* 内建笔记功能
|
||||
|
||||
|
||||
![Otter][15]
|
||||
|
||||
Figure 4: Otter 浏览器快起标签项.
|
||||
|
||||
[许可证书][9]
|
||||
|
||||
Otter浏览器可以在几乎所有Linux发行版上运行通过[AppImage][16]软件格式,因此无需安装。只需下载AppImage文件,授予文件可执行权限(使用命令 `chmod u+x otter-browser-.AppImage`),然后使用命令`./otter-browser.AppImage` 启动应用程序。
|
||||
|
||||
Otter浏览器在网站展示方面做得非常出色,可以轻松地用作你的微型浏览器。
|
||||
|
||||
|
||||
### Lynx
|
||||
|
||||
让我们见识真正的微型浏览器。早在97年,当我使用Linux时,就经常使用的[Lynx][17]纯文本模式的网页浏览器。
|
||||
Lynx的存在并且可以从标准存储库中进行安装。正如您可能期望的那样,Lynx在终端窗口中工作,并且不会显示漂亮的图片和高级功能的渲染方式(图5)。事实上,Lynx是你能找到的最简单的浏览器。由于这个网页浏览器是如此简陋,所以不建议每个人都使用它。但如果你碰巧有一个没有界面的服务器,你需要能够偶尔访问的网站,Lynx是一个真正的救星。
|
||||
|
||||
![Lynx][19]
|
||||
|
||||
Figure 5: Lynx 浏览器展示 Linux.com 网址界面.
|
||||
|
||||
[许可证书][9]
|
||||
|
||||
我还发现Lynx是一个非常有用的工具,它可以帮助我解决网站某些方面的故障(或者如果网站上的某些功能阻止我在常规浏览器中查看内容)。使用Lynx的另一个重要原因是它可以让我们更加专注内容(而不是其他无关的元素)。
|
||||
|
||||
### Plenty More Where This Came From 更多
|
||||
|
||||
微型浏览器还有很多。但是这里列出的清单应该使你开始走极简主义的道路。无论您是否在低功率计算机上运行,这些浏览器中的一个(或多个)都一定可以满足这一需求。
|
||||
|
||||
了解linux 更多信息可以通过免费的["Linux 简洁" ][20]课程,该课程来源Linux基金和edX平台提供的。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.linux.com/blog/intro-to-linux/2018/11/5-minimal-web-browsers-linux
|
||||
|
||||
作者:[Jack Wallen][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[MonkeyDEcho](https://github.com/MonkeyDEcho)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.linux.com/users/jlwallen
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://www.mozilla.org/en-US/firefox/new/
|
||||
[2]: https://www.chromium.org/
|
||||
[3]: https://vivaldi.com/
|
||||
[4]: https://www.google.com/chrome/
|
||||
[5]: https://www.merriam-webster.com/dictionary/epiphany
|
||||
[6]: https://developer.gnome.org/hig/stable/
|
||||
[7]: /files/images/minimalbrowsers1jpg
|
||||
[8]: https://www.linux.com/sites/lcom/files/styles/rendered_file/public/minimalbrowsers_1.jpg?itok=Q7wZLF8B (GNOME Web)
|
||||
[9]: /licenses/category/used-permission
|
||||
[10]: https://www.netsurf-browser.org/
|
||||
[11]: https://qupzilla.com/
|
||||
[12]: /files/images/minimalbrowsers3jpg
|
||||
[13]: https://www.linux.com/sites/lcom/files/styles/rendered_file/public/minimalbrowsers_3.jpg?itok=O8iMALWO (QupZilla)
|
||||
[14]: /files/images/minimalbrowsers4jpg
|
||||
[15]: https://www.linux.com/sites/lcom/files/styles/rendered_file/public/minimalbrowsers_4.jpg?itok=5bCa0z-e (Otter)
|
||||
[16]: https://sourceforge.net/projects/otter-browser/files/
|
||||
[17]: https://lynx.browser.org/
|
||||
[18]: /files/images/minimalbrowsers5jpg
|
||||
[19]: https://www.linux.com/sites/lcom/files/styles/rendered_file/public/minimalbrowsers_5.jpg?itok=p_Lmiuxh (Lynx)
|
||||
[20]: https://training.linuxfoundation.org/linux-courses/system-administration-training/introduction-to-linux
|
@ -7,29 +7,28 @@
|
||||
[#]: via: (https://opensource.com/article/19/11/simulate-gravity-python)
|
||||
[#]: author: (Seth Kenlon https://opensource.com/users/seth)
|
||||
|
||||
Simulate gravity in your Python game
|
||||
在你的 Python 游戏中模拟引力
|
||||
======
|
||||
Learn how to program video games with Python's Pygame module and start
|
||||
manipulating gravity.
|
||||
学习如何使用 Python 的 Pygame 模块编程电脑游戏,并开始操作引力。
|
||||
![Cosmic stars in outer space][1]
|
||||
|
||||
The real world is full of movement and life. The thing that makes the real world so busy and dynamic is physics. Physics is the way matter moves through space. Since a video game world has no matter, it also has no physics, so game programmers have to _simulate_ physics.
|
||||
真实的世界充满了运动和生活。物理学使得真实的生活如此忙碌和动态。物理学是物质在空间中运动的方式。既然一个电脑游戏世界没有物质,它也就没有物理学规律,使用游戏程序员不得不 _模拟_ 物理学。
|
||||
|
||||
In terms of most video games, there are basically only two aspects of physics that are important: gravity and collision.
|
||||
从大多数电脑游戏来说,这里基本上仅有物理学的两个方向是重要的:引力和碰撞。
|
||||
|
||||
You implemented some collision detection when you [added an enemy][2] to your game, but this article adds more because gravity requires collision detection. Think about why gravity might involve collisions. If you can't think of any reasons, don't worry—it'll become apparent as you work through the sample code.
|
||||
当你[添加一个敌人][2]到你的游戏中时,你实现了一下碰撞检测,但是这篇文章添加更多的东西,因为引力需要碰撞检测。想想为什么引力可能涉及碰撞。如果你不能想到任何原因,不要担心—当你通过示例代码工作时,它将变得明显。
|
||||
|
||||
Gravity in the real world is the tendency for objects with mass to be drawn toward one another. The larger the object, the more gravitational influence it exerts. In video game physics, you don't have to create objects with mass great enough to justify a gravitational pull; you can just program a tendency for objects to fall toward the presumed largest object in the video game world: the world itself.
|
||||
引力在真实世界中的是有质量的物体来相互吸引的趋势。物体(质量)越大,它施加越大的引力作用。在电脑游戏物理学中,你不必创建质量足够大的物体来证明引力的正确;你可以在电脑游戏世界本身中仅编程一个物体落向假设的最大的对象的倾向。
|
||||
|
||||
### Adding a gravity function
|
||||
### 添加一个引力函数
|
||||
|
||||
Remember that your player already has a property to determine motion. Use this property to pull the player sprite toward the bottom of the screen.
|
||||
记住你的玩家已经有一个属性来决定动作。使用这个属性来将玩家精灵拉向屏幕底部。
|
||||
|
||||
In Pygame, higher numbers are closer to the bottom edge of the screen.
|
||||
在 Pygame 中,较高的数字更接近屏幕的底部边缘。
|
||||
|
||||
In the real world, gravity affects everything. In platformers, however, gravity is selective—if you add gravity to your entire game world, all of your platforms would fall to the ground. Instead, you add gravity just to your player and enemy sprites.
|
||||
在真实的世界中,引力影响一切。然而,在平台中,引力是有选择性的—如果你添加引力到你的整个游戏世界,你所有平台都将掉到地上。作为替换,你仅添加引力到你的玩家和敌人精灵中。
|
||||
|
||||
First, add a **gravity** function in your **Player** class:
|
||||
首先,在你的 **Player** 类中添加一个 **引力** 函数:
|
||||
|
||||
|
||||
```
|
||||
@ -37,11 +36,11 @@ First, add a **gravity** function in your **Player** class:
|
||||
self.movey += 3.2 # how fast player falls
|
||||
```
|
||||
|
||||
This is a simple function. First, you set your player in vertical motion, whether your player wants to be in motion or not. In other words, you have programmed your player to always be falling. That's basically gravity.
|
||||
这是一个简单的函数。首先,不管你的玩家是否想运动,你设置你的玩家垂直运动。也就是说,你已经编程你的玩家总是在下降。这基本上就是引力。
|
||||
|
||||
For the gravity function to have an effect, you must call it in your main loop. This way, Python applies the falling motion to your player once every clock tick.
|
||||
为使引力函数生效,你必需在你的主循环中调用它。这样,当每一个时钟滴答作响时,Python 应用下落运动到你玩家。
|
||||
|
||||
In this code, add the first line to your loop:
|
||||
在这代码中,添加第一行到你的循环中:
|
||||
|
||||
|
||||
```
|
||||
@ -49,49 +48,50 @@ In this code, add the first line to your loop:
|
||||
player.update()
|
||||
```
|
||||
|
||||
Launch your game to see what happens. Look sharp, because it happens fast: your player falls out of the sky, right off your game screen.
|
||||
启动你的游戏来看看会发生什么。注意,因为它快速地发生:你是玩家从天空上下落,恰好从你的游戏屏幕落下。
|
||||
|
||||
Your gravity simulation is working, but maybe too well.
|
||||
你的引力模拟是工作的,但是,也许太好了。
|
||||
|
||||
As an experiment, try changing the rate at which your player falls.
|
||||
作为一次试验,尝试更改你玩家下落的速度。
|
||||
|
||||
### Adding a floor to gravity
|
||||
### 添加一个地板到引力
|
||||
|
||||
The problem with your character falling off the world is that there's no way for your game to detect it. In some games, if a player falls off the world, the sprite is deleted and respawned somewhere new. In other games, the player loses points or a life. Whatever you want to happen when a player falls off the world, you have to be able to detect when the player disappears offscreen.
|
||||
你的游戏没有办法发现你的角色掉落出世界的问题。在一些游戏中,如果一个玩家掉落出世界,该精灵被删除,并在新的位置重生。在其它的游戏中,玩家丢失分数或一条生命。当一个玩家掉落出世界时,不管你想发生什么,你必需能够侦测出玩家何时消失在屏幕外。
|
||||
|
||||
In Python, to check for a condition, you can use an **if** statement.
|
||||
在 Python 中,要检查一个条件,你可以使用一个 **if** 语句。
|
||||
|
||||
You must check to see **if** your player is falling and how far your player has fallen. If your player falls so far that it reaches the bottom of the screen, then you can do _something_. To keep things simple, set the position of the player sprite to 20 pixels above the bottom edge.
|
||||
你必需查看你玩家**是否**正在掉落,以及你的玩家掉落到什么程度。如果你的玩家掉落到屏幕的底部,那么你可以做 _一些事情_ 。 为保持事情简单,设置玩家精灵的位置为底部边缘上方20像素。
|
||||
|
||||
Make your **gravity** function look like this:
|
||||
使你的 **引力** 函数看起来像这样:
|
||||
|
||||
|
||||
```
|
||||
def gravity(self):
|
||||
self.movey += 3.2 # how fast player falls
|
||||
|
||||
if self.rect.y > worldy and self.movey >= 0:
|
||||
if self.rect.y > worldy and self.movey >= 0:
|
||||
self.movey = 0
|
||||
self.rect.y = worldy-ty
|
||||
```
|
||||
|
||||
Then launch your game. Your sprite still falls, but it stops at the bottom of the screen. You may not be able to _see_ your sprite behind the ground layer, though. An easy fix is to make your player sprite bounce higher by adding another **-ty** to its new Y position after it hits the bottom of the game world:
|
||||
然后,启动你的游戏。你的精灵仍然下落,但是它停在屏幕的底部。不过,你也许不能 _看到_ 你在地面层下的精灵。一个简单的解决方法是,在精灵碰撞游戏世界的底部后,通过添加另一个 **-ty** 到它的新 Y 位置,从而使你的精灵弹跳更高:
|
||||
|
||||
|
||||
```
|
||||
def gravity(self):
|
||||
self.movey += 3.2 # how fast player falls
|
||||
|
||||
if self.rect.y > worldy and self.movey >= 0:
|
||||
if self.rect.y > worldy and self.movey >= 0:
|
||||
self.movey = 0
|
||||
self.rect.y = worldy-ty-ty
|
||||
```
|
||||
|
||||
Now your player bounces at the bottom of the screen, just behind your ground sprites.
|
||||
现在你的玩家在屏幕底部弹跳,恰好在你地面层精灵的后面。
|
||||
|
||||
What your player really needs is a way to fight gravity. The problem with gravity is, you can't fight it unless you have something to push off of. So, in the next article, you'll add ground and platform collision and the ability to jump. In the meantime, try applying gravity to the enemy sprite.
|
||||
你的玩家真正需要的是反抗引力的方法。引力问题是,你不能反抗它,除非你有一些东西来推开引力作用。因此,在接下来的文章中,你将添加地面和平台碰撞以及跳跃能力。在这期间,尝试应用引力到敌人精灵。
|
||||
|
||||
Here's all the code so far:
|
||||
|
||||
到目前为止,这里是全部的代码:
|
||||
|
||||
|
||||
```
|
||||
@ -150,7 +150,7 @@ class Player(pygame.sprite.Sprite):
|
||||
def gravity(self):
|
||||
self.movey += 3.2 # how fast player falls
|
||||
|
||||
if self.rect.y > worldy and self.movey >= 0:
|
||||
if self.rect.y > worldy and self.movey >= 0:
|
||||
self.movey = 0
|
||||
self.rect.y = worldy-ty-ty
|
||||
|
||||
@ -170,16 +170,16 @@ class Player(pygame.sprite.Sprite):
|
||||
self.rect.y = self.rect.y + self.movey
|
||||
|
||||
# moving left
|
||||
if self.movex < 0:
|
||||
if self.movex < 0:
|
||||
self.frame += 1
|
||||
if self.frame > ani*3:
|
||||
if self.frame > ani*3:
|
||||
self.frame = 0
|
||||
self.image = self.images[self.frame//ani]
|
||||
|
||||
# moving right
|
||||
if self.movex > 0:
|
||||
if self.movex > 0:
|
||||
self.frame += 1
|
||||
if self.frame > ani*3:
|
||||
if self.frame > ani*3:
|
||||
self.frame = 0
|
||||
self.image = self.images[(self.frame//ani)+4]
|
||||
|
||||
@ -215,9 +215,9 @@ class Enemy(pygame.sprite.Sprite):
|
||||
distance = 80
|
||||
speed = 8
|
||||
|
||||
if self.counter >= 0 and self.counter <= distance:
|
||||
if self.counter >= 0 and self.counter <= distance:
|
||||
self.rect.x += speed
|
||||
elif self.counter >= distance and self.counter <= distance*2:
|
||||
elif self.counter >= distance and self.counter <= distance*2:
|
||||
self.rect.x -= speed
|
||||
else:
|
||||
self.counter = 0
|
||||
@ -243,7 +243,7 @@ class Level():
|
||||
ground_list = pygame.sprite.Group()
|
||||
i=0
|
||||
if lvl == 1:
|
||||
while i < len(gloc):
|
||||
while i < len(gloc):
|
||||
ground = Platform(gloc[i],worldy-ty,tx,ty,'ground.png')
|
||||
ground_list.add(ground)
|
||||
i=i+1
|
||||
@ -262,9 +262,9 @@ class Level():
|
||||
ploc.append((300,worldy-ty-256,3))
|
||||
ploc.append((500,worldy-ty-128,4))
|
||||
|
||||
while i < len(ploc):
|
||||
while i < len(ploc):
|
||||
j=0
|
||||
while j <= ploc[i][2]:
|
||||
while j <= ploc[i][2]:
|
||||
plat = Platform((ploc[i][0]+(j*tx)),ploc[i][1],tx,ty,'ground.png')
|
||||
plat_list.add(plat)
|
||||
j=j+1
|
||||
@ -311,7 +311,7 @@ tx = 64 #tile size
|
||||
ty = 64 #tile size
|
||||
|
||||
i=0
|
||||
while i <= (worldx/tx)+tx:
|
||||
while i <= (worldx/tx)+tx:
|
||||
gloc.append(i*tx)
|
||||
i=i+1
|
||||
|
||||
@ -366,13 +366,14 @@ while main == True:
|
||||
|
||||
* * *
|
||||
|
||||
This is part 6 in an ongoing series about creating video games in [Python 3][3] using the [Pygame][4] module. Previous articles are:
|
||||
这是仍在进行中的关于使用 [Pygame][4] 模块来在 [Python 3][3] 在创建电脑游戏的第七部分。先前的文章是:
|
||||
|
||||
* [Learn how to program in Python by building a simple dice game][5]
|
||||
* [Build a game framework with Python using the Pygame module][6]
|
||||
* [How to add a player to your Python game][7]
|
||||
* [Using Pygame to move your game character around][8]
|
||||
* [What's a hero without a villain? How to add one to your Python game][2]
|
||||
* [通过构建一个简单的掷骰子游戏去学习怎么用 Python 编程][5]
|
||||
* [使用 Python 和 Pygame 模块构建一个游戏框架][6]
|
||||
* [如何在你的 Python 游戏中添加一个玩家][7]
|
||||
* [用 Pygame 使你的游戏角色移动起来][8]
|
||||
* [如何向你的 Python 游戏中添加一个敌人][2]
|
||||
* [在 Pygame 游戏中放置平台][9]
|
||||
|
||||
|
||||
|
||||
@ -382,7 +383,7 @@ via: https://opensource.com/article/19/11/simulate-gravity-python
|
||||
|
||||
作者:[Seth Kenlon][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
译者:[robsean](https://github.com/robsean)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
@ -397,3 +398,4 @@ via: https://opensource.com/article/19/11/simulate-gravity-python
|
||||
[6]: https://opensource.com/article/17/12/game-framework-python
|
||||
[7]: https://opensource.com/article/17/12/game-python-add-a-player
|
||||
[8]: https://opensource.com/article/17/12/game-python-moving-player
|
||||
[9]: https://opensource.com/article/18/7/put-platforms-python-game
|
@ -0,0 +1,71 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (PaperWM: tiled window management for GNOME)
|
||||
[#]: via: (https://jvns.ca/blog/2020/01/05/paperwm/)
|
||||
[#]: author: (Julia Evans https://jvns.ca/)
|
||||
|
||||
PaperWM:GNOME 下的平铺窗口管理
|
||||
======
|
||||
|
||||
当我开始在个人计算机上使用 Linux 时,令我兴奋的第一件事就是轻巧的窗口管理器,这主要是因为当时我的笔记本电脑只有有 32MB 的内存,且没有其他可使用的内存。
|
||||
|
||||
接着我开始接触 [xmonad][1] 之类的平铺窗口管理器!我可以用键盘管理窗口了!它们太快了!我可以通过编写 Haskell 程序来配置 xmonad!我可以用各种有趣的方式自定义所有内容(例如使用 [dmenu][2] 作为启动器)!这些年来,我用过 3,4 个不同的平铺窗口管理器,它们很有趣。
|
||||
|
||||
大约 6 年前,我觉得配置平铺窗口管理器对我来说不再是一件有趣的事情,因此转而使用 Ubuntu 桌面环境 Gnome。 (现在,我的笔记本电脑中的内存增加了 500 倍,这要快得多 :) )
|
||||
|
||||
我使用 Gnome 已有很长时间了,但是我仍然有点想念平铺窗口管理器。六个月前,一个朋友告诉我有关 [PaperWM][3] 的消息,它使你可以在 Gnome中 平铺窗口!我立即安装了它,并从那时起我一直在使用它。
|
||||
|
||||
### PaperWM:Gnome 下的平铺窗口管理
|
||||
|
||||
[PaperWM][3] 的基本思想是:你想继续使用 Gnome(因为在 Gnome 中各种任务都能完成),但是你也希望使用平铺窗口管理器。
|
||||
|
||||
它是一个 Gnome 扩展程序(而不是一个独立的窗口管理器),并且使用 Javascript。
|
||||
|
||||
### “Paper” 表示你的所有窗户都在一行中
|
||||
|
||||
PaperWM 的主要思想是将所有窗口排成一行,这实际上与传统的平铺窗口管理器大不相同,在传统的平铺窗口管理器中,你可以按任意方式平铺窗口。这是我写这篇博客时在几个窗口之间切换/调整大小的 gif 图像(有一个浏览器和两个终端窗口):
|
||||
|
||||
![][4]
|
||||
|
||||
PaperWM 的 Github README 链接了此视频:<http://10gui.com/video/>,它描述为一个类似的”线性窗口管理器“。
|
||||
|
||||
我以前从未听说过这种组织窗口的方式,但是我喜欢它的简单性。如果要查找特定的窗口,只需向左/向右移动,直到找到它。
|
||||
|
||||
### 我在 PaperWM 中所做的一切
|
||||
|
||||
还有很多其他功能,但这是我使用的功能:
|
||||
|
||||
* 在窗口之间左右移动(`Super + ,`, `Super + .`)
|
||||
* 按顺序向左/向右移动窗口(`Super+Shift+,`,`Super+Shift+.`)
|
||||
* 全屏显示窗口(`Super + f`)
|
||||
* 缩小窗口(`Super + r`)
|
||||
|
||||
|
||||
|
||||
### 我喜欢不需要配置的工具
|
||||
|
||||
我在笔记本上使用 PaperWM 已经6个月了,我真的很喜欢它!即使它是可配置(通过编写 Javascript 配置文件),我也非常欣赏它,它自带我想要的功能,我无需研究如何去配置。
|
||||
|
||||
[fish shell][5] 是另一个类似的令人愉悦的工具,我基本上没有配置 fish(除了设置环境变量等),我真的很喜欢它的默认功能。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://jvns.ca/blog/2020/01/05/paperwm/
|
||||
|
||||
作者:[Julia Evans][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://jvns.ca/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://xmonad.org/
|
||||
[2]: https://wiki.archlinux.org/index.php/Dmenu
|
||||
[3]: https://github.com/paperwm/PaperWM
|
||||
[4]: https://jvns.ca/images/paperwm.gif
|
||||
[5]: https://jvns.ca/blog/2017/04/23/the-fish-shell-is-awesome/
|
Loading…
Reference in New Issue
Block a user