-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.sh
114 lines (94 loc) · 2.46 KB
/
config.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
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
#!/usr/bin/env bash
# ====================================================
# Copyright (C) 2023 river All rights reserved.
#
# Author : tower_town
# Email : [email protected]
# File Name : config.sh
# Last Modified : 2023-08-16 01:25
# Describe :
#
# ====================================================
vim_depd(){
apk add \
vifm \
just \
clang \
clang16-extra-tools
# clangd in clang16-extra-tools
# apk add python3 py3-pip
# # pip conf
# pip install --upgrade pip
# pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
# # options
# pip install clangd
# vimlsp
apk add nodejs-lts npm
npm config set registry https://registry.npmmirror.com
npm install -g vim-language-server
npm list -g
ln -s /usr/local/bin/vim-language-server /usr/bin/vimlsp
}
alpine_init(){
# setting mirror apk rep
echo "setting mirror apk rep"
sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories
# basic apk
echo "install basic apk"
apk add \
build-base \
vim \
git \
curl \
wget \
less
# install docs reference: wiki.alpinelinux.com/wiki/Alpine_Linux:FAQ
echo "install docs reference: wiki.alpinelinux.com/wiki/Alpine_Linux:FAQ"
apk add mandoc man-pages docs
# setting timezone reference: wiki.alpinelinux.com/wiki/Setting_the_timezone
echo "setting timezone."
apk add tzdata
ls /usr/share/zoneinfo
# setting timezone to Asia/Shanghai
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
echo "Asia/Shanghai" > /etc/timezone
date
apk del tzdata
echo "setting timezone finish."
}
fish_config(){
apk add \
fish \
shadow
echo $(which fish) | sudo tee -a /etc/shells
chsh -s $(which fish)
cat <<EOF
set ohmyfish "https://raw.githubusercontent.com/oh-my-fish/oh-my-fish/master/bin/install"
which omf && fish -c "curl $ohmyfish | fish"
omf install ays
apk add lua5.1 luajit
git clone https://github.com/skywind3000/z.lua /usr/local/zlua
echo 'lua /usr/local/zlua/z.lua --init fish | source' >> ~/.config/fish/conf.d/z.fish
EOF
}
fish_proxy(){
tee -a ~/.config/fish/conf.d/proxy.fish <<'__EOF__'
function with_fastgit
HTTPS_PROXY=http://127.0.0.1:38457 $argv
end
__EOF__
}
alter_command(){
apk add \
exa \
find-fd \
ripgrep \
bat \
htop
# dua-cli
dua_url="https://github.com/Byron/dua-cli/releases/download/v2.20.1/dua-v2.20.1-x86_64-unknown-linux-musl.tar.gz"
wget ${dua_url} -O /tmp/dua.tar.gz
tar -xzf /tmp/dua.tar.gz
mv /tmp/dua-v2.20.1-x86_64-unknown-linux-musl /opt/dua
ln -s /opt/dua/dua /usr/bin/dua
}