Skip to content

Latest commit

 

History

History
166 lines (117 loc) · 4.66 KB

File metadata and controls

166 lines (117 loc) · 4.66 KB

chezmoi 管理的 dotfiles

fastfetch

OS: Arch Linux x86_64
Shell: zsh 5.9
WM: niri 25.11 (Wayland)
Font: 0xProto Nerd Font Mono (10pt) [GTK2/3/4]
Cursor: Sweet (24px)
Terminal: tmux 3.6a

install

packages

paru -S --needed --noconfirm pacman-contrib

命令行工具参考:

paru -S --needed --noconfirm git vim curl wget \
    nvim eza git-delta bat btop duf dust gdu tldr \
    fd jq ripgrep ripgrep-all fzf zoxide \
    chezmoi \
    zsh zimfw tmux\
    fcitx5-rime rime-ice-git fcitx5-configtool \
    uv

字体

paru -S --needed --noconfirm \
    ttf-0xproto-nerd ttf-jetbrains-mono-nerd \
    noto-fonts noto-fonts-cjk noto-fonts-emoji noto-fonts-extra

niri

参考 Getting Startted

paru -S --needed --noconfirm \
    niri xwayland-satellite \
    xdg-desktop-portal-gnome xdg-desktop-portal-gtk \
    gnome-keyring libsecret \
    foot fuzzel swaylock \
    matugen cava qt6-multimedia-ffmpeg \
    libnotify mako polkit-gnome \
    waybar ttf-jetbrains-mono-nerd otf-font-awesome \
    qt6ct breeze breeze-icons gnome-themes-extra \
    slurp grim satty mark-shot \
    archlinux-xdg-menu

init

使用 chezmoi 同步 dotfiles

Use a hosted repo to manage your dotfiles across multiple machines

# 检出
chezmoi init https://github.com/fish-www/dotfiles.git

# 检查变更
chezmoi diff

# 应用变更
chezmoi apply

usage

chezmoi config

使用了 chezmoi format tmpl 来生成 chezmoi 的 配置文件

chezmoi init 时会询问一些问题来生成配置文件,之后可以修改 ~/.config/chezmoi/chezmoi.toml 来调整配置

ssh

  • ~/.ssh/config 中使用了 Include 来包含 ~/.ssh/config.d/* 中的配置文件,可在此目录中添加本地的 ssh 配置

  • 使用 ~/.ssh/id_github 来存储 GitHub 的 SSH 密钥,可通过 ssh-keygen 来生成,并配置到 github 上

    ssh-keygen -t ed25519 -f ~/.ssh/id_github -C "your comment"

git

  • 配置统一存放在 ~/.config/git/config 中,使用了 Include 来包含 ~/.config/git/config_local 配置文件,可在此文件中添加本地的 git 配置(为什么 git 的 Include 不支持通配符 😭)

niri

  • 需要手动创建一下 ~/.config/niri/local-config.kdl,即使没有要写的配置

    因为在 niri 的 config.kdl 中 include 了 local-config.kdl,用来存放机器相关的配置,而 niri 要到下个版本才能支持 可选 include

dolphin

  • 关于 dolphin 的深色模式,需要先启动 qt6ct,配置 color theme 为深色模式的主题
  • 关于 dolphin 的文件默认打开方式,需要执行:
    XDG_MENU_PREFIX=arch- kbuildsycoca6 --noincremental
  • 为了避免某些应用默认使用 nautilus 作为文件管理器,可以卸载 nautilus
    pacman -Rdd nautilus

qq

使用的是 linuxqq-nt-bwrap 包,所以配置了目录映射,手动创建一个 ~/Downloads/QQ 目录,然后启动 qq,配置下载目录为此目录

也可以直接配置成 ~/Downloads,不过这样会和其他程序下载的文件混在一起,所以还是放子目录了

pi

安装 pi

paru -S --needed --noconfirm pnpm
pnpm install -g --ignore-scripts @earendil-works/pi-coding-agent

配置了 pi 的别名,默认使用 gondolin,通过别名使用需要先安装 gondolin 和 qemu,参考 containerization#gondolin

安装 gondolin

git clone https://github.com/earendil-works/pi.git
cd pi
mkdir ~/.pi/agent/extensions
cp -R packages/coding-agent/examples/extensions/gondolin ~/.pi/agent/extensions/gondolin
cd ~/.pi/agent/extensions/gondolin
npm install --ignore-scripts

安装 qemu

paru -S --needed --noconfirm qemu-base

other

Wayland ↔ X11 双向剪贴板同步工具

解决 linuxqq 剪贴板与其他程序不同步的问题

使用 clipsync

paru -S comalot-clipsync-git

systemctl --user enable --now clipsync