[bugfix] ...

This commit is contained in:
Klesh Wong 2020-09-18 04:16:15 +00:00
parent 0ccea9505a
commit 67ef09142c
28 changed files with 183 additions and 67 deletions

23
apps/docker.sh Executable file
View File

@ -0,0 +1,23 @@
#!/bin/bash
DIR=$(readlink -f $(dirname $0))
. $DIR/../env.sh
# install docker
case "$PM" in
apt)
sudo apt install -y docker.io docker-compose
! which pip3 && $ROOT/python/install.sh
sudo pip3 install docker-compose
;;
pacman)
sudo pacman -S docker docker-compose
;;
esac
sudo systemctl enable docker
sudo systemctl start docker
# configuration
sudo usermod -aG docker $USER

2
office/install.sh → apps/install.sh Normal file → Executable file
View File

@ -11,7 +11,6 @@ case "$PM" in
chromium-browser \
zathura zathura-pdf-poppler sxiv \
flameshot \
keepassxc \
libreoffice \
gimp
;;
@ -20,7 +19,6 @@ case "$PM" in
chromium \
zathura zathura-pdf-mupdf sxiv\
flameshot \
keepassxc \
libreoffice-fresh \
gimp
;;

18
apps/keepassxc.sh Executable file
View File

@ -0,0 +1,18 @@
#!/bin/bash
DIR=$(readlink -f $(dirname $0))
. $DIR/../env.sh
# install nextcloud
case "$PM" in
apt)
sudo add-apt-repository -y ppa:phoerious/keepassxc
sudo apt-get update
sudo apt install -y keepassxc
;;
pacman)
sudo pacman -S keepassxc
;;
esac

4
office/nextcloud.sh → apps/nextcloud.sh Normal file → Executable file
View File

@ -7,9 +7,7 @@ DIR=$(readlink -f $(dirname $0))
# install nextcloud
case "$PM" in
apt)
echo TODO
exit -1
sudo add-apt-repository ppa:nextcloud-devs/client
sudo add-apt-repository -y ppa:nextcloud-devs/client
sudo apt-get update
sudo apt install -y nextcloud-client
;;

2
autologin/install.sh Normal file → Executable file
View File

@ -3,7 +3,7 @@
DIR=$(readlink -f $(dirname $0))
. $DIR/../env.sh
read -l -P 'Please enter autologin username (empty to skip): ' username
read -p 'Please enter autologin username (empty to skip): ' username
if [ -z "$username" ]; then
echo skip autologin setup
else

View File

@ -1,3 +1,4 @@
[Service]
ExecStart=
ExecStart=-/usr/bin/agetty --autologin USERNAME --noclear %I $TERM
#ExecStart=-/usr/bin/agetty --autologin USERNAME --noclear %I $TERM
ExecStart=-/sbin/agetty --autologin USERNAME --noclear %I $TERM

35
deeplearning/install.sh Executable file
View File

@ -0,0 +1,35 @@
#!/bin/bash
DIR=$(readlink -f $(dirname $0))
. $DIR/../env.sh
$ROOT/python/install.sh
# install deep learning tools
case "$PM" in
apt)
# cuda dependencies
sudo apt install linux-headers-$(uname -r)
source /etc/lsb-release
if [ "$DISTRIB_RELEASE" = "18.04" ] && [ "$(uname -m)" = 'x86_64' ]; then
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-ubuntu1804.pin
sudo mv cuda-ubuntu1804.pin /etc/apt/preferences.d/cuda-repository-pin-600
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub
sudo add-apt-repository "deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/ /"
sudo apt-get update
sudo apt-get -y install cuda
elif [ "$DISTRIB_RELEASE" = "20.04" ]; then
sudo apt install nvidia-cuda-toolkit
else
echo 'Unsupported release'
exit -1
fi
;;
pacman)
echo TODO
exit -1
;;
esac

1
dunst/config/config Symbolic link
View File

@ -0,0 +1 @@
/home/klesh/dotfiles/dunst/config

3
dunst/install.sh Normal file → Executable file
View File

@ -3,9 +3,6 @@
DIR=$(readlink -f $(dirname $0))
. $DIR/../env.sh
# check dependencies
! which yarnpkg && $ROOT/nodejs/install.sh
# install nvim
case "$PM" in
apt)

2
env.sh
View File

@ -41,7 +41,7 @@ fish-is-default-shell () {
}
has-bluetooth () {
dmesg | grep -i blue
dmesg | grep -i bluetooth
}

View File

