在 Ubuntu 20.04 中完全进入深色模式
深色模式

> 
> 深色模式是 Ubuntu 20.04 最受瞩目的[新功能](https://itsfoss.com/ubuntu-20-04-release-features/)之一了。任何版本的 Ubuntu 都可以通过[安装深色主题](https://itsfoss.com/install-themes-ubuntu/)让用户界面拥有一个深色的外观，但在 Ubuntu 20.04 中，这个过程变得更简单。
> 
> 
> 


![](/data/attachment/album/202004/11/200841gvvaja25jaz5z7hv.jpg)


在 Ubuntu 20.04 中，无需额外安装主题，默认主题（称为 Yaru）本身就带有三种模式，其中就包括深色模式。


下面我会展示如何将 Ubuntu 系统完全设置为深色模式。


### 在 Ubuntu 20.04 打开深色模式






这个步骤是在 GNOME 桌面上进行的，如果你[使用的是其它桌面](https://itsfoss.com/find-desktop-environment/)，你看到的可能会和下面的截图不一样。


按下 super 键（或 Windows 键），然后输入 “settings”，就可以找到系统设置。


![Search for Settings](/data/attachment/album/202004/11/200933vk5rfyk5vavz9mif.jpg)


在系统设置中，进入“<ruby> 外观 <rt>  Appearance </rt></ruby>”部分，就可以看到<ruby> 浅色 <rt>  light </rt></ruby>、<ruby> 标准 <rt>  standard </rt></ruby>和<ruby> 深色 <rt>  dark </rt></ruby>三个选项。既然要使用深色模式，那自然而然要选择“深色”这个选项了。


![Enable Dark Theme in Ubuntu](/data/attachment/album/202004/11/200935k8sk99vpp79haza7.png)


完成设置以后，使用了 GTK3 的应用程序都可以跟随深色模式。因此你会看到系统中包括文本编辑器、终端、LibreOffice 等在内的大多数应用程序都已经切换成深色了。但未使用 GTK3 的应用程序可能并没有跟随进入深色模式，下面我会展示如何更完整地进入深色模式。


### 继续调整，进入完整深色模式


这个时候你会发现，shell 主题、屏幕顶部面板中的消息托盘和系统托盘还仍然保持在原有的模式当中。


![No Dark Shell by default in Ubuntu](/data/attachment/album/202004/11/200939rqzx558t88qy8utx.jpg)


现在就需要使用 [GNOME 扩展](https://itsfoss.com/gnome-shell-extensions/)安装 Yaru 深色 shell 主题了。[在 Ubuntu 中通过 Ctrl+Alt+T 打开终端](https://itsfoss.com/ubuntu-shortcuts/)，然后执行以下这个命令安装浏览器扩展：



```
sudo apt install chrome-gnome-shell
```

进入[扩展页面](https://extensions.gnome.org/extension/19/user-themes/)启用这个扩展：


![Enable User Themes GNOME Extension](/data/attachment/album/202004/11/200940f3m4omo4roavovsl.jpg)


执行以下命令安装 [GNOME 调整工具](https://itsfoss.com/gnome-tweak-tool/)：



```
sudo apt install gnome-tweaks
```

打开 GNOME 调整工具，进入“<ruby> 外观 <rt>  Appearance </rt></ruby>”部分，就可以看到 shell 主题的选项，现在只需要把它启用就可以了。


![Enable Yaru Dark Shell Theme in Ubuntu](/data/attachment/album/202004/11/200941hnyp5f3fnzzeeo5y.jpg)


设置完之后再观察一下，桌面通知、消息托盘、系统托盘等等都已经进入深色模式了。


![Yaru Dark Shell Theme in Ubuntu](/data/attachment/album/202004/11/200941b9vyxg4f789vosyw.jpg)


现在感觉好多了。但你可能还会注意到，在使用浏览器访问网站的时候，很多网站都使用了白色的背景色。如果期望网站方提供深色模式，那是很不现实的，但我们可以自己实现这一件事。


你需要用到的东西就是诸如 [Dark Reader](https://darkreader.org/) 这样的浏览器扩展。《[在 Firefox 中启用深色模式](https://itsfoss.com/firefox-dark-mode/)》这篇文章中也有讨论过这个浏览器扩展，它的使用过程并不复杂，如果你使用的浏览器是 Firefox、Chrome 或 [Ubuntu 下的 Chromium](https://itsfoss.com/install-chromium-ubuntu/)，就可以直接安装[其官方网站](https://darkreader.org/)上列出的扩展。


Dark Reader 安装完成后，就会以深色模式打开网站了。


![It’s FOSS Homepage in Dark Mode with Dark Reader](/data/attachment/album/202004/11/200942teiez33kan2goafx.jpg)


当然，有些外部的第三方应用程序可能仍然是浅色状态。如果它们自己附带了深色模式的选项，就需要手动启用它们的深色模式。


如今，深色模式在非开发者人群中也越来越流行了。按照以上的步骤，你就可以轻松进入深色模式。


请享受深色模式。




---


via: <https://itsfoss.com/dark-mode-ubuntu/>


作者：[Abhishek Prakash](https://itsfoss.com/author/abhishek/) 选题：[lujun9972](https://github.com/lujun9972) 译者：[HankChow](https://github.com/HankChow) 校对：[wxy](https://github.com/wxy)


本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译，[Linux中国](https://linux.cn/) 荣誉推出


OK
One of the most talked about [new features in Ubuntu 20.04](https://itsfoss.com/ubuntu-20-04-release-features/) is the dark mode. You can [install dark theme in any Ubuntu version](https://itsfoss.com/install-themes-ubuntu/) to give it a dark look but the new Ubuntu 20.04 makes it a lot easier.

You don’t need to install themes on your own. You can find three variants of the default theme (called Yaru) and you can enable the dark mode from the settings.

It still leaves a few thing to I am going to show you some tips on giving complete dark mode to your Ubuntu system.

## Enable dark mode in Ubuntu 20.04

The steps are performed on the GNOME desktop. If you are [using some other desktop environment](https://itsfoss.com/find-desktop-environment/), the screenshots may look different.

Press the super key (Windows key) and start typing settings to search for the Settings application.

![Settings Search Ubuntu 20 04](https://itsfoss.com/content/images/wordpress/2020/04/settings-search-ubuntu-20-04.jpg)

In the Settings application, go to Appearance section and you should see three variants of the theme: Light, Standard and Dark. No prizes for guessing that you need to select Dark if you want to use the dark mode.

![Enable Dark Theme Ubuntu](https://itsfoss.com/content/images/wordpress/2020/04/enable-dark-theme-ubuntu.png)

Not all but applications using GTK3 should automatically comply with the dark theme. In other words, you’ll notice that most of the applications like text editor, terminal, LibreOffice etc on your system automatically switch to dark mode.

But it still leaves a few thing in the light mode. Let me show you a couple of tips to ‘go to the darker side’.

## Tweaks to go full dark mode in Ubuntu 20.04

You’ll notice that the shell theme is still light. The message tray, system tray (in the top panel) are still not using dark mode.

![No Dark Shell Ubuntu](https://itsfoss.com/content/images/wordpress/2020/04/no-dark-shell-ubuntu.jpg)

You’ll have to [use a GNOME extension](https://itsfoss.com/gnome-shell-extensions/) here that will let you install Yaru dark shell theme. Install the browser extension first by using this command in terminal ([use Ctrl+Alt+T keyboard shortcut for terminal in Ubuntu](https://itsfoss.com/ubuntu-shortcuts/)).

`sudo apt install chrome-gnome-shell`


Now [go to the extension’s webpage](https://extensions.gnome.org/extension/19/user-themes/) and enable the extension by switching it on:

![Enable User Themes Gnome](https://itsfoss.com/content/images/wordpress/2020/04/enable-user-themes-gnome.jpg)

You need to [install GNOME Tweaks tool](https://itsfoss.com/gnome-tweak-tool/) by using this command:

`sudo apt install gnome-tweaks`


Open the GNOME Tweaks tool and go to Appearance. You’ll see the option to change the shell theme. You don’t need to install this Yaru dark shell theme. It’s already there. You just have to enable it.

![Ubuntu Yaru Dark Shell Theme](https://itsfoss.com/content/images/wordpress/2020/04/ubuntu-yaru-dark-shell-theme.jpeg)

Now, you can see that even the shell features like desktop notifications, message tray, system tray are also in dark mode.

![Yaru Dark Shell Theme Ubuntu](https://itsfoss.com/content/images/wordpress/2020/04/yaru-dark-shell-theme-ubuntu.jpg)

Looks better, isn’t it? There is one more thing you could do to further enjoy dark mode in Ubuntu. You’ll notice that the websites you visit still have white background. You cannot expect all the websites to provide a dark mode.

This is where you can use a browser extension like [Dark Reader](https://darkreader.org/). John has already discussed it in the tutorial on [enabling dark mode in Firefox](https://itsfoss.com/firefox-dark-mode/). It’s not a complicated task. If you use Firefox, Chrome or [Chromium in Ubuntu](https://itsfoss.com/install-chromium-ubuntu/), you can install the browser extension listed on the [Dark Reader website](https://darkreader.org/).

Once you have installed Dark Reader, all the websites you visit should be in dark mode automatically.

![It's FOSS Homepage in Dark Mode with Dark Reader](https://itsfoss.com/content/images/wordpress/2020/01/itsfoss_dark_mode.jpg)

You may still find a few external third party applications using light theme. You may have to manually enable dark theme, if they have such an option available.

Dark mode is getting popular these days even among the non-coders. Turning on the dark mode is on my list of [first few things to do after installing Ubuntu 20.04](https://itsfoss.com/things-to-do-after-installing-ubuntu-20-04/). With these tips, you can satisfy your craving of dark mode in Ubuntu.

I hope you like it. Enjoy the dark mode.