[bugfix] ...

This commit is contained in:
Klesh Wong 2020-09-19 09:23:38 +08:00
parent 0ba89c7f04
commit 75b0f359c8
6 changed files with 35 additions and 5 deletions

View File

@ -19,5 +19,20 @@ esac
sudo systemctl enable docker
sudo systemctl start docker
# configuration
sudo usermod -aG docker $USER
if [ -d /etc/docker ]; then
dj='{}'
if [ -f /etc/docker/daemon.json ]; then
# backup
[ ! -f /etc/docker/daemon.bak.json ] && \
sudo cp /etc/docker/daemon.json /etc/docker/daemon.bak.json
# read
dj=$(cat /etc/docker/daemon.json)
fi
echo $dj | jq '. + {"registry-mirrors": ["https://izuhlbap.mirror.aliyuncs.com"]}' | sudo tee /etc/docker/daemon.json
sudo systemctl restart docker
fi

View File

@ -26,6 +26,11 @@ case "$PM" in
echo 'Unsupported release'
exit -1
fi
distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add -
curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list
sudo apt update
sudo apt install -y nvidia-docker2
;;
pacman)
echo TODO

View File

@ -90,6 +90,7 @@ Plug 'editorconfig/editorconfig-vim'
Plug 'tpope/vim-surround'
Plug 'jiangmiao/auto-pairs'
Plug 'preservim/nerdtree'
Plug 'posva/vim-vue'
"Plug 'neoclide/coc.nvim', {'branch': 'release'}
"Plug 'neoclide/coc-json', {'do': 'yarnpkg install --frozen-lockfile'}
"Plug 'iamcco/coc-vimlsp', {'do': 'yarnpkg install --frozen-lockfile'}

View File

@ -14,6 +14,10 @@ case "$PM" in
;;
esac
# enable for current user
systemctl --user enable mpd
systemctl --user start mpd
# symlink configuration
lnsf $DIR/config/mpd ~/.config/mpd
lnsf $DIR/config/ncmpcpp ~/.config/ncmpcpp

View File

@ -4,10 +4,12 @@
function update
set -x text
# mpd
if which mpc
set music (mpc)
if string match -r playing "$music[2]"
set text $text "喇 $music[1]"
end
end
# volume
set vol (amixer get Master)
if string match -r '\[off\]' "$vol"
@ -36,7 +38,7 @@ function update
set text $text " $cpu"
end
# battery
set battery (cat /sys/class/power_supply/BAT0/capacity 2>/dev/null || -1)
set battery (cat /sys/class/power_supply/BAT0/capacity 2>/dev/null || echo "-1")
if test "$battery" -gt -1
set plugged (cat /sys/class/power_supply/AC/online)
if test "$plugged" -eq 1

View File

@ -15,9 +15,11 @@ case "$PM" in
xorg libx11-dev libxft-dev libxinerama-dev \
libxrandr-dev arandr autorandr \
ibus ibus-table ibus-table-wubi \
pavucontrol \
gnome-keyring \
xss-lock \
nitrogen \
lm-sensors \
trayer
sudo apt remove gdm3
;;
@ -30,6 +32,7 @@ case "$PM" in
gnome-keyring \
xss-lock \
nitrogen \
lm-sensors \
trayer
;;
esac