ArchLinux发行版ManjaroKDE配置

1、列出国内镜像地址选择并跟换适合自己所在地区的源

因为我所在的地区之前使用其它软件源老是出问题只有中科大的较为稳定我选中科大的源(https://mirrors.ustc.edu.cn/archlinuxcn/$arch)。

1
sudo pacman-mirrors -i -c China -m rank

2.修改配置文件(/etc/pacman.conf)

内置的编辑器有nano和kate

1
sudo nano /etc/pacman.conf

结尾处追加写入:

1
2
3
4
5
[archlinuxcn]

SigLevel = Optional TrustedOnly

Server = https://mirrors.ustc.edu.cn/archlinuxcn/$arch

可能因为版本差异会存在些许差异附上整个源文件作为备份:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
#
# /etc/pacman.conf
#
# See the pacman.conf(5) manpage for option and repository directives

#
# GENERAL OPTIONS
#
[options]
# The following paths are commented out with their default values listed.
# If you wish to use different paths, uncomment and update the paths.
#RootDir = /
#DBPath = /var/lib/pacman/
CacheDir = /var/cache/pacman/pkg/
#LogFile = /var/log/pacman.log
#GPGDir = /etc/pacman.d/gnupg/
#HookDir = /etc/pacman.d/hooks/
HoldPkg = pacman glibc manjaro-system
# If upgrades are available for these packages they will be asked for first
SyncFirst = manjaro-system archlinux-keyring manjaro-keyring
#XferCommand = /usr/bin/curl -C - -f %u > %o
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
#CleanMethod = KeepInstalled
#UseDelta = 0.7
Architecture = auto

# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
#IgnorePkg =
#IgnoreGroup =

#NoUpgrade =
#NoExtract =

# Misc options
#UseSyslog
#Color
#TotalDownload
# We cannot check disk space from within a chroot environment
CheckSpace
#VerbosePkgLists

# By default, pacman accepts packages signed by keys that its local keyring
# trusts (see pacman-key and its man page), as well as unsigned packages.
SigLevel = Required DatabaseOptional
LocalFileSigLevel = Optional
#RemoteFileSigLevel = Required

# NOTE: You must run `pacman-key --init` before first using pacman; the local
# keyring can then be populated with the keys of all official Manjaro Linux
# packagers with `pacman-key --populate archlinux manjaro`.

#
# REPOSITORIES
# - can be defined here or included from another file
# - pacman will search repositories in the order defined here
# - local/custom mirrors can be added here or in separate files
# - repositories listed first will take precedence when packages
# have identical names, regardless of version number
# - URLs will have $repo replaced by the name of the current repo
# - URLs will have $arch replaced by the name of the architecture
#
# Repository entries are of the format:
# [repo-name]
# Server = ServerName
# Include = IncludePath
#
# The header [repo-name] is crucial - it must be present and
# uncommented to enable the repo.
#

# The testing repositories are disabled by default. To enable, uncomment the
# repo name header and Include lines. You can add preferred servers immediately
# after the header, and they will be used before the default mirrors.

[core]
SigLevel = PackageRequired
Include = /etc/pacman.d/mirrorlist

[extra]
SigLevel = PackageRequired
Include = /etc/pacman.d/mirrorlist

[community]
SigLevel = PackageRequired
Include = /etc/pacman.d/mirrorlist

# If you want to run 32 bit applications on your x86_64 system,
# enable the multilib repositories as required here.

[multilib]
SigLevel = PackageRequired
Include = /etc/pacman.d/mirrorlist

# An example of a custom package repository. See the pacman manpage for
# tips on creating your own repositories.
#[custom]
#SigLevel = Optional TrustAll
#Server = file:///home/custompkgs

3.更新软件源配置文件使其生效

1
sudo pacman-mirrors -g

4.同步软件数据仓库

1
sudo pacman -Syy

5.系统升级

1
sudo pacman -Syu

6.全面更新系统

1
sudo pacman -Syyu

7.安装archlinuxcn-keyring包导入GPG key

1
sudo pacman -S archlinuxcn-keyring

8.安装AUR包管理工具yay

1
sudo pacman -S yay

9.安装Fcitx5输入法

9.1:首先卸载Fcitx4版本的套件

1
sudo pacman Rc fcitx

9.2:安装Fcitx5

1
sudo pacman -S fcitx5 fcitx5-chinese-addons fcitx5-chewing fcitx5-pinyin-zhwiki fcitx5-pinyin-moegirl fcitx5-config-qt fcitx5-gtk

9.3:写入配置(~/.xprofile)

1
kate ~/.xprofile

写入一下内容:

1
2
3
4
5
export GTK_IM_MODULE=fcitx5
export QT_IM_MODULE=fcitx5
export XMODIFIERS="@im=fcitx5"
#设置开机自启
fcitx5 &

9.4:编辑文件(~/.xinitrc)

命令:

1
kate ~/.xinitrc

注意:在exec $(get_session)之前加入,exec $(get_session)这行内容在结尾处

写入内容:

1
2
3
4
#__________________________华丽的分割线___________________________
export GTK_IM_MODULE=fcitx5
export XMODIFIERS=@im=fcitx5
export QT_IM_MODULE=fcitx5

附上源配置文件作为备份:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/bin/bash
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap

DEFAULT_SESSION=startplasma-x11

# merge in defaults and keymaps

if [ -f $sysresources ]; then
xrdb -merge $sysresources
fi

if [ -f $sysmodmap ]; then
xmodmap $sysmodmap
fi

if [ -f "$userresources" ]; then
xrdb -merge "$userresources"
fi

if [ -f "$usermodmap" ]; then
xmodmap "$usermodmap"
fi

# start some nice programs

if [ -d /etc/X11/xinit/xinitrc.d ] ; then
for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
[ -x "$f" ] && . "$f"
done
unset f
fi

get_session(){
local dbus_args=(--sh-syntax --exit-with-session)
case $1 in
awesome) dbus_args+=(awesome) ;;
bspwm) dbus_args+=(bspwm-session) ;;
budgie) dbus_args+=(budgie-desktop) ;;
cinnamon) dbus_args+=(cinnamon-session) ;;
deepin) dbus_args+=(startdde) ;;
enlightenment) dbus_args+=(enlightenment_start) ;;
fluxbox) dbus_args+=(startfluxbox) ;;
gnome) dbus_args+=(gnome-session) ;;
i3|i3wm) dbus_args+=(i3 --shmlog-size 0) ;;
jwm) dbus_args+=(jwm) ;;
kde) dbus_args+=(startplasma-x11) ;;
lxde) dbus_args+=(startlxde) ;;
lxqt) dbus_args+=(lxqt-session) ;;
mate) dbus_args+=(mate-session) ;;
xfce) dbus_args+=(xfce4-session) ;;
openbox) dbus_args+=(openbox-session) ;;
*) dbus_args+=($DEFAULT_SESSION) ;;
esac

