为 Ubuntu 18.04 安装 MacOS 主题
本文为一个脚本为 Ubuntu 安装 MacOS 主题教程
脚本来自 Youtube 博主(见下文 Follow 链接 1)分享在 GitHub 上(见下文 Follow 链接 2)
因为有一些小细节,所以在此分享一遍(同时也是为部分朋友搬运资源)。
1 Follow
2 ScreenShots
3 Install macOS Themes on Ubuntu
-
xtrem must be installed in the system. To install xterm, open Terminal and execute:
$ sudo apt update $ sudo apt install xterm -
将 本脚本 保存到桌面.
保存文件名为
macUbuntu.sh; 文章后附“本脚本”完整代码!!! 注意 !!!,该脚本 line 28 需要下载原作者在 Dropbox 上分享的 Mac 主题文件。
但是因为众所周知的原因,你“可能”下载不了。以下提供两种解决方案:
一、
如果你可以科学上网,那么你可以直接执行改脚本它会下载这个分享的文件。
二、
如果你不能科学上网,那么你可以下载该文件(CustomizedPack.tar.xz)之后,将它移动到本机的/var/www/html/文件夹下(我假设你知道我这段话的意思,这个文件夹下在有安装 Apache 的 Ubuntu 主机上就可以通过浏览器访问/下载),然后修改 line 28 这一行curl -L -O https://www.dropbox.com/s/rga88t2i4n9mbxz/CustomizedPack.tar.xz为
curl -L -O http://localhost/CustomizedPack.tar.xz即可。
-
执行上述脚本
警告:
- Don’t run this script as sudo.
- This script will open xterm several times to install some required packages. When promted, enter your password on xterm window.
- Open Terminal again and execute:
cd Desktop chmod +x macUbuntu.sh ./macUbuntu.sh注意,执行上述脚本的时候,需要在打开的 xterm 窗口输入几次 sudo 密码和 ‘y’ 来确认安装一些所需软件。
-
Log Out/Restart your computer.
以上,只要执行该脚本就能安装完成 MacOS 桌面主题。
还有其它定制,如需要,请参考上文 “Follow” 给出的链接来操作。
附
macUbuntu.sh:
Skip to content
Search or jump to…
Pull requests
Issues
Marketplace
Explore
@RDpWTeHM Sign out
3
13 11 debugster/GnomeTweaks
Code Issues 0 Pull requests 0 Projects 0 Wiki Insights
GnomeTweaks/macUbuntu.sh
0803023 on 1 Sep 2018
@debugster debugster Update macUbuntu.sh
148 lines (121 sloc) 6.12 KB
#!/bin/bash
RED='\033[0;31m'
GREEN='\033[0;32m'
BROWN='\033[0;33m'
BLUE='\033[0;34m'
YELLOW='\033[1;33m'
CYAN='\033[1;36m'
NC='\033[0m' # No Color
clear
echo -e " ${BROWN}#####################################${NC}"
echo -e " ${BROWN}# macOS Theme for Ubuntu #${NC}"
echo -e " ${BROWN}#-----------------------------------#${NC}"
echo -e " ${BROWN}# Author : Nayeem Mahmood #${NC}"
echo -e " ${BROWN}# Email : [email protected] #${NC}"
echo -e " ${BROWN}# Facebook : fb.com/alive.nayeem #${NC}"
echo -e " ${BROWN}# GitHub : github.com/debugster #${NC}"
echo -e " ${BROWN}#####################################${NC}"
#Install required packages
echo -e "${CYAN}Starting : ${NC}${YELLOW}Attempting to install Required Packages : Curl, Gnome Tweak Tool, GTK Clutter${NC}"
xterm -e 'sh -c "echo Curl, Gnome Tweak Tool and GTK Clutter will be installed. Please enter your password.; sudo apt update; sudo apt install curl gnome-tweak-tool gir1.2-gtkclutter-1.0"'
echo -e "${GREEN}Finished : ${NC}${YELLOW}Installing Packages : Curl, Gnome Tweak Tool, GTK Clutter${NC}"
echo -e "${CYAN}Starting : ${NC}${YELLOW}Downloading required files${NC}"
cd ~/Downloads/
curl -L -O https://www.dropbox.com/s/rga88t2i4n9mbxz/CustomizedPack.tar.xz
echo -e "${GREEN}Finished : ${NC}${YELLOW}Downloading required files${NC}"
[ ! -d CustomizedPack ] && mkdir -p CustomizedPack
tar xvf CustomizedPack.tar.xz -C CustomizedPack
clear
cd CustomizedPack
[ ! -d ~/.themes ] && mkdir -p ~/.themes
[ ! -d ~/Downloads/Apple-Darwin-For-Plymouth/darwin ] && mkdir -p ~/Downloads/Apple-Darwin-For-Plymouth/darwin
[ ! -d ~/.icons ] && mkdir -p ~/.icons
[ ! -d ~/.local/share/fonts ] && mkdir -p ~/.local/share/fonts
[ ! -d ~/.local/share/gnome-shell/extensions ] && mkdir -p ~/.local/share/gnome-shell/extensions
#ls
echo -e "${GREEN}Copying Cursor Files${NC}"
cp -r Cursor/* ~/.icons/
echo -e "${GREEN}Copying Icon Files${NC}"
cp -r Icons/* ~/.icons/
echo -e "${GREEN}Copying Shell Files${NC}"
cp -r Shell/* ~/.themes/
echo -e "${GREEN}Copying Theme Files${NC}"
cp -r Themes/* ~/.themes/
cp -r Apple-Darwin-For-Plymouth/darwin/* ~/Downloads/Apple-Darwin-For-Plymouth/darwin/
echo -e "${GREEN}Copying Fonts${NC}"
cp -r Fonts/* ~/.local/share/fonts/
echo -e "${GREEN}Copying Wallpapers${NC}"
cp -r Wallpapers/* ~/Pictures/
#Install the required gnome extensions
cd ~/Downloads/CustomizedPack/
echo -e "${CYAN}Starting : ${NC}${YELLOW}Installing required extensions${NC}"
./gnome-ext-install.sh install [email protected] [email protected] [email protected] [email protected]
clear
echo -e "${GREEN}Finished : ${NC}${YELLOW}User Theme, Blyr, Dash to Dock, Net Speed Monitor extensions are installed.${NC}"
#Changing UI
## Application Theme
echo -e "${BLUE}Changing Theme${NC}"
dconf write /org/gnome/desktop/interface/gtk-theme "'McOS-MJV'"
## Cursor
echo -e "${BLUE}Changing Cursor${NC}"
dconf write /org/gnome/desktop/interface/cursor-theme "'El_Capitan_CursorsMODNew'"
## Icons
echo -e "${BLUE}Changing Icons${NC}"
dconf write /org/gnome/desktop/interface/icon-theme "'MacRemix'"
## Shell
echo -e "${BLUE}Changing Shell${NC}"
dconf write /org/gnome/shell/extensions/user-theme/name "'MacOS_HS'"
## Wallpaper
echo -e "${BLUE}Changing Wallpaper${NC}"
dconf write /org/gnome/desktop/background/picture-uri "'file:///home/$USER/Pictures/macOS-mojave-Desert-5.jpg'"
dconf write /org/gnome/desktop/background/picture-options "'zoom'"
## Lock Screen Wallpaper
echo -e "${BLUE}Changing Lock Screen Wallpaper${NC}"
dconf write /org/gnome/desktop/screensaver/picture-uri "'file:///home/$USER/Pictures/macOS-mojave-Desert-5.jpg'"
dconf write /org/gnome/desktop/screensaver/picture-options "'zoom'"
## Show Desktop Icons
echo -e "${BLUE}Enabling Desktop Icons${NC}"
dconf write /org/gnome/desktop/background/show-desktop-icons "true"
## Button Layout
echo -e "${BLUE}Moving Title Buttons to Left${NC}"
dconf write /org/gnome/desktop/wm/preferences/button-layout "'close,minimize,maximize:'"
##### Dash To Dock
## Monitor Placement
echo -e "${BLUE}Showing Dock on Primary Monitor Only${NC}"
dconf write /org/gnome/shell/extensions/dash-to-dock/preferred-monitor "0"
## Dock Placement
echo -e "${BLUE}Changing Dock Position to Bottom${NC}"
dconf write /org/gnome/shell/extensions/dash-to-dock/dock-position "'BOTTOM'"
## Max Icon Size
echo -e "${BLUE}Setting Max Icon Size 32${NC}"
dconf write /org/gnome/shell/extensions/dash-to-dock/dash-max-icon-size "32"
## Autohide
echo -e "${BLUE}Enabling Dock Autohide${NC}"
dconf write /org/gnome/shell/extensions/dash-to-dock/dock-fixed "false"
## Show Launcher on Left
echo -e "${BLUE}Showing App Launcher on Left${NC}"
dconf write /org/gnome/shell/extensions/dash-to-dock/show-apps-at-top "true"
## Mouse Scroll Action
echo -e "${BLUE}Changing Mouse Scroll Action to Cycle Windows${NC}"
dconf write /org/gnome/shell/extensions/dash-to-dock/scroll-action "'cycle-windows'"
## Custom Dock Indicator
echo -e "${BLUE}Changing Dock Indicator${NC}"
dconf write /org/gnome/shell/extensions/dash-to-dock/custom-theme-running-dots "false"
dconf write /org/gnome/shell/extensions/dash-to-dock/custom-theme-customize-running-dots "false"
## Disable Custom Dock Shrink
echo -e "${BLUE}Disabling Custom Dock Shrink${NC}"
dconf write /org/gnome/shell/extensions/dash-to-dock/custom-theme-shrink "false"
## Dock Transparency Mode
echo -e "${BLUE}Changing Dock Transparency Mode${NC}"
dconf write /org/gnome/shell/extensions/dash-to-dock/transparency-mode "'DEFAULT'"
echo -e "${RED}Removing Downloaded Unnecessary Files${NC}"
cd ~/Downloads/
rm -rf CustomizedPack
rm CustomizedPack.tar.xz
echo -e "${YELLOW}Uninstalling Ubuntu Dock (It might be seen on lock screen)${NC}"
xterm -e 'sh -c "echo Ubuntu dock will be uninstalled. Please enter your password.; sudo apt-get remove gnome-shell-extension-ubuntu-dock; sudo apt update"'
echo -e "${CYAN}Theme Credit : ${NC}${GREEN}paulxfce${NC}"
echo -e "${CYAN}Shell Credit : ${NC}${GREEN}unc926${NC}"
echo -e "${CYAN}Cursor Credit : ${NC}${GREEN}dcomim | krourke${NC}"
echo -e "${CYAN}Icons Credit : ${NC}${GREEN}krourke | umayanga | zayronXIO${NC}"
echo -e "${GREEN}DONE. ENJOY ;)${NC}"
© 2019 GitHub, Inc.
Terms
Privacy
Security
Status
Help
Contact GitHub
Pricing
API
Training
Blog
About
Press h to open a hovercard with more details. Favorites
Default by OctoMate