先show下自己配置的截图,简单弄了下,凑合用。
本文默认你已经安装了基本的archlinux系统,只是没有配置桌面环境。所以跳过前面archlinux的基础安装过程。
ArchLinux的具体安装请参见我的博客 https://blog.csdn.net/r8l8q8/article/details/76516523
1.安装显卡驱动 和X窗系统
(1)安装显卡驱动
确定显卡型号
执行:
# lspci | grep VGA
执行:
$ sudo pacman -S 驱动包
官方仓库提供的驱动包:
通用----------------------------------xf86-video-vesa
intel----------------------------------xf86-video-intel
Geforce7±-------------------------xf86-video-nouveau
Geforce6/7-------------------------xf86-video-304xx
(2)安装X窗口系统
执行:
$ sudo pacman -S xorg-server
3.安装登录管理器和i3wm
(1)安装sddm登录管理器,可以选择其他登录管理器或者不装用startx启动,具体参见arch wiki
执行
$ sudo pacman -S sddm
$ sudo systemctl enable sddm
安装并启用sddm服务
(2)安装i3wm
执行
$ sudo pacman -S i3-gaps
安装i3-gaps(i3-gaps为i3wm的分支,提供了更多特性)
(3)安装终端
执行
$ sudo pacman -S mate-terminal
安装mate-terminal(可选其他终端,这里安装的是mate桌面的终端,相比其他xterm urxvt等轻量级终端略为大一些,但是配置方便,自己用鼠标点几下就ok了)
(4)重启
reboot
至此基础的i3安装已经完成
4.开始安装简单美化所需的软件
软件名
简介compton
提供窗口透明支持
polybar
状态条,类似于windows那个任务栏,也可以用默认的i3bar或者装别的panel
rofi
快捷程序启动,也可以装dmenu
feh
墙纸设置
(1)安装窗口透明支持软件
$ sudo pacman -S compton
(2)安装状态条
先添加archlinuxcn源, polybar在archlinuxcn源里。
$ sudo nano /etc/pacman.conf
在 /etc/pacman.conf 文件末尾添加两行:
[archlinuxcn]
SigLevel=Never
Server = https://mirrors.ustc.edu.cn/archlinuxcn/$arch
(先执行sudo pacman -S firefox 安装浏览器,然后打开本文复制一下文中archlinuxcn源,在nano 里ctrl+shift+v粘贴以下)
然后执行
$ sudo pacman -Syy
更新下仓库信息
执行
$ sudo pacman -S polybar
安装polybar
(3)安装快捷程序启动
$ sudo pacman -S rofi
(4)安装墙纸设置软件
$ sudo pacman -S feh
其中执行
feh --randomize --bg-fill ~/Pictures/DesktopBackground
会随机切换一张图片作为墙纸,可以配合linux的crontab 设置成每隔10分钟自动切换壁纸。crontab的安装使用很简单,请自行百度。
(5)安装输入法
执行
$ sudo pacman -S fcitx-im fcitx-configtool
安装输入法引擎。
官方仓库里的输入法:
fcitx-cloudpinyin
fcitx-googlepinyin
fcitx-libpinyin
fcitx-sunpinyin
ArchLinuxCN源里有搜狗拼音 fcitx-sogoupinyin
选择一个安装.
执行
$ nano ~/.xprofile
添加以下内容
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS="@im=fcitx"
5.修改配置文件
(1)修改i3配置文件
执行
$ nano ~/.config/i3/config
打开配置文件。
汉字注释部分为在原来配置文件基础上修改添加的内容
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
set $mod Mod4
#设置窗口边框等等
new_window none
new_float normal
hide_edge_borders both
#设置窗口间距
gaps inner 8
gaps outer 6
# 设置截图快捷键 ,先安装mate-utils, sudo pacman -S mate-utils
bindsym $mod+p exec mate-screenshot -i
#登录时 启用窗口透明
exec --no-startup-id compton -b
#登陆时 随机选择壁纸 ,~/Pictures/DesktopBackground 下要放几张图片
exec --no-startup-id feh --randomize --bg-fill ~/Pictures/DesktopBackground
# 登陆时启动polybar
exec --no-startup-id ~/.config/polybar/launch.sh
#登录时启动fcitx
exec --no-startup-id fcitx
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
font pango:monospace 8
# This font is widely installed, provides lots of unicode glyphs, right-to-left
# text rendering and scalability on retina/hidpi displays (thanks