mirror of
https://github.com/ChrisTitusTech/linutil.git
synced 2024-11-05 13:15:21 +00:00
commit
02b7d7cdf7
|
@ -2,8 +2,8 @@
|
|||
|
||||
. ../common-script.sh
|
||||
|
||||
setupAlacritty() {
|
||||
echo "Install Alacritty if not already installed..."
|
||||
installAlacritty() {
|
||||
echo "Installing Alacritty..."
|
||||
if ! command_exists alacritty; then
|
||||
case ${PACKAGER} in
|
||||
pacman)
|
||||
|
@ -14,12 +14,12 @@ setupAlacritty() {
|
|||
;;
|
||||
esac
|
||||
else
|
||||
echo "alacritty is already installed."
|
||||
echo "Alacritty is already installed."
|
||||
fi
|
||||
}
|
||||
|
||||
setupAlacrittyConfig() {
|
||||
echo "Copy alacritty config files"
|
||||
echo "Copying Alacritty configuration files..."
|
||||
if [ -d "${HOME}/.config/alacritty" ] && [ ! -d "${HOME}/.config/alacritty-bak" ]; then
|
||||
cp -r "${HOME}/.config/alacritty" "${HOME}/.config/alacritty-bak"
|
||||
fi
|
||||
|
@ -30,5 +30,5 @@ setupAlacrittyConfig() {
|
|||
|
||||
checkEnv
|
||||
checkEscalationTool
|
||||
setupAlacritty
|
||||
installAlacritty
|
||||
setupAlacrittyConfig
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
. ../common-script.sh
|
||||
|
||||
setupFastfetch() {
|
||||
echo "Installing Fastfetch if not already installed..."
|
||||
installFastfetch() {
|
||||
echo "Installing Fastfetch..."
|
||||
if ! command_exists fastfetch; then
|
||||
case ${PACKAGER} in
|
||||
pacman)
|
||||
|
@ -29,5 +29,5 @@ setupFastfetchConfig() {
|
|||
|
||||
checkEnv
|
||||
checkEscalationTool
|
||||
setupFastfetch
|
||||
installFastfetch
|
||||
setupFastfetchConfig
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
. ../common-script.sh
|
||||
|
||||
setupKitty() {
|
||||
echo "Install Kitty if not already installed..."
|
||||
installKitty() {
|
||||
echo "Installing Kitty..."
|
||||
if ! command_exists kitty; then
|
||||
case ${PACKAGER} in
|
||||
pacman)
|
||||
|
@ -19,7 +19,7 @@ setupKitty() {
|
|||
}
|
||||
|
||||
setupKittyConfig() {
|
||||
echo "Copy Kitty config files"
|
||||
echo "Copying Kitty configuration files..."
|
||||
if [ -d "${HOME}/.config/kitty" ] && [ ! -d "${HOME}/.config/kitty-bak" ]; then
|
||||
cp -r "${HOME}/.config/kitty" "${HOME}/.config/kitty-bak"
|
||||
fi
|
||||
|
@ -30,5 +30,5 @@ setupKittyConfig() {
|
|||
|
||||
checkEnv
|
||||
checkEscalationTool
|
||||
setupKitty
|
||||
installKitty
|
||||
setupKittyConfig
|
|
@ -14,7 +14,7 @@ cloneMyBash() {
|
|||
}
|
||||
|
||||
installDepend() {
|
||||
echo "Install mybash if not already installed"
|
||||
echo "Installing Bash..."
|
||||
case "$PACKAGER" in
|
||||
pacman)
|
||||
$ESCALATION_TOOL "$PACKAGER" -S --needed --noconfirm bash bash-completion tar bat tree unzip fontconfig
|
||||
|
|
|
@ -13,8 +13,8 @@ cloneNeovim() {
|
|||
cd "$HOME" && git clone https://github.com/ChrisTitusTech/neovim.git "$HOME/.local/share/neovim"
|
||||
}
|
||||
|
||||
setupNeovim() {
|
||||
echo "Install Neovim if not already installed"
|
||||
installNeovim() {
|
||||
echo "Installing Neovim..."
|
||||
case "$PACKAGER" in
|
||||
pacman)
|
||||
$ESCALATION_TOOL "$PACKAGER" -S --needed --noconfirm neovim ripgrep fzf python-virtualenv luarocks go shellcheck
|
||||
|
@ -36,6 +36,7 @@ setupNeovim() {
|
|||
}
|
||||
|
||||
backupNeovimConfig() {
|
||||
printf "%b\n" "${YELLOW}Backing up existing configuration files...${RC}"
|
||||
if [ -d "$HOME/.config/nvim" ] && [ ! -d "$HOME/.config/nvim-backup" ]; then
|
||||
cp -r "$HOME/.config/nvim" "$HOME/.config/nvim-backup"
|
||||
fi
|
||||
|
@ -43,6 +44,7 @@ backupNeovimConfig() {
|
|||
}
|
||||
|
||||
linkNeovimConfig() {
|
||||
printf "%b\n" "${YELLOW}Linking Neovim configuration files...${RC}"
|
||||
mkdir -p "$HOME/.config/nvim"
|
||||
ln -s "$gitpath/titus-kickstart/"* "$HOME/.config/nvim/" # Wild card is used here to link all contents of titus-kickstart.
|
||||
}
|
||||
|
@ -50,6 +52,6 @@ linkNeovimConfig() {
|
|||
checkEnv
|
||||
checkEscalationTool
|
||||
cloneNeovim
|
||||
setupNeovim
|
||||
installNeovim
|
||||
backupNeovimConfig
|
||||
linkNeovimConfig
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
. ../common-script.sh
|
||||
|
||||
setupRofi() {
|
||||
echo "Install Rofi if not already installed..."
|
||||
installRofi() {
|
||||
echo "Installing Rofi..."
|
||||
if ! command_exists rofi; then
|
||||
case "$PACKAGER" in
|
||||
pacman)
|
||||
|
@ -19,7 +19,7 @@ setupRofi() {
|
|||
}
|
||||
|
||||
setupRofiConfig() {
|
||||
echo "Copy Rofi config files"
|
||||
echo "Copying Rofi configuration files..."
|
||||
if [ -d "$HOME/.config/rofi" ] && [ ! -d "$HOME/.config/rofi-bak" ]; then
|
||||
cp -r "$HOME/.config/rofi" "$HOME/.config/rofi-bak"
|
||||
fi
|
||||
|
@ -35,5 +35,5 @@ setupRofiConfig() {
|
|||
|
||||
checkEnv
|
||||
checkEscalationTool
|
||||
setupRofi
|
||||
installRofi
|
||||
setupRofiConfig
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
. ../common-script.sh
|
||||
|
||||
# Function to install zsh
|
||||
install_zsh() {
|
||||
echo "Install ZSH if not already installed..."
|
||||
installZsh() {
|
||||
echo "Installing Zsh..."
|
||||
if ! command_exists zsh; then
|
||||
case "$PACKAGER" in
|
||||
pacman)
|
||||
|
@ -20,7 +20,8 @@ install_zsh() {
|
|||
}
|
||||
|
||||
# Function to setup zsh configuration
|
||||
setup_zsh_config() {
|
||||
setupZshConfig() {
|
||||
echo "Setting up Zsh configuration..."
|
||||
CONFIG_DIR="$HOME/.config/zsh"
|
||||
ZSHRC_FILE="$CONFIG_DIR/.zshrc"
|
||||
|
||||
|
@ -48,5 +49,5 @@ EOL
|
|||
|
||||
checkEnv
|
||||
checkEscalationTool
|
||||
install_zsh
|
||||
setup_zsh_config
|
||||
installZsh
|
||||
setupZshConfig
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
. ../common-script.sh
|
||||
|
||||
installPkg() {
|
||||
echo "Install UFW if not already installed..."
|
||||
echo "Installing UFW..."
|
||||
if ! command_exists ufw; then
|
||||
case ${PACKAGER} in
|
||||
pacman)
|
||||
|
@ -19,7 +19,7 @@ installPkg() {
|
|||
}
|
||||
|
||||
configureUFW() {
|
||||
printf "%b\n" "${GREEN}Using Chris Titus Recommended Firewall Rules${RC}"
|
||||
printf "%b\n" "${YELLOW}Using Chris Titus Recommended Firewall Rules${RC}"
|
||||
|
||||
echo "Disabling UFW"
|
||||
$ESCALATION_TOOL ufw disable
|
||||
|
|
|
@ -61,7 +61,7 @@ fastUpdate() {
|
|||
}
|
||||
|
||||
updateSystem() {
|
||||
printf "%b\n" "${GREEN}Updating system${RC}"
|
||||
printf "%b\n" "${YELLOW}Updating system${RC}"
|
||||
case ${PACKAGER} in
|
||||
nala|apt-get)
|
||||
$ESCALATION_TOOL "${PACKAGER}" update -y
|
||||
|
|
Loading…
Reference in New Issue
Block a user