commit 552acea0220800bc6f604ab0181bca7d48a5f37c Author: Lord_Devi Date: Tue Jul 9 01:40:52 2024 -0400 Initial yadm commit. Just added yadm config so far. diff --git a/.config/yadm/bootstrap b/.config/yadm/bootstrap new file mode 100755 index 0000000..dd4d552 --- /dev/null +++ b/.config/yadm/bootstrap @@ -0,0 +1,113 @@ +#!/usr/bin/env bash +_location=".config/yadm/bootstrap" +_ghq_root="${HOME}/.local/opt/git" +_ghq="${HOME}/.local/opt/go/bin/ghq" + +# This script is for setting up an initial user environment. Once yadm has +# been cloned into the homedir, 'yadm bootstrap' gets ran. Then this script +# executes. It should install the correct apps, termcaps, terminfo, etc. + +# {{{ +_debug=y # Comment this out to disable debuging. + +_blue="\e[34m" +_magenta="\e[35m" +_green="\e[92m" +_cyan="\e[36m" +_white="\e[97m" +_end_color="\e[0m" + +# Mordu with location. +_mordu() { + [ "$_debug" ] && echo -e "${_blue}>>> ${_magenta}Mordu${_cyan}@${_green}${_location}${_cyan}:${_white} $*${_end_color}" +} + +# Mordu with location and no new line. +_mordu_n() { + [ "$_debug" ] && echo -en "${_blue}>>> ${_magenta}Mordu${_cyan}@${_green}${_location}${_cyan}:${_white} $*${_end_color}" +} + +# Echo with new line to add completion messages to _mordu_n +_mordu_nl() { + [ "$_debug" ] && echo -e "${_white}$*${_end_color}" +} + +_mordu "Starting script." +# }}} + +# {{{ +_fix_ssh_perms() { + if [ -d "${HOME}/.ssh" ]; then + _mordu "Setting perms to 600 for files in .ssh." + find "${HOME}/.ssh" -type f -exec chmod 600 {} + + _mordu "Setting perms to 700 for directories in .ssh." + find "${HOME}/.ssh" -type d -exec chmod 700 {} + + _mordu "Setting perms to 644 for public keys in .ssh." + find "${HOME}/.ssh" -type f -name "*.pub" -exec chmod 644 {} + + else + _mordu "No .ssh found in home dir yet. Not setting permissions." + fi +} +# }}} + +# {{{ +# The scripts for setting up a minimal shell. +_shell_minimum_install() { + _mordu "Sourcing shell mimimal install scripts." + for __app in "${HOME}/.config/yadm/shell-minimal.d/"*.sh ; do + _mordu "Processing ${__app}." + bash "$__app" + done +} + +# The scripts for setting up a minimal workstation. +_workstation_minimum_install() { + _mordu "Sourcing workstation minimal install scripts." + for __app in "${HOME}/.config/yadm/workstation-minimal.d/"*.sh ; do + _mordu "Processing ${__app}." + bash "${__app}" + done +} +# }}} + +# {{{ +_source_install_scripts() { + # Check if we are a workstation or server/shell only. + if type Xorg > /dev/null 2>&1 ; then + _mordu "Xorg found. Bootstraping with a graphical workstation in mind." + _shell_minimum_install + _workstation_minimum_install + else + _mordu "Xorg not found. Bootstraping for a shell only environment." + _shell_minimum_install + fi +} +# }}} + +# {{{ +_set_shell_zsh() { + local _user="$USER" + _mordu "Setting users shell to zsh." + sudo usermod -s /usr/bin/zsh "$_user" +} +# }}} + +# {{{ +_gc() { + _mordu "Performing some basic garbage collection." + rm -rf ~/.cargo ~/.lesshst ~/.viminfo ~/.w3m ~/.wget-hsts ~/.vim +} +# }}} + +# {{{
+_main() { + _fix_ssh_perms + _source_install_scripts + _set_shell_zsh + _gc + _mordu "Bootstrapping complete. You are going to want to re-login." +} +_main +# }}}
+ +_mordu "Completed script." diff --git a/.config/yadm/encrypt b/.config/yadm/encrypt new file mode 100644 index 0000000..47cc18f --- /dev/null +++ b/.config/yadm/encrypt @@ -0,0 +1 @@ +.ssh/* diff --git a/.config/yadm/install-extras.sh b/.config/yadm/install-extras.sh new file mode 100755 index 0000000..9b5915d --- /dev/null +++ b/.config/yadm/install-extras.sh @@ -0,0 +1,74 @@ +#!/usr/bin/env bash +_location=".config/yadm/install-extras.sh" + +# {{{ +_debug=y # Comment this out to disable debuging. + +_blue="\e[34m" +_magenta="\e[35m" +_green="\e[92m" +_cyan="\e[36m" +_white="\e[97m" +_end_color="\e[0m" + +# Mordu with location. +_mordu() { + [ "$_debug" ] && echo -e "${_blue}>>> ${_magenta}Mordu${_cyan}@${_green}${_location}${_cyan}:${_white} $*${_end_color}" +} + +# Mordu with location and no new line. +_mordu_n() { + [ "$_debug" ] && echo -en "${_blue}>>> ${_magenta}Mordu${_cyan}@${_green}${_location}${_cyan}:${_white} $*${_end_color}" +} + +# Echo with new line to add completion messages to _mordu_n +_mordu_nl() { + [ "$_debug" ] && echo -e "${_white}$*${_end_color}" +} + +_mordu "Starting script." +# }}} + +# {{{ +# The scripts for setting up a minimal shell. +_shell_extras() { + _mordu "Sourcing shell extra install scripts." + for __app in "${HOME}/.config/yadm/shell-extras.d/"*.sh ; do + _mordu "Processing ${__app}." + bash "$__app" + done +} + +# The scripts for setting up a minimal workstation. +_workstation_extras() { + _mordu "Sourcing workstation extra install scripts." + for __app in "${HOME}/.config/yadm/workstation-extras.d/"*.sh ; do + _mordu "Processing ${__app}." + bash "${__app}" + done +} +# }}} + +# {{{ +_source_install_scripts() { + # Check if we are a workstation or server/shell only. + if type Xorg > /dev/null 2>&1 ; then + _mordu "Xorg found. Installing extras for a graphical user environment." + _shell_extras + _workstation_extras + else + _mordu "Xorg not found. Installing extras for a shell only environment." + _shell_extras + fi +} +# }}} + +# {{{
+_main() { + _source_install_scripts + _mordu "Finished installing extras." +} +_main +# }}}
+ +_mordu "Completed script." diff --git a/.config/yadm/scripts/install-xorg.sh b/.config/yadm/scripts/install-xorg.sh new file mode 100755 index 0000000..207983c --- /dev/null +++ b/.config/yadm/scripts/install-xorg.sh @@ -0,0 +1,112 @@ +#!/usr/bin/env bash +_location=".config/yadm/scripts/install-xorg.sh" + +# This script is for installing Xorg on Fedora. This is often a desirable step +# to take before running the main bootstrap script. The bootstrap script will +# prepare either a shell only environment or an Xorg based workstation +# depending on whether or not Xorg is installed. So running this first will +# ensure a workstation installation occurs. + +# {{{ +_debug=y # Comment this out to disable debuging. + +_blue="\e[34m" +_magenta="\e[35m" +_green="\e[92m" +_cyan="\e[36m" +_white="\e[97m" +_end_color="\e[0m" + +# Mordu with location. +_mordu() { + [ "$_debug" ] && echo -e "${_blue}>>> ${_magenta}Mordu${_cyan}@${_green}${_location}${_cyan}:${_white} $*${_end_color}" +} + +# Mordu with location and no new line. +_mordu_n() { + [ "$_debug" ] && echo -en "${_blue}>>> ${_magenta}Mordu${_cyan}@${_green}${_location}${_cyan}:${_white} $*${_end_color}" +} + +# Echo with new line to add completion messages to _mordu_n +_mordu_nl() { + [ "$_debug" ] && echo -e "${_white}$*${_end_color}" +} + +_mordu "Starting script." +# }}} + +# {{{ +_define_packages() { + _packages=(dbus-x11 xrandr) +} +# }}} + +# {{{ +_install_pkgs() { + local __required_packages=("$@") + + for __package in "${__required_packages[@]}" ; do + if [[ $(rpm -qi "${__package//\"/}") == "package ${__package//\"/} is not installed" ]] ; then + _mordu "Not installed yet: ${__package}." + __not_installed_yet+=( "$__package" ) + else + _mordu "Already installed: ${__package}." + fi + done + _mordu "Total not installed yet: ${__not_installed_yet[*]}" + + if (( ${#__not_installed_yet[@]} )); then + sudo dnf -y install "${__not_installed_yet[@]}" + fi +} +# }}} + +# {{{ +# Define the package groups you want to install +_define_pkg_groups() { + _pkg_groups=(\ + "base-x") +} +# }}} + +# {{{ +# Function to install package groups if not already installed +_install_pkg_groups() { + local __required_pkg_groups=("$@") + local __not_installed_yet=() + + # Get the list of installed package groups + local __installed_groups + __installed_groups=$(dnf group list --hidden installed | awk '/Installed Groups:/,/^$/' | sed '1d' | sed 's/^[ \t]*//') + + for __group in "${__required_pkg_groups[@]}"; do + if echo "$__installed_groups" | grep -q "^${__group}$"; then + _mordu "Already installed: ${__group}." + else + _mordu "Not installed yet: ${__group}." + __not_installed_yet+=( "$__group" ) + fi + done + + _mordu "Total not installed yet: ${__not_installed_yet[*]}" + + if (( ${#__not_installed_yet[@]} )); then + sudo dnf -y group install "${__not_installed_yet[@]}" + fi +} +# }}} + +# {{{
+_main() { + # Install Fedora packages + _define_packages + _install_pkgs "${_packages[@]}" + + # Install Fedora package groups + _define_pkg_groups + _install_pkg_groups "${_pkg_groups[@]}" +} +_main +# }}}
+ +_mordu "Completed script." diff --git a/.config/yadm/scripts/rpmfusion-setup.sh b/.config/yadm/scripts/rpmfusion-setup.sh new file mode 120000 index 0000000..bea0cf4 --- /dev/null +++ b/.config/yadm/scripts/rpmfusion-setup.sh @@ -0,0 +1 @@ +../shell-minimal.d/02-rpmfusion-setup.sh \ No newline at end of file diff --git a/.config/yadm/shell-extras.d/01-install-fedora-packages.sh b/.config/yadm/shell-extras.d/01-install-fedora-packages.sh new file mode 100755 index 0000000..34b0ff4 --- /dev/null +++ b/.config/yadm/shell-extras.d/01-install-fedora-packages.sh @@ -0,0 +1,115 @@ +#!/usr/bin/env bash +_location=".config/yadm/shell-extras.d/01-install-fedora-packages.sh" + +# {{{ +_debug=y # Comment this out to disable debuging. + +_blue="\e[34m" +_magenta="\e[35m" +_green="\e[92m" +_cyan="\e[36m" +_white="\e[97m" +_end_color="\e[0m" + +# Mordu with location. +_mordu() { + [ "$_debug" ] && echo -e "${_blue}>>> ${_magenta}Mordu${_cyan}@${_green}${_location}${_cyan}:${_white} $*${_end_color}" +} + +# Mordu with location and no new line. +_mordu_n() { + [ "$_debug" ] && echo -en "${_blue}>>> ${_magenta}Mordu${_cyan}@${_green}${_location}${_cyan}:${_white} $*${_end_color}" +} + +# Echo with new line to add completion messages to _mordu_n +_mordu_nl() { + [ "$_debug" ] && echo -e "${_white}$*${_end_color}" +} + +_mordu "Starting script." +# }}} + +# {{{ +_define_packages() { + _tools=(hyperfine) + _entertainment=(tintin) + _net=(s3cmd) + _development=(perl nodejs nodejs-npm gcc postgresql zlib-ng-compat-devel \ + bzip2-devel readline-devel sqlite sqlite-devel openssl-devel tk-devel \ + libffi-devel xz-devel gdbm-libs libnsl2 uuid-devel libuuid-devel python3 \ + python3-pip ShellCheck hexyl) + _admin=(ansible) + _packages=("${_entertainment[@]}" "${_development[@]}" "${_net[@]}" \ + "${_tools[@]}" "${_admin[@]}") +} +# }}} + +# {{{ +_install_pkgs() { + local __required_packages=("$@") + + for __package in "${__required_packages[@]}" ; do + if [[ $(rpm -qi "${__package//\"/}") == "package ${__package//\"/} is not installed" ]] ; then + _mordu "Not installed yet: ${__package}." + __not_installed_yet+=( "$__package" ) + else + _mordu "Already installed: ${__package}." + fi + done + _mordu "Total not installed yet: ${__not_installed_yet[*]}" + + if (( ${#__not_installed_yet[@]} )); then + sudo dnf -y install "${__not_installed_yet[@]}" + fi +} +# }}} + +# {{{ +# Define the package groups you want to install +_define_pkg_groups() { + _pkg_groups=(\ + "Text-based Internet") +} +# }}} + +# {{{ +# Function to install package groups if not already installed +_install_pkg_groups() { + local __required_pkg_groups=("$@") + local __not_installed_yet=() + + # Get the list of installed package groups + local __installed_groups + __installed_groups=$(dnf group list --hidden installed | awk '/Installed Groups:/,/^$/' | sed '1d' | sed 's/^[ \t]*//') + + for __group in "${__required_pkg_groups[@]}"; do + if echo "$__installed_groups" | grep -q "^${__group}$"; then + _mordu "Already installed: ${__group}." + else + _mordu "Not installed yet: ${__group}." + __not_installed_yet+=( "$__group" ) + fi + done + + _mordu "Total not installed yet: ${__not_installed_yet[*]}" + + if (( ${#__not_installed_yet[@]} )); then + sudo dnf -y group install "${__not_installed_yet[@]}" + fi +} +# }}} + +# {{{
+_main() { + # Install Fedora packages. + _define_packages + _install_pkgs "${_packages[@]}" + + # Install Fedora package groups + _define_pkg_groups + _install_pkg_groups "${_pkg_groups[@]}" +} +_main +# }}}
+ +_mordu "Completed script." diff --git a/.config/yadm/shell-extras.d/02-install-go-stuff.sh b/.config/yadm/shell-extras.d/02-install-go-stuff.sh new file mode 100755 index 0000000..f514d6f --- /dev/null +++ b/.config/yadm/shell-extras.d/02-install-go-stuff.sh @@ -0,0 +1,77 @@ +#!/usr/bin/env bash +_location=".config/yadm/shell-extras.d/02-install-go-stuff.sh" +export GOPATH="${HOME}/.local/opt/go" + +# {{{ +_debug=y # Comment this out to disable debuging. + +_blue="\e[34m" +_magenta="\e[35m" +_green="\e[92m" +_cyan="\e[36m" +_white="\e[97m" +_end_color="\e[0m" + +# Mordu with location. +_mordu() { + [ "$_debug" ] && echo -e "${_blue}>>> ${_magenta}Mordu${_cyan}@${_green}${_location}${_cyan}:${_white} $*${_end_color}" +} + +# Mordu with location and no new line. +_mordu_n() { + [ "$_debug" ] && echo -en "${_blue}>>> ${_magenta}Mordu${_cyan}@${_green}${_location}${_cyan}:${_white} $*${_end_color}" +} + +# Echo with new line to add completion messages to _mordu_n +_mordu_nl() { + [ "$_debug" ] && echo -e "${_white}$*${_end_color}" +} + +_mordu "Starting script." +# }}} + +# {{{ +## Make sure the binary directory exists already. +_install_go_packages() { + ## Install Lazygit + if [ -x "${GOPATH}/bin/lazygit" ]; then + _mordu "Lazygit already installed." + else + _mordu "Installing lazygit." + go install github.com/jesseduffield/lazygit@latest + fi + + ## Install Tea + if [ -x "${GOPATH}/bin/tea" ]; then + _mordu "Tea already installed." + else + _mordu "Installing tea." + go install code.gitea.io/tea@latest + fi + + ## Install Gitmux + if [ -x "${GOPATH}/bin/gitmux" ]; then + _mordu "Gitmux already installed." + else + _mordu "Installing Gitmux." + go install github.com/arl/gitmux@latest + fi + + ## Install Shfmt + if [ -f "${GOPATH}/bin/shfmt" ]; then + _mordu "Shfmt already installed." + else + _mordu "Installing shfmt." + go install mvdan.cc/sh/v3/cmd/shfmt@latest + fi +} +# }}} + +# {{{
+_main() { + _install_go_packages +} +_main +# }}}
+ +_mordu "Completed script." diff --git a/.config/yadm/shell-extras.d/03-install-rust-stuff.sh b/.config/yadm/shell-extras.d/03-install-rust-stuff.sh new file mode 100755 index 0000000..4a0e109 --- /dev/null +++ b/.config/yadm/shell-extras.d/03-install-rust-stuff.sh @@ -0,0 +1,82 @@ +#!/usr/bin/env bash +_location=".config/yadm/shell-extras.d/03-install-rust-stuff.sh" +export CARGO_HOME="${HOME}/.local/opt/cargo" + +# {{{ +_debug=y # Comment this out to disable debuging. + +_blue="\e[34m" +_magenta="\e[35m" +_green="\e[92m" +_cyan="\e[36m" +_white="\e[97m" +_end_color="\e[0m" + +# Mordu with location. +_mordu() { + [ "$_debug" ] && echo -e "${_blue}>>> ${_magenta}Mordu${_cyan}@${_green}${_location}${_cyan}:${_white} $*${_end_color}" +} + +# Mordu with location and no new line. +_mordu_n() { + [ "$_debug" ] && echo -en "${_blue}>>> ${_magenta}Mordu${_cyan}@${_green}${_location}${_cyan}:${_white} $*${_end_color}" +} + +# Echo with new line to add completion messages to _mordu_n +_mordu_nl() { + [ "$_debug" ] && echo -e "${_white}$*${_end_color}" +} + +_mordu "Starting script." +# }}} + +# {{{ +_install_rust_and_cargo() { + _mordu "Installing rust and cargo." + sudo dnf install -y rust cargo +} +# }}} + +# {{{ +## Make sure the binary directory exists already. +_install_cargo_packages() { + if [ ! -d "${CARGO_HOME}/bin" ]; then + _mordu "Did not find ${CARGO_HOME}/bin. Creating." + mkdir -p "${CARGO_HOME}/bin" + fi + + ## Install ddh + if [ -x "${CARGO_HOME}/bin/ddh" ]; then + _mordu "Ddh already installed." + else + _mordu "Installing ddh." + cargo install --git https://git.mgk.one/utils-system/darakian.ddh + fi + + ## Install suckit + if [ -x "${CARGO_HOME}/bin/suckit" ]; then + _mordu "Suckit already installed." + else + _mordu "Installing suckit." + cargo install --git https://git.mgk.one/scraping/skallwar.suckit + fi + + ## Install skim + if [ -x "${CARGO_HOME}/bin/sk" ]; then + _mordu "Skim already installed." + else + _mordu "Installing skim." + cargo install --git https://git.mgk.one/utils-shell/lotabout.skim + fi +} +# }}} + +# {{{
+_main() { + _install_rust_and_cargo + _install_cargo_packages +} +_main +# }}}
+ +_mordu "Completed script." diff --git a/.config/yadm/shell-extras.d/04-install-python-stuff.sh b/.config/yadm/shell-extras.d/04-install-python-stuff.sh new file mode 100755 index 0000000..e8448c4 --- /dev/null +++ b/.config/yadm/shell-extras.d/04-install-python-stuff.sh @@ -0,0 +1,87 @@ +#!/usr/bin/env bash +_location=".config/yadm/shell-extras.d/04-install-python-stuff.sh" + +# {{{ +_debug=y # Comment this out to disable debuging. + +_blue="\e[34m" +_magenta="\e[35m" +_green="\e[92m" +_cyan="\e[36m" +_white="\e[97m" +_end_color="\e[0m" + +# Mordu with location. +_mordu() { + [ "$_debug" ] && echo -e "${_blue}>>> ${_magenta}Mordu${_cyan}@${_green}${_location}${_cyan}:${_white} $*${_end_color}" +} + +# Mordu with location and no new line. +_mordu_n() { + [ "$_debug" ] && echo -en "${_blue}>>> ${_magenta}Mordu${_cyan}@${_green}${_location}${_cyan}:${_white} $*${_end_color}" +} + +# Echo with new line to add completion messages to _mordu_n +_mordu_nl() { + [ "$_debug" ] && echo -e "${_white}$*${_end_color}" +} + +_mordu "Starting script." +# }}} + +# {{{ +_install_python() { + _mordu "Installing python." + sudo dnf install -y python3 python3-pip +} +# }}} + +# {{{ +## Make sure pyenv is installed. +#if [ -e "$PYENV_ROOT"/bin/pyenv ]; then +# echo "Pyenv already installed." +#else +# echo "Pyenv not installed. Installing." +# echo "Cloning pyenv." +# ghq get git.mgk.one/utils-code/pyenv.pyenv +# echo "Cloning pyenv-virtualenv." +# ghq get git.mgk.one/utils-code/pyenv.pyenv-virtualenv +# echo "Linking pyenv." +# ln -sr "$GHQ_ROOT"/git.mgk.one/utils-code/pyenv.pyenv "$PYENV_ROOT" +# echo "Linking pyenv-virtual-env." +# ln -sr "$GHQ_ROOT"/git.mgk.one/utils-code/pyenv.pyenv-virtualenv "$PYENV_ROOT"/plugins/pyenv-virtualenv +# echo "Installing latest python version." +# pyenv install "$(pyenv latest -k 3)" +# echo "Setting default python version to the latest version." +# pyenv global "$(pyenv latest -k 3)" +#fi +# +#echo "Initializing the pyenv shell environment." +#eval "$(pyenv init --path)" +#eval "$(pyenv init -)" +#eval "$(pyenv virtualenv-init -)" +#echo "Running update command for pip." +#pip install --upgrade pip +# }}} + +# {{{ +_install_python_packages() { + ## Install ckill + if command -v ckill > /dev/null 2>&1; then + _mordu "Ckill already installed." + else + _mordu "Installing ckill." + pip install ckill + fi +} +# }}} + +# {{{
+_main() { + _install_python + _install_python_packages +} +_main +# }}}
+ +_mordu "Completed script." diff --git a/.config/yadm/shell-extras.d/05-install-sbcl-and-quicklisp-stuff.sh b/.config/yadm/shell-extras.d/05-install-sbcl-and-quicklisp-stuff.sh new file mode 100755 index 0000000..a29b303 --- /dev/null +++ b/.config/yadm/shell-extras.d/05-install-sbcl-and-quicklisp-stuff.sh @@ -0,0 +1,202 @@ +#!/usr/bin/env bash +_location=".config/yadm/shell-extras.d/05-install-sbcl-and-quicklisp-stuff.sh" + +# {{{ +_debug=y # Comment this out to disable debuging. + +_blue="\e[34m" +_magenta="\e[35m" +_green="\e[92m" +_cyan="\e[36m" +_white="\e[97m" +_end_color="\e[0m" + +# Mordu with location. +_mordu() { + [ "$_debug" ] && echo -e "${_blue}>>> ${_magenta}Mordu${_cyan}@${_green}${_location}${_cyan}:${_white} $*${_end_color}" +} + +# Mordu with location and no new line. +_mordu_n() { + [ "$_debug" ] && echo -en "${_blue}>>> ${_magenta}Mordu${_cyan}@${_green}${_location}${_cyan}:${_white} $*${_end_color}" +} + +# Echo with new line to add completion messages to _mordu_n +_mordu_nl() { + [ "$_debug" ] && echo -e "${_white}$*${_end_color}" +} + +_mordu "Starting script." +# }}} + +# {{{ +_prepare_src_dir() { + if [ ! -d "${HOME}/.local/opt/src" ]; then + _mordu "${HOME}/.local/opt/src not created yet. Creating." + mkdir -p "${HOME}/.local/opt/src" + fi + + if [ ! -d "${HOME}/.local/opt/src/sbcl" ]; then + _mordu "${HOME}/.local/opt/src/sbcl not created yet. Creating." + mkdir -p "${HOME}/.local/opt/src/sbcl" + fi +} +# }}} + +# {{{ +_fetch_sbcl_info() { + _mordu "Installing sbcl." + # Get the latest release information + _mordu "Fetching info on what the latest version of sbcl is." + _api_response=$(curl -s "https://api.github.com/repos/sbcl/sbcl/releases/latest") + + # Extract the tag name from the API response + _tag_name=$(echo "$_api_response" | grep -o '"tag_name": "[^"]*' | cut -d'"' -f4) + + # Construct the download URL + _download_url="http://prdownloads.sourceforge.net/sbcl/${_tag_name}-x86-64-linux-binary.tar.bz2" + + # Get the current installed version of SBCL + _current_sbcl_version=$(sbcl --version | awk '{print $2}') + + # The new version to install + _new_sbcl_version=$(echo "$_tag_name" | cut -d'-' -f2) +} +# }}} + +# {{{ +_download_latest_sbcl() { + # Download the latest release + cd "${HOME}/.local/opt/src/sbcl" || exit + if [ -f "${HOME}/.local/opt/src/sbcl/${_tag_name}-x86_64-linux-binary.tar.bz2" ]; then + _mordu "Latest SBCL already downloaded." + else + _mordu "Downloading latest SBCL." + curl -L -o "${_tag_name}-x86_64-linux-binary.tar.bz2" "$_download_url" + _mordu "Downloaded latest SBCL release: ${_tag_name}" + fi +} +# }}} + +# {{{ +_extract_sbcl() { + # Extract the archive + if [ ! -d "${HOME}/.local/opt/src/sbcl/${_tag_name}-x86-64-linux" ]; then + _mordu "Extracting archive." + tar -jxpvf "${_tag_name}-x86_64-linux-binary.tar.bz2" + else + _mordu "Archive already extracted. Continueing." + fi +} +# }}} + +# {{{ +_run_sbcl_install_script() { + # Running SBCL install script. + _mordu "Running SBCL install script." + cd "${_tag_name}-x86-64-linux" || exit + sudo ./install.sh +} +# }}} + +# {{{ +# Function to compare versions +_version_gt() { + # Return true if $1 > $2 + test "$(echo "$@" | tr " " "\n" | sort -V | head -n 1)" != "$1" +} + +_install_sbcl() { + if [ "$_current_sbcl_version" == "$_new_sbcl_version" ]; then + _mordu "SBCL is already up-to-date with version ${_current_sbcl_version}." + elif _version_gt "$_new_sbcl_version" "$_current_sbcl_version"; then + _mordu "A newer version of SBCL is available. Installing version ${_new_sbcl_version}..." + # Place your installation code here + _run_sbcl_install_script + else + _mordu "Current SBCL version ${_current_sbcl_version} is newer than the version to install ${_new_sbcl_version}." + fi +} +# }}} + +# {{{ +_download_quicklisp() { + _mordu "Downloading quicklisp." + curl -o "${HOME}/.local/opt/src/quicklisp.lisp" \ + https://beta.quicklisp.org/quicklisp.lisp +} +# }}} + +# {{{ +_run_quicklisp_install_script() { + _mordu "Running quicklisp install script." + + sbcl --load ~/.local/opt/src/quicklisp.lisp --eval "(quicklisp-quickstart:install :path \"${HOME}/.local/opt/quicklisp/\")" --eval '(quit)' + + # Load the installed Quicklisp and install additional packages + sbcl --eval "(load \"${HOME}/.local/opt/quicklisp/setup.lisp\")" \ + --eval '(quit)' + + _mordu "Quicklisp install script finished processing." +} +# }}} + +# {{{ +_install_quicklisp() { + # Run SBCL to check if Quicklisp is installed and print a confirmation + sbcl --noinform --eval ' + (handler-case + (progn + (if (find-package :ql) + (format t "Quicklisp is installed.~%") + (progn + (format t "Quicklisp is not installed.~%") + (sb-ext:exit :code 1)))) + (error (e) + (format t "Quicklisp is not installed.~%") + (sb-ext:exit :code 1))) + ' --quit + + # Check the exit code of the previous command + if [ $? -eq 1 ]; then + # Install Quicklisp if it is not installed + _run_quicklisp_install_script + else + _mordu "Quicklisp is already installed. No need to install." + fi +} +# }}} + +# {{{ +_install_quicklisp_packages() { + _mordu "Install quicklisp packages." + + sbcl --eval '(ql:quickload "clx")' \ + --eval '(ql:quickload "cl-ppcre")' \ + --eval '(ql:quickload "alexandria")' \ + --eval '(quit)' + + _mordu "Quicklisp packages installed." +} +# }}} + +# {{{
+_main() { + # Prep install area. + _prepare_src_dir + + # Install SBCL + _fetch_sbcl_info + _download_latest_sbcl + _extract_sbcl + _install_sbcl + + # Install Quicklisp + _download_quicklisp + _install_quicklisp + _install_quicklisp_packages +} +_main +# }}}
+ +_mordu "Completed script." diff --git a/.config/yadm/shell-minimal.d/01-setup-xdg-dirs.sh b/.config/yadm/shell-minimal.d/01-setup-xdg-dirs.sh new file mode 100755 index 0000000..feb3753 --- /dev/null +++ b/.config/yadm/shell-minimal.d/01-setup-xdg-dirs.sh @@ -0,0 +1,155 @@ +#!/usr/bin/env bash +_location=".config/yadm/shell-minimal.d/01-setup-xdg-dirs.sh" + +# {{{ +_debug=y # Comment this out to disable debuging. + +_blue="\e[34m" +_magenta="\e[35m" +_green="\e[92m" +_cyan="\e[36m" +_white="\e[97m" +_end_color="\e[0m" + +# Mordu with location. +_mordu() { + [ "$_debug" ] && echo -e "${_blue}>>> ${_magenta}Mordu${_cyan}@${_green}${_location}${_cyan}:${_white} $*${_end_color}" +} + +# Mordu with location and no new line. +_mordu_n() { + [ "$_debug" ] && echo -en "${_blue}>>> ${_magenta}Mordu${_cyan}@${_green}${_location}${_cyan}:${_white} $*${_end_color}" +} + +# Echo with new line to add completion messages to _mordu_n +_mordu_nl() { + [ "$_debug" ] && echo -e "${_white}$*${_end_color}" +} + +_mordu "Starting script." +# }}} + +# {{{ +_set_xdg_environment() { + _mordu "Setting XDG Environment Variables." + XDG_CONFIG_HOME="${HOME}/.config" + XDG_CACHE_HOME="${HOME}/.cache" + XDG_DATA_HOME="${HOME}/.local/share" + # The xdg user-dirs below usually aren't handled as Env Vars. I + # find it simplifies things for me right now. + XDG_DESKTOP_DIR="${HOME}/.local/desktop" + XDG_DOCUMENTS_DIR="${HOME}/dox" + XDG_DOWNLOAD_DIR="${HOME}/dl" + XDG_MUSIC_DIR="${HOME}/mzk" + XDG_PICTURES_DIR="${HOME}/pix" + XDG_PROJECTS_DIR="${HOME}/proj" + XDG_PUBLICSHARE_DIR="${HOME}/pub" + XDG_TEMPLATES_DIR="${HOME}/.local/templates" + XDG_VIDEOS_DIR="${HOME}/vidz" +} +# }}} + +# {{{ +_install_xdg_user_dirs() { + # Create ~/.config/user-dirs.dirs based on above. + if ! command -v xdg-user-dirs-update > /dev/null 2>&1; then + _mordu "Installing xdg-user-dirs." + sudo dnf -y install xdg-user-dirs + fi +} +# }}} + +# {{{ +_update_xdg_user_dirs() { + _mordu "Configuring XDG-USER-DIRS with xdg-user-dirs-update." + xdg-user-dirs-update --set DOCUMENTS "$XDG_DOCUMENTS_DIR" + xdg-user-dirs-update --set DESKTOP "$XDG_DESKTOP_DIR" + xdg-user-dirs-update --set DOWNLOAD "$XDG_DOWNLOAD_DIR" + xdg-user-dirs-update --set MUSIC "$XDG_MUSIC_DIR" + xdg-user-dirs-update --set PICTURES "$XDG_PICTURES_DIR" + xdg-user-dirs-update --set TEMPLATES "$XDG_TEMPLATES_DIR" + xdg-user-dirs-update --set VIDEOS "$XDG_VIDEOS_DIR" + xdg-user-dirs-update --set PUBLICSHARE "$XDG_PUBLICSHARE_DIR" +} +# }}} + +# {{{ +# Let's make sure the XDG dirs exist. There is a good argument to +# be made that we keep this mkdir stuff solely in a boostrap +# phase, and not in a login or interactive shell phase of things. +# I will try to see if this helps with my sanity or if it is a bad +# idea later after trying for a while. +_create_xdg_dirs() { + _mordu "Creating XDD-USER-DIRS that do not already exist." + for _xdgdir in "$XDG_CONFIG_HOME" "$XDG_CACHE_HOME" "$XDG_DATA_HOME" \ + "$XDG_DESKTOP_DIR" "$XDG_DOCUMENTS_DIR" "$XDG_DOCUMENTS_DIR" \ + "$XDG_DOWNLOAD_DIR" "$XDG_MUSIC_DIR" "$XDG_PICTURES_DIR" \ + "$XDG_PUBLICSHARE_DIR" "$XDG_TEMPLATES_DIR" "$XDG_VIDEOS_DIR" \ + "$XDG_PROJECTS_DIR" + do + if [ ! -d "$_xdgdir" ]; then + _mordu "Creating $_xdgdir." + mkdir -p "$_xdgdir" + fi + done +} +# }}} + +# {{{ +# There are some directories I want to be sure exist for future use. Some of +# the more basic items I will create here. +_create_extra_xdg_dirs() { + PATH="${HOME}/.local/bin:${PATH}" + GIT_OPT="${HOME}/.local/opt/git" + GIT_PROJ="${HOME}/proj/git" + + # Create user's manual page root if it doesn't exist. + if [ ! -d "${HOME}/.local/share/man" ]; then + _mordu "Creating ${HOME}/.local/share/man." + mkdir -pv "${HOME}/.local/share/man" + fi + + # Create user's binary root if it doesn't exist. + if [ ! -d "${HOME}/.local/bin" ]; then + _mordu "Creating ${HOME}/.local/bin." + mkdir -pv "${HOME}/.local/bin" + fi + + # Create user's less cache dir if it doesn't exist. + if [ ! -d "${HOME}/.cache/less" ]; then + _mordu "Creating ${HOME}/.cache/less." + mkdir -pv "${HOME}/.cache/less" + fi + + # Create user's zsh share dir if it doesn't exist. + if [ ! -d "${HOME}/.local/share/zsh" ]; then + _mordu "Creating ${HOME}/.local/share/zsh." + mkdir -p "${HOME}/.local/share/zsh" + fi + + # Create users git repo root under optional software. + if [ ! -d "$GIT_OPT" ]; then + _mordu "Creating ${GIT_OPT}." + mkdir -p "$GIT_OPT" + fi + + # Create users git repo root under projects. + if [ ! -d "$GIT_PROJ" ]; then + _mordu "Creating ${GIT_PROJ}." + mkdir -p "$GIT_PROJ" + fi +} +# }}} + +# {{{
+_main() { + _set_xdg_environment + _install_xdg_user_dirs + _update_xdg_user_dirs + _create_xdg_dirs + _create_extra_xdg_dirs +} +_main +# }}}
+ +_mordu "Completed script." diff --git a/.config/yadm/shell-minimal.d/02-rpmfusion-setup.sh b/.config/yadm/shell-minimal.d/02-rpmfusion-setup.sh new file mode 100755 index 0000000..59e99cc --- /dev/null +++ b/.config/yadm/shell-minimal.d/02-rpmfusion-setup.sh @@ -0,0 +1,64 @@ +#!/usr/bin/env bash +_location=".config/yadm/shell-minimal.d/02-rpmfusion-setup.sh" + +# {{{ +_debug=y # Comment this out to disable debuging. + +_blue="\e[34m" +_magenta="\e[35m" +_green="\e[92m" +_cyan="\e[36m" +_white="\e[97m" +_end_color="\e[0m" + +# Mordu with location. +_mordu() { + [ "$_debug" ] && echo -e "${_blue}>>> ${_magenta}Mordu${_cyan}@${_green}${_location}${_cyan}:${_white} $*${_end_color}" +} + +# Mordu with location and no new line. +_mordu_n() { + [ "$_debug" ] && echo -en "${_blue}>>> ${_magenta}Mordu${_cyan}@${_green}${_location}${_cyan}:${_white} $*${_end_color}" +} + +# Echo with new line to add completion messages to _mordu_n +_mordu_nl() { + [ "$_debug" ] && echo -e "${_white}$*${_end_color}" +} + +_mordu "Starting script." +# }}} + +# {{{ +_add_rpmfusion_repo() { + _mordu "Adding RPM Fusion Repo." + sudo dnf install -y \ + https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-"$(rpm -E %fedora)".noarch.rpm \ + https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-"$(rpm -E %fedora)".noarch.rpm +} +# }}} + +# {{{ +_update_package_cache() { + _mordu "Updating the local DNF package cache." + sudo dnf makecache --refresh +} +# }}} + +# {{{ +_update_packages() { + _mordu "Updating Fedora packages." + sudo dnf update -y +} +# }}} + +# {{{
+_main() { + _add_rpmfusion_repo + _update_package_cache + _update_packages +} +_main +# }}}
+ +_mordu "Completed script." diff --git a/.config/yadm/shell-minimal.d/03-install-fedora-packages.sh b/.config/yadm/shell-minimal.d/03-install-fedora-packages.sh new file mode 100755 index 0000000..a4fdfb6 --- /dev/null +++ b/.config/yadm/shell-minimal.d/03-install-fedora-packages.sh @@ -0,0 +1,117 @@ +#!/usr/bin/env bash +_location=".config/yadm/shell-minimal.d/03-install-fedora-packages.sh" + +# {{{ +_debug=y # Comment this out to disable debuging. + +_blue="\e[34m" +_magenta="\e[35m" +_green="\e[92m" +_cyan="\e[36m" +_white="\e[97m" +_end_color="\e[0m" + +# Mordu with location. +_mordu() { + [ "$_debug" ] && echo -e "${_blue}>>> ${_magenta}Mordu${_cyan}@${_green}${_location}${_cyan}:${_white} $*${_end_color}" +} + +# Mordu with location and no new line. +_mordu_n() { + [ "$_debug" ] && echo -en "${_blue}>>> ${_magenta}Mordu${_cyan}@${_green}${_location}${_cyan}:${_white} $*${_end_color}" +} + +# Echo with new line to add completion messages to _mordu_n +_mordu_nl() { + [ "$_debug" ] && echo -e "${_white}$*${_end_color}" +} + +_mordu "Starting script." +# }}} + +# {{{ +_define_packages() { + _editors=(neovim vim-enhanced visidata) + _shell_utils=(lolcat tmux ripgrep nnn fastfetch zsh moreutils thefuck bat \ + kitty-terminfo eza fd-find fzf zoxide) + _entertainment=(fortune-mod) + _net=(aria2 wget2 bind-utils NetworkManager-tui traceroute nmap netcat rsync) + _development=(git make autoconf automake patch bzip2 xz findutils) + _system=(htop bpytop diskonaut chkconfig) + _packages=("${_editors[@]}" "${_shell_utils[@]}" "${_entertainment[@]}" \ + "${_development[@]}" "${_net[@]}" "${_system[@]}") +} +# }}} + +# {{{ +_install_pkgs() { + local __required_packages=("$@") + + for __package in "${__required_packages[@]}" ; do + if [[ $(rpm -qi "${__package//\"/}") == "package ${__package//\"/} is not installed" ]] ; then + _mordu "Not installed yet: ${__package}." + __not_installed_yet+=( "$__package" ) + else + _mordu "Already installed: ${__package}." + fi + done + _mordu "Total not installed yet: ${__not_installed_yet[*]}" + + if (( ${#__not_installed_yet[@]} )); then + sudo dnf -y install "${__not_installed_yet[@]}" + fi +} +# }}} + +# {{{ +# Define the package groups you want to install +_define_pkg_groups() { + _pkg_groups=(\ + "Container Management" \ + "Development Tools" \ + "Standard" \ + "Hardware Support") +} +# }}} + +# {{{ +# Function to install package groups if not already installed +_install_pkg_groups() { + local __required_pkg_groups=("$@") + local __not_installed_yet=() + + # Get the list of installed package groups + local __installed_groups + __installed_groups=$(dnf group list --hidden installed | awk '/Installed Groups:/,/^$/' | sed '1d' | sed 's/^[ \t]*//') + + for __group in "${__required_pkg_groups[@]}"; do + if echo "$__installed_groups" | grep -q "^${__group}$"; then + _mordu "Already installed: ${__group}." + else + _mordu "Not installed yet: ${__group}." + __not_installed_yet+=( "$__group" ) + fi + done + + _mordu "Total not installed yet: ${__not_installed_yet[*]}" + + if (( ${#__not_installed_yet[@]} )); then + sudo dnf -y group install "${__not_installed_yet[@]}" + fi +} +# }}} + +# {{{
+_main() { + # Install Fedora packages. + _define_packages + _install_pkgs "${_packages[@]}" + + # Install Fedora package groups + _define_pkg_groups + _install_pkg_groups "${_pkg_groups[@]}" +} +_main +# }}}
+ +_mordu "Completed script." diff --git a/.config/yadm/shell-minimal.d/04-install-go-stuff.sh b/.config/yadm/shell-minimal.d/04-install-go-stuff.sh new file mode 100755 index 0000000..4f573a4 --- /dev/null +++ b/.config/yadm/shell-minimal.d/04-install-go-stuff.sh @@ -0,0 +1,71 @@ +#!/usr/bin/env bash +_location=".config/yadm/shell-minimal.d/04-install-go-stuff.sh" +export GOPATH="${HOME}/.local/opt/go" + +# {{{ +_debug=y # Comment this out to disable debuging. + +_blue="\e[34m" +_magenta="\e[35m" +_green="\e[92m" +_cyan="\e[36m" +_white="\e[97m" +_end_color="\e[0m" + +# Mordu with location. +_mordu() { + [ "$_debug" ] && echo -e "${_blue}>>> ${_magenta}Mordu${_cyan}@${_green}${_location}${_cyan}:${_white} $*${_end_color}" +} + +# Mordu with location and no new line. +_mordu_n() { + [ "$_debug" ] && echo -en "${_blue}>>> ${_magenta}Mordu${_cyan}@${_green}${_location}${_cyan}:${_white} $*${_end_color}" +} + +# Echo with new line to add completion messages to _mordu_n +_mordu_nl() { + [ "$_debug" ] && echo -e "${_white}$*${_end_color}" +} + +_mordu "Starting script." +# }}} + +# {{{ +_install_golang() { + _mordu_n "Checking for go.." + if command -v go > /dev/null 2>&1 ; then + _mordu_nl "..Found. Not installing." + else + _mordu "..Not found. Installing go." + sudo dnf install -y golang + fi +} +# }}} + +# {{{ +## Make sure the binary directory exists already. +_install_go_packages() { + if [ ! -d "${GOPATH}/bin" ]; then + _mordu "Did not find ${GOPATH}/bin. Creating." + mkdir -p "$GOPATH"/bin + fi + + ## Install Ghq + if [ -f "${GOPATH}/bin/ghq" ]; then + _mordu "Ghq already installed." + else + _mordu "Installing Ghq." + go install github.com/x-motemen/ghq@latest + fi +} +# }}} + +# {{{
+_main() { + _install_golang + _install_go_packages +} +_main +# }}}
+ +_mordu "Completed script." diff --git a/.config/yadm/shell-minimal.d/05-zsh.sh b/.config/yadm/shell-minimal.d/05-zsh.sh new file mode 100755 index 0000000..f6bb7de --- /dev/null +++ b/.config/yadm/shell-minimal.d/05-zsh.sh @@ -0,0 +1,103 @@ +#!/usr/bin/env bash +_location=".config/yadm/shell-minimal.d/05-zsh.sh" +export GHQ_ROOT="${HOME}/.local/opt/git" +_ghq="${HOME}/.local/opt/go/bin/ghq" + +# {{{ +_debug=y # Comment this out to disable debuging. + +_blue="\e[34m" +_magenta="\e[35m" +_green="\e[92m" +_cyan="\e[36m" +_white="\e[97m" +_end_color="\e[0m" + +# Mordu with location. +_mordu() { + [ "$_debug" ] && echo -e "${_blue}>>> ${_magenta}Mordu${_cyan}@${_green}${_location}${_cyan}:${_white} $*${_end_color}" +} + +# Mordu with location and no new line. +_mordu_n() { + [ "$_debug" ] && echo -en "${_blue}>>> ${_magenta}Mordu${_cyan}@${_green}${_location}${_cyan}:${_white} $*${_end_color}" +} + +# Echo with new line to add completion messages to _mordu_n +_mordu_nl() { + [ "$_debug" ] && echo -e "${_white}$*${_end_color}" +} + +_mordu "Starting script." +# }}} + +# {{{ +_clone_zinit() { + ZINIT_HOME="${HOME}/.local/share/zinit/zinit.git" + local __repo="git.mgk.one/zsh/zdharma-continuum.zinit" + local _zinit_opt="${GHQ_ROOT}/${__repo}" + + if ! $_ghq list | grep -q "$__repo" ; then + _mordu "Git cloning zinit." + $_ghq get "${__repo}" + else + _mordu "Found repo ${__repo}. Updating." + $_ghq get -u "${__repo}" + fi + + if [ ! -d "${HOME}/.local/share/zinit" ]; then + _mordu "Creating .local/share/zinit." + mkdir -p "${HOME}/.local/share/zinit" + fi + + if [ ! -e "$ZINIT_HOME" ]; then + _mordu "Linking the zinit repo to ${ZINIT_HOME}." + ln -sr "$_zinit_opt" "$ZINIT_HOME" + fi +} +# }}} + +# {{{ +_define_zsh_plugins() { + _zsh_plugins=(\ + zdharma-continuum.zinit-annex-meta-plugins \ + zdharma-continuum.zinit-annex-bin-gem-node \ + zdharma-continuum.zinit-annex-patch-dl \ + zdharma-continuum.zinit-annex-rust \ + zdharma-continuum.fast-syntax-highlighting \ + zdharma-continuum.history-search-multi-word \ + zsh-users.zsh-completions \ + zsh-users.zsh-autosuggestions \ + aloxaf.fzf-tab \ + joshskidmore.zsh-fzf-history-search \ + romkatv.powerlevel10k-media \ + romkatv.powerlevel10k) +} +# }}} + +# {{{ +_clone_zsh_plugins() { + for _plugin in "${_zsh_plugins[@]}" ; do + local __repo="git.mgk.one/zsh/${_plugin}" + + if $_ghq list | grep -q "$__repo" ; then + _mordu "Found existing clone of ${__repo}. Updating." + $_ghq get -u "$__repo" + else + _mordu "Could not find ${__repo}. Installing." + $_ghq get "$__repo" + fi + done +} +# }}} + +# {{{
+_main() { + _clone_zinit + _define_zsh_plugins + _clone_zsh_plugins +} +_main +# }}}
+ +_mordu "Completed script." diff --git a/.config/yadm/shell-minimal.d/06-tmux.sh b/.config/yadm/shell-minimal.d/06-tmux.sh new file mode 100755 index 0000000..3dd5492 --- /dev/null +++ b/.config/yadm/shell-minimal.d/06-tmux.sh @@ -0,0 +1,104 @@ +#!/usr/bin/env bash +_location=".config/yadm/shell-minimal.d/06-tmux.sh" +_ghq="${HOME}/.local/opt/go/bin/ghq" + +# {{{ +_debug=y # Comment this out to disable debuging. + +_blue="\e[34m" +_magenta="\e[35m" +_green="\e[92m" +_cyan="\e[36m" +_white="\e[97m" +_end_color="\e[0m" + +# Mordu with location. +_mordu() { + [ "$_debug" ] && echo -e "${_blue}>>> ${_magenta}Mordu${_cyan}@${_green}${_location}${_cyan}:${_white} $*${_end_color}" +} + +# Mordu with location and no new line. +_mordu_n() { + [ "$_debug" ] && echo -en "${_blue}>>> ${_magenta}Mordu${_cyan}@${_green}${_location}${_cyan}:${_white} $*${_end_color}" +} + +# Echo with new line to add completion messages to _mordu_n +_mordu_nl() { + [ "$_debug" ] && echo -e "${_white}$*${_end_color}" +} + +_mordu "Starting script." +# }}} + +# {{{ +_define_tmux_plugins() { + _tmux_plugins=(\ + tmux-plugins.tpm \ + tmux-plugins.tmux-sensible \ + o0th.tmux-nova \ + tmux-plugins.tmux-battery \ + imomaliev.tmux-keyboard-layout \ + tmux-plugins.tmux-yank \ + tmux-plugins.tmux-cpu \ + tmux-plugins.tmux-resurrect \ + tmux-plugins.tmux-continuum \ + crispyconductor.tmux-copy-toolkit \ + roosta.tmux-fuzzback \ + jaclu.tmux-power-zoom \ + jabirali.tmux-tilish \ + sunaku.tmux-navigate \ + tmux-plugins.tmux-logging + thewtex.tmux-mem-cpu-load) +} +# }}} + +# {{{ +_clone_tmux_plugins() { + _mordu "Cloning tmux plugins." + if [ ! -d "${HOME}/.config/tmux/plugins" ] ; then + _mordu "Did not find a tmux plugins directory. Creating." + mkdir -p "${HOME}/.config/tmux/plugins" + fi + + for _plugin in "${_tmux_plugins[@]}" ; do + local __repo="git.mgk.one/tmux/${_plugin}" + + _mordu "Checking for plugin ${__repo}." + if $_ghq list | grep -q "$__repo" ; then + _mordu "Found existing clone of ${__repo}. Updating." + $_ghq get -u "$__repo" + else + _mordu "Could not find ${_plugin}." + $_ghq get "$__repo" + fi + + _mordu "Checking for ${_plugin} link." + if [ -e ~/.config/tmux/plugins/"${_plugin}" ] ; then + _mordu "Found ${_plugin} link." + else + _mordu "Could not find ${_plugin} link." + ln -sr "${HOME}/.local/opt/git/${__repo}" \ + "${HOME}/.config/tmux/plugins/${_plugin}" + fi + done +} +# }}} + +# {{{ +_install_tmux_plugins() { + export TMUX_PLUGIN_MANAGER_PATH="${HOME}/.config/tmux/plugins/" + _mordu "Calling 'install_plugins' to install tmux plugins." + "${HOME}/.config/tmux/plugins/tmux-plugins.tpm/bin/install_plugins" +} +# }}} + +# {{{
+_main() { + _define_tmux_plugins + _clone_tmux_plugins + _install_tmux_plugins +} +_main +# }}}
+ +_mordu "Completed script." diff --git a/.config/yadm/shell-minimal.d/07-vim.sh b/.config/yadm/shell-minimal.d/07-vim.sh new file mode 100755 index 0000000..fe70749 --- /dev/null +++ b/.config/yadm/shell-minimal.d/07-vim.sh @@ -0,0 +1,173 @@ +#!/usr/bin/env bash +_location=".config/yadm/shell-minimal.d/07-vim.sh" +_ghq="${HOME}/.local/opt/go/bin/ghq" + +# {{{ +_debug=y # Comment this out to disable debuging. + +_blue="\e[34m" +_magenta="\e[35m" +_green="\e[92m" +_cyan="\e[36m" +_white="\e[97m" +_end_color="\e[0m" + +# Mordu with location. +_mordu() { + [ "$_debug" ] && echo -e "${_blue}>>> ${_magenta}Mordu${_cyan}@${_green}${_location}${_cyan}:${_white} $*${_end_color}" +} + +# Mordu with location and no new line. +_mordu_n() { + [ "$_debug" ] && echo -en "${_blue}>>> ${_magenta}Mordu${_cyan}@${_green}${_location}${_cyan}:${_white} $*${_end_color}" +} + +# Echo with new line to add completion messages to _mordu_n +_mordu_nl() { + [ "$_debug" ] && echo -e "${_white}$*${_end_color}" +} + +_mordu "Starting script." +# }}} + +# {{{ +_clone_vim_plug() { + # Download Vim-Plug if it isn't already. + local __repo="git.mgk.one/vim/junegunn.vim-plug" + + _mordu_n "Checking ro cloned ${__repo}.." + if $_ghq list | grep -q "$__repo" ; then + _mordu_nl "..Found. Updating." + $_ghq get -u "$__repo" + else + _mordu_n "Not found. Cloning." + $_ghq get "$__repo" + fi +} +# }}} + +# {{{ +_create_autoload_directories() { + # Make sure the autoload directories exist for vim and nvim. + _mordu "Creating autoload directories." + if [ -d "${HOME}/.config/vim/autoload" ] ; then + _mordu "Vim autoload dir already exists." + else + _mordu "Creating vim autoload dir." + mkdir -p "${HOME}/.config/vim/autoload" + fi + if [ -d "${HOME}/.config/nvim/autoload" ] ; then + _mordu "Neovim autoload dir already exists." + else + _mordu "Creating neovim autoload dir." + mkdir -p "${HOME}/.config/nvim/autoload" + fi + _mordu "Finished creating autoload directories." +} +# }}} + +# {{{ +_link_vim_plug_to_autoloads() { + local __opt_plug_vim="${HOME}/.local/opt/git/git.mgk.one/vim/junegunn.vim-plug/plug.vim" + + # Add Vim-Plug to vim's autoload dir if it isn't already. + _mordu_n "Checking for vim's vim-plug link.." + if [ -f "${HOME}/.config/vim/autoload/plug.vim" ] ; then + _mordu_nl "..Found." + else + _mordu_nl "..Not found. Linking." + ln -sr "$__opt_plug_vim" "${HOME}/.config/vim/autoload/plug.vim" + fi + + # Add Vim-Plug to neovim's autoload dir if it isn't already. + _mordu_n "Checking for neovim's vim-plug link.." + if [ -f "${HOME}/.config/nvim/autoload/plug.vim" ] ; then + _mordu_nl "..Found." + else + _mordu_nl "..Not found. Linking." + ln -sr "$__opt_plug_vim" "${HOME}/.config/nvim/autoload/plug.vim" + fi +} +# }}} + +# {{{ +_define_vim_plugins() { + _mordu "Defining vim plugin list." + _vim_plugins=(\ + git.mgk.one/vim/bourgeoisbear.clrzr \ + git.mgk.one/vim/khaveesh.vim-fish-syntax \ + git.mgk.one/vim/tpope.vim-surround \ + git.mgk.one/vim/tpope.vim-repeat) +} +# }}} + +# {{{ +_clone_vim_plugins() { + _mordu "Cloning vim plugins." + for __vim_plugin in "${_vim_plugins[@]}" ; do + local __repo="$__vim_plugin" + + _mordu_n "Checking for ${__repo}.." + if [ -d "${HOME}/.local/opt/git/${__repo}" ]; then + _mordu_nl "..Found. Updating." + $_ghq get -u "$__repo" + else + _mordu_nl "..Not found. Cloning." + $_ghq get "$__repo" + fi + done +} +# }}} + +# {{{ +_define_neovim_plugins() { + _mordu "Defining neovim plugin list." + _neovim_plugins=(\ + git.mgk.one/nvim/norcalli.nvim-colorizer.lua \ + git.mgk.one/nvim/ishan9299.modus-theme-vim) +} +# }}} + +# {{{ +_clone_neovim_plugins() { + _mordu "Cloning neovim plugins." + for __neovim_plugin in "${_neovim_plugins[@]}" ; do + local __repo="$__neovim_plugin" + + _mordu_n "Checking for ${__repo}.." + if [ -d "${HOME}/.local/opt/git/${__repo}" ]; then + _mordu_nl "..Found. Updating." + $_ghq get -u "$__repo" + else + _mordu_nl "..Not found. Cloning." + $_ghq get "$__repo" + fi + done +} +# }}} + +# {{{ +_run_vim_plug_install() { + _mordu "Calling PlugInstall for vim." + vim +PlugInstall +qall + + _mordu "Calling PlugInstall for nvim." + nvim +PlugInstall +qall +} +# }}} + +# {{{
+_main() { + _clone_vim_plug + _create_autoload_directories + _link_vim_plug_to_autoloads + _define_vim_plugins + _clone_vim_plugins + _define_neovim_plugins + _clone_neovim_plugins + _run_vim_plug_install +} +_main +# }}}
+ +_mordu "Completed script." diff --git a/.config/yadm/shell-minimal.d/08-misc.sh b/.config/yadm/shell-minimal.d/08-misc.sh new file mode 100755 index 0000000..28d870d --- /dev/null +++ b/.config/yadm/shell-minimal.d/08-misc.sh @@ -0,0 +1,152 @@ +#!/usr/bin/env bash +_location=".config/yadm/shell-minimal.d/08-misc.sh" +export GHQ_ROOT="${HOME}/.local/opt/git" +_ghq="${HOME}/.local/opt/go/bin/ghq" + +# {{{ +_debug=y # Comment this out to disable debuging. + +_blue="\e[34m" +_magenta="\e[35m" +_green="\e[92m" +_cyan="\e[36m" +_white="\e[97m" +_end_color="\e[0m" + +# Mordu with location. +_mordu() { + [ "$_debug" ] && echo -e "${_blue}>>> ${_magenta}Mordu${_cyan}@${_green}${_location}${_cyan}:${_white} $*${_end_color}" +} + +# Mordu with location and no new line. +_mordu_n() { + [ "$_debug" ] && echo -en "${_blue}>>> ${_magenta}Mordu${_cyan}@${_green}${_location}${_cyan}:${_white} $*${_end_color}" +} + +# Echo with new line to add completion messages to _mordu_n +_mordu_nl() { + [ "$_debug" ] && echo -e "${_white}$*${_end_color}" +} + +_mordu "Starting script." +# }}} + +# {{{ +# Function for testing if a repo was just updated or not. +_was_repo_updated() { + __repo_path="$1" + + cd "$__repo_path" || exit + + __fetch_head_time=$(stat -c %Y .git/ORIG_HEAD) + __current_time=$(date +%s) + __time_diff=$((__current_time - __fetch_head_time)) + + _mordu "Fetch Head Time: $__fetch_head_time" + _mordu "Current Time: $__current_time" + _mordu "Time Diff: $__time_diff" + + if [ "$__time_diff" -le 60 ]; then + return 0 # True + else + return 1 # False + fi +} +# }}} + +# {{{ +_install_bat_extras() { + local __repo="git.mgk.one/utils-shell/eth-p.bat-extras" + + # Check if the repo already exists or not. + _mordu_n "Checking for ${__repo}.." + if $_ghq list | grep -q "$__repo" ; then + _mordu_nl "..Found. Updating." + $_ghq get -u "$__repo" + else + _mordu_nl "Not Found. Installing." + $_ghq get "$__repo" + fi + + # Check if the repo needs to be rebuilt or not. + if _was_repo_updated "${GHQ_ROOT}/${__repo}" ; then + _mordu "The repo ${__repo} was updated recently." + cd "${GHQ_ROOT}/${__repo}" || exit + ./build.sh --install --prefix="${HOME}/.local/" --minify=none + cd || exit + else + _mordu "The repo ${__repo} was not updated recently." + fi +} +# }}} + +# {{{ +_install_and_update_ls_colors() { + local __repo="git.mgk.one/utils-shell/trapd00r.LS_COLORS" + + _mordu "Checking for ${__repo}.." + if $_ghq list | grep -q "$__repo" ; then + _mordu_nl "..Found. Updating." + $_ghq get -u "${__repo}" + else + _mordu "Not Found. Installing." + $_ghq get "${__repo}" + fi + + # Check if the repo needs to be rebuilt or not. + if _was_repo_updated "${GHQ_ROOT}/${__repo}" ; then + _mordu "The repo ${__repo} was updated recently." + + # Generate the LS_COLORS script I use for my shell init. + _mordu "Generating lscolors.sh from LS_COLORS." + dircolors -b "${HOME}/.config/posix-common/LS_COLORS" \ + > "${HOME}/.config/posix-common/lscolors.sh" + + # Search and replace the blue used for directories with my preference. + sed -i 's/di=38;5;30/di=01;34/' "${HOME}/.config/posix-common/lscolors.sh" + sed -i 's/ln=target/ln=01;36/' "${HOME}/.config/posix-common/lscolors.sh" + + # Ensure the lscolors.sh script is executable. + _mordu "Ensuring lscolors.sh is executable." + chmod +x "${HOME}/.config/posix-common/lscolors.sh" + cd || exit + else + _mordu "The repo ${__repo} was not updated recently." + fi +} +# }}} + +# {{{ +_install_ugit() { + local __repo="git.mgk.one/utils-code/bhupesh-v.ugit" + + _mordu_n "Checking for ${__repo}.." + if $_ghq list | grep -q "$__repo" ; then + _mordu_nl "..Found. Updating." + $_ghq get -u "$__repo" + else + _mordu_nl "Not Found. Installing." + $_ghq get "$__repo" + fi + + _mordu_n "Checking for ugit binary link.." + if [ -L "${HOME}/.local/bin/ugit" ]; then + _mordu_nl "..Found. Not linking." + else + _mordu_nl "..Not Found. Linking." + ln -sr "${GHQ_ROOT}/${__repo}/ugit" \ + "${HOME}/.local/bin/ugit" + fi +} +# }}} + +# {{{
+_main() { + _install_bat_extras + _install_and_update_ls_colors + _install_ugit +} +_main +# }}}
+ +_mordu "Completed script." diff --git a/.config/yadm/workstation-extras.d/01-install-fedora-packages.sh b/.config/yadm/workstation-extras.d/01-install-fedora-packages.sh new file mode 100755 index 0000000..6cab3eb --- /dev/null +++ b/.config/yadm/workstation-extras.d/01-install-fedora-packages.sh @@ -0,0 +1,111 @@ +#!/usr/bin/env bash +_location=".config/yadm/workstation-extras.d/01-install-fedora-packages.sh" + +# {{{ +_debug=y # Comment this out to disable debuging. + +_blue="\e[34m" +_magenta="\e[35m" +_green="\e[92m" +_cyan="\e[36m" +_white="\e[97m" +_end_color="\e[0m" + +# Mordu with location. +_mordu() { + [ "$_debug" ] && echo -e "${_blue}>>> ${_magenta}Mordu${_cyan}@${_green}${_location}${_cyan}:${_white} $*${_end_color}" +} + +# Mordu with location and no new line. +_mordu_n() { + [ "$_debug" ] && echo -en "${_blue}>>> ${_magenta}Mordu${_cyan}@${_green}${_location}${_cyan}:${_white} $*${_end_color}" +} + +# Echo with new line to add completion messages to _mordu_n +_mordu_nl() { + [ "$_debug" ] && echo -e "${_white}$*${_end_color}" +} + +_mordu "Starting script." +# }}} + +# {{{ +_define_packages() { + _packages=(\ + wireshark) +} +# }}} + +# {{{ +_install_pkgs() { + local __required_packages=("$@") + + for __package in "${__required_packages[@]}" ; do + if [[ $(rpm -qi "${__package//\"/}") == "package ${__package//\"/} is not installed" ]] ; then + _mordu "Not installed yet: ${__package}." + __not_installed_yet+=( "$__package" ) + else + _mordu "Already installed: ${__package}." + fi + done + _mordu "Total not installed yet: ${__not_installed_yet[*]}" + + if (( ${#__not_installed_yet[@]} )); then + sudo dnf -y install "${__not_installed_yet[@]}" + fi +} +# }}} + +# {{{ +# Define the package groups you want to install +_define_pkg_groups() { + _pkg_groups=(\ + "Sound and Video" \ + "LibreOffice" \ + "Security Lab" \ + "Fonts" \ + "Multimedia") +} +# }}} + +# {{{ +# Function to install package groups if not already installed +_install_pkg_groups() { + local __required_pkg_groups=("$@") + local __not_installed_yet=() + + # Get the list of installed package groups + local __installed_groups + __installed_groups=$(dnf group list --hidden installed | awk '/Installed Groups:/,/^$/' | sed '1d' | sed 's/^[ \t]*//') + + for __group in "${__required_pkg_groups[@]}"; do + if echo "$__installed_groups" | grep -q "^${__group}$"; then + _mordu "Already installed: ${__group}." + else + _mordu "Not installed yet: ${__group}." + __not_installed_yet+=( "$__group" ) + fi + done + + _mordu "Total not installed yet: ${__not_installed_yet[*]}" + + if (( ${#__not_installed_yet[@]} )); then + sudo dnf -y group install "${__not_installed_yet[@]}" + fi +} +# }}} + +# {{{
+_main() { + # Install Fedora packages + _define_packages + _install_pkgs "${_packages[@]}" + + # Install Fedora package groups + _define_pkg_groups + _install_pkg_groups "${_pkg_groups[@]}" +} +_main +# }}}
+ +_mordu "Completed script." diff --git a/.config/yadm/workstation-extras.d/02-fonts.sh b/.config/yadm/workstation-extras.d/02-fonts.sh new file mode 100755 index 0000000..1c98f5b --- /dev/null +++ b/.config/yadm/workstation-extras.d/02-fonts.sh @@ -0,0 +1,74 @@ +#!/usr/bin/env bash +_location=".config/yadm/workstation-extras.d/02-fonts.sh" +GHQ_ROOT="${HOME}/.local/opt/git" +_ghq="${HOME}/.local/opt/go/bin/ghq" + +# {{{ +_debug=y # Comment this out to disable debuging. + +_blue="\e[34m" +_magenta="\e[35m" +_green="\e[92m" +_cyan="\e[36m" +_white="\e[97m" +_end_color="\e[0m" + +# Mordu with location. +_mordu() { + [ "$_debug" ] && echo -e "${_blue}>>> ${_magenta}Mordu${_cyan}@${_green}${_location}${_cyan}:${_white} $*${_end_color}" +} + +# Mordu with location and no new line. +_mordu_n() { + [ "$_debug" ] && echo -en "${_blue}>>> ${_magenta}Mordu${_cyan}@${_green}${_location}${_cyan}:${_white} $*${_end_color}" +} + +# Echo with new line to add completion messages to _mordu_n +_mordu_nl() { + [ "$_debug" ] && echo -e "${_white}$*${_end_color}" +} + +_mordu "Starting script." +# }}} + +# {{{ +_install_nerd_fonts() { + local __repo="git.mgk.one/fonts/ryanoasis.nerd-fonts" + + _mordu_n "Checking for nerd-fonts.." + if $_ghq list | grep -q "$__repo" ; then + _mordu_nl "..Found. Updating." + $_ghq get -u --shallow "$__repo" + else + _mordu_nl "Not Found. Installing." + $_ghq get --shallow "$__repo" + fi + + _mordu_nl "Checking to see if Nerd Fonts are already installed to ~/.local/share/fonts/." + if [ ! -d "${HOME}/.local/share/fonts/NerdFonts" ]; then + _mordu_nl "Could not locate ${HOME}/.local/share/fonts/NerdFonts." + _mordu_nl "Running the Nerd Fonts install script." + "${GHQ_ROOT}/${__repo}/install.sh" -l + else + _mordu_nl "Nerd Fonts found already linked at ${HOME}/.local/share/fonts/NerdFonts. Not linking." + fi +} +# }}} + +# {{{ +_regen_fonts() { + _mordu_n "Regenerating font cache.." + fc-cache + _mordu_nl "..Done." +} +# }}} + +# {{{
+_main() { + _install_nerd_fonts + _regen_fonts +} +_main +# }}}
+ +_mordu "Completed script." diff --git a/.config/yadm/workstation-minimal.d/01-install-fedora-packages.sh b/.config/yadm/workstation-minimal.d/01-install-fedora-packages.sh new file mode 100755 index 0000000..00b2267 --- /dev/null +++ b/.config/yadm/workstation-minimal.d/01-install-fedora-packages.sh @@ -0,0 +1,107 @@ +#!/usr/bin/env bash +_location=".config/yadm/workstation-minimal.d/01-install-fedora-packages.sh" + +# {{{ +_debug=y # Comment this out to disable debuging. + +_blue="\e[34m" +_magenta="\e[35m" +_green="\e[92m" +_cyan="\e[36m" +_white="\e[97m" +_end_color="\e[0m" + +# Mordu with location. +_mordu() { + [ "$_debug" ] && echo -e "${_blue}>>> ${_magenta}Mordu${_cyan}@${_green}${_location}${_cyan}:${_white} $*${_end_color}" +} + +# Mordu with location and no new line. +_mordu_n() { + [ "$_debug" ] && echo -en "${_blue}>>> ${_magenta}Mordu${_cyan}@${_green}${_location}${_cyan}:${_white} $*${_end_color}" +} + +# Echo with new line to add completion messages to _mordu_n +_mordu_nl() { + [ "$_debug" ] && echo -e "${_white}$*${_end_color}" +} + +_mordu "Starting script." +# }}} + +# {{{ +_define_packages() { + _packages=(blueman firefox ffmpeg vlc-plugin-pipewire vlc-plugin-ffmpeg \ + feh mpv awesome) + } +# }}} + +# {{{ +_install_pkgs() { + local __required_packages=("$@") + + for __package in "${__required_packages[@]}" ; do + if [[ $(rpm -qi "${__package//\"/}") == "package ${__package//\"/} is not installed" ]] ; then + _mordu "Not installed yet: ${__package}." + __not_installed_yet+=( "$__package" ) + else + _mordu "Already installed: ${__package}." + fi + done + _mordu "Total not installed yet: ${__not_installed_yet[*]}" + + if (( ${#__not_installed_yet[@]} )); then + sudo dnf -y install "${__not_installed_yet[@]}" + fi +} +# }}} + +# {{{ +# Define the package groups you want to install +_define_pkg_groups() { + _pkg_groups=(\ + "VideoLAN Client") +} +# }}} + +# {{{ +# Function to install package groups if not already installed +_install_pkg_groups() { + local __required_pkg_groups=("$@") + local __not_installed_yet=() + + # Get the list of installed package groups + local __installed_groups + __installed_groups=$(dnf group list --hidden installed | awk '/Installed Groups:/,/^$/' | sed '1d' | sed 's/^[ \t]*//') + + for __group in "${__required_pkg_groups[@]}"; do + if echo "$__installed_groups" | grep -q "^${__group}$"; then + _mordu "Already installed: ${__group}." + else + _mordu "Not installed yet: ${__group}." + __not_installed_yet+=( "$__group" ) + fi + done + + _mordu "Total not installed yet: ${__not_installed_yet[*]}" + + if (( ${#__not_installed_yet[@]} )); then + sudo dnf -y group install "${__not_installed_yet[@]}" + fi +} +# }}} + +# {{{
+_main() { + # Install Fedora packages + _define_packages + _install_pkgs "${_packages[@]}" + + # Install Fedora package groups + _define_pkg_groups + _install_pkg_groups "${_pkg_groups[@]}" +} +_main +# }}}
+ +_mordu "Completed script." diff --git a/.config/yadm/workstation-minimal.d/02-fonts.sh b/.config/yadm/workstation-minimal.d/02-fonts.sh new file mode 100755 index 0000000..dfbc9d3 --- /dev/null +++ b/.config/yadm/workstation-minimal.d/02-fonts.sh @@ -0,0 +1,112 @@ +#!/usr/bin/env bash +_location=".config/yadm/workstation-minimal.d/02-fonts.sh" +export GHQ_ROOT="${HOME}/.local/opt/git" +_ghq="${HOME}/.local/opt/go/bin/ghq" + +# {{{ +_debug=y # Comment this out to disable debuging. + +_blue="\e[34m" +_magenta="\e[35m" +_green="\e[92m" +_cyan="\e[36m" +_white="\e[97m" +_end_color="\e[0m" + +# Mordu with location. +_mordu() { + [ "$_debug" ] && echo -e "${_blue}>>> ${_magenta}Mordu${_cyan}@${_green}${_location}${_cyan}:${_white} $*${_end_color}" +} + +# Mordu with location and no new line. +_mordu_n() { + [ "$_debug" ] && echo -en "${_blue}>>> ${_magenta}Mordu${_cyan}@${_green}${_location}${_cyan}:${_white} $*${_end_color}" +} + +# Echo with new line to add completion messages to _mordu_n +_mordu_nl() { + [ "$_debug" ] && echo -e "${_white}$*${_end_color}" +} + +_mordu "Starting script." +# }}} + +# {{{ +_install_iosevka_comfy() { + local __repo="git.mgk.one/fonts/protesilaos.iosevka-comfy" + + _mordu_n "Checking for iosevka-comfy.." + if $_ghq list | grep -q "$__repo" ; then + _mordu_nl "..Found." + else + _mordu_nl "Not Found. Installing." + $_ghq get --shallow "$__repo" + fi + + _mordu "Linking font directories from git to share." + for __font_dir in "${GHQ_ROOT}/${__repo}/"*/ ; do + # Remove trailing slash from dir. + __font_dir=${__font_dir%/} + __font=$(basename "$__font_dir") + _mordu_nl "Processing font_dir: ${__font_dir}." + _mordu_nl "Processing font: $__font." + if [ ! -d "${HOME}/.local/share/fonts/${__font}" ]; then + _mordu_nl "Could not find ${HOME}/.local/share/fonts/${__font}." + _mordu_nl "Linking ${__font_dir} to ${HOME}/.local/share/fonts/" + ln -sr "$__font_dir" "${HOME}/.local/share/fonts/$__font" + else + _mordu_nl "Located ${HOME}/.local/share/fonts/${__font_dir}. Not linking." + fi + done +} +# }}} + +# {{{ +_install_meslo() { + local __repo="git.mgk.one/fonts/romkatv.powerlevel10k-media" + + _mordu_n "Checking for powerlevel10k-media.." + if $_ghq list | grep -q "$__repo" ; then + _mordu_nl "..Found. Updating." + $_ghq get -u "$__repo" + else + _mordu_nl "Not Found. Installing." + $_ghq get "$__repo" + fi + + for __font_loc in "${GHQ_ROOT}/${__repo}/"*.ttf ; do + __font_ttf=$(basename "$__font_loc") + + _mordu_nl "Processing font located at: $__font_loc." + _mordu_nl "Processing font: $__font_ttf." + _mordu_nl "Checking if ${__font_ttf} exists in ${HOME}/.local/share/fonts/." + + if [ ! -e "${HOME}/.local/share/fonts/${__font_ttf}" ] ; then + _mordu_nl "Could not find ${HOME}/.local/share/fonts/${__font_ttf}." + _mordu_nl "Linking ${__font_loc} to ${HOME}/.local/share/fonts/${__font_ttf}." + ln -sr "$__font_loc" "${HOME}/.local/share/fonts/${__font_ttf}" + else + _mordu_nl "Found ${HOME}/.local/share/fonts/${__font_ttf}. Not linking." + fi + done +} +# }}} + +# {{{ +_regen_fonts() { + _mordu_n "Regenerating font cache.." + fc-cache + _mordu_nl "..Done." +} +# }}} + +# {{{
+_main() { + _install_iosevka_comfy + _install_meslo + _regen_fonts +} +_main +# }}}
+ +_mordu "Completed script." diff --git a/.config/yadm/workstation-minimal.d/03-kitty.sh b/.config/yadm/workstation-minimal.d/03-kitty.sh new file mode 100755 index 0000000..5bf0412 --- /dev/null +++ b/.config/yadm/workstation-minimal.d/03-kitty.sh @@ -0,0 +1,53 @@ +#!/usr/bin/env bash +_location=".config/yadm/workstation-minimal.d/03-kitty.sh" +_ghq="${HOME}/.local/opt/go/bin/ghq" + +# {{{ +_debug=y # Comment this out to disable debuging. + +_blue="\e[34m" +_magenta="\e[35m" +_green="\e[92m" +_cyan="\e[36m" +_white="\e[97m" +_end_color="\e[0m" + +# Mordu with location. +_mordu() { + [ "$_debug" ] && echo -e "${_blue}>>> ${_magenta}Mordu${_cyan}@${_green}${_location}${_cyan}:${_white} $*${_end_color}" +} + +# Mordu with location and no new line. +_mordu_n() { + [ "$_debug" ] && echo -en "${_blue}>>> ${_magenta}Mordu${_cyan}@${_green}${_location}${_cyan}:${_white} $*${_end_color}" +} + +# Echo with new line to add completion messages to _mordu_n +_mordu_nl() { + [ "$_debug" ] && echo -e "${_white}$*${_end_color}" +} + +_mordu "Starting script." +# }}} + +# {{{ +_clone_kitty_themes() { + local __repo="git.mgk.one/x11-term/dexpota.kitty-themes" + + if $_ghq list | grep -q "$__repo" ; then + _mordu "Kitty themes already found." + else + _mordu "Cloning kitty-themes." + $_ghq get "$__repo" + fi +} +# }}} + +# {{{
+_main() { + _clone_kitty_themes +} +_main +# }}}
+ +_mordu "Completed script." diff --git a/.config/yadm/workstation-minimal.d/04-xcape.sh b/.config/yadm/workstation-minimal.d/04-xcape.sh new file mode 100755 index 0000000..44fcf8a --- /dev/null +++ b/.config/yadm/workstation-minimal.d/04-xcape.sh @@ -0,0 +1,86 @@ +#!/usr/bin/env bash +_location=".config/yadm/workstation-minimal.d/04-xcape.sh" +export GHQ_ROOT="${HOME}/.local/opt/git" +_ghq="${HOME}/.local/opt/go/bin/ghq" + +# {{{ +_debug=y # Comment this out to disable debuging. + +_blue="\e[34m" +_magenta="\e[35m" +_green="\e[92m" +_cyan="\e[36m" +_white="\e[97m" +_end_color="\e[0m" + +# Mordu with location. +_mordu() { + [ "$_debug" ] && echo -e "${_blue}>>> ${_magenta}Mordu${_cyan}@${_green}${_location}${_cyan}:${_white} $*${_end_color}" +} + +# Mordu with location and no new line. +_mordu_n() { + [ "$_debug" ] && echo -en "${_blue}>>> ${_magenta}Mordu${_cyan}@${_green}${_location}${_cyan}:${_white} $*${_end_color}" +} + +# Echo with new line to add completion messages to _mordu_n +_mordu_nl() { + [ "$_debug" ] && echo -e "${_white}$*${_end_color}" +} + +_mordu "Starting script." +# }}} + +# {{{ +_install_deps() { + local __required_packages=(git gcc make pkgconf-pkg-config libX11-devel libXtst-devel libXi-devel) + + for __package in "${__required_packages[@]}" ; do + if [[ $(rpm -qi "${__package//\"/}") == "package ${__package//\"/} is not installed" ]] ; then + _mordu "Could not find ${__package}." + __not_installed_yet+=( "$__package" ) + else + _mordu "Found ${__package}." + fi + done + _mordu "Total not installed yet: ${__not_installed_yet[*]}" + + if (( ${#__not_installed_yet[@]} )); then + sudo dnf -y install "${__not_installed_yet[@]}" + fi +} +# }}} + +# {{{ +_install_xcape() { + $_ghq get git.mgk.one/x11-input/alols.xcape + + cd "${GHQ_ROOT}/git.mgk.one/x11-input/alols.xcape" || exit + make + make PREFIX="${HOME}/.local" MANDIR="/share/man/man1" install + cd || exit + + if command -v xcape ; then + _mordu "Successfully installed xcape." + else + _mordu "Problem installing xcape. Could not find it in path." + exit 1 + fi +} +# }}} + +# {{{
+_main() { + _mordu_n "Checking for xcape.." + if command -v xcape > /dev/null ; then + _mordu_nl "..Found." + else + _mordu_nl "Not Found. Installing." + _install_deps + _install_xcape + fi +} +_main +# }}}
+ +_mordu "Completed script." diff --git a/.config/yadm/workstation-minimal.d/05-awesomewm.sh b/.config/yadm/workstation-minimal.d/05-awesomewm.sh new file mode 100755 index 0000000..9c27381 --- /dev/null +++ b/.config/yadm/workstation-minimal.d/05-awesomewm.sh @@ -0,0 +1,92 @@ +#!/usr/bin/env bash +_location=".config/yadm/workstation-minimal.d/05-awesomewm.sh" +export GHQ_ROOT="${HOME}/.local/opt/git" +_ghq="${HOME}/.local/opt/go/bin/ghq" + +# {{{ +_debug=y # Comment this out to disable debuging. + +_blue="\e[34m" +_magenta="\e[35m" +_green="\e[92m" +_cyan="\e[36m" +_white="\e[97m" +_end_color="\e[0m" + +# Mordu with location. +_mordu() { + [ "$_debug" ] && echo -e "${_blue}>>> ${_magenta}Mordu${_cyan}@${_green}${_location}${_cyan}:${_white} $*${_end_color}" +} + +# Mordu with location and no new line. +_mordu_n() { + [ "$_debug" ] && echo -en "${_blue}>>> ${_magenta}Mordu${_cyan}@${_green}${_location}${_cyan}:${_white} $*${_end_color}" +} + +# Echo with new line to add completion messages to _mordu_n +_mordu_nl() { + [ "$_debug" ] && echo -e "${_white}$*${_end_color}" +} + +_mordu "Starting script." +# }}} + +# {{{ +_clone_awesome_copycats() { + # Ensure it is already downloaded. + local __repo="git.mgk.one/x11-wm/lcpz.awesome-copycats" + + _mordu_nl "Checking for awesome copycats.." + if $_ghq list | grep -q "$__repo" ; then + _mordu_n "..Found. Updating." + $_ghq get -u "$__repo" + else + _mordu_n "..Not found. Cloning." + $_ghq get "$__repo" + fi +} +# }}} + +# {{{ +_link_to_config() { + # Link themes to config dir. + if [ ! -e "${HOME}/.config/awesome/themes" ]; then + _mordu_nl "Awesome Copycats does not appear to be linked to config dir yet." + _mordu_nl "Linking theme dir to config dir." + ln -sr "${GHQ_ROOT}/git.mgk.one/x11-wm/lcpz.awesome-copycats/themes" \ + "${HOME}/.config/awesome/themes" + else + _mordu_nl "Awesome Copycats themes already linked to config dir." + fi + + # Link freedesktop to config dir. + if [ ! -e "${HOME}/.config/awesome/freedesktop" ]; then + _mordu_nl "Awesome freedesktop does not appear to be linked to config dir yet." + _mordu_nl "Linking freedesktop dir to config dir." + ln -sr "${GHQ_ROOT}/git.mgk.one/x11-wm/lcpz.awesome-copycats/freedesktop" \ + "${HOME}/.config/awesome/freedesktop" + else + _mordu_nl "Awesome freedesktop already linked to config dir." + fi + + # Link lain to config dir. + if [ ! -e "${HOME}/.config/awesome/lain" ]; then + _mordu_nl "Lain does not appear to be linked to config dir yet." + _mordu_nl "Linking lain dir to config dir." + ln -sr "${GHQ_ROOT}/git.mgk.one/x11-wm/lcpz.awesome-copycats/lain" \ + "${HOME}/.config/awesome/lain" + else + _mordu_nl "Awesome lain already linked to config dir." + fi +} +# }}} + +# {{{
+_main() { + _clone_awesome_copycats + _link_to_config +} +_main +# }}}
+ +_mordu "Completed script." diff --git a/.config/yadm/workstation-minimal.d/06-stumpwm.sh b/.config/yadm/workstation-minimal.d/06-stumpwm.sh new file mode 100755 index 0000000..3161af8 --- /dev/null +++ b/.config/yadm/workstation-minimal.d/06-stumpwm.sh @@ -0,0 +1,74 @@ +#!/usr/bin/env bash +_location=".config/yadm/workstation-minimal.d/06-stumpwm.sh" +export GHQ_ROOT="${HOME}/.local/opt/git" +_ghq="${HOME}/.local/opt/go/bin/ghq" + +# {{{ +_debug=y # Comment this out to disable debuging. + +_blue="\e[34m" +_magenta="\e[35m" +_green="\e[92m" +_cyan="\e[36m" +_white="\e[97m" +_end_color="\e[0m" + +# Mordu with location. +_mordu() { + [ "$_debug" ] && echo -e "${_blue}>>> ${_magenta}Mordu${_cyan}@${_green}${_location}${_cyan}:${_white} $*${_end_color}" +} + +# Mordu with location and no new line. +_mordu_n() { + [ "$_debug" ] && echo -en "${_blue}>>> ${_magenta}Mordu${_cyan}@${_green}${_location}${_cyan}:${_white} $*${_end_color}" +} + +# Echo with new line to add completion messages to _mordu_n +_mordu_nl() { + [ "$_debug" ] && echo -e "${_white}$*${_end_color}" +} + +_mordu "Starting script." +# }}} + +# {{{ +_clone_stumpwm() { + # Ensure it is already downloaded. + local __repo="git.mgk.one/x11-wm/stumpwm.stumpwm" + + _mordu_n "Checking for StumpWM.." + if $_ghq list | grep -q "$__repo" ; then + _mordu_nl "..Found. Updating." + $_ghq get -u "$__repo" + else + _mordu_n "..Not found. Cloning." + $_ghq get "$__repo" + fi +} +# }}} + +# {{{ +_compile_and_install_stumpwm() { + if ! command -v stumpwm > /dev/null 2>&1; then + _mordu "StumpWM binary not found. Compiling and installing." + cd "${GHQ_ROOT}/git.mgk.one/x11-wm/stumpwm.stumpwm" || exit + ./autogen || exit + ./configure || exit + make || exit + sudo make install || exit + _mordu "StumpWM compiled and installed." + else + _mordu "StumpWM binary found in path. Not compiling and installing." + fi +} +# }}} + +# {{{
+_main() { + _clone_stumpwm + _compile_and_install_stumpwm +} +_main +# }}}
+ +_mordu "Completed script." diff --git a/.config/yadm/workstation-minimal.d/07-brotab.sh b/.config/yadm/workstation-minimal.d/07-brotab.sh new file mode 100755 index 0000000..e058112 --- /dev/null +++ b/.config/yadm/workstation-minimal.d/07-brotab.sh @@ -0,0 +1,53 @@ +#!/usr/bin/env bash +_location=".config/yadm/workstation-minimal.d/07-brotab.sh" + +# {{{ +_debug=y # Comment this out to disable debuging. + +_blue="\e[34m" +_magenta="\e[35m" +_green="\e[92m" +_cyan="\e[36m" +_white="\e[97m" +_end_color="\e[0m" + +# Mordu with location. +_mordu() { + [ "$_debug" ] && echo -e "${_blue}>>> ${_magenta}Mordu${_cyan}@${_green}${_location}${_cyan}:${_white} $*${_end_color}" +} + +# Mordu with location and no new line. +_mordu_n() { + [ "$_debug" ] && echo -en "${_blue}>>> ${_magenta}Mordu${_cyan}@${_green}${_location}${_cyan}:${_white} $*${_end_color}" +} + +# Echo with new line to add completion messages to _mordu_n +_mordu_nl() { + [ "$_debug" ] && echo -e "${_white}$*${_end_color}" +} + +_mordu "Starting script." +# }}} + +# {{{ +_install_brotab() { + if command -v bt > /dev/null 2>&1; then + _mordu "Installing brotab app manifests." + bt install + else + _mordu "Brotab not found, installing." + pip3 install brotab + _mordu "Installing brotab app manifests." + bt install + fi +} +# }}} + +# {{{
+_main() { + _install_brotab +} +_main +# }}}
+ +_mordu "Completed script." diff --git a/.config/yadm/workstation-minimal.d/08-gsu.sh b/.config/yadm/workstation-minimal.d/08-gsu.sh new file mode 100755 index 0000000..4b1488e --- /dev/null +++ b/.config/yadm/workstation-minimal.d/08-gsu.sh @@ -0,0 +1,88 @@ +#!/usr/bin/env bash +_location=".config/yadm/workstation-minimal.d/08-gsu.sh" +export GHQ_ROOT="${HOME}/.local/opt/git" +_ghq="${HOME}/.local/opt/go/bin/ghq" + +# {{{ +_debug=y # Comment this out to disable debuging. + +_blue="\e[34m" +_magenta="\e[35m" +_green="\e[92m" +_cyan="\e[36m" +_white="\e[97m" +_end_color="\e[0m" + +# Mordu with location. +_mordu() { + [ "$_debug" ] && echo -e "${_blue}>>> ${_magenta}Mordu${_cyan}@${_green}${_location}${_cyan}:${_white} $*${_end_color}" +} + +# Mordu with location and no new line. +_mordu_n() { + [ "$_debug" ] && echo -en "${_blue}>>> ${_magenta}Mordu${_cyan}@${_green}${_location}${_cyan}:${_white} $*${_end_color}" +} + +# Echo with new line to add completion messages to _mordu_n +_mordu_nl() { + [ "$_debug" ] && echo -e "${_white}$*${_end_color}" +} + +_mordu "Starting script." +# }}} + +# {{{ +_install_deps() { + # This is a list of packages required to compile the tool with. + local __required_packages=(jq curl xdotool maim slop ffmpeg) + + for __package in "${__required_packages[@]}" ; do + if [[ $(rpm -qi "${__package//\"/}") == "package ${__package//\"/} is not installed" ]] ; then + _mordu "Could not find $__package." + local __not_installed_yet+=( "$__package" ) + else + _mordu "Found $__package." + fi + done + + _mordu "Total not installed yet: ${__not_installed_yet[*]}" + + if (( ${#__not_installed_yet[@]} )); then + sudo dnf -y install --allowerasing "${__not_installed_yet[@]}" + fi +} +# }}} + +# {{{ +_install_gsu() { + # Check if the repo is already downloaded or not. + if $_ghq list | grep -q "winneon.gsu" ; then + _mordu "Found gsu. Not cloning." + else + local __repo="git.mgk.one/x11-misc/winneon.gsu" + local __repo_loc="${GHQ_ROOT}/${__repo}" + + # Clone the repo. + _mordu "Cloning $__repo." + $_ghq get $__repo + + # Change to the repo directory, as we need to compile it. + cd "$__repo_loc" || exit + + # Compile the source code. + _mordu "Compiling gsu." + PREFIX="${HOME}/.local" SYSCONFDIR="$HOME/.config" make install + _mordu "Compiled and installed gsu." + fi +} +# }}} + +# {{{
+_main() { + _install_deps + _install_gsu +} +_main +# }}}
+ +_mordu "Completed script." diff --git a/.config/yadm/workstation-minimal.d/09-emacs.sh b/.config/yadm/workstation-minimal.d/09-emacs.sh new file mode 100755 index 0000000..18152a2 --- /dev/null +++ b/.config/yadm/workstation-minimal.d/09-emacs.sh @@ -0,0 +1,275 @@ +#!/usr/bin/env bash +_location=".config/yadm/workstation-minimal.d/09-emacs.sh" +export GHQ_ROOT="${HOME}/.local/opt/git" +_ghq="${HOME}/.local/opt/go/bin/ghq" +_emacs_branch="master" + +# {{{ +_debug=y # Comment this out to disable debuging. + +_blue="\e[34m" +_magenta="\e[35m" +_green="\e[92m" +_cyan="\e[36m" +_white="\e[97m" +_end_color="\e[0m" + +# Mordu with location. +_mordu() { + [ "$_debug" ] && echo -e "${_blue}>>> ${_magenta}Mordu${_cyan}@${_green}${_location}${_cyan}:${_white} $*${_end_color}" +} + +# Mordu with location and no new line. +_mordu_n() { + [ "$_debug" ] && echo -en "${_blue}>>> ${_magenta}Mordu${_cyan}@${_green}${_location}${_cyan}:${_white} $*${_end_color}" +} + +# Echo with new line to add completion messages to _mordu_n +_mordu_nl() { + [ "$_debug" ] && echo -e "${_white}$*${_end_color}" +} + +_mordu "Starting script." +# }}} + +# {{{ +_clone_tree-sitter() { + local __repo="git.mgk.one/libs-code/tree-sitter.tree-sitter" + + if $_ghq list | grep -q "$__repo" ; then + _mordu "Repository ${__repo} already cloned. Updating." + $_ghq get -u "$__repo" + else + _mordu "Repository ${__repo} not cloned yet. Cloning" + $_ghq get "$__repo" + fi +} +# }}} + +# {{{ +_install_tree-sitter() { + local __repo="git.mgk.one/libs-code/tree-sitter.tree-sitter" + + cd "${GHQ_ROOT}/${__repo}" + + _mordu "Compiling ${__repo}." + make + _mordu "Completed compiling ${__repo}." + + _mordu "Installing ${__repo}." + sudo make install + _mordu "Completed installing ${__repo}" +} +# }}} + +# {{{ +_clone_emacs() { + local __repo="git.mgk.one/emacs/gnu.emacs" + + if $_ghq list | grep -q "$__repo" ; then + _mordu "Repository ${__repo} already cloned. Updating." + $_ghq get -u "$__repo" + else + _mordu "Repository ${__repo} not cloned yet. Cloning" + $_ghq get "$__repo" + fi +} +# }}} + +# {{{ +_install_deps() { + local __required_packages=(wxBase-devel wxGTK-devel libwebp-devel jansson jansson-devel ImageMagick ImageMagick-devel libtree-sitter-devel libtree-sitter tree-sitter-cli) + + for __package in "${__required_packages[@]}" ; do + if [[ $(rpm -qi "${__package//\"/}") == "package ${__package//\"/} is not installed" ]] ; then + _mordu "Not installed yet: $__package." + local __not_installed_yet+=( "$__package" ) + else + _mordu "Found $__package." + fi + done + + _mordu "Total not installed yet: ${__not_installed_yet[*]}" + + if (( ${#__not_installed_yet[@]} )); then + sudo dnf -y install --allowerasing "${__not_installed_yet[@]}" + fi + + _mordu "Completing dependancy install with remaining packages." + sudo dnf -y builddep emacs +} +# }}} + +# {{{ +_prepare_emacs_repo() { + local __repo="git.mgk.one/emacs/gnu.emacs" + + cd "${GHQ_ROOT}/${__repo}" + _mordu "Performing make distclean." + make distclean + _mordu "Performing make uninstall." + make uninstall + _mordu "Performing git checkout on branch ${_emacs_branch}." + git checkout "$_emacs_branch" + _mordu "Pulling most recent changes." + git pull + _mordu "Ensuring current head is set correctly." + git reset --hard HEAD +} +# }}} + +# {{{ +_configure_emacs_repo() { + CC='CFLAGS=-DMAIL_USE_LOCKF -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer' + LDFLAGS='-Wl,-z,relro gcc' + PKG_CONFIG_PATH=:/usr/lib64/pkgconfig:/usr/share/pkgconfig + + local __repo="git.mgk.one/emacs/gnu.emacs" + + cd "${GHQ_ROOT}/${__repo}" + + _mordu "Performing autogen." + ./autogen.sh + _mordu "Performing configure." + ./configure \ + --prefix="${HOME}/.local" \ + --with-mailutils \ + --with-x-toolkit=lucid \ + --with-native-compilation \ + --with-tree-sitter \ + --with-imagemagick \ + --without-compress-install \ + build_alias=x86_64-redhat-linux-gnu \ + host_alias=x86_64-redhat-linux-gnu + _mordu "Completed configure." +} +# }}} + +# {{{ +_compile_emacs_repo() { + local __repo="git.mgk.one/emacs/gnu.emacs" + + cd "${GHQ_ROOT}/${__repo}" + _mordu "Performing compilation process." + make -j8 + _mordu "Complete compile process." +} +# }}} + +# {{{ +_install_emacs_repo() { + local __repo="git.mgk.one/emacs/gnu.emacs" + + cd "${GHQ_ROOT}/${__repo}" + _mordu "Performing installation process." + make install + _mordu "Completed installation process." +} +# }}} + +# {{{ +_dnf_install_emacs() { + local __required_packages=(emacs-gtk+x11) + + for __package in "${__required_packages[@]}" ; do + if [[ $(rpm -qi "${__package//\"/}") == "package ${__package//\"/} is not installed" ]] ; then + _mordu "Not installed yet: $__package." + local __not_installed_yet+=( "$__package" ) + else + _mordu "Found $__package." + fi + done + + _mordu "Total not installed yet: ${__not_installed_yet[*]}" + + if (( ${#__not_installed_yet[@]} )); then + sudo dnf -y install --allowerasing "${__not_installed_yet[@]}" + fi + + _mordu "Completing dependancy install with remaining packages." + sudo dnf -y builddep emacs +} +# }}} + +# {{{ +_configure_alternates() { + _mordu "Setting default version of emacs to /usr/bin/emacs-gtk+11." + sudo alternatives --install /usr/bin/emacs emacs /usr/bin/emacs-gtk+x11 90 + sudo alternatives --auto emacs + _mordu "Changed default version of emacs." +} +# }}} + +# {{{ +_clone_chemacs() { + local __repo="git.mgk.one/emacs/plexus.chemacs2" + + if $_ghq list | grep -q "$__repo" ; then + _mordu "Repository ${__repo} already cloned. Updating." + $_ghq get -u "$__repo" + else + _mordu "Repository ${__repo} not cloned yet. Cloning" + $_ghq get "$__repo" + fi +} +# }}} + +# {{{ +_move_and_backup_old_configs() { + _mordu "Checking for existing emacs configs to backup." + if [ -f "${HOME}/.emacs" ]; then + _mordu "Found ${HOME}/.emacs, moving to .bak version." + mv "${HOME}/.emacs.bak" + fi + + if [ -d "${HOME}/.emacs.d" ]; then + _mordu "Found ${HOME}/.emacs.d, moving to .bak version." + mv "${HOME}/.emacs.d" "${HOME}/.emacs.d.bak" + fi + + if [ -d "${HOME}/.config/emacs" ]; then + _mordu "Found ${HOME}/.config/emacs, moving to .bak version." + mv "${HOME}/.config/emacs" "${HOME}/.config/emacs.bak" + fi +} +# }}} + +# {{{ +_link_chemacs_to_config() { + local __repo="git.mgk.one/emacs/plexus.chemacs2" + + _mordu "Linking chemacs to .config/emacs." + ln -sr "${GHQ_ROOT}/${__repo}" \ + "${HOME}/.config/emacs" +} +# }}} + +# {{{ +_run_emacs_to_bootstrap() { + _mordu "Bootstrapping emacs with an initial dry run." + emacs --batch --load ~/.config/emacs/early-init.el --load ~/.config/emacs/init.el --eval '(kill-emacs)' + _mordu "Completed initial run of emacs." +} +# }}} + +# {{{
+_main() { + _clone_tree-sitter + _install_tree-sitter + _clone_emacs + _install_deps + _prepare_emacs_repo + _configure_emacs_repo + _compile_emacs_repo + _install_emacs_repo + _dnf_install_emacs + _configure_alternates + _clone_chemacs + _move_and_backup_old_configs + _link_chemacs_to_config + _run_emacs_to_bootstrap +} +_main +# }}}
+ +_mordu "Completed script."