OSDN Git Service

new deadd-center
[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 # session for lightdm
43 wget https://raw.githubusercontent.com/paperbenni/suckless/master/dwm.desktop
44 sudo mv dwm.desktop /usr/share/xsessions/
45
46 gprogram startdwm
47 gprogram sucklessshutdown
48
49 for FOLDER in ./*; do
50     if ! [ -d "$FOLDER" ]; then
51         echo "skipping $FOLDER"
52         continue
53     fi
54     pushd "$FOLDER"
55     rm config.h
56     make
57     sudo make install
58     popd
59 done
60
61 if ! [ -z "$1" ]; then
62     curl https://raw.githubusercontent.com/paperbenni/dotfiles/master/install.sh | bash
63 fi
64
65 # install window switcher
66 LINK="https://raw.githubusercontent.com/paperbenni/suckless/master"
67
68 if cat /etc/os-release | grep -i 'arch'; then
69     echo "setting up arch specific stuff"
70     # auto start script with dwm
71     ls ~/.dwm || mkdir ~/.dwm
72     curl $LINK/autostart.sh >~/.dwm/autostart.sh
73     if ! command -v compton; then
74         sudo pacman --noconfirm -S compton
75     fi
76
77     # install notification-center
78     if ! command -v deadd; then
79         wget $LINK/bin/deadd.xz
80         xz -d deadd.xz
81         sudo mv deadd /usr/bin/deadd
82         sudo chmod +x /usr/bin/deadd
83     fi
84
85 fi
86
87 # notification program for deadd-center
88 git clone https://github.com/phuhl/notify-send.py
89 cd notify-send.py
90 sudo pip install notify2
91 sudo python setup.py install
92 cd ..
93 rm -rf notify-send.py
94
95 mkdir -p ~/.config/deadd
96 curl $LINK/deadd.conf >~/.config/deadd/deadd.conf
97
98 curl "$LINK/dswitch" | sudo tee /usr/local/bin/dswitch
99 sudo chmod +x /usr/local/bin/dswitch
100
101 # install win + a menus for screenshots
102 curl https://raw.githubusercontent.com/paperbenni/menus/master/install.sh | bash