diff --git a/apps/docker.sh b/apps/docker.sh index 7c9a7a0..8a5143c 100755 --- a/apps/docker.sh +++ b/apps/docker.sh @@ -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 diff --git a/deeplearning/install.sh b/deeplearning/install.sh index 919d1ec..4896633 100755 --- a/deeplearning/install.sh +++ b/deeplearning/install.sh @@ -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 diff --git a/nvim/config/init.vim b/nvim/config/init.vim index ad9175f..08c3fad 100644 --- a/nvim/config/init.vim +++ b/nvim/config/init.vim @@ -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'} diff --git a/player/install.sh b/player/install.sh index 4e4c3e9..c4742b3 100755 --- a/player/install.sh +++ b/player/install.sh @@ -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 diff --git a/suckless/config/dwmbar b/suckless/config/dwmbar index 7a2e47c..b197f1a 100755 --- a/suckless/config/dwmbar +++ b/suckless/config/dwmbar @@ -4,9 +4,11 @@ function update set -x text # mpd - set music (mpc) - if string match -r playing "$music[2]" - set text $text "喇 $music[1]" + 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) @@ -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 diff --git a/suckless/install.sh b/suckless/install.sh index e8dd7b5..fe3d129 100755 --- a/suckless/install.sh +++ b/suckless/install.sh @@ -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 @@ -83,4 +86,4 @@ EOT # config dwm -lnsf $DIR/config ~/.config/dwm \ No newline at end of file +lnsf $DIR/config ~/.config/dwm