我的Artix Linux(runit+XFCE4)配置

yumo6662个月前 (09-01)技术文章30

以下是针对 Artix Linux (runit+XFCE4) 的完整美化与现代化配置指南,包含 **Paru 安装、中文字体(Maple Mono)、中文输入法、Zsh+Zim 终端增强** 等关键步骤:


---


## **1. 系统更新与基础配置**

### **(1) 更新系统**

```bash

sudo pacman -Syu

```


### **(2) 安装基础工具**

```bash

sudo pacman -S --needed base-devel git curl wget neofetch

```


---


## **2. 安装 Paru (AUR 助手)**

```bash

git clone https://aur.archlinux.org/paru.git

cd paru

makepkg -si

```

**配置优化**:

- 启用彩色输出:编辑 `/etc/paru.conf`,取消注释 `Color`。

- 设置并行下载:修改 `ParallelDownloads=5` 加速 AUR 包下载。


---


## **3. XFCE4 桌面美化**

### **(1) 安装 macOS 风格主题**

```bash

paru -S whitesur-gtk-theme whitesur-icon-theme # 现代简约风格

```

**应用主题**:

1. `Settings > Appearance` → 选择 **WhiteSur-dark**

2. `Settings > Window Manager` → 匹配主题

3. `Settings > Icons` → 选择 **WhiteSur**


### **(2) 安装 Plank Dock**

```bash

sudo pacman -S plank

```

**开机自启**:

```bash

mkdir -p ~/.config/autostart

cp /usr/share/applications/plank.desktop ~/.config/autostart/

```


### **(3) 窗口动画与特效**

```bash

paru -S compiz

xfconf-query -c xfce4-session -p /sessions/Failsafe/Client0_Command -a -s compiz

```

通过 `ccsm` 启用 **Wobbly Windows** 和 **Expo 桌面预览**。


### **(4) 字体优化**

安装 **Maple Mono** 中英文等宽字体:

```bash

paru -S ttf-maple-beta # 基础版

paru -S ttf-maple-beta-nf-cn # 含中文及Nerd Font图标

```

配置终端和编辑器使用 Maple Mono,例如在 Alacritty 的 `
~/.config/alacritty/alacritty.yml` 中:

```yaml

font:

normal:

family: "Maple Mono"

style: "Regular"

```


---


## **4. 中文支持与输入法**

### **(1) 安装中文字体**

```bash

sudo pacman -S noto-fonts-cjk # 基础中日韩字体

```


### **(2) 配置 Fcitx5 输入法**

```bash

sudo pacman -S fcitx5 fcitx5-gtk fcitx5-qt fcitx5-configtool

paru -S fcitx5-chinese-addons fcitx5-pinyin-zhwiki # 拼音输入法

```


### **(3) 环境变量配置**

编辑 `~/.xprofile`:

```bash

export GTK_IM_MODULE=fcitx5

export QT_IM_MODULE=fcitx5

export XMODIFIERS="@im=fcitx5"

fcitx5 &

```


### **(4) Runit 服务自启**

```bash

mkdir -p ~/.config/runit/sv/fcitx5

tee ~/.config/runit/sv/fcitx5/run <<EOF

#!/bin/sh

exec fcitx5 -d

EOF

chmod +x ~/.config/runit/sv/fcitx5/run

ln -s ~/.config/runit/sv/fcitx5 /etc/service/

```


---


## **5. 终端美化(Zsh + Zim)**

### **(1) 安装 Zsh**

```bash

sudo pacman -S zsh

chsh -s $(which zsh) # 设为默认shell

```


### **(2) 安装 Zim 框架**(替代 Oh My Zsh)

```bash

curl -fsSL https://raw.githubusercontent.com/zimfw/install/master/install.zsh | zsh

```

编辑 `~/.zimrc` 启用插件:

```bash

zmodule asciiship # 简约主题

zmodule zsh-autosuggestions zsh-syntax-highlighting

```


