arch 配置「自用」

arch hyprland 配置「自用」
配置完成效果
image
image
image

我采用的 Arch + hyprland +fish + ags 的配置

ags使用教程具体可参考ags官方文挡

archlinux 简明指南

Arch Linux 安装使用教程
个人配置

安装arch+hyprland

这里直接使用archinstall,桌面环境记得选hyprland
如果是笔记本需要先连接互联网 具体方法参考archwiki

安装完成后

配置archlinuxcn源

sudo vim /etc/pacman.conf
-------------------------------------------
# 在最后添加
[archlinuxcn]
Server = https://mirrors.ustc.edu.cn/archlinuxcn/$arch

更新GPG密钥

sudo pacman -Sy archlinuxcn-keyring

下载yay包管理器

sudo pacman -S yay

下载中文字体

sudo pacman -S wqy-microhei wqy-microhei-lite wqy-bitmapfont wqy-zenhei ttf-arphic-ukai ttf-arphic-uming adobe-source-han-sans-cn-fonts adobe-source-han-serif-cn-fonts noto-fonts-cjk

安装输入法

sudo pacman -S fcitx5-im # 输入法基础包组
sudo pacman -S fcitx5-chinese-addons # 官方中文输入引擎
sudo pacman -S fcitx5-anthy # 日文输入引擎
sudo pacman -S fcitx5-pinyin-moegirl # 萌娘百科词库。二刺猿必备(archlinuxcn)
sudo pacman -S fcitx5-material-color # 输入法主题

在hyprland中设置启动

exec-once=fcitx5 --replace -d

写入配置

sudo vim /etc/environment

GTK_IM_MODULE=fcitx
QT_IM_MODULE=fcitx
XMODIFIERS=@im=fcitx
SDL_IM_MODULE=fcitx
GLFW_IM_MODULE=ibus

常用软件

壁纸软件 :hyprpaper
应用启动器:Rofi

$menu=rofi -show drun
bind = SUPER, R, exec, $menu 

安装常用软件

yay -S code neovim  fish gtklock yesplaymusic 

切换默认终端

chsh -l 

列出终端路径

chsh -S /bin/fish

切换终端

复制与粘贴

yay -S cliphist wl-clipboard
exec-once=wl-paste --type text --watch cliphist store
exec-once=wl-paste --type image --watch cliphist store
bind=SUPER_SHIFT, V, exec, cliphist list | rofi -dmenu | cliphist decode | wl-copy
for i in $(cliphist list | awk -F. '{ print $2 }'); do cliphist delete-query "$i"; done

配置顶栏

现在改用ags,具体配置方法见上文文档

yay -S waybar

截屏与录屏

sudo pacman -S pipewire wireplumber slurp grim
$mainMod=SUPER
$shiftMod=SUPER_SHIFT
$altMod=SUPER_ALT
$alt=ALT
$shift=SHIFT

$screen_file=${HOME}/Pictures/ScreenShot/screen_shot_$(date + "%Y-%m-%d_%H-%M-%S").png
bind=$shiftMod, S, exec, grim -g "$(slurp)" - | wl-copy
bind=, Print,      exec, grim $screen_file
bind=$shift, Print,exec, grim -g "$(slurp)" $screen_file
bind=$alt, Print,  exec, grim - | wl-copy 
  • 浏览器
    • firefox
    • Chromium
  • 截图工具
    • flamsehot
  • 音乐
    • yesplaymusic
  • 编程
    • vscode
    • nvim

办公

  • Typora-free [写文档用]

网络环境配置

yay -Sa clash-premium-bin clash-for-windows-electron-bin

常见问题

Arch 下配置latex环境

yay -S texlive-basic
yay -S texlive-latex  
yay -S latexstudio

解决neovim clangd Lsp 报错

warning: multiple different client offset_encodings detected for buffer, this is not supported yet

~/.local/share/nvim/lazy/nvim-lspconfig/lua/lspconfig/server-configurations/clangd.lua

修改为

local default_capabilities = {
  textDocument = {
    completion = {
      editsNearCursor = true,
    },
  },
  offsetEncoding = utf-16' ,
}

没声音?

yay -S libcanberra-pulse plasma-pa pulseaudio pulseaudio-alsa
posted @   Erfu  阅读(3547)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· 单线程的Redis速度为什么快?
· SQL Server 2025 AI相关能力初探
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?
· 展开说说关于C#中ORM框架的用法!
点击右上角即可分享
微信分享提示