我可以在Unity图标中添加更多应用程序吗?

是否可以在一个Unity图标/按钮中“封装”多个应用程序? 为了控制启动器上的按钮数量,将一些相同类型的应用程序(例如小型附件应用程序,如截屏或Web应用程序等)存储在单个按钮中对我来说非常有用,因为这是可能的使用xfce面板……

在此处输入图像描述

概观

这个答案给出了两个可能的答案 – 抽屉快速列表

抽屉

抽屉可通过PPA获得12.04:

在此处输入图像描述

sudo add-apt-repository ppa:ian-berke/ppa-drawers sudo apt-get update sudo apt-get install drawers 

从Dash发射抽屉。 对于您的抽屉,从~/.local/share/applications拖放创建的图标。

启动抽屉 – 然后您可以将喜爱的应用程序从Dash拖放到抽屉上。

图形快速列表

启动多个选项的默认统一方法是使用快捷列表 – 右键单击​​启动器图标以显示该启动器图标的选项菜单。

在此处输入图像描述

使用MyUnity可以使用12.04的图形方法创建快速列表

myunity 安装myunity

在此处输入图像描述

此选项允许您创建快速列表 – 快捷列表是右键单击启动器图标时显示的子菜单。

使用11.04的图形方法创建快速列表是正在进行的工作 – 例如Unity Launcher Editor

在此处输入图像描述

这适用于Natty(ubuntu 11.04) – 但由于python版本更改,在oneiric(ubuntu 11.10)中不起作用(如编写本文时)

安装

 cd ~/Downloads sudo apt-get install bzr bzr branch lp:unity-launcher-editor 

跑步

 cd ~/Downloads/unity-launcher-editor ./ule 

手动创建快速列表

幸运的是,手动创建快速列表也很简单。 快速列表是一个.desktop文件,至少包含以下内容:

 [Desktop Entry] Version=1.0 Type=Application Terminal=false Icon=adressbook Name=Sample Menu Exec=example_application1 X-Ayatana-Desktop-Shortcuts=example_app2; [example_apps Shortcut Group] Name=Name of Application 2 Exec=example_application2 TargetEnvironment=Unity 

让我们将其分解为您应该更改的区域(从示例的顶部到底部工作)。

  • Icon= :这是/usr/share/icons的图形图片文件
  • Name= :这是您将鼠标hover在启动器图标上时看到的工具提示
  • Exec= :当您左键单击启动器图标时,这是默认的可执行文件
  • X-Ayatana-Desktop-Shortcuts= :这是一个以分号分隔的组列表。

每个组都是条目[group_name Shortcut Group]下的快速列表菜单选项

  • example_apps这是X-Ayatana-Desktop-Shortcuts字段中组的名称
  • Name= :这是快速列表菜单文本
  • Exec= :这是选择快速列表条目时的可执行文件

.desktop文件应该存在于本地文件夹~/.local/share/applications

如果它尚不存在,请创建此文件夹:

 mkdir -p ~/.local/share/applications 

在文件夹中创建一个文件 – 例如myquicklist.desktop ,然后将此文件从Nautilus拖放到Unity Launcher中。

模仿XFCE发射器

单击启动器按钮时的默认XFCE操作是运行可执行文件。 对于我们的启动器,您可以默认使用计算器

 Name=My Quicklist Exec=gcalctool 

XFCE启动器中可能的其他操作是仅显示启动器项目列表。 不幸的是,在Unity中你不能这样做 – 它必须是右键单击。

默认的Exec=必须运行一些东西 – 例如,您可以使用它来显示一个快速弹出对话框,提醒您右键单击:

 Name=My Quicklist Exec=zenity --title="action" --info --text="Right-Click for quicklist" --height=50 --width=275 --timeout=2 

您提供了以下示例:

  • 屏幕截图: Exec=gnome-screenshot -i
  • 字典: Exec=xfce4-dict
  • 计算器: Exec=gcalctool

在此处输入图像描述

