This commit is contained in:
Adam 2024-01-10 00:21:14 -05:00
parent fa63fd37ce
commit 7ed7836a6b
3 changed files with 45 additions and 47 deletions

View file

@ -34,30 +34,24 @@ export ZDOTDIR="${XDG_CONFIG_HOME:-$HOME/.config}/shell/zsh"
# Other program settings:
export FZF_DEFAULT_OPTS="--layout=reverse --height 40%"
export LESS=-R
export LESSOPEN="| /usr/bin/highlight -O ansi %s 2>/dev/null"
export QT_QPA_PLATFORMTHEME="gtk2" # Have QT use gtk2 theme.
export LESS_TERMCAP_mb
LESS_TERMCAP_mb="$(printf '%b' '')"
export LESS_TERMCAP_md
LESS_TERMCAP_md="$(printf '%b' '')"
export LESS_TERMCAP_me
LESS_TERMCAP_me="$(printf '%b' '')"
export LESS_TERMCAP_se
LESS_TERMCAP_se="$(printf '%b' '')"
export LESS_TERMCAP_so
LESS_TERMCAP_so="$(printf '%b' '')"
export LESS_TERMCAP_ue
LESS_TERMCAP_ue="$(printf '%b' '')"
export LESS_TERMCAP_us
LESS_TERMCAP_us="$(printf '%b' '')"
# export LESS=-R
# export LESSOPEN="| /usr/bin/highlight -O ansi %s 2>/dev/null"
# export LESS_TERMCAP_mb
# LESS_TERMCAP_mb="$(printf '%b' '')"
# export LESS_TERMCAP_md
# LESS_TERMCAP_md="$(printf '%b' '')"
# export LESS_TERMCAP_me
# LESS_TERMCAP_me="$(printf '%b' '')"
# export LESS_TERMCAP_se
# LESS_TERMCAP_se="$(printf '%b' '')"
# export LESS_TERMCAP_so
# LESS_TERMCAP_so="$(printf '%b' '')"
# export LESS_TERMCAP_ue
# LESS_TERMCAP_ue="$(printf '%b' '')"
# export LESS_TERMCAP_us
# LESS_TERMCAP_us="$(printf '%b' '')"
#
# Multithreading
export XZ_DEFAULTS="-T 0"

View file

@ -4,22 +4,24 @@ set -e
# Copy configs and make a backup if it already exists
printf "\nInstalling Configs..."
for file in configs/*
cd configs
for file in *
do
printf "\n%s..." "$file"
cp -rbv "$file" "$HOME"/.config/
cp -rb "$file" "$HOME"/.config/
done
# Copy scripts and make a backup if it already exists
printf "\nInstalling Scripts..."
printf "\n\nInstalling Scripts..."
cd ../
if [ ! -d "$HOME/.local/bin" ]; then
mkdir "$HOME/.local/bin"
fi
cp -rbv bin "$HOME"/.local
cp -rb bin "$HOME"/.local
# Link shell files and make a backup if it already exists
printf "\nLinking shell..."
cp -sbv "$HOME"/.config/shell/profile ~/.zprofile
cp -sbv "$HOME"/.config/x11/xinitrc ~/.xinitrc
printf "\nLinking shell...\n"
cp -sb "$HOME"/.config/shell/profile ~/.zprofile
cp -sb "$HOME"/.config/x11/xinitrc ~/.xinitrc

36
setup
View file

@ -1,6 +1,7 @@
#!/bin/sh
set -e
cd
clear &&
echo "Choose your adventure:
@ -32,33 +33,34 @@ sudo echo ''
. /etc/os-release
OS=$NAME
HEADER=':::::::-. ... ... :::::::.. .::::::.
;;, `'\'';, .;;;;;;;. .;;;;;;;. ;;;;``;;;; ;;;` `
`[[ [[,[[ \[[,,[[ \[[,[[[,/[[['\'' '\''[==/[[[[,
$$, $$$$$, $$$$$$, $$$$$$$$$c '\'''\'''\'' $
888_,o8P'\''"888,_ _,88P"888,_ _,88P888b "88bo,88b dP
MMMMP"` "YMMMMMP" "YMMMMMP" MMMM "W" "YMmMY"
Doors are sturdier than windows.
-------------------------------------------------------'
printf "\nSetup for %s\n" "$OS"
case "$OS" in
*Arch*)
# Check for less and install if not found
if ! type "less" > /dev/null 2>&1; then
echo "less not found, installing..."
sudo pacman -S --noconfirm less # <<< should handle other distros here
fi
clear &&
# Execute in less with a header for style points
exec > >(less +F --header 8) 2>&1
exec > >(less +F -X --header 8) 2>&1
trap 'exec >&- 2>&-; wait' EXIT
echo ':::::::-. ... ... :::::::.. .::::::.
;;, `'\'';, .;;;;;;;. .;;;;;;;. ;;;;``;;;; ;;;` `
`[[ [[,[[ \[[,,[[ \[[,[[[,/[[['\'' '\''[==/[[[[,
$$, $$$$$, $$$$$$, $$$$$$$$$c '\'''\'''\'' $
888_,o8P'\''"888,_ _,88P"888,_ _,88P888b "88bo,88b dP
MMMMP"` "YMMMMMP" "YMMMMMP" MMMM "W" "YMmMY" '
echo "Doors are sturdier than windows.
-------------------------------------------------------"
printf "\nSetup for %s\n" "$OS"
case "$OS" in
*Arch*)
cd
echo "$HEADER"
echo "Enabling Pacman colors..."
sudo sed '/Color/s/^#//' -i /etc/pacman.conf
printf "Upgrading system...\n"
sudo pacman -Syyu --noconfirm
printf '\nVerifying base requirements...'
sudo pacman -S --needed --noconfirm git base-devel
@ -120,4 +122,4 @@ fi
printf "\nDone!\nLog out and back in for changes to take effect."
# Give less time to catch up and tell it we're done
sleep 1 && killall -s SIGINT less
sleep .5 && killall -s SIGINT less