Manjaro I3WM installation and configuration
安装系统
-
进入官网下载页面选择 i3wm 最新的系统安装文件, 并将其写入U盘
-
进入主板 BIOS, 选择使用 USB 启动
-
在 Manjaro Hello 界面中点击 Install
-
在语言选择中选择英文, 默认的软件包中没有中文字体, 会导致安装后乱码
-
安装过程中需要进行硬盘分区, 保证有
/
和/bios/efi/
目录即可 -
安装完成后重启, 拔出U盘, 使用硬盘引导
系统设置
系统换源
可以使用以下命令进行更换据你最快的源
sudo pacman-mirrors --fasttrack
使用以下命令进行软件包更新
sudo yay -Syyu
设置中文
安装中文字体
yay -S wqy-bitmapfont wqy-microhei wqy-microhei-lite wqy-zenhei
打开 Manjaro Setting Manager > Locale Settings 添加 中文(中国) zh_CN.UTF-8
安装中文输入法
yay -S fcitx fcitx-im fcitx-configtool fcitx-googlepingyin
# 选择搜狗拼音会有一点问题, 所以选择google拼音
开启输入法
#
# ~/.profile
#
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS="@im=fcitx
配置开机自启
#
# ~/.i3/config
#
exec_always --no-startup-id fcitx
交换键盘按键(可选)
交换 win
键与 alt
键
#
# ~/.Xmodmap
#
clear mod1
clear mod4
keycode 64 = Super_L
keycode 133 = Alt_L
add mod1 = Alt_L
add mod4 = Super_L
配置 rofi
安装 rofi
yay -S rofi
添加 Dracula Theme
curl https://raw.githubusercontent.com/dracula/rofi/master/theme/config1.rasi -o ~/.config/rofi/Dracula.rasi
配置 win
+ space
启动rofi
#
# ~/.i3/config
#
bindsym $mod+space exec --no-startup-id rofi -modi drun -show drun -theme Dracula -icon-theme "Dracula" -show-icons
修改浏览器
yay -Rs palemoon-bin
yay -S chromium
sed -i 's/\/usr\/bin\/palemoon/\/usr\/bin\/chromium/g' ~/.profile
sed -i 's/userapp-Pale Moon/chromium/g' ~/.config/mimeapps.list
sed -i 's/palemoon/chromium/g' ~/.i3/config
安装下拉式终端
yay -S yakuake
# yakuake 依赖 konsole, konsole 可以用来替换默认的终端
sed -i 's/termial/konsole/g'
添加 yakuake 自动启动
#
# ~/.i3/config
#
exec --no-startup-id yakuake
konsole 配置
curl https://raw.githubusercontent.com/dracula/konsole/master/Dracula.colorscheme -o ~/.local/share/konsole/Dracula.colorscheme
进入 Konsole > Settings > Edit Current Profile... > Appearance tab > Color Schemes & font 选择 Dracula
gtk 设置
wget https://github.com/dracula/gtk/archive/master.zip
unzip master.zip
cp -r gtk-master/kde/kvantum/* ~/.config/Kvantum
mv gtk-master ./themes
gsettings set org.gnome.desktop.interface gtk-theme "Dracula"
gsettings set org.gnome.desktop.wm.preferences theme "Dracula"
安装图标主题
wget https://github.com/dracula/gtk/files/5214870/Dracula.zip
unzip Dracula.zip
mv Dracula ~/.icons/
打开 Customize Look And Feel > Widet 以及 Icon Theme 选择 Widget 为 Dracula
打开 Kvantum Manager > Change/Delete Theme 选择 Dracula-Solid
修改 i3-status
#
# /etc/i3status.conf
#
# i3status configuration file.
# see "man i3status" for documentation.
# It is important that this file is edited as UTF-8.
# The following line should contain a sharp s:
# ß
# If the above line is not correctly displayed, fix your editor first!
general {
markup = "pango"
output_format = "i3bar"
colors = true
interval = 5
color_good = "#50FA7B"
color_bad = "#F1FA8C"
color_degraded = "#FF5555"
}
# order += "ipv6"
order += "cpu_usage"
order += "disk /"
# order += "disk /home"
# order += "wireless _first_"
order += "ethernet _first_"
# order += "battery all"
# order += "load"
order += "memory"
order += "tztime local"
cpu_usage {
format = " <span color='gold'>⚡ %usage</span> "
}
load {
format = " <span color='sandybrown'>%1min</span> "
# max_threshold = 0.3
}
disk "/" {
# format = " hdd %avail "
format = " <span color='cyan'>🖴 %used (%percentage_used)</span> "
}
ethernet _first_ {
# if you use %speed, i3status requires root privileges
format_up = " 🖧 %ip "
format_down = " no lan "
}
wireless _first_ {
# if you use %speed, i3status requires root privileges
format_up = " lan: %ip %speed "
format_down = " no lan "
}
battery all {
# format = "%status %percentage %remaining %emptytime"
format = " %status %percentage"
format_down = "No battery"
last_full_capacity = true
integer_battery_capacity = true
# status_chr = ""
status_chr = "⚡"
# status_bat = "bat"
# status_bat = "☉"
status_bat = ""
# status_unk = "?"
status_unk = ""
# status_full = ""
status_full = "☻"
low_threshold = 15
threshold_type = time
}
memory {
format = " <span color='plum'>🗘 %used (%percentage_used)</span> "
# format = "%used / %available"
threshold_degraded = "1G"
format_degraded = "MEMORY < %available"
}
tztime local {
# format = "%Y-%m-%d %H:%M:%S"
format = " ⏲ %m.%d %H:%M "
}
问题记录
lightdm 启动失败
开机时提示 Failed to start Light Display Manager, 而进入终端后手动重启却能成功
这个问题解决方案为往 /etc/lightdm/lightdm.conf 中添加 logind-check-graphical=true
#
# /etc/lightdm/lightdm.conf
#
[LightDM]
......
logind-check-graphical=true
......
该问题主要是 SSD 硬盘启动太快, 可能导致 lightdm 启动时硬件驱动还未就绪, 而系统默认只会重启5次, 5次重启中, 驱动都没有准备好则需要手动重启
如果不希望每次都手动重启, 则需要配置其启动时检查并等待显示驱动, 参考链接
HDMI没有声音
添加以下内容至文件 ~/.asoundrc, 并在声卡 Channel 中选择 PCM
#
# ~/.asoundrc
#
defaults.pcm.card 0
defaults.pcm.device 3
defaults.ctl.card 0
开启垂直同步
修改 /etc/xdg/picom.conf
#
# /etc/xdg/picom.conf
#
vsync = true;