zerog

[archived] simple Parabola GNU/Linux post-install script
git clone git://git.hanetzok.net/zerog
Log | Files | Refs | README | LICENSE

commit 95cf864398613b03bc76b3170c450e518eed9336
Author: cybvik <mail@cybvik.xyz>
Date:   Tue,  9 Aug 2022 02:27:56 +0200

Initial commit

Diffstat:
ACOPYING | 13+++++++++++++
AREADME | 29+++++++++++++++++++++++++++++
Aprogs.list | 42++++++++++++++++++++++++++++++++++++++++++
Azerog | 77+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 161 insertions(+), 0 deletions(-)

diff --git a/COPYING b/COPYING @@ -0,0 +1,13 @@ +DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + Version 2, December 2004 + + Copyright (C) 2004 Sam Hocevar <sam@hocevar.net> + + Everyone is permitted to copy and distribute verbatim or modified + copies of this license document, and changing it is allowed as long + as the name is changed. + + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. You just DO WHAT THE FUCK YOU WANT TO. diff --git a/README b/README @@ -0,0 +1,29 @@ +ZEROG +===== +Simple Parabola GNU/Linux-libre post-install script + +Dependencies +------------ +This script requires git and base-devel packages + +Usage +----- +Install Parabola on your system then run: + + git clone git://git.cybvik.xyz/zerog + cd zerog + chmod +x zerog.sh + sudo ./zerog.sh + +Customization +------------- +You can change the source for the progs.list, the dotfiles and suckless repo by +editing the corresponding variables at the beginning of the script + +Contact +------- +You can report issues and contributions to zerog@cybvik.xyz + +Credits +------- +This script is heavily inspired by LARBS <larbs.xyz> diff --git a/progs.list b/progs.list @@ -0,0 +1,42 @@ +xorg-server +xorg-xinit +xorg-xprop +xrandr +xclip +xcape +xdotool +xorg-xdpyinfo +unzip +ttf-liberation +ueberzug +bc +ranger +dosfstools +libnotify +dunst +exfat-utils +moreutils +sxiv +ffmpeg +gnome-keyring +neovim +mpd +mpc +mpv +man-db +ncmpcpp +newsboat +ntfs-3g +pulseaudio +pulsemixer +pamixer +maim +lynx +yt-dlp +zathura +zathura-pdf-mupdf +poppler +fzf +slock +neomutt +noto-fonts-emoji diff --git a/zerog b/zerog @@ -0,0 +1,77 @@ +#!/bin/bash + +### VARIABLES ### + +script_dir="$(dirname "$(realpath $0)")" +progs="$script_dir/progs.list" +dotfiles="git://git.cybvik.xyz/dotfiles" +name="$(logname)" +src="/home/$name/.local/src" +giturl="git://git.cybvik.xyz" + +### FUNCTIONS ### + +warning() { + printf "WARNING: $1\n" >> "$logfile" +} + +error() { + printf "ERROR: $1\n" >> "$logfile" + clear + printf "Error: Please check $logfile for more info" + exit 1 +} + +prepare() { + pacman -S --noconfirm --needed git zsh ca-certificates >/dev/null 2>&1 + grep -q "ILoveCandy" /etc/pacman.conf || + sed -i "/#VerbosePkgLists/a ILoveCandy" /etc/pacman.conf + sed -Ei "s/^#(ParallelDownloads).*/\1 = 5/;/^#Color$/s/#//" /etc/pacman.conf +} + +install_programs() { + while read -r program; do + printf "Installing $program\n" + pacman -S --noconfirm --needed "$program" >/dev/null 2>&1 || + warning "$program" + done < "$progs" +} + +get_dotfiles() { + printf "### Installing dotfiles ###\n" + sudo -u "$name" git clone "$dotfiles" /tmp/dotfiles >/dev/null + sudo -u "$name" cp -rfT /tmp/dotfiles "/home/$name" +} + +suckless() { + [ -d "$src" ] || mkdir -p "$src" + cd "$src" && printf "### Installing suckless software ###\n" + for program in dwm st dmenu slock; do + sudo -u "$name" git clone "$giturl/$program" >/dev/null + cd "$program" && make clean install + cd "$src" + done +} + +follow_up() { + chsh -s /bin/zsh "$name" >/dev/null 2>&1 + sudo -u "$name" mkdir -p "/home/$name/.cache/zsh/" + sudo -u "$name" mkdir -p "/home/$name/.config/mpd/playlists/" + rmmod pcspkr + printf "blacklist pcspkr\n" >/etc/modprobe.d/nobeep.conf +} + +### SCRIPT ### + +printf "###########################\n########## ZEROG ##########\n###########\ +################\n" + +prepare || error "prepare failed" + +install_programs || error "install_programs failed" + +get_dotfiles || error "get_dotfiles failed" + +suckless || error "suckless failed" + +follow_up || error "follow_up failed"