├── README.md └── betterctl.sh /README.md: -------------------------------------------------------------------------------- 1 | ### BetterControl have been moved to https://github.com/better-ecosystem/better-control 2 | -------------------------------------------------------------------------------- /betterctl.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # A simple script to install or uninstall Better Control on your OS 3 | clear 4 | echo -e "\e[32mBetter Control Manager\e[0m" 5 | echo -e "your version : \e[34m6.12.0\e[0m" 6 | echo " " 7 | echo -e "This script is still under development to improve it if you find any errors head over to \e[31m\e[1mhttps://github.com/better-ecosystem/better-control/issues\e[0m and open an issue on it" 8 | echo " " 9 | 10 | set -e 11 | 12 | install_arch() { 13 | rm -rf ~/better-control-git 14 | git clone https://aur.archlinux.org/better-control-git.git 15 | clear 16 | cd better-control-git 17 | makepkg -si --noconfirm 18 | rm -rf ~/better-control-git 19 | clear 20 | echo -e "\e[1m\e[4m✅ Installation complete. You can run Better Control using the command 'control' or open the better-control app.\e[0m" 21 | } 22 | 23 | install_debian() { 24 | echo "⬇️Installing dependencies for Debian-based systems..." 25 | sudo apt update 26 | sudo apt install -y libgtk-3-dev network-manager bluez bluez-tools pulseaudio-utils brightnessctl python3-gi python3-dbus python3 power-profiles-daemon gammastep python3-requests python3-qrcode python3-setproctitle python3-pil usbguard 27 | 28 | clear 29 | git clone https://github.com/better-ecosystem/better-control.git 30 | cd better-control 31 | sudo make install 32 | rm -rf ~/better-control 33 | clear 34 | echo -e "\e[1m4m✅ Installation complete. You can run Better Control using the command 'control' or open the better-control app.\e[0m" 35 | } 36 | 37 | install_fedora() { 38 | echo "⬇️Installing dependencies for Fedora-based systems..." 39 | sudo dnf install -y gtk3 NetworkManager bluez pulseaudio-utils \ 40 | python3-gobject python3-dbus python3 power-profiles-daemon \ 41 | gammastep python3-requests python3-qrcode python3-setproctitle \ 42 | python3-pillow usbguard brightnessctl make --allowerasing 43 | clear 44 | 45 | git clone https://github.com/better-ecosystem/better-control.git 46 | cd better-control 47 | sudo make install 48 | rm -rf ~/better-control 49 | clear 50 | echo -e "\e[1m4m✅ Installation complete. You can run Better Control using the command 'control' or open the better-control app.\e[0m" 51 | } 52 | 53 | install_void() { 54 | echo "⬇️Installing dependencies for Void Linux..." 55 | sudo xbps-install -Sy NetworkManager pulseaudio-utils brightnessctl python3-gobject python3-dbus python3 power-profiles-daemon gammastep python3-requests python3-qrcode gtk+3 bluez python3-Pillow usbguard python3-pip python3-setproctitle 56 | clear 57 | 58 | git clone https://github.com/better-ecosystem/better-control.git 59 | cd better-control 60 | sudo make install 61 | rm -rf ~/better-control 62 | clear 63 | echo -e "\e[1m4m✅ Installation complete. You can run Better Control using the command 'control' or open the better-control app.\e[0m" 64 | } 65 | 66 | install_alpine() { 67 | echo "⬇️Installing dependencies for Alpine Linux..." 68 | sudo apk add gtk3 networkmanager bluez bluez-utils pulseaudio-utils brightnessctl py3-gobject py3-dbus python3 power-profiles-daemon gammastep py3-requests py3-qrcode py3-pip py3-setuptools gcc musl-dev python3-dev py3-pillow 69 | pip install setproctitle 70 | clear 71 | 72 | git clone https://github.com/better-ecosystem/better-control.git 73 | cd better-control 74 | sudo make install 75 | rm -rf ~/better-control 76 | clear 77 | echo -e "\e[1m4m✅ Installation complete. You can run Better Control using the command 'control' or open the better-control app.\e[0m" 78 | } 79 | 80 | uninstall_arch() { 81 | echo "Uninstalling better-control-git on Arch Linux..." 82 | sudo pacman -R --noconfirm better-control-git 83 | clear 84 | } 85 | 86 | uninstall_others() { 87 | echo "Uninstalling better-control on other distros..." 88 | git clone https://github.com/better-ecosystem/better-control 89 | cd better-control 90 | sudo make uninstall 91 | rm -rf ~/better-control 92 | clear 93 | echo "\e[1m4m✅ Uninstallation complete.\e[0m]" 94 | } 95 | 96 | detect_os() { 97 | if [ -f /etc/os-release ]; then 98 | . /etc/os-release 99 | echo "$ID" 100 | else 101 | echo "unknown" 102 | fi 103 | } 104 | 105 | confirm() { 106 | # Prompt for yes/no confirmation 107 | while true; do 108 | read -p "$1 [y/n]: " yn 109 | case $yn in 110 | [Yy]* ) return 0;; 111 | [Nn]* ) return 1;; 112 | * ) echo "Please answer yes or no. (Y for yes and N for no)";; 113 | esac 114 | done 115 | } 116 | 117 | echo -e "\e[1mDo you want to install or uninstall or update Better Control?\e0" 118 | echo -e "\e[32m 0) Install\e[0m" 119 | echo -e "\e[32m 1) Uninstall\e[0m" 120 | echo -e "\e[32m 2) Update\e[0m" 121 | echo -e "\e[3myour answer:\e0" 122 | read -r choice 123 | 124 | case "$choice" in 125 | 0|i|I|install) 126 | echo "Starting installation..." 127 | detect_os_id=$(detect_os) 128 | case "$detect_os_id" in 129 | arch|endeavouros|manjaro|garuda) 130 | install_arch 131 | ;; 132 | debian|ubuntu|linuxmint|pop) 133 | install_debian 134 | ;; 135 | fedora|rhel) 136 | install_fedora 137 | ;; 138 | void) 139 | install_void 140 | ;; 141 | alpine) 142 | install_alpine 143 | ;; 144 | nixos) 145 | echo "❄️ Detected NixOS. This package has an unofficial flake here:" 146 | echo "https://github.com/Rishabh5321/better-control-flake" 147 | ;; 148 | *) 149 | echo "❌ Unsupported distro: $detect_os_id please open an issue on the GitHub repository on this and well add your distro." 150 | exit 1 151 | ;; 152 | esac 153 | ;; 154 | 1|u|U|uninstall) 155 | echo "You chose to uninstall Better Control." 156 | if confirm "Are you sure you want to uninstall? Y for yes , N for no"; then 157 | detect_os_id=$(detect_os) 158 | case "$detect_os_id" in 159 | arch|endeavouros|manjaro|garuda) 160 | uninstall_arch 161 | ;; 162 | *) 163 | uninstall_others 164 | ;; 165 | esac 166 | echo "✅ Uninstallation complete." 167 | else 168 | echo "❌ Uninstallation cancelled." 169 | fi 170 | ;; 171 | 172 | 2|update|Update) 173 | echo "Starting update (uninstall and reinstall)..." 174 | detect_os_id=$(detect_os) 175 | case "$detect_os_id" in 176 | arch|endeavouros|manjaro|garuda) 177 | echo "Uninstalling on Arch-based distro..." 178 | uninstall_arch 179 | echo "Installing on Arch-based distro..." 180 | install_arch 181 | ;; 182 | debian|ubuntu|linuxmint|pop) 183 | echo "Uninstalling on Debian-based distro..." 184 | uninstall_others 185 | echo "Installing on Debian-based distro..." 186 | install_debian 187 | ;; 188 | fedora|rhel) 189 | echo "Uninstalling on Fedora-based distro..." 190 | uninstall_others 191 | echo "Installing on Fedora-based distro..." 192 | install_fedora 193 | ;; 194 | void) 195 | echo "Uninstalling on Void Linux..." 196 | uninstall_others 197 | echo "Installing on Void Linux..." 198 | install_void 199 | ;; 200 | alpine) 201 | echo "Uninstalling on Alpine Linux..." 202 | uninstall_others 203 | echo "Installing on Alpine Linux..." 204 | install_alpine 205 | ;; 206 | nixos) 207 | echo "❄️ Detected NixOS. This package has an unofficial flake here:" 208 | echo "https://github.com/Rishabh5321/better-control-flake" 209 | ;; 210 | *) 211 | echo "❌ Unsupported distro: $detect_os_id please open an issue on the GitHub repository on this and well add your distro." 212 | exit 1 213 | ;; 214 | esac 215 | echo "✅ Update complete." 216 | ;; 217 | 218 | 219 | 220 | *) 221 | echo "Invalid choice. Please run the script again and choose 'install' or 'uninstall'." 222 | exit 1 223 | ;; 224 | esac 225 | --------------------------------------------------------------------------------