diff options
Diffstat (limited to '')
| -rw-r--r-- | Makefile | 26 | ||||
| -rw-r--r-- | README.md | 16 | ||||
| -rwxr-xr-x | install | 34 |
3 files changed, 34 insertions, 42 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..e64860e --- /dev/null +++ b/Makefile @@ -0,0 +1,26 @@ +PROGRAMS = dwm dmenu slstatus st fetcha + +default: + @echo "Available jobs:" + @printf "\tinstall: installs all included suckless programs\n" + @printf "\tinstall-laptop: installs all included suckless programs \ + with the laptop config changes applied\n" + @printf "\twallpaper: uses feh to set the wallpaper\n" + +install: + for prog in $(PROGRAMS); do make -C $$prog clean install; done + cp picom.conf /etc/xdg/picom.conf + +install-laptop: + git apply laptop.diff + $(MAKE) install + git restore . + +wallpaper: + feh --bg-fill $(shell pwd)/wallpaper.jpg || true + @echo 'Creating ~/.fehbg' + echo '#!/bin/sh' > $(HOME)/.fehbg + echo 'feh --no-fehbg --bg-fill $(shell pwd)/wallpaper.jpg' > $(HOME)/.fehbg + chmod 755 $(HOME)/.fehbg + +.PHONY: default install install-laptop wallpaper @@ -20,16 +20,16 @@ It's also recommended to start dwm and other related software through xinit, my ### Automated -Clone the repo ```sh git clone https://git.sr.ht/~pml68/suckless-setup cd suckless-setup -``` -Simply run the included script with root permissions. -```sh -chmod +x install -sudo ./install +sudo make install +# OR +sudo make install-laptop + +# optional +make wallpaper ``` ### Manual @@ -49,12 +49,12 @@ cd .. #### Optional -Set the background +Set the background (this is done by the `wallpaper` make job) ```sh feh --bg-fill wallpaper.jpg ``` -Copy over the picom configuration +Copy over the picom configuration (this is done by both install make jobs) ```sh sudo cp picom.conf /etc/xdg/picom.conf ``` diff --git a/install b/install deleted file mode 100755 index 294dcfd..0000000 --- a/install +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh -programs="dwm dmenu slstatus st fetcha" - -command_exists() { - command -v "$1" >/dev/null 2>&1 -} - -if [ "$(id -u)" -eq 0 ] || [ -n "$SUDO_UID" ]; then - read -p "Install laptop configuration instead of desktop? [y/N] " laptop - if [ "$laptop" = "y" ] || [ "$laptop" = "Y" ]; then - git apply laptop.diff - fi - - for program in $programs; do - (cd "$program" && echo "Starting $program installation" && make -s clean install && echo "$program installation complete" && make -s clean) - done - - git restore . - - if command_exists picom; then - echo "Copying picom configuration" - cp picom.conf /etc/xdg/picom.conf - fi -else - echo "No root permissions, skipping installation of suckless programs and picom config" -fi - - -if command_exists feh; then - echo "Creating ~/.fehbg" - echo '#!/bin/sh' > ~/.fehbg - echo "feh --no-fehbg --bg-fill $(pwd)/wallpaper.jpg" >> ~/.fehbg - chmod 755 ~/.fehbg -fi |
