3 #############################################
4 ## installs all paperbenni suckless forks ##
5 ## made for personal use, so be warned ;) ##
6 #############################################
8 echo "installing paperbenni's suckless suite"
10 source <(curl -s https://raw.githubusercontent.com/paperbenni/bash/master/import.sh)
13 # pinstall dash slop ffmpeg wmctrl
16 git clone --depth=1 https://github.com/paperbenni/"$1".git
20 wget "https://raw.githubusercontent.com/paperbenni/suckless/master/programs/$1"
24 if [ "$1" = "dotfiles" ]; then
40 if grep -q 'nobody' </etc/groups; then
46 wget https://raw.githubusercontent.com/paperbenni/suckless/master/dwm.desktop
47 sudo mv dwm.desktop /usr/share/xsessions/
51 # shutdown popup that breaks restart loop
52 gprogram sucklessshutdown
55 # deadcenter toggle script
58 # dmenu run but in terminal emulator st
59 # only supported terminal apps (less to search through)
62 curl "$LINK/termprograms.txt" >~/.cache/termprograms.txt
65 if ! [ -d "$FOLDER" ]; then
66 echo "skipping $FOLDER"
70 if ! [ -e build.sh ]; then
81 # install dotfiles like bash,git and tmux config
82 if [ -n "$DOTFILES" ]; then
83 curl https://raw.githubusercontent.com/paperbenni/dotfiles/master/install.sh | bash
86 LINK="https://raw.githubusercontent.com/paperbenni/suckless/master"
88 if cat /etc/os-release | grep -i 'arch'; then
91 { pacman -iQ "$i" || command -v "$i"; } &>/dev/null && continue
92 sudo pacman -S --noconfirm "$i"
95 echo "setting up arch specific stuff"
97 sudo pacman -Syu --noconfirm
106 if ! command -v panther_launcher; then
107 wget "https://www.rastersoft.com/descargas/panther_launcher/panther_launcher-1.12.0-1-x86_64.pkg.tar.xz"
108 sudo pacman -U --noconfirm panther_launcher*.pkg.tar.xz
109 rm panther_launcher*.pkg.tar.xz
114 if sudo dmidecode --string chassis-type | grep -iq 'laptop'; then
115 touch .cache/islaptop
118 # ubuntu specific stuff
119 if grep -iq 'ubuntu' </etc/os-release; then
122 sudo apt-get upgrade -y
132 { dpkg -l "$i" || command -v "$i"; } &>/dev/null && continue
133 sudo apt-get install -y "$i"
137 if ! command -v panther_launcher; then
138 wget "https://www.rastersoft.com/descargas/panther_launcher/panther-launcher-xenial_1.12.0-ubuntu1_amd64.deb"
139 sudo dpkg -i panther-launcher*.deb
140 sudo apt-get install -fy
141 rm panther-launcher*.deb
145 # auto start script with dwm
146 ls ~/.dwm || mkdir ~/.dwm
147 curl $LINK/autostart.sh >~/.dwm/autostart.sh
149 # notification program for deadd-center
150 if ! command -v notify-send.py &>/dev/null; then
151 git clone --depth=2 https://github.com/phuhl/notify-send.py
153 sudo pip2 install notify2
154 sudo python3 setup.py install
156 sudo rm -rf notify-send.py
159 mkdir -p ~/.config/deadd
160 curl $LINK/deadd.conf >~/.config/deadd/deadd.conf
162 # install window switcher
163 curl "$LINK/dswitch" | sudo tee /usr/local/bin/dswitch
164 sudo chmod +x /usr/local/bin/dswitch
166 # install win + a menus for shortcuts like screenshots and shutdown
167 curl https://raw.githubusercontent.com/paperbenni/menus/master/install.sh | bash
169 ## notification center ##
170 # remove faulty installation
171 sudo rm /usr/bin/deadd &>/dev/null
172 sudo rm /usr/bin/deadcenter &>/dev/null
175 echo "installing deadd"
176 wget -q $LINK/bin/deadd.xz
179 sudo mv deadd /usr/bin/deadd
180 sudo chmod +x /usr/bin/deadd
182 mkdir ~/paperbenni &>/dev/null
184 # automatic wallpaper changer
187 mv rwallpaper.py ~/paperbenni/
188 chmod +x wallpaper.sh
189 mv wallpaper.sh ~/paperbenni/
190 sudo pip3 install -r requirements.txt
194 # install things like fonts or gtk theme
195 if ! [ -e ~/.config/paperthemes/$THEME.txt ]; then
196 echo "installing theme"
197 curl -s "https://raw.githubusercontent.com/paperbenni/suckless/master/themes/$THEME.sh" | bash
198 mkdir ~/.config/paperthemes
199 touch ~/.config/paperthemes/$THEME.txt
201 echo "theme installation already found"
205 if ! grep 'dwm' </etc/profile; then
206 echo "fixing java windows for dwm in /etc/profile"
207 echo '# fix dwm java windows' | sudo tee -a /etc/profile
208 echo 'export _JAVA_AWT_WM_NONREPARENTING=1' | sudo tee -a /etc/profile
210 echo "java workaround already applied"