因此,您的示例.desktop文件将如下所示:

 [Desktop Entry] Version=1.0 Type=Application Terminal=false Icon=addressbook Name=My Quicklist Exec=zenity --title="action" --info --text="Right-Click for quicklist" --height=50 --width=275 --timeout=2 X-Ayatana-Desktop-Shortcuts=screenshot;dictionary;calculator [screenshot Shortcut Group] Name=Gnome Screenshot Exec=gnome-screenshot -i TargetEnvironment=Unity [dictionary Shortcut Group] Name=XFCE Dictionary Exec=xfce4-dict TargetEnvironment=Unity [calculator Shortcut Group] Name=Gnome Calculator Exec=gcalctool TargetEnvironment=Unity 

是的,您可以使用Launcher快捷列表将应用程序添加到启动器图标的右键菜单中。 看看这个问题:

  • 可以使用哪些自定义启动器和Unity快速列表?

具体来说, libreoffice示例可以修改为只在同一个图标下运行您想要的任何应用程序。

适用于Ubuntu 11.10(Oneiric)和Unity(3D)

示例:“ Ubuntu Toolbox ”多function图标

说明: 单个“工具箱”图标,替换多个Unity启动器图标,用于: 系统设置 (默认), Ubuntu TweakUbuntu软件中心软件更新

在此处输入图像描述

评论: 我确实对图标(非自定义),文件命名和默认项目做了一些妥协。 其他替代方案可能会发生冲突或可能与现有项目混淆。 (被警告)

 mkdir ~/.local/share/applications (if required) gedit ~/.local/share/applications/toolbox.desktop & 

注意: &符号’&’立即释放命令行。

我的自定义’ toolbox.desktop ‘文件:(可以轻松编辑)

 [Desktop Entry] Name=Ubuntu Toolbox Comment=System Settings Exec=gnome-control-center --overview Icon=redhat-tools Terminal=false Type=Application StartupNotify=true Categories=GNOME;GTK;System; OnlyShowIn=GNOME;Unity; X-GNOME-Bugzilla-Bugzilla=GNOME X-GNOME-Bugzilla-Product=gnome-control-center X-GNOME-Bugzilla-Component=shell X-GNOME-Bugzilla-Version=3.2.1 X-Ubuntu-Gettext-Domain=gnome-control-center-2.0 X-Ayatana-Desktop-Shortcuts=UbuntuTweak;SoftwareCenter;SoftwareUpdates; [UbuntuTweak Shortcut Group] Name=Ubuntu Tweak Exec=ubuntu-tweak TargetEnvironment=Unity [SoftwareCenter Shortcut Group] Name=Ubuntu Software Center Exec=software-center TargetEnvironment=Unity [SoftwareUpdates Shortcut Group] Name=Update Manager Exec=update-manager -c TargetEnvironment=Unity 

抽屉是在Unity Laucher中分组应用程序的完美方式。

截至目前,它不在repos中,但你仍然可以从ppa安装它。

 sudo add-apt-repository ppa:ian-berke/ppa-drawers sudo apt-get update sudo apt-get install drawers 

一些截图显示抽屉的使用

在此处输入图像描述

在此处输入图像描述

创建新抽屉后,您可以从Dash中拖放应用程序。

您甚至可以在抽屉中存储文件和文件夹,从而提供快速访问常用文件的方法。

在此处输入图像描述

资料来源:
http://maketecheasier.com/group-apps-together-in-unity-launcher/2012/08/10
http://www.iloveubuntu.net/how-easily-group-items-featuring-their-own-mini-dash-unity-launcher-drawers

我认为david6和fossfreedom的答案都非常好,这只是为了向您展示相同的变体。

在这种情况下,它是我用于各种操作的“实用程序”图标,它使用标准应用程序,一些shell脚本和命令。 因为我使用synaptic,所以我设置了左键单击图标以运行synaptic,其他一切都是右键单击快速列表。

另外一个兴趣点 – 在自定义.desktops中使用快速列表’X-Ayatana-Desktop-Shortcuts =’行确定快速列表中显示的内容和显示的顺序。

