Wayland desktop for Linux with skeuomorphic design

本文为原文前 6,000 字符的节选翻译,完整内容请查看原文。

v0.1.2 (BETA) — v0.1,首个公开版本,包含修复程序以及 Fedora 的安装程序。请参阅 RELEASE-NOTES.md。

I’ve created a Discord server! You can also report bugs and submit ideas for new features here! link : https://discord.gg/xR5f7Xs49

我创建了一个 Discord 服务器!你可以在这里报告错误并提交新功能的想法!链接:https://discord.gg/xR5f7Xs49

DEsk is Desktop Environment and desk in one word — a name that came from the Reddit community. It used to be called DeskWM: the commands are now desk, desk-session, desk-settings and so on, and what was set up for DeskWM (its settings, its data, DESKWM_* variables) carries over by itself.

DEsk 是 Desktop Environment(桌面环境)和 desk(书桌)的合体词——这个名字源自 Reddit 社区。它过去被称为 DeskWM:现在的命令是 desk、desk-session、desk-settings 等,而之前为 DeskWM 设置的内容(其设置、数据、DESKWM_* 变量)会自动迁移。

A Wayland desktop for Linux in realistic skeuomorphism — the kind iOS 6 had, where everything on the screen is drawn to look like the real thing. Here the desktop is a desk.

这是一个采用逼真拟物化设计的 Linux Wayland 桌面——类似于 iOS 6 的风格,屏幕上的所有元素都被绘制成看起来像真实物体的样子。在这里,桌面就是一张书桌。

Windows are sheets of paper on a walnut desk. The dock is a drawer, your apps are filed in binders on a bookshelf behind the desk, notifications arrive in a post box, and the system controls are a panel built into the back of the desk. The room is ray-traced, and one desk lamp lights all of it.

窗口是胡桃木书桌上的纸张。程序坞是一个抽屉,你的应用程序被归档在书桌后的书架上的活页夹里,通知会投递到邮箱中,而系统控件则是嵌入在书桌后方的面板。整个房间经过光线追踪渲染,并由一盏台灯照亮。

Status: beta. DEsk is used day to day on its author’s machines and has been checked carefully (see docs/ARCHITECTURE.md, section 9), but this is its first release: expect rough edges, and expect things to change. Your settings and data will be carried forward.

状态:测试版。DEsk 已在作者的机器上日常使用并经过仔细检查(参见 docs/ARCHITECTURE.md 第 9 节),但这是它的第一个版本:请预料到会有瑕疵,并预料到会有变动。你的设置和数据将会被保留。

Download the latest release from the Releases page and unpack it (or clone this repository). Then, in its folder, run the line for your system:

从 Releases 页面下载最新版本并解压(或克隆此仓库)。然后,在文件夹中运行对应你系统的命令行:

Ubuntu 24.04 / 26.04 (and Linux Mint, Pop!_OS)

Ubuntu 24.04 / 26.04(以及 Linux Mint, Pop!_OS)

Arch Linux (and EndeavourOS, Manjaro)

Arch Linux(以及 EndeavourOS, Manjaro)

Fedora 43 / 44 (and Nobara)

Fedora 43 / 44(以及 Nobara)

Then log out and choose DEsk on the login screen.

然后注销并在登录界面选择 DEsk。

More options, building by hand and running DEsk in a window are under Build and Run.

更多选项、手动构建以及在窗口中运行 DEsk 的说明位于“Build and Run”部分。

Nothing here is a symbol for a thing on a desk. As in the realistic skeuomorphism of iOS 6, each is drawn to look like the real thing set down there — its material, the light on it, its shadow and the wear of use.

这里没有任何东西仅仅是书桌上物品的符号。正如 iOS 6 的逼真拟物化一样,每一个元素都被绘制成看起来像是真实放置在那里的物体——包括它的材质、光影、阴影以及使用磨损的痕迹。

DEsk is meant to be installed as a whole desktop, like GNOME or KDE, so it picks a standard program for each job the desk has: a terminal, a web browser, a file manager and a text editor. The drawer’s things and Super+Enter open them. For each job, the first of these that is there:

DEsk 旨在像 GNOME 或 KDE 一样作为完整的桌面环境安装,因此它为书桌的每项工作选择了标准程序:终端、网页浏览器、文件管理器和文本编辑器。抽屉里的物品和 Super+Enter 快捷键可以打开它们。对于每项工作,它会优先选择已安装的程序:

DEsk draws the desk; the work done on it is done with free software that already exists. It reaches completeness by borrowing, and keeps a firm line between what it makes and what it borrows:

DEsk 负责绘制书桌;而在书桌上完成的工作则由现有的自由软件来执行。它通过借鉴来实现完整性,并严格区分自己创建的内容与借鉴的内容:

The rule for new cases: make only what is drawn as part of the room or can only be done inside the compositor; otherwise find an existing program that works as it is under a wlroots compositor, and make something only as a last resort. KDE’s System Settings and kcmshell (which do not work outside Plasma), Xfce’s and MATE’s X11-only dialogs, and Xfce’s display and appearance dialogs (which need xfsettingsd, and xfsettingsd overwrites GSettings with Xfce’s defaults as it starts) are not used.

针对新情况的规则是:仅制作那些被绘制为房间一部分的内容,或者只能在合成器内部完成的功能;否则,寻找一个能在 wlroots 合成器下直接运行的现有程序,仅在万不得已时才自行开发。KDE 的系统设置和 kcmshell(在 Plasma 之外无法工作)、Xfce 和 MATE 的 X11 专用对话框,以及 Xfce 的显示和外观对话框(需要 xfsettingsd,且 xfsettingsd 启动时会用 Xfce 的默认值覆盖 GSettings)均不被使用。

