OSDN Git Service

comment headers
[instantos/instantOS.git] / install.sh
1 #!/usr/bin/env bash
2
3 #############################################
4 ## installs all paperbenni suckless forks  ##
5 ## made for personal use, so be warned ;)  ##
6 #############################################
7
8 echo "installing paperbenni's suckless suite"
9
10 source <(curl -s https://raw.githubusercontent.com/paperbenni/bash/master/import.sh)
11 pb install
12
13 pinstall dash slop ffmpeg wmctrl
14
15 gclone() {
16     git clone --depth=1 https://github.com/paperbenni/"$1".git
17 }
18
19 gprogram() {
20     wget "https://raw.githubusercontent.com/paperbenni/suckless/master/programs/$1"
21     sudo mv $1 /bin/
22     sudo chmod +x /bin/$1
23 }
24
25 mkdir -p ~/.local/share/fonts
26
27 pushd ~/.local/share/fonts
28 if ! [ -e monaco.ttf ]; then
29     wget https://github.com/todylu/monaco.ttf/raw/master/monaco.ttf
30 fi
31 popd
32
33 rm -rf ~/suckless
34 mkdir ~/suckless
35 cd ~/suckless
36
37 gclone dwm
38 gclone dmenu
39 gclone st
40 gclone slock
41
42 wget https://raw.githubusercontent.com/paperbenni/suckless/master/dwm.desktop
43 sudo mv dwm.desktop /usr/share/xsessions/
44
45 gprogram startdwm
46 gprogram sucklessshutdown
47
48 for FOLDER in ./*; do
49     if ! [ -d "$FOLDER" ]; then
50         echo "skipping $FOLDER"
51         continue
52     fi
53     pushd "$FOLDER"
54     rm config.h
55     make
56     sudo make install
57     popd
58 done
59
60 if ! [ -z "$1" ]; then
61     curl https://raw.githubusercontent.com/paperbenni/dotfiles/master/install.sh | bash
62 fi
63
64 # install window switcher
65 LINK="https://raw.githubusercontent.com/paperbenni/suckless/master"
66
67 if cat /etc/os-release | grep -i 'arch'; then
68     echo "setting up arch specific stuff"
69     # auto start script with dwm
70     ls ~/.dwm || mkdir ~/.dwm
71     curl $LINK/autostart.sh >~/.dwm/autostart.sh
72     if ! command -v compton; then
73         sudo pacman --noconfirm -S compton
74     fi
75
76     # install notification-center
77     if ! command -v deadd-notification-center; then
78         wget $LINK/bin/deadd.pkg.tar.xz
79         sudo pacman --noconfirm -U deadd.pkg.tar.xz
80         rm deadd.pkg.tar.xz
81     fi
82
83 fi
84
85 mkdir -p ~/.config/deadd
86 curl $LINK/deadd.conf >~/.config/deadd/deadd.conf
87
88 curl "$LINK/dswitch" | sudo tee /usr/local/bin/dswitch
89 sudo chmod +x /usr/local/bin/dswitch
90
91 git clone https://github.com/phuhl/notify-send.py
92 cd notify-send.py
93 sudo pip install notify2
94 sudo python setup.py install
95 cd ..
96 rm -rf notify-send.py
97
98 # install win + a menus for screenshots
99 curl https://raw.githubusercontent.com/paperbenni/menus/master/install.sh | bash