### **(3) 配置 Starship 提示符**

```bash

paru -S starship

echo 'eval "$(starship init zsh)"' >> ~/.zshrc

```

示例 `~/.config/starship.toml`:

```toml

[character]

success_symbol = "[](bold green)"

error_symbol = "[](bold red)"

```


---


## **6. 必备软件推荐**

| **类别** | **软件** | **安装命令** |

|----------------|-----------------------|---------------------------------|

| **浏览器** | Firefox + Vimium | `sudo pacman -S firefox` |

| **文件管理** | Thunar + Ranger | `sudo pacman -S thunar ranger` |

| **终端** | Alacritty + Tmux | `paru -S alacritty tmux` |

| **效率工具** | Albert (Spotlight替代)| `paru -S albert` |

| **开发工具** | VSCode + Neovim | `paru -S code neovim` |


---


## **7. 现代化改进**

### **(1) 启用 ZRAM**

```bash

sudo pacman -S zram-generator

sudo systemctl enable --now systemd-zram-setup@zram0

```


### **(2) 模糊搜索 (Rofi)**

```bash

paru -S rofi

```

绑定 `Super + D` 快捷键启动。


### **(3) 透明化效果**

编辑 `~/.config/picom.conf` 启用透明和阴影:

```ini

opacity-rule = [

"90:class_g = 'Alacritty'",

"85:class_g = 'Thunar'"

];

```


---


## **8. 最终清理**

```bash

sudo pacman -Rns $(pacman -Qdtq) # 移除孤立依赖

```


---


## **效果预览与总结**

- **桌面**:WhiteSur 主题 + Compiz 动态特效 + Plank Dock

- **终端**:Zsh + Zim + Maple Mono 字体 + Starship 提示符

- **输入法**:Fcitx5 拼音 + 词库优化

- **性能**:ZRAM 内存压缩 + 轻量化软件组合


进一步定制可参考:

- [XFCE 美化指南](
https://blog.csdn.net/alfiy/article/details/126859106)

- [Maple Mono 字体文档](
https://gitee.com/mirrors/Maple-Mono)

相关文章

Windows下VSCode配置C++环境_配置vscode c语言环境

介绍本文介绍了如何在 Windows 10 下使用 VSCode 配置 C/C++ 环境,编译器采用 MinGW-w64(GCC 在Windows 下的支持)主要参考了微软 VSCode 官方文档配置...

VSCode MCP Server:改进开发流程,打造更智能、更能干的AI智能体

作者:Sebastian Petrus | 编译:小兰模型上下文协议 (Model Context Protocol, MCP) 是一种新的开放标准,它帮助 AI 模型使用通用接口与外部工具、数据源和...

人生苦短,我要在VSCode里面用Python

轻沉 发自 浅度寺 量子位 出品 | 公众号 QbitAI在程序员圈子里,Visual Studio Code(以下简称VSCode)可以说是目前最火的代码编辑器之一了。它是微软出品的一款可扩展的轻量...

大语言模型学习PYTHONSTARTUP 变量详解及实用指南

一、概述PYTHONSTARTUP 是一个 环境变量,用于指定一个 Python 脚本路径。每当用户启动 交互式 Python 解释器(即 Python REPL,如在终端执行 python 或 py...

如何使用VSCode+gdbserver远程调试ZMC900E

由于嵌入式设备资源受限,通常无法在其上安装庞大的IDE调试程序,且许多嵌入式系统并无桌面环境。为了方便调试自开发程序,本文介绍利用VSCode与gdbserver进行嵌入式设备上程序的远程调试方法。...

手把手带你进行Golang环境配置_windows golang安装与配置

前言大家好,我是星期八,是一个每天都要在镜子前给自己梳仅剩三根头发的三年码农本次我们来安排一下如何在win平台上配置Go语言开发环境。整体来说,Go配置环境还是挺轻松的,和Python差不多,并且会自...