From 1e566ea3b67e1e58ec62a662690902e4d9596560 Mon Sep 17 00:00:00 2001 From: pml68 Date: Fri, 13 Dec 2024 00:41:46 +0100 Subject: feat: better install script --- install.sh | 34 +++++++++++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) (limited to 'install.sh') diff --git a/install.sh b/install.sh index 848536f..4a0776d 100755 --- a/install.sh +++ b/install.sh @@ -1,6 +1,34 @@ #!/bin/sh -dirs=("dwm" "dmenu" "slstatus" "st") +dirs="dwm dmenu slstatus st" -for dir in "${dirs[@]}"; do - (cd "$dir" && sudo make clean install) +command_exists() { + command -v "$1" >/dev/null 2>&1 +} + +for dir in $dirs; do + (cd "$dir" && echo "starting $dir installation" && make clean install && echo "$dir installation complete") done + +if command_exists feh; then + feh --bg-fill wallpaper.jpg + echo "~/.fehbg &" >> ~/.xinitrc +fi + +if command_exists picom; then + cp picom.conf /etc/xdg/picom.conf + echo "picom &" >> ~/.xinitrc +fi + +command_exists flameshot && echo "flameshot &" >> ~/.xinitrc + +command_exists neofetch && cp neofetch -r ~/.config/ + +command_exists vis && cp vis -r ~/.config/ + +if command_exists tmux; then + git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm + cp tmux -r ~/.config/ +fi + +echo "slstatus &" >> ~/.xinitrc +echo "exec dwm" >> ~/.xinitrc -- cgit v1.2.3