Arch中的一些体验小优化

1.雾凇拼音部分符号输出为英文标点 在写md,latex等文件时要不停切换中英文标点,非常的麻烦,所以干脆在配置文件中自定义half_shape标点映射自行更换 在~/.local/share/fcitx5/rime/rime_ice.custom.yaml添加以下段落 punctuator/half_shape: "¥": "$" # 人民币符号 -> 美元符 "「": "{" "」": "}" "【": "[" "】": "]" "·": "`" # 间隔号 -> 反引号 "、": "\\" # 顿号 -> 反斜杠 "~": "~" 重启fcitx即可. 这种方案本质上是替换了rime输入法输出的符号,所以在日常输入中,被替换的这些符号也会保持英文标点的状态.这点需要注意. 2. 微信无法粘贴图片 微信的剪贴板bug也是老生常谈的问题,这里ai推荐我使用wl-copy写一个脚本,安装脚本后,部分解决问题 先安装wl-paste和wl-copy yay -S wl-clipboard 再看看~/.local/bin是否存在 mkdir -p ~/.local/bin 然后 vim ~/.local/bin/wx-clip-fix.sh 写入以下脚本 #!/bin/bash # 依赖: wl-clipboard (确保已安装 wl-paste 和 wl-copy) wl-paste --watch bash -c ' # 避免无限循环:仅当内容是纯文本才处理 if wl-paste -n --list-types | grep -q "text/plain"; then clip=$(wl-paste -n) # 匹配微信/QQ的临时图片路径 if [[ "$clip" == file://*/WeChat_Data/*\.jpg ]] || [[ "$clip" == file://*/WeChat_Data/*\.png ]]; then filepath=$(echo "$clip" | sed "s/^file:\/\///") if [ -f "$filepath" ]; then # 重新作为图片写入剪贴板,打断原有 MIME mime=$(file --mime-type -b "$filepath") wl-copy -t "$mime" < "$filepath" # 可选:通知反馈 (需要安装 libnotify) # notify-send "Clipboard" "已转换微信图片为原生格式" fi fi fi ' 在niri配置文件中添加spawn-at-startup ...

2026-05-19 · 2 min · 251 words · 3cbb5c40