防爆。 – 你可以有10个[任何快捷方式组]条目,但只显示其中一些是’X-Ayatana-Desktop-Shortcuts =’行中的内容

 [Desktop Entry] Version=1.0 Type=Application Terminal=false Exec=synaptic-pkexec Name=Utilities Icon=/usr/share/icons/Humanity/categories/48/applications-other.svg X-Ayatana-Desktop-Shortcuts=UpdateManager;CompizConfig;Htop;GetUpdates;NautilusActions;DconfEditor;GconfEditor;ForceQuit;ScreenShot;SeachFiles;Gksu; [UpdateManager Shortcut Group] Name=Update Manager Exec=/usr/bin/update-manager TargetEnvironment=Unity [Htop Shortcut Group] Name=Htop Exec=htop1 TargetEnvironment=Unity [GetUpdates Shortcut Group] Name=Update Sources Exec=update1 TargetEnvironment=Unity [NautilusActions Shortcut Group] Name=Nautilus Actions Exec=nautilus-actions-config-tool TargetEnvironment=Unity [CompizConfig Shortcut Group] Name=Compiz Settings Exec=ccsm TargetEnvironment=Unity [GconfEditor Shortcut Group] Name=Gconf Editor Exec=gconf-editor TargetEnvironment=Unity [ForceQuit Shortcut Group] Name=Force Quit Exec=xkill TargetEnvironment=Unity [ScreenShot Shortcut Group] Name=Screen Shots Exec=gnome-screenshot --interactive TargetEnvironment=Unity [SeachFiles Shortcut Group] Name=Search For Files Exec=gnome-search-tool TargetEnvironment=Unity [DconfEditor Shortcut Group] Name=Dconf Editor Exec=dconf-editor TargetEnvironment=Unity [Gksu Shortcut Group] Name=Root Nautilus Exec=gksudo nautilus TargetEnvironment=Unity 

给Ex。 小脚本,Exec = htop1只是我的$ PATH(〜/ bin)中bin的一个名为htop1的文件

 #!/bin/bash gnome-terminal --command htop 

Exec = update1是一个名为update1的

 #!/bin/bash gnome-terminal --command "sudo apt-get update" 

在一个带有大量快速列表的.desktop中,如果想要在X-Ayatana-Desktop-Shortcuts =行上节省空间,你可以用更简单的方式命名你的快捷方式组,使用像Scg1; Scg2; Scg3; 等等

X-阿亚坦 – 桌面-快捷= SCG1; SCG2; Scg3; 等。

以我第一次参加为例

 [Scg1 Shortcut Group] Name=Update Manager Exec=/usr/bin/update-manager TargetEnvironment=Unity 

你可以用你的发射器图标,快速列表等方式做很多事情和变化,

我知道这不是你问题的答案,但我认为它与启动器(或简称alternatives )相同。

1)尝试Gnome-Pie (具有一些非常酷的效果的应用程序启动器) 侏儒馅饼


2)使用Dock ,例如Glx-Dock / Cairo-Dock (例如mac中的dock)和docky(它们位于软件中心)。

开罗的船坞


3)使用快捷方式打开程序(在破折号中键入并打开它>>转到快捷方式点击>>转到自定义快捷方式>>按+按钮>>用快捷方式打开要打开的程序>> apply> >为其指定快捷方式)

快捷键

查看新的应用程序:抽屉 在此处输入图像描述 http://www.iloveubuntu.net/how-easily-group-items-featuring-their-own-mini-dash-unity-launcher-drawers

http://www.iloveubuntu.net/create-bundles-files-and-folders-unity-launcher-fancy-drawers-ppa-available

你可以通过做添加ppa

sudo add-apt-repository ppa:ian-berke / ppa sudo apt-get update && sudo apt-get install drawer

只需在Dash中键入Drawers即可开始使用。 它将在〜/ .local / share / applications中创建一个抽屉启动器,您可以将其置于启动器/底座上。 然后拖放您想要的任何内容(文档,文件夹,应用程序,web-url)。 左键单击打开一个带有每个文件图标的迷你短划线,右键单击打开快速列表。 右键单击打开的抽屉中的项目可以编辑其名称或执行命令。 左键单击使用默认应用程序启动它们。