Skip to content

Instantly share code, notes, and snippets.

@x42en
Last active December 9, 2019 19:38
Show Gist options
  • Save x42en/81e95dad5e3ab5d67fd4943301803bb7 to your computer and use it in GitHub Desktop.
Save x42en/81e95dad5e3ab5d67fd4943301803bb7 to your computer and use it in GitHub Desktop.
Macbuntu install party
#!/bin/bash
# Transform Ubuntu 18.04 or Linux Mint 19 to MacBuntu
# https://www.noobslab.com/2018/08/macbuntu-1804-transformation-pack-ready.html
# If you want to change another version Ubuntu or Linux Mint?
# Search MacBuntu for your version on https://www.noobslab.com/search?q=MacBuntu
INSTALL_LOG='/tmp/macbuntu_install.log'
# Setup workspace
WORKSPACE=~/.macbuntu
function usage {
echo "Usage: $0 [--install] [--remove]"
exit 1
}
function install {
mkdir -p $WORKSPACE/wallpapers/5k
echo "[+] Download Wallpapers..."
# Download MacBuntu OS Wallpapers
wget -qO- http://drive.noobslab.com/data/Mac/MacBuntu-Wallpapers.zip | busybox unzip - -d $WORKSPACE/wallpapers/ && mv $WORKSPACE/wallpapers/MacBuntu-Wallpapers $WORKSPACE/wallpapers/macbuntu
# Download default macOS 5K wallpapers
# https://512pixels.net/projects/default-mac-wallpapers-in-5k/
# wget http://512pixels.net/downloads/macos-wallpapers/10-0_10.1.png -P $WORKSPACE/wallpapers/5k
cat <<EOF | xargs -P 0 wget -qP $WORKSPACE/wallpapers/5k
http://512pixels.net/downloads/macos-wallpapers/10-0_10.1.png
http://512pixels.net/downloads/macos-wallpapers/10-2.png
http://512pixels.net/downloads/macos-wallpapers/10-3.png
http://512pixels.net/downloads/macos-wallpapers/10-4.png
http://512pixels.net/downloads/macos-wallpapers/10-5.png
http://512pixels.net/downloads/macos-wallpapers/10-6.png
http://512pixels.net/downloads/macos-wallpapers/10-7.png
http://512pixels.net/downloads/macos-wallpapers/10-8.jpg
http://512pixels.net/downloads/macos-wallpapers/10-9.jpg
http://512pixels.net/downloads/macos-wallpapers/10-10.jpg
http://512pixels.net/downloads/macos-wallpapers/10-11.jpg
http://512pixels.net/downloads/macos-wallpapers/10-12.jpg
http://512pixels.net/downloads/macos-wallpapers/10-13.jpg
https://512pixels.net/downloads/macos-wallpapers/10-14-Day.jpg
https://512pixels.net/downloads/macos-wallpapers/10-14-Night.jpg
http://512pixels.net/downloads/macos-wallpapers/10-15-beta-light.jpg
http://512pixels.net/downloads/macos-wallpapers/10-15-beta-dark.jpg
EOF
# Enter these commands in terminal to get themes, icons and cursors.
echo "[+] Install noobslab repository"
sudo add-apt-repository ppa:noobslab/macbuntu &>> ${INSTALL_LOG}
echo "[+] Update system"
sudo apt -qq update &>> ${INSTALL_LOG}
sudo apt -qq -y install macbuntu-os-icons-v1804 macbuntu-os-ithemes-v1804 slingscold albert plank macbuntu-os-plank-theme-v1804 gnome-tweak-tool unity-tweak-tool gnome-shell-extensions lightdm-webkit-greeter &>> ${INSTALL_LOG}
echo "[+] Install fonts"
wget -qO mac-fonts.zip http://drive.noobslab.com/data/Mac/macfonts.zip
sudo unzip mac-fonts.zip -d /usr/share/fonts && rm mac-fonts.zip
sudo fc-cache -f -v
#echo "[+] Install login manager"
#sudo git clone https://github.com/paysonwallach/aqua-lightdm-webkit-theme /usr/share/lightdm-webkit/themes/aqua
echo "[+] Install multi-touch gestures"
sudo apt -qq -y install xdotool wmctrl libinput-tools &>> ${INSTALL_LOG}
cd /tmp
git clone https://github.com/bulletmark/libinput-gestures.git
cd ./libinput-gestures
sudo make install
sudo usermod -a -G input ${USER}
libinput-gestures-setup autostart
echo "[!] After installation choose theme, icons and mac cursor from tweak tool."
}
function uninstall {
# Uninstall themes and icons
echo "[+] Uninstall packages"
sudo apt remove --purge macbuntu-os-icons-v1804 macbuntu-os-ithemes-v1804 slingscold albert plank macbuntu-os-plank-theme-v1804 gnome-tweak-tool unity-tweak-tool gnome-shell-extensions lightdm-webkit-greeter &>> ${INSTALL_LOG}
echo "[+] Remove all ${WORKSPACE} directory"
rm -rf ${WORKSPACE}
echo "[+] Remove fonts"
echo "[+] Remove repository"
sudo add-apt-repository -r ppa:noobslab/macbuntu
echo "[+] Remove multi-gestures"
libinput-gestures-setup stop
libinput-gestures-setup autostop
sudo libinput-gestures-setup uninstall
}
echo -e "\t\t..:: Macbuntu Install Party ::.."
# Check args
POSITIONAL=()
while [[ $# -gt 0 ]]
do
key="$1"
case $key in
-i|--install)
INSTALL=1
shift # past argument
;;
-r|--remove)
REMOVE=1
shift # past argument
;;
-h|--help)
usage >&2
;;
*) # unknown option
POSITIONAL+=("$1") # save it in an array for later
shift # past argument
;;
esac
done
set -- "${POSITIONAL[@]}" # restore positional parameters
if [[ -z ${INSTALL} && -z ${REMOVE} ]]; then
usage >&2;
fi
echo "[+] MacBuntu is set on ${WORKSPACE}"
echo "[+] Monitor actions using 'tail -f ${INSTALL_LOG}' command"
if [[ ${INSTALL} ]]; then
install
else
uninstall
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment