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)
15 wget "https://raw.githubusercontent.com/paperbenni/suckless/master/programs/$1"
19 if [ "$1" = "dotfiles" ]; then
25 echo "using theme $THEME"
36 if grep -q 'nobody' </etc/groups || grep -q 'nobody' </etc/group; then
37 echo "nobody workaround not required"
44 # install cursors for themes
45 if ! [ -e ~/.icons/osx ]; then
46 curl -s https://raw.githubusercontent.com/paperbenni/cursors/master/install.sh | bash
50 wget https://raw.githubusercontent.com/paperbenni/suckless/master/dwm.desktop
51 sudo mv dwm.desktop /usr/share/xsessions/
55 # shutdown popup that breaks restart loop
56 gprogram sucklessshutdown
59 # deadcenter toggle script
62 # dmenu run but in terminal emulator st
63 # only supported terminal apps (less to search through)
70 curl "$LINK/termprograms.txt" >~/.cache/termprograms.txt
73 if ! [ -d "$FOLDER" ]; then
74 echo "skipping $FOLDER"
78 if ! [ -e build.sh ]; then
89 # install dotfiles like bash,git and tmux config
90 if [ -n "$DOTFILES" ]; then
91 curl https://raw.githubusercontent.com/paperbenni/dotfiles/master/install.sh | bash
94 LINK="https://raw.githubusercontent.com/paperbenni/suckless/master"
96 if cat /etc/os-release | grep -i 'arch'; then
99 { pacman -iQ "$i" || command -v "$i"; } &>/dev/null && continue
100 sudo pacman -S --noconfirm "$i"
103 echo "setting up arch specific stuff"
105 sudo pacman -Syu --noconfirm
124 if ! command -v panther_launcher; then
125 wget "https://www.rastersoft.com/descargas/panther_launcher/panther_launcher-1.12.0-1-x86_64.pkg.tar.xz"
126 sudo pacman -U --noconfirm panther_launcher*.pkg.tar.xz
127 rm panther_launcher*.pkg.tar.xz
132 if sudo dmidecode --string chassis-type | grep -iq 'laptop'; then
133 touch .cache/islaptop
136 # ubuntu specific stuff
137 if grep -iq 'ubuntu' </etc/os-release; then
140 sudo apt-get upgrade -y
158 { dpkg -l "$i" || command -v "$i"; } &>/dev/null && continue
159 sudo apt-get install -y "$i"
163 if ! command -v panther_launcher; then
164 wget "https://www.rastersoft.com/descargas/panther_launcher/panther-launcher-xenial_1.12.0-ubuntu1_amd64.deb"
165 sudo dpkg -i panther-launcher*.deb
166 sudo apt-get install -fy
167 rm panther-launcher*.deb
171 # auto start script with dwm
172 ls ~/.dwm || mkdir ~/.dwm
173 curl $LINK/autostart.sh >~/.dwm/autostart.sh
175 # set up multi monitor config for dswitch
176 if ! [ -e ~/paperbenni/ismultimonitor ]; then
177 if xrandr | grep ' connected' | grep -Eo '[0-9]{3,}x' |
178 grep -o '[0-9]*' | wc -l | grep '2'; then
179 mkdir ~/paperbenni &>/dev/null
180 xrandr | grep ' connected' | grep -Eo '[0-9]{3,}x' |
181 grep -o '[0-9]*' >~/paperbenni/ismultimonitor
182 echo "$(wc -l ~/paperbenni/ismultimonitor) monitors detected"
184 echo "not a multi monitor setup"
187 echo "monitor config: "
188 cat ~/paperbenni/ismultimonitor
192 # notification program for deadd-center
193 if ! command -v notify-send.py &>/dev/null; then
194 git clone --depth=2 https://github.com/phuhl/notify-send.py
196 sudo pip2 install notify2
197 sudo python3 setup.py install
199 sudo rm -rf notify-send.py
202 mkdir -p ~/.config/deadd
203 curl $LINK/deadd.conf >~/.config/deadd/deadd.conf
205 # install win + a menus for shortcuts like screenshots and shutdown
206 curl https://raw.githubusercontent.com/paperbenni/menus/master/install.sh | bash
208 ## notification center ##
209 if ! command -v deadd; then
210 echo "installing deadd"
211 wget -q $LINK/bin/deadd.xz
217 mkdir ~/paperbenni &>/dev/null
219 # automatic wallpaper changer
220 if [ "$2" = "rwall" ]; then
223 mv rwallpaper.py ~/paperbenni/
224 chmod +x wallpaper.sh
225 mv wallpaper.sh ~/paperbenni/
226 sudo pip3 install -r requirements.txt
231 # install things like fonts or gtk theme
232 if ! [ -e ~/.config/paperthemes/$THEME.txt ]; then
233 echo "installing theme"
234 curl -s "https://raw.githubusercontent.com/paperbenni/suckless/master/themes/$THEME.sh" | bash
235 mkdir ~/.config/paperthemes
236 touch ~/.config/paperthemes/$THEME.txt
238 echo "theme installation already found"
242 if ! grep 'dwm' </etc/profile; then
243 echo "fixing java windows for dwm in /etc/profile"
244 echo '# fix dwm java windows' | sudo tee -a /etc/profile
245 echo 'export _JAVA_AWT_WM_NONREPARENTING=1' | sudo tee -a /etc/profile
247 echo "java workaround already applied"