echo "dbus-launch ${dbus_args[*]}"
}
exec $(get_session "$1")

开机启动项可在设置系统设置中使用GUI图形界面配置就不搞那华丽胡哨的了。

安装配置完Fcitx5输入法之后重启或注销一下电脑(推荐重启)。

1
重启命令:reboot

10.常用软件安装

注意:安装软件这种环节能用pacman装的就尽量不要用yay安装

安装臭名昭著的勒索软件Vim(调侃话语哈哈)

1
sudo pacman -S vim

AUR

1
sudo pacman -S yaourt

微信

千万不要安装网页版的为什么呢?(现在大部分人的微信都不支持网页版微信的登陆了我自己也在内嘿嘿)

1
2
sudo pacman -S wine-wechat
也可以在添加或删除软件中搜索 WeChat 直接安装

TIM

1
2
3
4
yay -S com.qq.tim.spark

sudo pacman -S base-devel

如果提示:(==> 错误: Cannot find the strip binary required for object file stripping.)
解决方法:因为没有安装 fakeroot、binutils 等打包工具,下载完了以后无法生成软件包执行以下命令安装一下完了之后再执行yay -S com.qq.tim.spaek就能安装上了

1
2
3
4
5
6
7
安装打包工具:sudo pacman -S base-devel
再次yay -S com.qq.tim.spaek安装TIM
No
No
:q
:q
y

