![用於刪除 Unity 啟動器(如果在 Ubuntu 14.04 中存在)和/或 xfce 面板(如果是 xubuntu)的 Shell 腳本](https://rvso.com/image/1127625/%E7%94%A8%E6%96%BC%E5%88%AA%E9%99%A4%20Unity%20%E5%95%9F%E5%8B%95%E5%99%A8%EF%BC%88%E5%A6%82%E6%9E%9C%E5%9C%A8%20Ubuntu%2014.04%20%E4%B8%AD%E5%AD%98%E5%9C%A8%EF%BC%89%E5%92%8C%2F%E6%88%96%20xfce%20%E9%9D%A2%E6%9D%BF%EF%BC%88%E5%A6%82%E6%9E%9C%E6%98%AF%20xubuntu%EF%BC%89%E7%9A%84%20Shell%20%E8%85%B3%E6%9C%AC.png)
只需要 shell 腳本刪除 unity 啟動器(如果在 Ubuntu 14.04 中存在)和/或 xfce 面板(在 xubuntu 的情況下)。
如果有人有同樣的想法,請告訴我。
謝謝
答案1
更新:
要在腳本執行時完全刪除啟動器,我將停用 unity compiz 外掛程式。
我們有這樣一個腳本複選框,為了方便起見,我將其貼在這裡:
#!/usr/bin/env python3
# This file is part of Checkbox.
#
# Copyright 2014-2015 Canonical Ltd.
# Written by:
# Daniel Manrique <[email protected]>
# Sylvain Pineau <[email protected]>
#
# Checkbox is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3,
# as published by the Free Software Foundation.
#
# Checkbox is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Checkbox. If not, see <http://www.gnu.org/licenses/>.
"""
manage_compiz_plugin
====================
This script allows enabling or disabling compiz plugins using
gsettings. Changes take effect on the fly.
"""
from gettext import gettext as _
import argparse
import gettext
import os
import sys
import subprocess
import time
PATH="org.compiz.core:/org/compiz/profiles/unity/plugins/core/"
KEY="active-plugins"
gettext.textdomain("2013.com.canonical.certification.checkbox")
gettext.bindtextdomain("2013.com.canonical.certification.checkbox",
os.getenv("CHECKBOX_PROVIDER_LOCALE_DIR", None))
plugins = eval(subprocess.check_output(["gsettings", "get", PATH, KEY]))
parser = argparse.ArgumentParser(description=_("enable/disable compiz plugins"),
epilog=_("Available plugins: {}").format(plugins))
parser.add_argument("plugin", type=str, help=_('Name of plugin to control'))
parser.add_argument("action", type=str, choices=['enable', 'disable'],
help=_("What to do with the plugin"))
args = parser.parse_args()
if args.action == 'enable':
if args.plugin in plugins:
raise SystemExit(_("Plugin {} already enabled").format(args.plugin))
plugins.append(args.plugin)
else:
if args.plugin not in plugins:
raise SystemExit(_("Plugin {} doesn't exist").format(args.plugin))
plugins.remove(args.plugin)
subprocess.call(["gsettings", "set", PATH, KEY, str(plugins)])
time.sleep(3)
若要停用統一外掛程式:
./manage_compiz_plugin unityshell disable
要恢復它:
./manage_compiz_plugin unityshell enable
第一個版本(使用自動隱藏):
若要隱藏 Unity 啟動器,請使用下列命令:
dconf write /org/compiz/profiles/unity/plugins/unityshell/launcher-hide-mode 1
dconf write /org/compiz/profiles/unity/plugins/unityshell/edge-responsiveness 0
要恢復它,只需使用:
dconf write /org/compiz/profiles/unity/plugins/unityshell/launcher-hide-mode 0
dconf write /org/compiz/profiles/unity/plugins/unityshell/edge-responsiveness 2
答案2
如果您正在尋找一個無需啟動器即可重新編譯 Unity 的腳本,那麼這應該正是您想要的: 無需啟動器即可編譯 Unity