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
116 if ! command -v panther_launcher; then
117 wget "https://www.rastersoft.com/descargas/panther_launcher/panther_launcher-1.12.0-1-x86_64.pkg.tar.xz"
118 sudo pacman -U --noconfirm panther_launcher*.pkg.tar.xz
119 rm panther_launcher*.pkg.tar.xz
124 if sudo dmidecode --string chassis-type | grep -iq 'laptop'; then
125 touch .cache/islaptop
128 # ubuntu specific stuff
129 if grep -iq 'ubuntu' </etc/os-release; then
132 sudo apt-get upgrade -y
150 { dpkg -l "$i" || command -v "$i"; } &>/dev/null && continue
151 sudo apt-get install -y "$i"
155 if ! command -v panther_launcher; then
156 wget "https://www.rastersoft.com/descargas/panther_launcher/panther-launcher-xenial_1.12.0-ubuntu1_amd64.deb"
157 sudo dpkg -i panther-launcher*.deb
158 sudo apt-get install -fy
159 rm panther-launcher*.deb
163 # auto start script with dwm
164 ls ~/.dwm || mkdir ~/.dwm
165 curl $LINK/autostart.sh >~/.dwm/autostart.sh
167 # set up multi monitor config for dswitch
168 if ! [ -e ~/paperbenni/ismultimonitor ]; then
169 if xrandr | grep ' connected' | grep -Eo '[0-9]{3,}x' |
170 grep -o '[0-9]*' | wc -l | grep '2'; then
171 mkdir ~/paperbenni &>/dev/null
172 xrandr | grep ' connected' | grep -Eo '[0-9]{3,}x' |
173 grep -o '[0-9]*' >~/paperbenni/ismultimonitor
174 echo "$(wc -l ~/paperbenni/ismultimonitor) monitors detected"
176 echo "not a multi monitor setup"
179 echo "monitor config: "
180 cat ~/paperbenni/ismultimonitor
183 # notification program for deadd-center
184 if ! command -v notify-send.py &>/dev/null; then
185 git clone --depth=2 https://github.com/phuhl/notify-send.py
187 sudo pip2 install notify2
188 sudo python3 setup.py install
190 sudo rm -rf notify-send.py
193 mkdir -p ~/.config/deadd
194 curl $LINK/deadd.conf >~/.config/deadd/deadd.conf
196 # install window switcher
197 curl "$LINK/dswitch" | sudo tee /usr/local/bin/dswitch
198 sudo chmod +x /usr/local/bin/dswitch
200 # install win + a menus for shortcuts like screenshots and shutdown
201 curl https://raw.githubusercontent.com/paperbenni/menus/master/install.sh | bash
203 ## notification center ##
204 # remove faulty installation
205 sudo rm /usr/bin/deadd &>/dev/null
206 sudo rm /usr/bin/deadcenter &>/dev/null
209 echo "installing deadd"
210 wget -q $LINK/bin/deadd.xz
213 sudo mv deadd /usr/bin/deadd
214 sudo chmod +x /usr/bin/deadd
216 mkdir ~/paperbenni &>/dev/null
218 # automatic wallpaper changer
221 mv rwallpaper.py ~/paperbenni/
222 chmod +x wallpaper.sh
223 mv wallpaper.sh ~/paperbenni/
224 sudo pip3 install -r requirements.txt
228 # install things like fonts or gtk theme
229 if ! [ -e ~/.config/paperthemes/$THEME.txt ]; then
230 echo "installing theme"
231 curl -s "https://raw.githubusercontent.com/paperbenni/suckless/master/themes/$THEME.sh" | bash
232 mkdir ~/.config/paperthemes
233 touch ~/.config/paperthemes/$THEME.txt
235 echo "theme installation already found"
239 if ! grep 'dwm' </etc/profile; then
240 echo "fixing java windows for dwm in /etc/profile"
241 echo '# fix dwm java windows' | sudo tee -a /etc/profile
242 echo 'export _JAVA_AWT_WM_NONREPARENTING=1' | sudo tee -a /etc/profile
244 echo "java workaround already applied"