install-desktop.sh works with apt, dnf, pacman and zypper. On Debian and Ubuntu the same set is also one package: equivs-build packaging/debian/desk-desktop.equivs.

install-desktop.sh 支持 apt、dnf、pacman 和 zypper。在 Debian 和 Ubuntu 上,同样的集合也可以作为一个软件包安装:equivs-build packaging/debian/desk-desktop.equivs。

The classic GTK programs of Xfce and MATE come first because they are the kind of window the desk’s paper is cut for — a menu bar, plain tools and the document — and they are light, start quickly and run on Wayland as they are. GTK 3 asks the compositor for its frame through KDE’s server-decoration protocol, so they lie on DEsk’s paper with its printed heading and no GTK title bar. Windows with a header bar (GNOME’s programs, Firefox) keep their own frame, inside a paper margin.

Xfce 和 MATE 的经典 GTK 程序被优先考虑,因为它们窗口的样式非常适合书桌上的“纸张”——即菜单栏、简洁的工具和文档区域。它们轻量、启动快,并且可以直接在 Wayland 上运行。GTK 3 通过 KDE 的服务器装饰协议向合成器请求边框,因此它们会显示在 DEsk 的纸张上,带有打印的标题,而没有 GTK 原生的标题栏。带有标题栏的窗口(如 GNOME 程序、Firefox)则保留其自身的边框,位于纸张边缘之内。

Shell Settings (desk-settings) holds DEsk’s own settings — windows, the size of things, how much is drawn, language, clock, your birthday and the weather, when the screen goes off and whether the desk locks then — on its Shell tab, and on its System tab rows that open the borrowed programs (network, Bluetooth, sound, displays, printers, the look of other programs, default programs, disks, disk usage, colour profiles, the input method, date and time, your name and picture, users, passwords and keys, adding and removing programs, backups, what the computer is doing, and the Experience Index), classic-looking programs first, each with the program’s own icon and its name — “Displays (wdisplays)” — so you can see what does the setting. A row whose program is not installed is printed faint with the package to install, by this distribution’s name. The two tabs sit on the sheet like a folder’s index tabs, and in each pocket is a wire-bound pad with a sheet to each part of the form and a sticky note on each sheet’s edge; taking hold of a note turns the sheets over the wire to it, as on the desk calendar (Page Up and Down too). Changing tab (a click, Ctrl+Tab or Ctrl+Page Up/Down) draws the other pad up out of the folder from below, and the pad comes up the same way when the window opens.

Shell 设置 (desk-settings) 包含 DEsk 自身的设置——窗口、物体大小、绘制细节、语言、时钟、生日、天气、屏幕关闭时间以及是否锁定书桌等——位于其“Shell”选项卡中。在“System”选项卡中,各行用于打开借鉴的程序(网络、蓝牙、声音、显示器、打印机、其他程序的外观、默认程序、磁盘、磁盘使用情况、颜色配置文件、输入法、日期和时间、你的姓名和头像、用户、密码和密钥、添加/删除程序、备份、计算机运行状态以及体验指数)。经典外观的程序优先显示,每个程序都有自己的图标和名称——例如“显示器 (wdisplays)”——这样你就能清楚地知道是什么在控制该设置。如果某个程序未安装,该行会以浅色显示,并标注该发行版下需要安装的软件包名称。这两个选项卡像文件夹的索引标签一样位于纸张上,每个口袋里都有一个线圈装订的记事本,每一页对应表单的一部分,每页边缘都有一个便签;抓住便签即可翻动线圈上的纸张,就像桌面日历一样(也可以使用 Page Up 和 Page Down)。切换选项卡(通过点击、Ctrl+Tab 或 Ctrl+Page Up/Down)会从下方将另一个记事本拉出文件夹,窗口打开时记事本也会以同样的方式升起。

Started as a session (desk-session, from a login screen), DEsk tells D-Bus and systemd where its display is, runs the XDG autostart entries (leaving out the ones that would fight it, such as another notification daemon or an X screen locker), and starts an authentication agent, the keyring, the input method and the network applet with whichever free program for each is installed. The input method’s candidates come up under the text being written — in a program’s window as on the desk’s own pages — and leave the keys where they are. It turns the screen off when nobody is at the desk (locking first, by default), lets video players keep it on, and speaks wlr-output-management (wdisplays, wlr-randr, kanshi), remembering a display tool’s arrangement for each set of screens. Logging out, restarting and powering off ask every window to close first, so a program with unsaved work can ask about it; a window that does not close holds it up and is put in front.

作为会话启动时(desk-session,从登录界面开始),DEsk 会告知 D-Bus 和 systemd 其显示器的位置,运行 XDG 自启动条目(排除掉那些会产生冲突的条目,例如另一个通知守护进程或 X 屏幕锁),并启动身份验证代理、密钥环、输入法和网络小程序(使用已安装的相应自由软件)。输入法的候选词会出现在正在输入的文本下方——就像在书桌的纸张上一样——而不会改变按键的位置。当书桌前无人时,它会关闭屏幕(默认先锁定),允许视频播放器保持屏幕常亮,并支持 wlr-output-management(wdisplays、wlr-randr、kanshi),为每组屏幕记住显示工具的排列方式。注销、重启和关机时,它会先请求每个窗口关闭,以便有未保存工作的程序可以进行提示;如果某个窗口无法关闭,它会暂停操作并将该窗口置于最前方。

Shell Settings also sets what only a Wayland compositor can: tap to click, natural scrolling, pointer speed and left-handed buttons (through libinput), the keyboard layout, a second layout and the keys that change.

Shell 设置还负责配置只有 Wayland 合成器才能控制的内容:点击触控、自然滚动、指针速度和左手鼠标按键(通过 libinput)、键盘布局、第二布局以及切换布局的按键。