Shell脚本删除unity启动器(如果存在于Ubuntu 14.04中)和/或xfce面板(在xubuntu的情况下)
只想要shell脚本删除unity启动器(如果存在于Ubuntu 14.04中)和/或xfce面板(在xubuntu的情况下)。
如果有人对此有所了解,请告诉我。
谢谢
更新 :
要在脚本执行时完全删除启动器,我将禁用unity compiz插件。
我们在Checkbox中有这样一个脚本,为了方便起见我在这里粘贴:
#!/usr/bin/env python3 # This file is part of Checkbox. # # Copyright 2014-2015 Canonical Ltd. # Written by: # Daniel Manrique # Sylvain Pineau # # 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 . """ 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)
要禁用unity插件:
./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
如果你正在寻找一个脚本来重新编译没有启动器的统一,这应该是你想要的: 编译没有启动器的Unity