Merge branch 'master' of gitee.com:klesh/dotfiles
This commit is contained in:
commit
11e8703bc0
17
cli/nnn.sh
17
cli/nnn.sh
|
@ -6,17 +6,28 @@ DIR=$(dirname "$(readlink -f "$0")")
|
||||||
|
|
||||||
log 'Setting up nnn'
|
log 'Setting up nnn'
|
||||||
|
|
||||||
|
$NNN_CONFIG_DIR="$XDG_CONFIG_HOME/nnn/plugins"
|
||||||
|
|
||||||
# setup package mirror for CHINA
|
# setup package mirror for CHINA
|
||||||
case "$PM" in
|
case "$PM" in
|
||||||
apt)
|
apt)
|
||||||
echo TODO
|
mkdir -p ~/.local/bin
|
||||||
exit -1
|
HTTPS_PROXY=$GITHUB_PROXY curl -Lo /tmp/nnn.tar.gz https://github.com/jarun/nnn/releases/download/v4.3/nnn-static-4.3.x86_64.tar.gz
|
||||||
|
cd /tmp
|
||||||
|
tar zxvf nnn.tar.gz
|
||||||
|
mv nnn-static ~/.local/bin/nnn
|
||||||
|
rm -rf nnn.tar.gz
|
||||||
|
cd -
|
||||||
|
|
||||||
|
mkdir -p "$NNN_CONFIG_DIR"
|
||||||
|
HTTPS_PROXY=$GITHUB_PROXY curl -Lo "$NNN_CONFIG_DIR/plugins/fzcd" https://github.com/jarun/nnn/raw/master/plugins/fzcd
|
||||||
|
HTTPS_PROXY=$GITHUB_PROXY curl -Lo "$NNN_CONFIG_DIR/plugins/preview-tui" https://github.com/jarun/nnn/raw/master/plugins/preview-tui
|
||||||
;;
|
;;
|
||||||
pacman)
|
pacman)
|
||||||
sudo pacman -S --noconfirm --needed nnn
|
sudo pacman -S --noconfirm --needed nnn
|
||||||
yay -S --noconfirm --needed dragon-drag-and-drop
|
yay -S --noconfirm --needed dragon-drag-and-drop
|
||||||
|
cp -r /usr/share/nnn/plugins/. "$NNN_CONFIG_DIR"
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# configuration
|
# configuration
|
||||||
lnsf "$DIR/nnn/n.fish" "$XDG_CONFIG_HOME/fish/functions/n.fish"
|
lnsf "$DIR/nnn/n.fish" "$XDG_CONFIG_HOME/fish/functions/n.fish"
|
||||||
cp -r /usr/share/nnn/plugins/. "$XDG_CONFIG_HOME/nnn/plugins"
|
|
||||||
|
|
|
@ -7,11 +7,12 @@ DIR=$(dirname "$(readlink -f "$0")")
|
||||||
FILES_PATH=$PREFIX/nodejs
|
FILES_PATH=$PREFIX/nodejs
|
||||||
NODE_BIN=$PREFIX/bin/node
|
NODE_BIN=$PREFIX/bin/node
|
||||||
NODE_URL=https://nodejs.org/dist
|
NODE_URL=https://nodejs.org/dist
|
||||||
NODE_VERSION=v14.15.4
|
NODE_VERSION=v14.18.0
|
||||||
NPM_BIN=npm
|
NPM_BIN=npm
|
||||||
|
NPM_CONFIG_REGISTRY=
|
||||||
if in_china; then
|
if in_china; then
|
||||||
NPM_REGISTRY_URL=https://npmreg.mirrors.ustc.edu.cn
|
export NPM_CONFIG_REGISTRY=https://registry.npmmirror.com
|
||||||
NODE_URL=$NPM_REGISTRY
|
NODE_URL=https://npmmirror.com/mirrors/node
|
||||||
NPM_BIN=npm
|
NPM_BIN=npm
|
||||||
fi
|
fi
|
||||||
export NPM_BIN
|
export NPM_BIN
|
||||||
|
@ -61,14 +62,14 @@ install() {
|
||||||
| sudo tee "$FILES_PATH" >/dev/null
|
| sudo tee "$FILES_PATH" >/dev/null
|
||||||
# remove download path
|
# remove download path
|
||||||
rm "/tmp/$NAME"
|
rm "/tmp/$NAME"
|
||||||
sudo npm install -g yarn
|
|
||||||
configure_nodejs
|
configure_nodejs
|
||||||
}
|
}
|
||||||
|
|
||||||
configure_nodejs() {
|
configure_nodejs() {
|
||||||
if in_china; then
|
if in_china; then
|
||||||
echo "registry=$NPM_REGISTRY_URL" > ~/.npmrc
|
echo "registry=$NPM_CONFIG_REGISTRY" > ~/.npmrc
|
||||||
yarnpkg config set registry $NPM_REGISTRY_URL --global
|
! has_cmd yarnpkg && sudo npm install -g yarn
|
||||||
|
yarnpkg config set registry $NPM_CONFIG_REGISTRY --global
|
||||||
#yarnpkg config set disturl https://npm.taobao.org/dist --global
|
#yarnpkg config set disturl https://npm.taobao.org/dist --global
|
||||||
#yarnpkg config set sass_binary_site https://npm.taobao.org/mirrors/node-sass --global
|
#yarnpkg config set sass_binary_site https://npm.taobao.org/mirrors/node-sass --global
|
||||||
#yarnpkg config set electron_mirror https://npm.taobao.org/mirrors/electron/ --global
|
#yarnpkg config set electron_mirror https://npm.taobao.org/mirrors/electron/ --global
|
||||||
|
|
|
@ -20,6 +20,7 @@ case "$PM" in
|
||||||
pkg)
|
pkg)
|
||||||
pkg install python
|
pkg install python
|
||||||
pip install virtualfish
|
pip install virtualfish
|
||||||
|
;;
|
||||||
apt)
|
apt)
|
||||||
#for older ubuntu distro
|
#for older ubuntu distro
|
||||||
#sudo add-apt-repository ppa:deadsnakes/ppa
|
#sudo add-apt-repository ppa:deadsnakes/ppa
|
||||||
|
|
|
@ -10,3 +10,10 @@
|
||||||
- tbsync
|
- tbsync
|
||||||
- provider for caldav & carddav: for nextcloud synchronization
|
- provider for caldav & carddav: for nextcloud synchronization
|
||||||
- provider for exchange activesync: for outlook synchronization
|
- provider for exchange activesync: for outlook synchronization
|
||||||
|
|
||||||
|
# Holiday Calendar
|
||||||
|
|
||||||
|
Create new calendar -> On the Network
|
||||||
|
|
||||||
|
1. [canada holidy](https://www.officeholidays.com/subscribe/canada)
|
||||||
|
2. [chinese holiday](https://www.officeholidays.com/subscribe/china)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user