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