the name is the solomonagen!

This commit is contained in:
Solomon Laing 2025-06-02 15:04:38 +09:30
parent e580a656ea
commit f35bf071e2
19 changed files with 260 additions and 291 deletions

View File

@ -1,7 +1,7 @@
#!/bin/sh
#!/usr/bin/env bash
#-----------------------------------
# Name: system-check
# Name: check
# Version: 1.0.0
# Author: Solomon Laing
# Description:
@ -17,7 +17,7 @@ fi
# check sudo is installed and user is in sudo or wheel group
# if not, direct user how to resolve
if ! command -v sudo &> /dev/null; then
if ! command -v sudo &>/dev/null; then
echo "sudo must be intsalled!"
echo "
To install sudo:
@ -38,7 +38,10 @@ if [[ "wheel" =~ "$groups" ]] || [[ "sudo" =~ "$groups" ]]; then
fi
# check for internet connection
connectivity=$(ping -c 1 -q google.com >&/dev/null; echo $?)
connectivity=$(
ping -c 1 -q google.com >&/dev/null
echo $?
)
if [ $connectivity -ne 0 ]; then
echo "You must be connected to the internet to run this collection of scripts. If you cloned these scripts in arch-chroot you may have problems."

59
arch/inkos-run Executable file
View File

@ -0,0 +1,59 @@
#!/usr/bin/env bash
echo "This script is going to attempt set up my system and it's dependencies. As such it will ask for root privilages."
read -r -p "Are you sure you want to continue? [Y/n] " input
case $input in
[nN][oO] | [nN])
exit 0
;;
*)
echo "continuing..."
;;
esac
check
script_dir=$(cd $(dirname "${BASH_SOURCE[0]}") && pwd)
filter=""
dry="0"
while [[ $# -gt 0 ]]; do
if [[ $1 == "--dry" ]]; then
dry="1"
else
filter="$1"
fi
shift
done
log() {
if [[ dry -eq "1" ]]; then
echo "[DRY_RUN]: $@"
else
echo "$@"
fi
}
execute() {
log "execute $*"
if [[ dry -eq "1" ]]; then
return
fi
"$@"
}
log "$script_dir -- $filter"
cd "$script_dir" || exit 1
scripts=$(find ./runs -maxdepth 1 -mindepth 1 -executable -type f)
for script in $scripts; do
if echo "$script" | grep -qv "$filter"; then
log "filtering $script"
continue
fi
execute "$script"
done

View File

@ -1,41 +0,0 @@
#!/bin/sh
#-----------------------------------
# Name: install-dmenu-inkletblot
# Version: 1.0.0
# Author: Solomon Laing
# Description:
# Installs my customisation of dmenu
#-----------------------------------
clear
if command -v dmenu &> /dev/null; then
echo "dmenu is already installed on the system."
exit 0
fi
echo "This script is going to install dmenu, my fork of dmenu with my custom styling. As such it will ask for root privilages."
read -r -p "Are you sure you want to continue? [Y/n] " input
case $input in
[nN][oO] | [nN])
exit 0
;;
*)
echo "The program will continue..."
;;
esac
cd /tmp
git clone https://gitlab.inkletblot.com/inkletblot/dmenu-inkletblot
cd dmenu-inkletblot
git checkout config
sudo -S make clean install
if ! command -v dmenu &> /dev/null; then
echo "dmenu failed to install, please manually rectify this and then rerun this setup with: ./setup install-dmenu"
exit 1
fi
exit 0

View File

@ -1,41 +0,0 @@
#!/bin/sh
#-----------------------------------
# Name: install-dwm-inkletblot
# Version: 1.0.0
# Author: Solomon Laing
# Description:
# Installs my customisation of dwm
#-----------------------------------
clear
if command -v dwm &> /dev/null; then
echo "dwm is already installed on the system."
exit 0
fi
echo "This script is going to install dwm, my fork of dwm with my custom styling. As such it will ask for root privilages."
read -r -p "Are you sure you want to continue? [Y/n] " input
case $input in
[nN][oO] | [nN])
exit 0
;;
*)
echo "The program will continue..."
;;
esac
cd /tmp
git clone https://gitlab.inkletblot.com/inkletblot/dwm-inkletblot
cd dwm-inkletblot
git checkout config
sudo -S make clean install
if ! command -v dwm &> /dev/null; then
echo "dwm failed to install, please manually rectify this and then rerun this setup with: ./setup install-dwm"
exit 1
fi
exit 0

