mirror of
https://github.com/ChrisTitusTech/linutil.git
synced 2024-11-05 13:15:21 +00:00
small refactor (#563)
* small refactor * Fix formatting --------- Co-authored-by: nnyyxxxx <nnyyxxxx@users.noreply.github.com>
This commit is contained in:
parent
7946000007
commit
2662aa03c4
|
@ -3,8 +3,8 @@
|
||||||
. ../common-script.sh
|
. ../common-script.sh
|
||||||
|
|
||||||
installAlacritty() {
|
installAlacritty() {
|
||||||
printf "%b\n" "${YELLOW}Installing Alacritty...${RC}"
|
|
||||||
if ! command_exists alacritty; then
|
if ! command_exists alacritty; then
|
||||||
|
printf "%b\n" "${YELLOW}Installing Alacritty...${RC}"
|
||||||
case "$PACKAGER" in
|
case "$PACKAGER" in
|
||||||
pacman)
|
pacman)
|
||||||
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm alacritty
|
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm alacritty
|
||||||
|
@ -19,7 +19,7 @@ installAlacritty() {
|
||||||
}
|
}
|
||||||
|
|
||||||
setupAlacrittyConfig() {
|
setupAlacrittyConfig() {
|
||||||
printf "%b\n" "${YELLOW}Copy alacritty config files${RC}"
|
printf "%b\n" "${YELLOW}Copying alacritty config files...${RC}"
|
||||||
if [ -d "${HOME}/.config/alacritty" ] && [ ! -d "${HOME}/.config/alacritty-bak" ]; then
|
if [ -d "${HOME}/.config/alacritty" ] && [ ! -d "${HOME}/.config/alacritty-bak" ]; then
|
||||||
cp -r "${HOME}/.config/alacritty" "${HOME}/.config/alacritty-bak"
|
cp -r "${HOME}/.config/alacritty" "${HOME}/.config/alacritty-bak"
|
||||||
fi
|
fi
|
||||||
|
|
17
core/tabs/applications-setup/bottles-setup.sh
Normal file → Executable file
17
core/tabs/applications-setup/bottles-setup.sh
Normal file → Executable file
|
@ -2,13 +2,20 @@
|
||||||
|
|
||||||
. ../common-script.sh
|
. ../common-script.sh
|
||||||
|
|
||||||
install_bottles() {
|
installBottles() {
|
||||||
|
if ! command_exists flatpak; then
|
||||||
printf "%b\n" "${YELLOW}Installing Bottles...${RC}"
|
printf "%b\n" "${YELLOW}Installing Bottles...${RC}"
|
||||||
. ./setup-flatpak.sh
|
case "$PACKAGER" in
|
||||||
flatpak install -y flathub com.usebottles.bottles
|
*)
|
||||||
printf "%b\n" "${GREEN}Bottles installed successfully. Restart the system to apply changes...${RC}"
|
. ./setup-flatpak.sh
|
||||||
|
flatpak install -y flathub com.usebottles.bottles
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
else
|
||||||
|
printf "%b\n" "${GREEN}Bottles is already installed.${RC}"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
checkEnv
|
checkEnv
|
||||||
checkEscalationTool
|
checkEscalationTool
|
||||||
install_bottles
|
installBottles
|
|
@ -3,8 +3,8 @@
|
||||||
. ../common-script.sh
|
. ../common-script.sh
|
||||||
|
|
||||||
installFastfetch() {
|
installFastfetch() {
|
||||||
printf "%b\n" "${YELLOW}Installing Fastfetch...${RC}"
|
|
||||||
if ! command_exists fastfetch; then
|
if ! command_exists fastfetch; then
|
||||||
|
printf "%b\n" "${YELLOW}Installing Fastfetch...${RC}"
|
||||||
case "$PACKAGER" in
|
case "$PACKAGER" in
|
||||||
pacman)
|
pacman)
|
||||||
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm fastfetch
|
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm fastfetch
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
. ../common-script.sh
|
. ../common-script.sh
|
||||||
|
|
||||||
installKitty() {
|
installKitty() {
|
||||||
printf "%b\n" "${YELLOW}Install Kitty if not already installed...${RC}"
|
|
||||||
if ! command_exists kitty; then
|
if ! command_exists kitty; then
|
||||||
|
printf "%b\n" "${YELLOW}Installing Kitty...${RC}"
|
||||||
case "$PACKAGER" in
|
case "$PACKAGER" in
|
||||||
pacman)
|
pacman)
|
||||||
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm kitty
|
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm kitty
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
gitpath="$HOME/.local/share/mybash"
|
gitpath="$HOME/.local/share/mybash"
|
||||||
|
|
||||||
installDepend() {
|
installDepend() {
|
||||||
|
if ! command_exists bash bash-completion tar bat tree unzip fontconfig git; then
|
||||||
printf "%b\n" "${YELLOW}Installing Bash...${RC}"
|
printf "%b\n" "${YELLOW}Installing Bash...${RC}"
|
||||||
case "$PACKAGER" in
|
case "$PACKAGER" in
|
||||||
pacman)
|
pacman)
|
||||||
|
@ -24,6 +25,7 @@ installDepend() {
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
cloneMyBash() {
|
cloneMyBash() {
|
||||||
|
|
|
@ -14,6 +14,7 @@ cloneNeovim() {
|
||||||
}
|
}
|
||||||
|
|
||||||
installNeovim() {
|
installNeovim() {
|
||||||
|
if ! command_exists neovim ripgrep git fzf; then
|
||||||
printf "%b\n" "${YELLOW}Installing Neovim...${RC}"
|
printf "%b\n" "${YELLOW}Installing Neovim...${RC}"
|
||||||
case "$PACKAGER" in
|
case "$PACKAGER" in
|
||||||
pacman)
|
pacman)
|
||||||
|
@ -33,6 +34,7 @@ installNeovim() {
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
backupNeovimConfig() {
|
backupNeovimConfig() {
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
. ../common-script.sh
|
. ../common-script.sh
|
||||||
|
|
||||||
installRofi() {
|
installRofi() {
|
||||||
printf "%b\n" "${YELLOW}Installing Rofi...${RC}"
|
|
||||||
if ! command_exists rofi; then
|
if ! command_exists rofi; then
|
||||||
|
printf "%b\n" "${YELLOW}Installing Rofi...${RC}"
|
||||||
case "$PACKAGER" in
|
case "$PACKAGER" in
|
||||||
pacman)
|
pacman)
|
||||||
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm rofi
|
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm rofi
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
|
|
||||||
# Function to install zsh
|
# Function to install zsh
|
||||||
installZsh() {
|
installZsh() {
|
||||||
printf "%b\n" "${YELLOW}Installing Zsh...${RC}"
|
|
||||||
if ! command_exists zsh; then
|
if ! command_exists zsh; then
|
||||||
|
printf "%b\n" "${YELLOW}Installing Zsh...${RC}"
|
||||||
case "$PACKAGER" in
|
case "$PACKAGER" in
|
||||||
pacman)
|
pacman)
|
||||||
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm zsh
|
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm zsh
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
. ../common-script.sh
|
. ../common-script.sh
|
||||||
|
|
||||||
installPkg() {
|
installPkg() {
|
||||||
printf "%b\n" "${YELLOW}Installing UFW...${RC}"
|
|
||||||
if ! command_exists ufw; then
|
if ! command_exists ufw; then
|
||||||
|
printf "%b\n" "${YELLOW}Installing UFW...${RC}"
|
||||||
case "$PACKAGER" in
|
case "$PACKAGER" in
|
||||||
pacman)
|
pacman)
|
||||||
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm ufw
|
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm ufw
|
||||||
|
|
Loading…
Reference in New Issue
Block a user