Linux版QQ

这个东西我安装过好几次只有一次是没崩的可安装可不安装毕竟已经有TIM了,界面也不怎么好看界面太老了有种经典的感觉.

1
sudo pacman -S linuxqq

QQ音乐

1
yay -S qqmusic-bin

腾讯视频

1
yay -S tenvideo

网易云音乐

1
sudo pacman -S netease-cloud-music

还有个命令版的网易云音乐好像使用Python写的,(这玩意儿我也不会用)我就知道安装完成后在终端输入:musicbox启动但是我的一启动就报错不知道啥原因我一打开报错我就没看过了.

使用方法链接:https://github.com/darknessomi/musicbox/blob/master/README.md#%E9%94%AE%E7%9B%98%E5%BF%AB%E6%8D%B7%E9%94%AE

1
yaourt musicbox
1
sudo pacman -S netease-musicbox

我的重点常用及开发软件:

JAVA IDE

1
sudo pacman -S intellij-idea-ultimate-edition

Chrome(谷歌浏览器)

1
sudo pacman -S --noconfirm google-chrome

Firefox(火狐浏览器)

1
2
1:安装浏览器
sudo pacman -S --noconfirm firefox
1
2
2:安装中文插件(系统自带的火狐是英文的)
sudo pacman -S --nocnofirm firefox-i18n-zh-cn
1
2
3:完整命令
sudo pacman -S --noconfirm firefox firefox-i18n-zh-cn

思维导图 xmind

1
yay -S xmind

Typora(arkdown编写神器)

1
sudo pacman -S typora

wps:

wps我是通过yay搜索安装的第二个包

1.搜索安装wps

1
yay -s wps-office

2.安装缺失字体

1
sudo pacman -S ttf-wps-fonts

3.安装中文字体

1
yay -S wps-office-mui-zh-cn

4.解决无法输入中文的问题

1
sudo nano /usr/bin/wps