View File

@ -1,40 +0,0 @@
#!/bin/sh
#-----------------------------------
# Name: install-dwmblocks-inkletblot
# Version: 1.0.0
# Author: Solomon Laing
# Description:
# Installs my customisation of dwmblocks
#-----------------------------------
clear
if command -v dwmblocks &> /dev/null; then
echo "dwmblocks is already installed on the system."
exit 0
fi
echo "This script is going to install dwmblocks, my fork of dmenu with my custom styling. As such it will ask for root privilages."
read -r -p "Are you sure you want to continue? [Y/n] " input
case $input in
[nN][oO] | [nN])
exit 0
;;
*)
echo "The program will continue..."
;;
esac
cd /tmp
git clone https://gitlab.inkletblot.com/inkletblot/dwmblocks-inkletblot
cd dwmblocks-inkletblot
sudo -S make clean install
if ! command -v dwmblocks &> /dev/null; then
echo "dwmblocks failed to install, please manually rectify this and then rerun this setup with: ./setup install-dwmblocks"
exit 1
fi
exit 0

View File

@ -1,41 +0,0 @@
#!/bin/sh
#-----------------------------------
# Name: install-st-inkletblot
# Version: 1.0.0
# Author: Solomon Laing
# Description:
# Installs my customisation of st
#-----------------------------------
clear
if command -v st &> /dev/null; then
echo "st is already installed on the system."
exit 0
fi
echo "This script is going to install st, my fork of st with my custom styling. As such it will ask for root privilages."
read -r -p "Are you sure you want to continue? [Y/n] " input
case $input in
[nN][oO] | [nN])
exit 0
;;
*)
echo "The program will continue..."
;;
esac
cd /tmp
git clone https://gitlab.inkletblot.com/inkletblot/st-inkletblot
cd st-inkletblot
git checkout config
sudo -S make clean install
if ! command -v st &> /dev/null; then
echo "st failed to install, please manually rectify this and then rerun this setup with: ./setup install-st"
exit 1
fi
exit 0

View File

@ -1,7 +1,7 @@
#!/bin/sh
#!/usr/bin/env bash
#-----------------------------------
# Name: install-dmenu-inkletblot
# Name: config
# Version: 1.0.0
# Author: Solomon Laing
# Description:
@ -12,17 +12,8 @@ clear
echo "This script is going to install my dotfiles."
read -r -p "Are you sure you want to continue? [Y/n] " input
case $input in
[nN][oO] | [nN])
exit 0
;;
*)
echo "The program will continue..."
;;
esac
function config {
/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME $@
/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME $@
}
if [ ! -d $HOME/.cfg ]; then
@ -37,12 +28,12 @@ The script will now attempt to install the configs, if configs have been install
config checkout main
if [ $? = 0 ]; then
echo "Checked out config.";
echo "Checked out config."
else
echo "Backing up pre-existing dot files.";
echo "Backing up pre-existing dot files."
mkdir -p $HOME/.config-backup
config checkout 2>&1 | egrep "\s+\." | awk {'print $1'} | xargs -I{} mv $HOME/{} $HOME/.config-backup/{}
fi;
fi
config checkout main

View File

