2020-09-17 02:47:33 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2020-09-17 10:24:35 +00:00
|
|
|
DIR=$(readlink -f $(dirname $0))
|
|
|
|
. $DIR/../env.sh
|
|
|
|
|
2020-09-17 16:02:24 +00:00
|
|
|
$ROOT/fish/install.sh
|
|
|
|
$ROOT/gui/install.sh
|
|
|
|
$ROOT/picom/install.sh
|
|
|
|
$ROOT/dunst/install.sh
|
2020-09-17 02:47:33 +00:00
|
|
|
|
|
|
|
# install dependencies
|
2020-09-17 10:24:35 +00:00
|
|
|
case "$PM" in
|
|
|
|
apt)
|
|
|
|
sudo apt install \
|
2020-09-17 16:02:24 +00:00
|
|
|
xorg libx11-dev libxft-dev libxinerama-dev \
|
|
|
|
libxrandr-dev arandr autorandr \
|
2020-09-17 10:24:35 +00:00
|
|
|
ibus ibus-table ibus-table-wubi \
|
2020-09-19 01:23:38 +00:00
|
|
|
pavucontrol \
|
2020-09-17 10:24:35 +00:00
|
|
|
gnome-keyring \
|
2020-09-17 16:02:24 +00:00
|
|
|
xss-lock \
|
|
|
|
nitrogen \
|
2020-09-19 01:23:38 +00:00
|
|
|
lm-sensors \
|
2020-09-17 10:24:35 +00:00
|
|
|
trayer
|
|
|
|
sudo apt remove gdm3
|
|
|
|
;;
|
|
|
|
pacman)
|
2020-09-18 18:01:58 +00:00
|
|
|
sudo pacman -S --needed \
|
2020-09-17 16:02:24 +00:00
|
|
|
xorg-server xorg-xinit xorg-xrandr xorg-xev xorg-xprop \
|
|
|
|
alsa-firmware alsa-utils alsa-plugins pulseaudio-alsa pulseaudio pavucontrol \
|
|
|
|
arandr autorandr \
|
|
|
|
ibus ibus-table ibus-table-chinese \
|
|
|
|
gnome-keyring \
|
|
|
|
xss-lock \
|
|
|
|
nitrogen \
|
2020-09-19 15:33:13 +00:00
|
|
|
i2c-tools \
|
2020-09-17 16:02:24 +00:00
|
|
|
trayer
|
2020-09-17 10:24:35 +00:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2020-09-17 03:07:58 +00:00
|
|
|
# clone / compile utilities and dwm itself
|
2020-09-17 02:47:33 +00:00
|
|
|
mkdir -p ~/Projects/suckless
|
|
|
|
|
2020-09-17 10:24:35 +00:00
|
|
|
[! -d ~/Projects/suckless/st] && git clone https://gitee.com/klesh/st.git ~/Projects/suckless/st
|
2020-09-17 02:47:33 +00:00
|
|
|
cd ~/Projects/suckless/st && sudo rm -f config.h && sudo make clean install
|
|
|
|
|
2020-09-17 10:24:35 +00:00
|
|
|
[! -d ~/Projects/suckless/dmenu] &&git clone https://gitee.com/klesh/dmenu.git ~/Projects/suckless/dmenu
|
2020-09-17 02:47:33 +00:00
|
|
|
cd ~/Projects/suckless/dmenu && sudo rm -f config.h && sudo make clean install
|
|
|
|
|
2020-09-17 10:24:35 +00:00
|
|
|
[! -d ~/Projects/suckless/slock] &&git clone https://gitee.com/klesh/slock.git ~/Projects/suckless/slock
|
2020-09-17 02:47:33 +00:00
|
|
|
cd ~/Projects/suckless/slock && sudo rm -f config.h && sudo make clean install
|
|
|
|
|
2020-09-17 10:24:35 +00:00
|
|
|
[! -d ~/Projects/suckless/dwm] &&git clone https://gitee.com/klesh/dwm.git ~/Projects/suckless/dwm
|
2020-09-17 02:47:33 +00:00
|
|
|
cd ~/Projects/suckless/dwm && sudo rm -f config.h && sudo make clean install
|
2020-09-17 03:07:58 +00:00
|
|
|
|
|
|
|
# config xinit to start for dwm
|
2020-09-20 03:40:50 +00:00
|
|
|
rm ~/.xinitrc
|
2020-09-17 03:07:58 +00:00
|
|
|
cat <<EOT > ~/.xinitrc
|
|
|
|
export QT_QPA_PLATFORMTHEME="qt5ct"
|
|
|
|
export GTK2_RC_FILES="$HOME/.gtkrc-2.0"
|
|
|
|
|
|
|
|
export XMODIFIERS="@im=ibus"
|
2020-09-25 07:48:37 +00:00
|
|
|
export QT_IM_MODULE=ibus
|
2020-09-22 04:26:27 +00:00
|
|
|
export GTK_IM_MODULE=xim
|
2020-09-17 03:07:58 +00:00
|
|
|
|
|
|
|
|
|
|
|
# xrandr --setprovideroutputsource modesetting NVIDIA-0
|
|
|
|
# xrandr --auto
|
|
|
|
|
|
|
|
|
|
|
|
xrdb ~/.Xresources
|
|
|
|
|
|
|
|
# auto lock after 300 seconds
|
|
|
|
xset s 300
|
|
|
|
systemd-lock-handler /usr/local/bin/slock
|
|
|
|
|
|
|
|
#xsetroot -cursor_name left_ptr
|
|
|
|
|
|
|
|
dbus-update-activation-environment --systemd DISPLAY
|
|
|
|
eval $(/usr/bin/gnome-keyring-daemon --start --components=pkcs11,secrets,ssh)
|
|
|
|
export SSH_AUTH_SOCK
|
|
|
|
|
|
|
|
autorandr --change --force
|
|
|
|
while :; do
|
2020-09-19 15:33:13 +00:00
|
|
|
ssh-agent dwm 2>/tmp/dwm.log || break
|
2020-09-17 03:07:58 +00:00
|
|
|
done
|
|
|
|
EOT
|
2020-09-17 16:02:24 +00:00
|
|
|
|
|
|
|
|
|
|
|
# config dwm
|
2020-09-21 03:38:47 +00:00
|
|
|
[[ -L $XDG_CONFIG_HOME/dwm/autostart ]] && rm $XDG_CONFIG_HOME/dwm/autostart
|
|
|
|
mkdir -p $DIR/config/dwm
|
|
|
|
cp $DIR/config/dwm/autostart $XDG_CONFIG_HOME/dwm/autostart
|
2020-09-19 15:33:13 +00:00
|
|
|
lnsf $DIR/config/dwm/dwmbar $XDG_CONFIG_HOME/dwm/dwmbar
|
|
|
|
lnsf $DIR/config/autorandr/postswitch $XDG_CONFIG_HOME/autorandr/postswitch
|