在第一行(#!/bin/bash)下面添加:

1
2
3
4
5
6
7
8
9
10
export XMODIFIERS="@im=fcitx"
export QT_IM_MODULE="fcitx"
gOpt=
#gOptExt=-multiply
gTemplateExt=("wpt" "dot" "dotx")


export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS="@im=fcitx"

Vscode

1
sudo pacman -S visual-studio-code-bin

nodejs

1
sudo pacman -S nodejs

JDK

1
sudo pacman -S jdk8-openjdk

PyCharm

这个安装的哪个包记不清了去添加/删除软件中傻瓜式的搜索一下安装就行虽然比不过命令高效

1
sudo pacman -S pycharm-professional

抓包工具

1
sudo pacman -S wireshark-qt

git管理工具

1
sudo pacman -S gitkraken

翻译、取词

1
sudo pacman -S goldendict

FTP、SFTP

1
sudo pacman -S filezilla

下载软件

aria2

1
sudo pacman -S aria2

axel

1
sudo pacman -S axel

sublime-text-4

1
yay -S sublime-text-4

图形编辑器gimp

1
sudo pacman -S gimp

终端复用工具tmux

1
sudo pacman -S tmux

虚拟机virtualbox

1
sudo pacman -S virtualbox

vmware-workstation

1
sudo pacman -S vmware-workstation

simplescreenrecorder录频软件

1
yay -S simplescreenrecorder-git

inux系统因为intel显卡导致部分录屏软件(Peek、Simplescreenrecorder)闪屏花屏的解决方法:

其实也不全是显卡问题,主要是因为桌面的问题,桌面如何显示图形决定了录屏软件即时渲染的正确与否。
文本仅对使用intel集显的设备有效!!!
添加配置文件,修改显示驱动:

1
sudo vim /etc/X11/xorg.conf.d/00-modesetting.conf

添加以下内容:

1
2
3
4
Section "Device"
Identifier "Intel"
Driver "modesetting"
EndSection

注销或重启即可生效。
可用inxi -G查看当前生效的驱动:

1
2
3
4
5
[machilus@Lucky-machilus ~]$ inxi -G
Graphics: Device-1: Intel Iris Xe Graphics driver: i915 v: kernel
Device-2: Chicony Chicony USB2.0 Camera type: USB driver: uvcvideo
Display: x11 server: X.Org 1.20.11 driver: loaded: modesetting resolution: 1920x1080~60Hz
OpenGL: renderer: Mesa Intel Xe Graphics (TGL GT2) v: 4.6 Mesa 21.0.3

dock栏

1
sudo pacman -S latte-dock

火焰截图flameshot

1
yay -S flameshot

uTools小工具(除了占用资源有点高其它都还好笔记本的话不建议给开机自启动耗电快插上电源后如果要使用的话再手动打开也不迟)

1
yay -S utools

scrcpy

1
yay -S scrcpy

使用数据线将手机与电脑连接USB连接模式选择 MTP模式(传输文件)

终端输入:scrcpy即可启动

11.KDE美化

安装终端显示信息neofetch

(装b神器,安装screenfetch也可)

1
2
3
4
5
6
7
sudo pacman -S neofetch
sudo pacman -S screenfetch

输出系统信息:
screenfetch -Arch
neofetch
screenfetch

安装PowerLevel10k主题

运行sudo pacman -S nerd-fonts-complete安装字体
运行以下命令安装powerlevel10k主题

1
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ~/powerlevel10k
1
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k

配置powerlevel10k

1
echo 'source ~/powerlevel10k/powerlevel10k.zsh-theme' >>! ~/.zshrc

在~/.zshrc写入ZSH_THEME="powerlevel10k/powerlevel10k"
安装后重新打开终端,并更改终端字体为hack

如需重新配置powerlevel10k主题,可随时运行p10k configure

安装自动补全插件

1
git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions

添加plugins=(zsh-autosuggestions git)

安装语法高亮插件

运行以下命令

1
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH_CUSTOM/plugins/zsh-syntax-highlighting

配值插件

1
echo "source $ZSH_CUSTOM/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ${ZDOTDIR:-$HOME}/.zshrc

安装colorls插件

运行sudo pacman -S ruby安装Ruby Gem
运行gem install colorls,用gem安装colorls(确保已安装nerd-fonts字体,不然会乱码)
如果安装速度慢,可以点击这里切换为清华源
安装成功以后将下面几行写入~/.zshrc

1
2
3
alias ls=colorls
alias ll="colorls -l"
alias la="colorls -a"

运行source ~/.zshrc使配置立即生效

sudo输入密码显示星号(可选)

1
2
运行命令sudo vim /etc/sudoers
添加以下内容Defaults env_reset,pwfeedback

vimplus(可选)

1
2
3
4
运行git clone https://github.com/chxuan/vimplus.git ~/.vimplus,从github克隆
运行sh ~/.vimplus/install.sh安装vimplus(可能需要五分钟左右,取决于你的网速)
运行sudo sh ~/.vimplus/install_to_user.sh username root安装到root用户
运行sh ~/.vimplus/update.sh更新vimplus

美化的话随便搞搞就行了不要花太多时间在美化上面,搞不好下次开机就没了。

终端zsh没必要华丽胡哨的不好看还麻烦,就默认终端修改下背景颜色和字体之类的就行了

中文字体包

1
2
3
4
5
6
sudo pacman -S wqy-zenhei
sudo pacman -S wqy-bitmapfont
sudo pacman -S wqy-microhei
sudo pacman -S ttf-wps-fonts
sudo pacman -S adobe-source-han-sans-cn-fonts
sudo pacman -S adobe-source-han-serif-cn-fonts

一款速度更快的 ssh 工具,网络不稳定时使用有奇效

mosh

1
yay -S mosh

wps

1
2
3
4
5
6
7
8
9
10
11
12
13
1.
yay -S wps-office
或者是
yay-s wps-office第二包

2.
安装字体
sudo pacman -S ttf-wps-fonts

3.解决wps菜单栏为英文的问题
pacman -Ss wps|grep zh #查看可用的语言包
yay -s wps-office-mui-zh-cn #安装wpsUI中文字体包