-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.sh
67 lines (55 loc) · 1.42 KB
/
init.sh
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
#!/bin/bash
# archlinuxcn 源
function archlinuxcn() {
echo '[archlinuxcn]
Server = https://mirrors.tuna.tsinghua.edu.cn/archlinuxcn/$arch
Server = https://mirrors.ustc.edu.cn/archlinuxcn/$arch
' | sudo tee -a /etc/pacman.conf
sudo pacman -Sy archlinuxcn-keyring haveged
sudo systemctl enable haveged
sudo systemctl start haveged
sudo pacman-key --init
sudo pacman-key --populate manjaro
sudo pacman-key --populate archlinux
sudo pacman-key --populate archlinuxcn
}
# 上网
function ladder() {
sudo pacman -Sy v2ray v2raya
sudo systemctl enable --now v2raya.service
}
# 输入法
function inputMethod() {
sudo pacman -S fcitx-rime
sudo pacman -S fcitx-im
sudo pacman -S fcitx-configtool
echo 'export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS="@im=fcitx"
' | sudo tee -a ~/.xprofile
# 配置 rime
mv ~/.config/fcitx/rime ~/.config/fcitx/rime.bak
git clone https://gitclone.com/github.com/hou8/rime.git ~/.config/fcitx/rime
}
# 主函数
function _main() {
# 换源
sudo pacman-mirrors -i -c China -m rank
# 更新全部应用
sudo pacman -Syyu
# 另一个包管理工具
sudo pacman -Sy yay
# 一些最基本需要安装的包
sudo pacman -Sy \
git \
vim \
tldr \
tree
# 一系列应用安装与配置
archlinuxcn
ladder
inputMethod
echo "done!"
}
# 入口
_main