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)
14 LINK="https://raw.githubusercontent.com/paperbenni/suckless/master"
16 cat /etc/os-release | grep -Eiq 'name.*(arch|manjaro|ubuntu)' || exit
18 if cat /etc/os-release | grep -iq 'name.*arch' ||
19 cat /etc/os-release | grep -iq 'name.*manjaro'; then
22 { pacman -iQ "$i" || command -v "$i" &>/dev/null; } &>/dev/null && continue
23 sudo pacman -S --noconfirm "$i"
26 echo "setting up arch specific stuff"
28 sudo pacman -Syu --noconfirm
35 pacinstall bash dash tmux
51 pacinstall xorg-xsetroot
58 pacinstall xorg-fonts-misc
59 pacinstall lxappearance
61 if ! command -v panther_launcher; then
62 wget "https://www.rastersoft.com/descargas/panther_launcher/panther_launcher-1.12.0-1-x86_64.pkg.tar.xz"
63 sudo pacman -U --noconfirm panther_launcher*.pkg.tar.xz
64 rm panther_launcher*.pkg.tar.xz
69 # ubuntu specific stuff
70 if grep -iq 'name.*ubuntu' </etc/os-release; then
73 sudo apt-get upgrade -y
77 { dpkg -l "$i" || command -v "$i" &>/dev/null; } &>/dev/null && continue
78 sudo apt-get install -y "$i"
87 aptinstall bash dash tmux
97 aptinstall x11-xserver-utils
110 aptinstall lxappearance
112 if ! command -v panther_launcher; then
113 wget "https://www.rastersoft.com/descargas/panther_launcher/panther-launcher-xenial_1.12.0-ubuntu1_amd64.deb"
114 sudo dpkg -i panther-launcher*.deb
115 sudo apt-get install -fy
116 rm panther-launcher*.deb
121 wget "https://raw.githubusercontent.com/paperbenni/suckless/master/programs/$1"
125 if [ "$1" = "dotfiles" ]; then
130 THEME="${1:-dracula}"
131 echo "using theme $THEME"
132 [ -e ~/paperbenni ] || mkdir ~/paperbenni
133 echo "$THEME" >~/paperbenni/.theme
144 if grep -q 'nobody' </etc/groups || grep -q 'nobody' </etc/group; then
145 echo "nobody workaround not required"
150 # add group and add user to group
152 if groups | grep -q "$1"; then
153 echo "user is member of $1"
157 sudo gpasswd -a $USER $1
166 # install cursors for themes
167 if ! [ -e ~/.icons/osx ]; then
168 curl -s https://raw.githubusercontent.com/paperbenni/cursors/master/install.sh | bash
171 # session for lightdm
172 wget https://raw.githubusercontent.com/paperbenni/suckless/master/dwm.desktop
173 sudo mv dwm.desktop /usr/share/xsessions/
177 # shutdown popup that breaks restart loop
178 gprogram sucklessshutdown
182 # dmenu run but in terminal emulator st
183 # only supported terminal apps (less to search through)
184 gprogram dmenu_run_st
189 # for that extra kick when doingg a typo
192 curl "$LINK/termprograms.txt" >~/.cache/termprograms.txt
194 for FOLDER in ./*; do
195 if ! [ -d "$FOLDER" ]; then
196 echo "skipping $FOLDER"
200 if ! [ -e build.sh ]; then
211 # install dotfiles like bash,git and tmux config
212 if [ -n "$DOTFILES" ]; then
213 curl https://raw.githubusercontent.com/paperbenni/dotfiles/master/install.sh | bash
216 if ! [ ~/.local/share/fonts/symbola.ttf ]; then
217 mkdir -p ~/.local/share/fonts
218 cd ~/.local/share/fonts
219 wget "http://symbola.surge.sh/symbola.ttf"
224 # laptop specific stuff
225 if acpi | grep -q '[0-9]%'; then
226 # config file to indicate being a laptop
227 touch .cache/islaptop
229 # fix tap to click not working with tiling wms
230 if ! [ -e /etc/X11/xorg.conf.d/90-touchpad.conf ] ||
231 ! cat /etc/X11/xorg.conf.d/90-touchpad.conf | grep -iq 'tapping.*"on"'; then
233 sudo mkdir -p /etc/X11/xorg.conf.d && sudo tee /etc/X11/xorg.conf.d/90-touchpad.conf <<'EOF' 1>/dev/null
235 Identifier "touchpad"
238 Option "Tapping" "on"
246 curl -s "https://raw.githubusercontent.com/paperbenni/suckless/master/monitor.sh" | bash
249 # three and four finger swipes on laptop
250 if ! command -v libinput-gestures &>/dev/null; then
252 git clone --depth=1 https://github.com/bulletmark/libinput-gestures.git
256 rm -rf libinput-gestures
261 # auto start script with dwm
262 ls .dwm &>/dev/null || mkdir .dwm
263 curl $LINK/autostart.sh >.dwm/autostart.sh
264 chmod +x .dwm/autostart.sh
266 # set up multi monitor config for dswitch
267 if ! [ -e paperbenni/ismultimonitor ]; then
268 if xrandr | grep ' connected' | grep -Eo '[0-9]{3,}x' |
269 grep -o '[0-9]*' | wc -l | grep '2'; then
270 mkdir paperbenni &>/dev/null
271 xrandr | grep ' connected' | grep -Eo '[0-9]{3,}x' |
272 grep -o '[0-9]*' >paperbenni/ismultimonitor
273 echo "$(wc -l paperbenni/ismultimonitor) monitors detected"
275 echo "not a multi monitor setup"
278 echo "monitor config: "
279 cat paperbenni/ismultimonitor
286 if ! command -v pfw &>/dev/null; then
288 if git clone --depth=1 https://github.com/wmutils/core.git; then
299 # install win + a menus for shortcuts like screenshots and shutdown
300 curl https://raw.githubusercontent.com/paperbenni/menus/master/install.sh | bash
302 # drag and drop x utility for ranger
303 if ! command -v dragon &>/dev/null; then
305 git clone --depth=1 https://github.com/mwh/dragon.git
314 mkdir paperbenni &>/dev/null
316 # automatic wallpaper changer
317 # uses reddit r/wallpaper scraper
318 if [ "$2" = "rwall" ]; then
322 mv rwallpaper.py ~/paperbenni/
323 chmod +x wallpaper.sh
324 mv wallpaper.sh ~/paperbenni/
325 sudo pip3 install -r requirements.txt
332 # set dwm as default for lightdm
333 echo '[Desktop]' >.dmrc
334 echo 'Session=dwm' >>.dmrc
335 if [ -e /etc/lightdm/lightdm.conf ]; then
336 sudo sed -i 's/^user-session=.*/user-session=dwm/g' /etc/lightdm/lightdm.conf
339 # install things like fonts or gtk theme
340 if ! [ -e .config/paperthemes/$THEME.txt ]; then
341 echo "installing theme"
342 curl -s "https://raw.githubusercontent.com/paperbenni/suckless/master/themes/$THEME.sh" | bash
343 mkdir .config/paperthemes
344 touch .config/paperthemes/$THEME.txt
346 echo "theme installation already found"
349 # fix java gui appearing empty on dwm
350 if ! grep 'dwm' </etc/profile; then
351 echo "fixing java windows for dwm in /etc/profile"
352 echo '# fix dwm java windows' | sudo tee -a /etc/profile
353 echo 'export _JAVA_AWT_WM_NONREPARENTING=1' | sudo tee -a /etc/profile
355 echo "java workaround already applied"