@ -0,0 +1,15 @@
[Settings]
gtk-theme-name=Arc-Dark
gtk-icon-theme-name=hicolor
gtk-font-name=Sans 10
gtk-cursor-theme-name=Adwaita
gtk-cursor-theme-size=0
gtk-toolbar-style=GTK_TOOLBAR_BOTH
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
gtk-button-images=1
gtk-menu-images=1
gtk-enable-event-sounds=1
gtk-enable-input-feedback-sounds=1
gtk-xft-antialias=1
gtk-xft-hinting=1
gtk-xft-hintstyle=hintfull

View File

@ -0,0 +1,27 @@
[Appearance]
color_scheme_path=/usr/share/qt5ct/colors/airy.conf
custom_palette=false
standard_dialogs=default
style=gtk2
[Fonts]
fixed=@Variant(\0\0\0@\0\0\0\x14\0U\0R\0W\0 \0G\0o\0t\0h\0i\0\x63@(\0\0\0\0\0\0\xff\xff\xff\xff\x5\x1\0\x32\x10)
general=@Variant(\0\0\0@\0\0\0\x14\0U\0R\0W\0 \0G\0o\0t\0h\0i\0\x63@(\0\0\0\0\0\0\xff\xff\xff\xff\x5\x1\0\x32\x10)
[Interface]
activate_item_on_single_click=1
buttonbox_layout=0
cursor_flash_time=1000
dialog_buttons_have_icons=1
double_click_interval=400
gui_effects=@Invalid()
keyboard_scheme=2
menus_have_icons=true
show_shortcuts_in_context_menus=true
stylesheets=@Invalid()
toolbutton_style=4
underline_shortcut=1
wheel_scroll_lines=3
[SettingsWindow]
geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\0\x6\0\0\0\"\0\0\au\0\0\x4-\0\0\0\b\0\0\0$\0\0\as\0\0\x4+\0\0\0\x1\0\0\0\0\a\x80\0\0\0\b\0\0\0$\0\0\as\0\0\x4+)

0
gui/freetype2.sh Normal file → Executable file
View File

9
gui/install.sh Normal file → Executable file
View File

@ -12,6 +12,7 @@ case "$PM" in
fonts-droid-fallback \
fonts-cascadia-code \
ttf-dejavu \
fonts-urw-base35 \
gucharmap
# network manager
sudo apt install \
@ -20,8 +21,8 @@ case "$PM" in
if has-bluetooth; then
sudo apt install \
bluez bluez-tools blueman pulseaudio-module-bluetooth
systemctl enable bluetooth
systemctl start bluetooth
sudo systemctl enable bluetooth
sudo systemctl start bluetooth
fi
;;
pacman)
@ -47,8 +48,8 @@ case "$PM" in
if has-bluetooth; then
sudo pacman -S \
bluez bluez-utils blueman pulseaudio-bluetooth xorg-xbacklight
systemctl enable bluetooth
systemctl start bluetooth
sudo systemctl enable bluetooth
sudo systemctl start bluetooth
fi
;;
esac

4
gui/theme.sh Normal file → Executable file
View File

@ -14,3 +14,7 @@ case "$PM" in
lxappearance arc-gtk-theme arc-icon-theme qt5ct qt5-styleplugins
;;
esac
# configuration
lnsf $DIR/config/gtk-3.0/settings.ini ~/.config/gtk-3.0/settings.ini
lnsf $DIR/config/qt5ct/qt5ct.conf ~/.config/qt5ct/qt5ct.conf

25
mirrors/install.sh Executable file
View File

@ -0,0 +1,25 @@
#!/bin/bash
DIR=$(readlink -f $(dirname $0))
. $DIR/../env.sh
! in-china && echo 'Skip mirrors configuration' && exit
# setup package mirror for CHINA
case "$PM" in
apt)
# backup original sources.list
[ ! -f /etc/apt/sources.list.bak ] && \
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
# replace with aliyun mirror
awk '$0 ~ /^deb/ {$2="https://mirrors.aliyun.com/ubuntu/"; print}' /etc/apt/sources.list.bak | sudo tee /etc/apt/sources.list
sudo apt update
;;
pacman)
echo TODO
exit -1
;;
esac

View File

@ -7,7 +7,7 @@ DIR=$(readlink -f $(dirname $0))
# install nodejs and yarn
case "$PM" in
apt)
sudo apt install nodejs yarnpkg
sudo apt install -y nodejs yarnpkg
;;
pacman)
sudo pacman -S nodejs yarn

View File

@ -19,5 +19,5 @@ case "$PM" in
esac
# symlink configuration
lnsf $DIR/config ~/.config/nvim
lnsf $DIR/config/init.vim ~/.config/nvim/init.vim
lnsf $DIR/config/init.vim ~/.vimrc

