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 # for that extra kick when doingg a typo
73 curl "$LINK/termprograms.txt" >~/.cache/termprograms.txt
76 if ! [ -d "$FOLDER" ]; then
77 echo "skipping $FOLDER"
81 if ! [ -e build.sh ]; then
92 # install dotfiles like bash,git and tmux config
93 if [ -n "$DOTFILES" ]; then
94 curl https://raw.githubusercontent.com/paperbenni/dotfiles/master/install.sh | bash
97 LINK="https://raw.githubusercontent.com/paperbenni/suckless/master"
99 if cat /etc/os-release | grep -i 'arch'; then
102 { pacman -iQ "$i" || command -v "$i"; } &>/dev/null && continue
103 sudo pacman -S --noconfirm "$i"
106 echo "setting up arch specific stuff"
108 sudo pacman -Syu --noconfirm
131 pacinstall lxappearance
133 if ! command -v panther_launcher; then
134 wget "https://www.rastersoft.com/descargas/panther_launcher/panther_launcher-1.12.0-1-x86_64.pkg.tar.xz"
135 sudo pacman -U --noconfirm panther_launcher*.pkg.tar.xz
136 rm panther_launcher*.pkg.tar.xz
141 if sudo dmidecode --string chassis-type | grep -iq 'laptop'; then
142 touch .cache/islaptop
145 # ubuntu specific stuff
146 if grep -iq 'ubuntu' </etc/os-release; then
149 sudo apt-get upgrade -y
153 { dpkg -l "$i" || command -v "$i"; } &>/dev/null && continue
154 sudo apt-get install -y "$i"
175 aptinstall lxappearance
177 if ! command -v panther_launcher; then
178 wget "https://www.rastersoft.com/descargas/panther_launcher/panther-launcher-xenial_1.12.0-ubuntu1_amd64.deb"
179 sudo dpkg -i panther-launcher*.deb
180 sudo apt-get install -fy
181 rm panther-launcher*.deb
185 # auto start script with dwm
186 ls ~/.dwm || mkdir ~/.dwm
187 curl $LINK/autostart.sh >~/.dwm/autostart.sh
189 # set up multi monitor config for dswitch
190 if ! [ -e ~/paperbenni/ismultimonitor ]; then
191 if xrandr | grep ' connected' | grep -Eo '[0-9]{3,}x' |
192 grep -o '[0-9]*' | wc -l | grep '2'; then
193 mkdir ~/paperbenni &>/dev/null
194 xrandr | grep ' connected' | grep -Eo '[0-9]{3,}x' |
195 grep -o '[0-9]*' >~/paperbenni/ismultimonitor
196 echo "$(wc -l ~/paperbenni/ismultimonitor) monitors detected"
198 echo "not a multi monitor setup"
201 echo "monitor config: "
202 cat ~/paperbenni/ismultimonitor
206 # notification program for deadd-center
207 if ! command -v notify-send.py &>/dev/null; then
208 git clone --depth=2 https://github.com/phuhl/notify-send.py
210 sudo pip2 install notify2
211 sudo python3 setup.py install
213 sudo rm -rf notify-send.py
216 mkdir -p ~/.config/deadd
217 curl $LINK/deadd.conf >~/.config/deadd/deadd.conf
219 # install win + a menus for shortcuts like screenshots and shutdown
220 curl https://raw.githubusercontent.com/paperbenni/menus/master/install.sh | bash
222 ## notification center ##
223 if ! command -v deadd; then
224 echo "installing deadd"
225 wget -q $LINK/bin/deadd.xz
231 if ! command -v dragon &>/dev/null; then
232 git clone --depth=1 https://github.com/mwh/dragon.git
240 if ! command -v lsw &>/dev/null; then
241 test -e core && (echo "core dir existing" && exit 1)
242 git clone --depth=1 https://github.com/wmutils/core.git
250 mkdir ~/paperbenni &>/dev/null
252 # automatic wallpaper changer
253 if [ "$2" = "rwall" ]; then
256 mv rwallpaper.py ~/paperbenni/
257 chmod +x wallpaper.sh
258 mv wallpaper.sh ~/paperbenni/
259 sudo pip3 install -r requirements.txt
264 # install things like fonts or gtk theme
265 if ! [ -e ~/.config/paperthemes/$THEME.txt ]; then
266 echo "installing theme"
267 curl -s "https://raw.githubusercontent.com/paperbenni/suckless/master/themes/$THEME.sh" | bash
268 mkdir ~/.config/paperthemes
269 touch ~/.config/paperthemes/$THEME.txt
271 echo "theme installation already found"
275 if ! grep 'dwm' </etc/profile; then
276 echo "fixing java windows for dwm in /etc/profile"
277 echo '# fix dwm java windows' | sudo tee -a /etc/profile
278 echo 'export _JAVA_AWT_WM_NONREPARENTING=1' | sudo tee -a /etc/profile
280 echo "java workaround already applied"