@ -1,12 +1,11 @@
#!/bin/sh
#!/usr/bin/env bash
#-----------------------------------
# Name: install-yay
# Name: defoults
# Version: 1.0.0
# Author: Solomon Laing
# Description:
# Installs the AUR helper yay on the
# system.
# Installs all of my default programs
#-----------------------------------
clear
@ -18,34 +17,22 @@ dependencies=$(sed -n '/DEFAULTS_START/,/DEFAULTS_END/p' $default_programs | sed
echo "This script is going to install all of my default programs, e.g.: browser, rss reader, etc. As such it will ask for root privilages."
echo "Defaults:$dependencies"
read -r -p "Are you sure you want to continue? [Y/n] " input
case $input in
[nN][oO] | [nN])
exit 0
;;
*)
echo "The program will continue..."
;;
esac
# if yay is not installed the run the install script
if ! command -v yay &> /dev/null; then
./install-yay
if ! command -v yay &>/dev/null; then
./yay
fi
failures=()
# run though each dependency and install it if it's not already installed
for dependency in $dependencies
do
for dependency in $dependencies; do
sudo -v
clear
if ! yay -Qi $dependency &> /dev/null; then
if ! yay -Qi $dependency &>/dev/null; then
echo "Installing $dependency and it's dependencies..."
yay -S --noconfirm $dependency
fi
if ! yay -Qi $dependency &> /dev/null; then
if ! yay -Qi $dependency &>/dev/null; then
failures+=("$dependency\n")
fi
done
@ -55,7 +42,6 @@ total_failures=$((${#failures[@]}))
if [ $total_failures -gt 0 ]; then
echo "$total_failures of the programs failed to install..."
echo -e "${failures[@]}"
echo "Please manually rectify this and then rerun this setup with: ./setup defaults"
exit 1
else
echo "Default programs sucessfully installed"

View File

@ -1,12 +1,11 @@
#!/bin/sh
#!/usr/bin/env bash
#-----------------------------------
# Name: install-yay
# Name: dependencies
# Version: 1.0.0
# Author: Solomon Laing
# Description:
# Installs the AUR helper yay on the
# system.
# Intsalls all of my system dependencies
#-----------------------------------
clear
@ -17,7 +16,7 @@ laptop_dependencies=$(sed -n '/DEPENDENCIES_LAPTOP_START/,/DEPENDENCIES_LAPTOP_E
laptop=0
# check user is happy to run this script
echo "This script is going to install all of the programs required for my scripts and dotfiles to function in a bisic manner. As such it will ask for root privilages."
echo "This script is going to install all of the programs required for my scripts and dotfiles to function in a basic manner. As such it will ask for root privilages."
echo "Dependencies:$dependencies"
echo ""
@ -37,44 +36,32 @@ case $laptop_input in
;;
esac
read -r -p "Are you sure you want to continue? [Y/n] " input
case $input in
[nN][oO] | [nN])
exit 0
;;
*)
echo "The program will continue..."
;;
esac
# if yay is not installed the run the install script
if ! command -v yay &> /dev/null; then
./install-yay
if ! command -v yay &>/dev/null; then
./yay
fi
failures=()
# run though each dependency and install it if it's not already installed
for dependency in $dependencies
do
for dependency in $dependencies; do
sudo -v
clear
if ! yay -Qi $dependency &> /dev/null; then #TODO: check whether this works as I'm expecting...
if ! yay -Qi $dependency &>/dev/null; then #TODO: check whether this works as I'm expecting...
echo "Installing $dependency and it's dependencies..."
yay -S --noconfirm $dependency
fi
if ! yay -Qi $dependency &> /dev/null; then
if ! yay -Qi $dependency &>/dev/null; then
# there are likely some dependencies that won't have an associated command
# TODO: find a better way to deal with this, eg have something like xorg COMMAND xprop in default programs
# just catch everything, ik there are better ways to do this
case $dependency in
xorg)
echo "xorg is has no command."
xorg)
echo "xorg is has no command."
;;
*)
failures+=("$dependency")
*)
failures+=("$dependency")
;;
esac
fi
@ -82,16 +69,14 @@ done
if [ $laptop -eq 1 ]; then
# run though each laptop dependency and install it if it's not already installed
for dependency in $laptop_dependencies
do
clear
for dependency in $laptop_dependencies; do
sudo -v
if ! yay -Qi $dependency &> /dev/null; then
if ! yay -Qi $dependency &>/dev/null; then
echo "Installing $dependency and it's dependencies..."
yay -S --noconfirm $dependency
fi
if ! yay -Qi $dependency &> /dev/null; then
if ! yay -Qi $dependency &>/dev/null; then
failures+=("$dependency\n")
fi
done
@ -102,7 +87,6 @@ total_failures=$((${#failures[@]}))
if [ $total_failures -gt 0 ]; then
echo "$total_failures of the programs failed to install..."
echo -e "${failures[@]}"
echo "Please manually rectify this and then rerun this setup with: ./setup deps"
exit 1
else
echo "Dependencies sucessfully installed"

30
arch/runs/dmenu Executable file
View File

@ -0,0 +1,30 @@
#!/usr/bin/env bash
#-----------------------------------
# Name: dmenu
# Version: 1.0.0
# Author: Solomon Laing
# Description:
# Installs my customisation of dmenu
#-----------------------------------
clear
if command -v dmenu &>/dev/null; then
echo "dmenu is already installed on the system."
exit 0
fi
echo "This script is going to install my fork of dmenu with my custom styling. As such it will ask for root privilages."
git clone https://gitlab.inkletblot.com/inkletblot/dmenu-inkletblot "$HOME/repos/gitlab.inkletblot.com/inkletblot/dmenu-inkletblot"
cd "$HOME/repos/gitlab.inkletblot.com/inkletblot/dmenu-inkletblot" || exit 1
git checkout config
sudo -S make clean install
if ! command -v dmenu &>/dev/null; then
echo "dmenu failed to install"
exit 1
fi
exit 0

30
arch/runs/dwm Executable file
View File

@ -0,0 +1,30 @@
#!/usr/bin/env bash
#-----------------------------------
# Name: dwm
# Version: 1.0.0
# Author: Solomon Laing
# Description:
# Installs my customisation of dwm
#-----------------------------------
clear
if command -v dwm &>/dev/null; then
echo "dwm is already installed on the system."
exit 0
fi
echo "This script is going to install my fork of dwm with my custom styling. As such it will ask for root privilages."
git clone https://gitlab.inkletblot.com/inkletblot/dwm-inkletblot "$HOME/repos/gitlab.inkletblot.com/inkletblot/dwm-inkletblot"
cd "$HOME/repos/gitlab.inkletblot.com/inkletblot/dwm-inkletblot" || exit 1
git checkout config
sudo -S make clean install
if ! command -v dwm &>/dev/null; then
echo "dwm failed to install"
exit 1
fi
exit 0

29
arch/runs/dwmblocks Executable file
View File

@ -0,0 +1,29 @@
#!/usr/bin/env bash
#-----------------------------------
# Name: dwmblocks
# Version: 1.0.0
# Author: Solomon Laing
# Description:
# Installs my customisation of dwmblocks
#-----------------------------------
clear
if command -v dwmblocks &>/dev/null; then
echo "dwmblocks is already installed on the system."
exit 0
fi
echo "This script is going to install my fork of dmenu with my custom styling. As such it will ask for root privilages."
git clone https://gitlab.inkletblot.com/inkletblot/dwmblocks-inkletblot "$HOME/repos/gitlab.inkletblot.com/inkletblot/dwmblocks-inkletblot"
cd "$HOME/repos/gitlab.inkletblot.com/inkletblot/dwmblocks-inkletblot" || exit 1
sudo -S make clean install
if ! command -v dwmblocks &>/dev/null; then
echo "dwmblocks failed to install."
exit 1
fi
exit 0

View File

@ -1,7 +1,7 @@
#!/bin/sh
#!/usr/bin/env bash
#-----------------------------------
# Name: install-fonts
# Name: fonts
# Version: 1.0.0
# Author: Solomon Laing
# Description:
@ -11,27 +11,15 @@
clear
if command -v getnf &> /dev/null; then
if command -v getnf &>/dev/null; then
echo "getnf is already installed on the system."
exit 0
fi
echo "This script is going to attempt install getnf. As such it will ask for root privilages."
read -r -p "Are you sure you want to continue? [Y/n] " input
case $input in
[nN][oO] | [nN])
exit 0
;;
*)
echo "The program will continue..."
;;
esac
cd /tmp
sudo -S git clone https://github.com/ronniedroid/getnf
sudo -S chown -R $USER:users ./getnf
cd getnf
git clone https://github.com/ronniedroid/getnf "$HOME/repos/github.com/ronniedroid/getnf"
cd "$HOME/repos/github.com/ronniedroid/getnf" || exit 1
sudo ./install.sh
@ -40,9 +28,7 @@ case $input in
[nN][oO] | [nN])
exit 0
;;
*)
echo "The program will continue..."
;;
*) ;;
esac
getnf