1
picom/config/config Symbolic link
View File

@ -0,0 +1 @@
/home/klesh/dotfiles/picom/config

11
picom/install.sh Normal file → Executable file
View File

@ -3,7 +3,7 @@
DIR=$(readlink -f $(dirname $0))
. $DIR/../env.sh
$PICOM_VER=v8.1
PICOM_VER=v8.1
# install ranger
@ -11,9 +11,9 @@ case "$PM" in
apt)
# install build tools
! which pip3 && $ROOT/python/install.sh
sudo pip install ninja-build meson
sudo pip3 install meson
# install dependencies
sudo apt install libxext-dev libxcb1-dev libxcb-damage0-dev libxcb-xfixes0-dev libxcb-shape0-dev libxcb-render-util0-dev libxcb-render0-dev libxcb-randr0-dev libxcb-composite0-dev libxcb-image0-dev libxcb-present-dev libxcb-xinerama0-dev libxcb-glx0-dev libpixman-1-dev libdbus-1-dev libconfig-dev libgl1-mesa-dev libpcre2-dev libevdev-dev uthash-dev libev-dev libx11-xcb-dev
sudo apt install -y ninja-build libxext-dev libxcb1-dev libxcb-damage0-dev libxcb-xfixes0-dev libxcb-shape0-dev libxcb-render-util0-dev libxcb-render0-dev libxcb-randr0-dev libxcb-composite0-dev libxcb-image0-dev libxcb-present-dev libxcb-xinerama0-dev libxcb-glx0-dev libpixman-1-dev libdbus-1-dev libconfig-dev libgl1-mesa-dev libpcre3-dev libevdev-dev uthash-dev libev-dev libx11-xcb-dev
# download picom source
[ ! -f /tmp/picom.tar.gz ] && \
curl -L https://github.com/yshui/picom/archive/v8.1.tar.gz --output /tmp/picom.tar.gz
@ -21,9 +21,10 @@ case "$PM" in
mkdir -p /tmp/picom
tar zxvf /tmp/picom.tar.gz --strip 1 -C /tmp/picom
pushd /tmp/picom
git submodule update --init --recursive
#git submodule update --init --recursive
meson --buildtype=release . build
ninja -C build install
sudo ninja -C build install
popd
;;
pacman)
sudo pacman -S picom

0
player/install.sh Normal file → Executable file
View File

View File

@ -3,6 +3,15 @@
DIR=$(readlink -f $(dirname $0))
. $DIR/../env.sh
# config pip mirror for CHINA
if in-china; then
lnsf $DIR/pip.conf ~/.pip/pip.conf
if sudo [ ! -f /root/.pip/pip.conf ]; then
sudo mkdir -p /root/.pip
sudo cp $DIR/pip.conf /root/.pip/pip.conf
fi
fi
# install python3
case "$PM" in
apt)
@ -16,11 +25,6 @@ case "$PM" in
esac
# enable auto_activation plugin for virtualfish
fish-is-default-shell && fish -c "vf addplugins auto_activation"
fish-is-default-shell && fish -c "yes | vf install && vf addplugins auto_activation"
# config pip mirror for CHINA
if in-china; then
mkdir -p ~/.pip
ln -sf $DIR/pip.conf ~/.pip/pip.conf
fi

1
suckless/config/config Symbolic link
View File

@ -0,0 +1 @@
/home/klesh/dotfiles/suckless/config

0
thunar/install.sh Normal file → Executable file
View File

View File

@ -1,14 +0,0 @@
# To use common configuration in %APPDATA%\mintty, simply remove this file
ThemeFile=rosipov
Font=Microsoft YaHei Mono
FontHeight=14
Term=xterm-256color
CursorType=block
Columns=120
Rows=40
Language=zh_CN
Locale=C
Transparency=medium
CtrlShiftShortcuts=yes
Scrollbar=none
PgUpDnScroll=yes

View File

@ -1,6 +0,0 @@
#!/bin/bash
set -e
sudo apt update
sudo apt upgrade --fix-missing -y -q
sudo apt install build-essential automake pkg-config software-properties-common curl -y -q

View File

@ -1,14 +0,0 @@
#!/bin/bash
set -e
sudo apt install linux-headers-$(uname -r)
source /etc/lsb-release
if [ "$DISTRIB_RELEASE" = "18.04" ] && [ "$(uname -m)" = 'x86_64' ]; then
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-ubuntu1804.pin
sudo mv cuda-ubuntu1804.pin /etc/apt/preferences.d/cuda-repository-pin-600
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub
sudo add-apt-repository "deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/ /"
sudo apt-get update
sudo apt-get -y install cuda
fi