mirror of
https://github.com/ChrisTitusTech/linutil.git
synced 2024-11-05 21:28:48 +00:00
consolidate code and fix global theme
This commit is contained in:
parent
f6e0b4f7b6
commit
d03be6796c
|
@ -78,7 +78,8 @@ checkDistro() {
|
||||||
|
|
||||||
checkEnv() {
|
checkEnv() {
|
||||||
checkCommandRequirements 'curl groups sudo'
|
checkCommandRequirements 'curl groups sudo'
|
||||||
checkPackageManager 'apt-get dnf pacman zypper'
|
checkPackageManager 'apt-get nala dnf pacman zypper yum xbps-install nix-env'
|
||||||
|
checkCurrentDirectoryWritable
|
||||||
checkSuperUser
|
checkSuperUser
|
||||||
checkDistro
|
checkDistro
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +1,5 @@
|
||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
|
|
||||||
checkEnv() {
|
|
||||||
checkCommandRequirements 'curl groups sudo'
|
|
||||||
checkPackageManager 'apt-get dnf pacman zypper'
|
|
||||||
checkSuperUser
|
|
||||||
checkDistro
|
|
||||||
}
|
|
||||||
|
|
||||||
setupAlacritty() {
|
setupAlacritty() {
|
||||||
echo "Install Alacritty if not already installed..."
|
echo "Install Alacritty if not already installed..."
|
||||||
if ! command_exists alacritty; then
|
if ! command_exists alacritty; then
|
||||||
|
|
|
@ -1,12 +1,5 @@
|
||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
|
|
||||||
checkEnv() {
|
|
||||||
checkCommandRequirements 'curl groups sudo'
|
|
||||||
checkPackageManager 'apt-get dnf pacman zypper'
|
|
||||||
checkSuperUser
|
|
||||||
checkDistro
|
|
||||||
}
|
|
||||||
|
|
||||||
setupKitty() {
|
setupKitty() {
|
||||||
echo "Install Kitty if not already installed..."
|
echo "Install Kitty if not already installed..."
|
||||||
if ! command_exists kitty; then
|
if ! command_exists kitty; then
|
||||||
|
|
|
@ -1,12 +1,5 @@
|
||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
|
|
||||||
checkEnv() {
|
|
||||||
checkCommandRequirements 'curl groups sudo'
|
|
||||||
checkPackageManager 'apt-get dnf pacman zypper'
|
|
||||||
checkSuperUser
|
|
||||||
checkDistro
|
|
||||||
}
|
|
||||||
|
|
||||||
setupRofi() {
|
setupRofi() {
|
||||||
echo "Install Rofi if not already installed..."
|
echo "Install Rofi if not already installed..."
|
||||||
if ! command_exists rofi; then
|
if ! command_exists rofi; then
|
||||||
|
|
|
@ -22,13 +22,6 @@ fi
|
||||||
|
|
||||||
cd "$LINUXTOOLBOXDIR/linutil" || exit
|
cd "$LINUXTOOLBOXDIR/linutil" || exit
|
||||||
|
|
||||||
checkEnv() {
|
|
||||||
checkCommandRequirements 'curl groups sudo'
|
|
||||||
checkPackageHandler 'apt yum dnf pacman zypper'
|
|
||||||
checkCurrentDirectoryWritable
|
|
||||||
checkSuperUser
|
|
||||||
}
|
|
||||||
|
|
||||||
installDepend() {
|
installDepend() {
|
||||||
## Check for dependencies.
|
## Check for dependencies.
|
||||||
DEPENDENCIES='tar tree multitail tldr trash-cli unzip cmake make jq'
|
DEPENDENCIES='tar tree multitail tldr trash-cli unzip cmake make jq'
|
||||||
|
|
|
@ -1,12 +1,5 @@
|
||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
|
|
||||||
checkEnv() {
|
|
||||||
checkCommandRequirements 'curl groups sudo'
|
|
||||||
checkPackageManager 'apt-get yum dnf pacman zypper'
|
|
||||||
checkCurrentDirectoryWritable
|
|
||||||
checkSuperUser
|
|
||||||
}
|
|
||||||
|
|
||||||
installDepend() {
|
installDepend() {
|
||||||
## Check for dependencies.
|
## Check for dependencies.
|
||||||
echo -e "${YELLOW}Installing dependencies...${RC}"
|
echo -e "${YELLOW}Installing dependencies...${RC}"
|
||||||
|
|
|
@ -4,15 +4,15 @@
|
||||||
LINUXTOOLBOXDIR="$HOME/linuxtoolbox"
|
LINUXTOOLBOXDIR="$HOME/linuxtoolbox"
|
||||||
|
|
||||||
if [ ! -d "$LINUXTOOLBOXDIR" ]; then
|
if [ ! -d "$LINUXTOOLBOXDIR" ]; then
|
||||||
echo -e "${YELLOW}Creating linuxtoolbox directory: $LINUXTOOLBOXDIR${RC}"
|
printf "${YELLOW}Creating linuxtoolbox directory: %s${RC}\n" "$LINUXTOOLBOXDIR"
|
||||||
mkdir -p "$LINUXTOOLBOXDIR"
|
mkdir -p "$LINUXTOOLBOXDIR"
|
||||||
echo -e "${GREEN}linuxtoolbox directory created: $LINUXTOOLBOXDIR${RC}"
|
printf "${GREEN}linuxtoolbox directory created: %s${RC}\n" "$LINUXTOOLBOXDIR"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd "$LINUXTOOLBOXDIR" || exit
|
cd "$LINUXTOOLBOXDIR" || exit
|
||||||
|
|
||||||
install_theme_tools() {
|
install_theme_tools() {
|
||||||
echo -e "${YELLOW}Installing theme tools (qt6ct and kvantum)...${RC}"
|
printf "${YELLOW}Installing theme tools (qt6ct and kvantum)...${RC}\n"
|
||||||
case $PACKAGER in
|
case $PACKAGER in
|
||||||
apt-get)
|
apt-get)
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
|
@ -31,14 +31,14 @@ install_theme_tools() {
|
||||||
sudo pacman --noconfirm -S qt6ct kvantum
|
sudo pacman --noconfirm -S qt6ct kvantum
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo -e "${RED}Unsupported package manager. Please install qt6ct and kvantum manually.${RC}"
|
printf "${RED}Unsupported package manager. Please install qt6ct and kvantum manually.${RC}\n"
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
configure_qt6ct() {
|
configure_qt6ct() {
|
||||||
echo -e "${YELLOW}Configuring qt6ct...${RC}"
|
printf "${YELLOW}Configuring qt6ct...${RC}\n"
|
||||||
mkdir -p "$HOME/.config/qt6ct"
|
mkdir -p "$HOME/.config/qt6ct"
|
||||||
cat <<EOF > "$HOME/.config/qt6ct/qt6ct.conf"
|
cat <<EOF > "$HOME/.config/qt6ct/qt6ct.conf"
|
||||||
[Appearance]
|
[Appearance]
|
||||||
|
@ -46,17 +46,26 @@ style=kvantum
|
||||||
color_scheme=default
|
color_scheme=default
|
||||||
icon_theme=breeze
|
icon_theme=breeze
|
||||||
EOF
|
EOF
|
||||||
echo -e "${GREEN}qt6ct configured successfully.${RC}"
|
printf "${GREEN}qt6ct configured successfully.${RC}\n"
|
||||||
|
|
||||||
|
# Add QT_QPA_PLATFORMTHEME to /etc/environment
|
||||||
|
if ! grep -q "QT_QPA_PLATFORMTHEME=qt6ct" /etc/environment; then
|
||||||
|
printf "${YELLOW}Adding QT_QPA_PLATFORMTHEME to /etc/environment...${RC}\n"
|
||||||
|
echo "QT_QPA_PLATFORMTHEME=qt6ct" | sudo tee -a /etc/environment > /dev/null
|
||||||
|
printf "${GREEN}QT_QPA_PLATFORMTHEME added to /etc/environment.${RC}\n"
|
||||||
|
else
|
||||||
|
printf "${GREEN}QT_QPA_PLATFORMTHEME already set in /etc/environment.${RC}\n"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
configure_kvantum() {
|
configure_kvantum() {
|
||||||
echo -e "${YELLOW}Configuring Kvantum...${RC}"
|
printf "${YELLOW}Configuring Kvantum...${RC}\n"
|
||||||
mkdir -p "$HOME/.config/Kvantum"
|
mkdir -p "$HOME/.config/Kvantum"
|
||||||
cat <<EOF > "$HOME/.config/Kvantum/kvantum.kvconfig"
|
cat <<EOF > "$HOME/.config/Kvantum/kvantum.kvconfig"
|
||||||
[General]
|
[General]
|
||||||
theme=Breeze
|
theme=Breeze
|
||||||
EOF
|
EOF
|
||||||
echo -e "${GREEN}Kvantum configured successfully.${RC}"
|
printf "${GREEN}Kvantum configured successfully.${RC}\n"
|
||||||
}
|
}
|
||||||
|
|
||||||
checkEnv
|
checkEnv
|
||||||
|
|
|
@ -1,12 +1,5 @@
|
||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
|
|
||||||
checkEnv() {
|
|
||||||
checkCommandRequirements 'curl groups sudo'
|
|
||||||
checkPackageManager 'apt-get nala dnf pacman zypper yum xbps-install'
|
|
||||||
checkSuperUser
|
|
||||||
checkDistro
|
|
||||||
}
|
|
||||||
|
|
||||||
fastUpdate() {
|
fastUpdate() {
|
||||||
case ${PACKAGER} in
|
case ${PACKAGER} in
|
||||||
pacman)
|
pacman)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user