77d51c65b3
zshrc 配置更新: - 新增 EDITOR/VISUAL/MANPAGER/PAGER 环境变量,让 git commit、 visudo、man 等工具默认使用 nvim 与 bat - zoxide init --cmd cd 直接接管 cd,删除手动 alias cd=z/cdi=zi - 新增 yazi yy wrapper:退出时自动 cd 到最后浏览的目录 - FZF 默认配置:fd 联动 + 现代 UI(高度/边框/预览窗口) - compinit 缓存优化:每天重建一次 zcompdump,平时复用 - eza alias 公共参数提取到 _EZA_BASE,所有列表都带 --git - 新增 Ctrl+Space 接受 zsh-autosuggestions 建议 base.py 同步: - 删除冗余 vim:neovim 已装且 EDITOR=nvim 已设置, visudo 等工具会通过 $EDITOR fallback 到 nvim
73 lines
1.8 KiB
Python
73 lines
1.8 KiB
Python
from decman import File, Module
|
|
from decman.plugins.aur import packages as aur_packages
|
|
from decman.plugins.pacman import packages as pacman_packages
|
|
|
|
|
|
class BaseModule(Module):
|
|
def __init__(self, user: str):
|
|
super().__init__("base")
|
|
self.user = user
|
|
|
|
def files(self):
|
|
return {
|
|
"/etc/pacman.conf": File(
|
|
source_file="./system/etc/pacman.conf",
|
|
),
|
|
"/etc/pacman.d/mirrorlist": File(
|
|
source_file="./system/etc/pacman.d/mirrorlist",
|
|
),
|
|
"/etc/sudoers.d/10-wheel": File(
|
|
source_file="./system/etc/sudoers.d/10-wheel",
|
|
permissions=0o440,
|
|
),
|
|
f"/home/{self.user}/.config/git/config": File(
|
|
source_file="./home/.config/git/config",
|
|
owner=self.user,
|
|
),
|
|
f"/home/{self.user}/.config/starship.toml": File(
|
|
source_file="./home/.config/starship.toml",
|
|
owner=self.user,
|
|
),
|
|
}
|
|
|
|
@pacman_packages
|
|
def pacman_packages(self) -> set[str]:
|
|
return {
|
|
"7zip",
|
|
"atuin",
|
|
"base-devel",
|
|
"base",
|
|
"bat",
|
|
"btop",
|
|
"curl",
|
|
"direnv",
|
|
"duf",
|
|
"dust",
|
|
"eza",
|
|
"fastfetch",
|
|
"fd",
|
|
"git-delta",
|
|
"git",
|
|
"jq",
|
|
"micro",
|
|
"ouch",
|
|
"procs",
|
|
"ripgrep",
|
|
"sd",
|
|
"starship",
|
|
"sudo",
|
|
"tealdeer",
|
|
"wget",
|
|
"xh",
|
|
"yazi",
|
|
"yq",
|
|
"zoxide",
|
|
}
|
|
|
|
@aur_packages
|
|
def aur_packages(self) -> set[str]:
|
|
return {
|
|
"decman",
|
|
"gomi-bin",
|
|
}
|