安装 freebsd 之后的一些配置
1. 安装X11相关
sudo pkg install -y xorg sourcecodepro-ttf wqy-fonts nerd-fonts firefox chromium pcmanfm-qt networkmgr xfce4-power-manager
# 字体:sourcecodepro-ttf wqy-fonts nerd-fonts
# 浏览器:firefox chromium
# 文件管理:pcmanfm-qt(35M) or thunar(182M)
# 网络管理:networkmgr wifimgr
# 电源管理:xfce4-power-manager
# 显卡驱动:xf86-video-intel
2. 配置窗口管理器
# dwm 需追加到.xinitrc文件,并注释旧的
echo "exec /usr/local/bin/dwm" >> ~/.xinitrc
# st
pkg install -y pkgconf
# surf
pkg install -y gcr webkit2-gtk3
3. 配置中文环境
# 显示中文字体, 需将环境变量写入,~/.bash_profile
export LANG=en_US.UTF-8
export LC_CTYPE=zh_CN.UTF-8
export LC_NUMERIC=zh_CN.UTF-8
export LC_TIME=zh_CN.UTF-8
export LC_COLLATE="en_US.UTF-8"
export LC_MONETARY=zh_CN.UTF-8
export LC_MESSAGES="en_US.UTF-8"
export LC_PAPER=zh_CN.UTF-8
export LC_NAME=zh_CN.UTF-8
export LC_ADDRESS=zh_CN.UTF-8
export LC_TELEPHONE=zh_CN.UTF-8
export LC_MEASUREMENT=zh_CN.UTF-8
export LC_IDENTIFICATION=zh_CN.UTF-8
export LC_ALL="en_US.UTF-8"
# 中文输入法
pkg install -y zh-fcitx zh-fcitx-cloudpinyin zh-fcitx-configtool fcitx-qt5
4. 配置自动登录到X11
# 1. autologin:修改/etc/ttys
ttyv0 "/usr/libexec/getty autologin" xterm onifexists secure
# 2. add username to autologin:修改/etc/gettytab,其中glenda as username
autologin|al.9600:\
:al=glenda:tc=std.9600:
al.19200:\
:al=glenda:tc=std.19200:
al.38400:\
:al=glenda:tc=std.38400:
al.57600:\
:al=glenda:tc=std.57600:
al.115200:\
:al=glenda:tc=std.115200:
al.230400:\
:al=glenda:tc=std.230400:
al.Pc:\
:al=glenda:tc=Pc
# auto startx, 需在~/.bash_profile中添加一下内容
[ -z $DISPLAY ] && [ $(tty) = "/dev/ttyv0" ] && startx
5. 配置工具链
sudo pkg install neovim neofetch git go node yarn python37 py37-pip \
bat ripgrep universal-ctags lazygit