View File

@ -1,7 +1,7 @@
#!/bin/sh
#!/usr/bin/env bash
#-----------------------------------
# Name: install-misc
# Name: misc
# Version: 1.0.0
# Author: Solomon Laing
# Description:
@ -18,34 +18,23 @@ dependencies=$(sed -n '/MISC_START/,/MISC_END/p' $default_programs | sed -e 's/M
echo "This script is going to install all of my misc programs that I frequently use."
echo "Misc programs:$dependencies"
read -r -p "Are you sure you want to continue? [Y/n] " input
case $input in
[nN][oO] | [nN])
exit 0
;;
*)
echo "The program will continue..."
;;
esac
# if yay is not installed the run the install script
if ! command -v yay &> /dev/null; then
./install-yay
if ! command -v yay &>/dev/null; then
./yay
fi
failures=()
# run though each dependency and install it if it's not already installed
for dependency in $dependencies
do
for dependency in $dependencies; do
sudo -v
clear
if ! yay -Qi $dependency &> /dev/null; then
if ! yay -Qi $dependency &>/dev/null; then
echo "Installing $dependency and it's dependencies..."
yay -S --noconfirm $dependency
fi
if ! yay -Qi $dependency &> /dev/null; then
if ! yay -Qi $dependency &>/dev/null; then
failures+=("$dependency\n")
fi
done
@ -55,7 +44,6 @@ total_failures=$((${#failures[@]}))
if [ $total_failures -gt 0 ]; then
echo "$total_failures of the programs failed to install..."
echo -e "${failures[@]}"
echo "Please manually rectify this and then rerun this setup with: ./setup misc"
exit 1
else
echo "Misc programs sucessfully installed"

26
arch/runs/neovim Executable file
View File

@ -0,0 +1,26 @@
#!/usr/bin/env bash
#-----------------------------------
# Name: neovim
# Version: 1.0.0
# Author: Solomon Laing
# Description:
# Installs neovim on the system.
#-----------------------------------
clear
if command -v neovim &>/dev/null; then
echo "neovim is already installed on the system."
exit 0
fi
echo "This script is going to attempt install neovim. As such it will ask for root privilages."
git clone --depth 1 https://github.com/neovim/neovim "$HOME/repos/github.com/neovim/neovim"
sudo pacman -S base-devel cmake ninja curl || exit 1
cd "$HOME/repos/github.com/neovim/neovim" || exit 1
make CMAKE_BUILD_TYPE=Release || exit 1
sudo make install || exit 1
exit 0

30
arch/runs/st Executable file
View File

@ -0,0 +1,30 @@
#!/usr/bin/env bash
#-----------------------------------
# Name: st
# Version: 1.0.0
# Author: Solomon Laing
# Description:
# Installs my customisation of st
#-----------------------------------
clear
if command -v st &>/dev/null; then
echo "st is already installed on the system."
exit 0
fi
echo "This script is going to install my fork of st with my custom styling. As such it will ask for root privilages."
git clone https://gitlab.inkletblot.com/inkletblot/st-inkletblot "$HOME/repos/gitlab.inkletblot.com/inkletblot/st-inkletblot"
cd "$HOME/repos/gitlab.inkletblot.com/inkletblot/st-inkletblot" || exit 1
git checkout config
sudo -S make clean install
if ! command -v st &>/dev/null; then
echo "st failed to install."
exit 1
fi
exit 0

View File

@ -1,7 +1,7 @@
#!/bin/sh
#!/usr/bin/env bash
#-----------------------------------
# Name: install-yay
# Name: yay
# Version: 1.0.0
# Author: Solomon Laing
# Description:
@ -11,31 +11,21 @@
clear
if command -v yay &> /dev/null; then
if command -v yay &>/dev/null; then
echo "yay is already installed on the system."
exit 0
fi
echo "This script is going to attempt install yay and it's dependencies. As such it will ask for root privilages."
read -r -p "Are you sure you want to continue? [Y/n] " input
case $input in
[nN][oO] | [nN])
exit 0
;;
*)
echo "The program will continue..."
;;
esac
if ! command -v fakeroot &> /dev/null; then
if ! command -v fakeroot &>/dev/null; then
sudo pacman -S --noconfirm base-devel
fi
cd /opt
cd /opt || exit 1
sudo -S git clone https://aur.archlinux.org/yay.git
sudo -S chown -R $USER:users ./yay
cd yay
cd yay || exit 1
makepkg -si
exit 0