本文最后更新于 2022-05-30 09:37:40
前言
本人一直喜欢折腾系统,经常会玩过头把系统搞崩溃。每次重装后都需要进行大量配置,费时费力。所以写了个脚本一键配置,解放双手。
目标
目标 |
进度 |
卸载安装常用软件 |
100% |
系统配置(控制中心设置) |
70% |
系统应用配置(文件管理器、编辑器等) |
0% |
用户应用配置(Chrome、VSCode等) |
0% |
兼容性
仅适配最新版本 Deepin,当前版本 20.6
食用方法
搭配 《我的deepin变形记》 食用效果更佳
1 2 3
| wget https://raw.githubusercontent.com/kt286/deepin-init/master/deepin-init.sh chmod +x deepin-init.sh sh deepin-init.sh
|
连接不上 Github 的同学也可以复制下文中脚本,另存为 deepin-init.sh
文件使用
脚本原文
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204
| #!/bin/bash
cd ~/Downloads
busctl call com.deepin.lastore /com/deepin/lastore com.deepin.lastore.Updater SetAutoCheckUpdates b 0 busctl call com.deepin.lastore /com/deepin/lastore com.deepin.lastore.Updater SetAutoDownloadUpdates b 0 busctl call com.deepin.lastore /com/deepin/lastore com.deepin.lastore.Updater SetUpdateNotify b 0 busctl call com.deepin.lastore /com/deepin/lastore com.deepin.lastore.Manager SetAutoClean b 0
gsettings set com.deepin.xsettings dtk-window-radius 8
gsettings set com.deepin.dde.dock display-mode 'efficient' gsettings set com.deepin.dde.dock window-size-efficient 46
busctl --user call com.deepin.dde.Dock /com/deepin/dde/Dock com.deepin.dde.Dock setPluginVisible sb '显示桌面' false busctl --user call com.deepin.dde.Dock /com/deepin/dde/Dock com.deepin.dde.Dock setPluginVisible sb '屏幕键盘' false busctl --user call com.deepin.dde.Dock /com/deepin/dde/Dock com.deepin.dde.Dock setPluginVisible sb '多任务视图' false busctl --user call com.deepin.dde.Dock /com/deepin/dde/Dock com.deepin.dde.Dock setPluginVisible sb '通知中心' false busctl --user call com.deepin.dde.Dock /com/deepin/dde/Dock com.deepin.dde.Dock setPluginVisible sb '全局搜索' false busctl --user call com.deepin.dde.Dock /com/deepin/dde/Dock com.deepin.dde.Dock setPluginVisible sb '截图录屏' false
gsettings set com.deepin.dde.mouse disable-touchpad true
gsettings set com.deepin.dde.power battery-lid-closed-action 'turnOffScreen' gsettings set com.deepin.dde.power battery-press-power-button 'showSessionUI' gsettings set com.deepin.dde.power battery-lock-delay 0 gsettings set com.deepin.dde.power battery-screen-black-delay 300 gsettings set com.deepin.dde.power battery-sleep-delay 0
gsettings set com.deepin.dde.power line-power-lid-closed-action 'turnOffScreen' gsettings set com.deepin.dde.power line-power-press-power-button 'showSessionUI' gsettings set com.deepin.dde.power line-power-lock-delay 0 gsettings set com.deepin.dde.power line-power-screen-black-delay 900 gsettings set com.deepin.dde.power line-power-sleep-delay 0
sudo busctl call com.deepin.daemon.Grub2 /com/deepin/daemon/Grub2/Theme com.deepin.daemon.Grub2.Theme SetBackgroundSourceFile s '/usr/share/wallpapers/deepin/mike-yukhtenko-a2kD4b0KK4s-unsplash.jpg' sudo sed -i 's/deepin-fallback/deepin/g' /etc/default/grub sudo /usr/lib/deepin-api/adjust-grub-theme -width 1920 -height 1080 sudo update-grub2
wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add - sudo sh -c 'echo "deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list'
wget -q -O - https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add - sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'
wget -q -O - https://mirrors.cloud.tencent.com/docker-ce/linux/debian/gpg | sudo apt-key add - sudo sh -c 'echo "deb [arch=amd64] https://mirrors.cloud.tencent.com/docker-ce/linux/debian buster stable" > /etc/apt/sources.list.d/docker.list'
wget -q -O - https://www.scootersoftware.com/RPM-GPG-KEY-scootersoftware | sudo apt-key add - sudo sh -c 'echo "deb https://www.scootersoftware.com/ bcompare4 non-free" > /etc/apt/sources.list.d/scootersoftware.list' sudo sh -c 'echo "Package: bcompare\nPin: origin www.scootersoftware.com\nPin-Priority: 600" > /etc/apt/preferences.d/scootersoftware'
wget -q -O - https://deb.nodesource.com/gpgkey/nodesource.gpg.key | sudo apt-key add - sudo sh -c 'echo "deb https://deb.nodesource.com/node_16.x buster main" > /etc/apt/sources.list.d/nodesource.list'
sudo sh -c 'echo "deb [trusted=yes] https://proposed-packages.deepin.com/dde-apricot unstable main contrib non-free" > /etc/apt/sources.list.d/deepin-unstable.list'
wget -q -O - https://better-dde.github.io/ppa/better-dde.gpg | sudo apt-key add - sudo sh -c 'echo "deb https://better-dde.github.io/ppa/ ./" > /etc/apt/sources.list.d/better-dde.list'
sudo apt purge -y libflashplugin-pepper rm -rf ~/.config/google-chrome/PepperFlash/
sudo apt purge -y deepin-manual sudo apt purge -y dde-manual-content sudo apt purge -y dde-introduction
sudo apt purge -y deepin-feedback sudo apt purge -y deepin-app-store sudo apt purge -y deepin-deepinid-client sudo apt purge -y deepin-calculator sudo apt purge -y deepin-draw sudo apt purge -y deepin-voice-note sudo apt purge -y deepin-album sudo apt purge -y deepin-camera sudo apt purge -y deepin-mail sudo apt purge -y deepin-screensaver* sudo apt purge -y deepin-clone sudo apt purge -y deepin-recovery-plugin sudo apt purge -y deepin-ab-recovery sudo apt purge -y deepin-boot-maker sudo apt purge -y gnome-theme* sudo apt purge -y libreoffice* sudo apt purge -y simple-scan sudo apt purge -y printer-driver-deepin-cloud-print sudo apt purge -y org.deepin.browser sudo apt purge -y org.deepin.downloader sudo apt purge -y deepin-deb-installer sudo apt purge -y uos-release-note sudo apt purge -y deepin-forum sudo apt purge -y fcitx* sudo apt purge -y nano
sudo apt purge -y plymouth*
sudo apt purge -y com.deepin*
sudo apt autoremove -y --purge
sudo apt update && sudo apt dist-upgrade -y sudo apt install -y curl sudo apt install -y git sudo apt install -y console-setup sudo apt install -y cmake-extras sudo apt install -y extra-cmake-modules sudo apt install -y build-essential sudo apt install -y code sudo apt install -y google-chrome-stable sudo apt install -y com.qq.office.deepin sudo apt install -y com.qq.weixin.deepin sudo apt install -y com.oray.sunlogin.client sudo apt install -y cn.wps.wps-office sudo apt install -y docker-ce sudo apt install -y fcitx5-chinese-addons sudo apt install -y fcitx5-material-color sudo apt install -y fcitx5-pinyin-zhwiki sudo apt install -y fcitx5-flypy sudo apt install -y bcompare sudo apt install -y nodejs sudo apt install -y remmina
sudo apt install -y nvidia-detect nvidia-detect | awk 'match($0, /nvidia-.*/, a) {print a[0]}' | xargs sudo apt -y install
sudo apt install -y dde-dock-graphics-plugin
sudo sed -i '$a\NoDisplay=true' /usr/share/applications/fcitx5-configtool.desktop sudo sed -i '$a\NoDisplay=true' /usr/share/applications/kbd-layout-viewer5.desktop
mkdir -p ~/.local/share/applications/
cp -r /opt/apps/com.qq.office.deepin/entries/icons/* ~/.local/share/icons/ cp -r /opt/apps/com.qq.office.deepin/entries/applications/* ~/.local/share/applications/
cp -r /opt/apps/com.qq.weixin.deepin/entries/icons/* ~/.local/share/icons/ cp -r /opt/apps/com.qq.weixin.deepin/entries/applications/* ~/.local/share/applications/
cp -r /opt/apps/com.oray.sunlogin.client/entries/icons/* ~/.local/share/icons/ cp -r /opt/apps/com.oray.sunlogin.client/entries/applications/* ~/.local/share/applications/
cp -r /opt/apps/cn.wps.wps-office/entries/icons/* ~/.local/share/icons/ cp -r /opt/apps/cn.wps.wps-office/entries/applications/* ~/.local/share/applications/
xdg-mime default dde-file-manager.desktop inode/directory
sudo rm /etc/opt/chrome/policies/recommended/*.json
mkdir -p ~/.config/autostart sudo cp /usr/share/applications/org.fcitx.Fcitx5.desktop ~/.config/autostart/org.fcitx.Fcitx5.desktop
sudo mv /usr/share/icons/bloom/actions/24/input-keyboard-symbolic.svg /usr/share/icons/bloom/actions/24/input-keyboard-symbolic.svg.bak sudo ln -s /usr/share/icons/bloom/status/20/keyboard-symbolic.svg /usr/share/icons/bloom/status/20/input-keyboard-symbolic.svg
sh -c '/opt/apps/com.qq.office.deepin/files/run.sh -c' export WINEPREFIX=$HOME/.deepinwine/Deepin-TIM rm TIM3.3.9.22051.exe wget -t 3 -T 15 https://dldir1.qq.com/qqfile/qq/TIM3.3.9/TIM3.3.9.22051.exe deepin-wine6-stable TIM3.3.9.22051.exe
sh -c '/opt/apps/com.qq.weixin.deepin/files/run.sh -c' export WINEPREFIX=$HOME/.deepinwine/Deepin-WeChat rm WeChatSetup.exe wget -t 3 -T 15 https://dldir1.qq.com/weixin/Windows/WeChatSetup.exe deepin-wine6-stable WeChatSetup.exe
rm -rf ~/.deepinwine/Deepin-WeChat/drive_c/users/$(whoami)/Application\ Data/Tencent/WeChat/XPlugin/Plugins/XWeb/ touch ~/.deepinwine/Deepin-WeChat/drive_c/users/$(whoami)/Application\ Data/Tencent/WeChat/XPlugin/Plugins/XWeb chmod 000 ~/.deepinwine/Deepin-WeChat/drive_c/users/$(whoami)/Application\ Data/Tencent/WeChat/XPlugin/Plugins/XWeb
sudo apt autoremove -y --purge
|