Вот пример создания элемента быстрого списка «Тип окна»:
# Create toggle-able menu item for urgency
urgent_menu_item = Dbusmenu.Menuitem.new ()
# Set the tab's name as the menu item's name
urgent_menu_item.property_set (Dbusmenu.MENUITEM_PROP_LABEL, _('Urgent'))
# Make the menu item toggle-able
urgent_menu_item.property_set(Dbusmenu.MENUITEM_PROP_TOGGLE_TYPE, Dbusmenu.MENUITEM_TOGGLE_CHECK)
urgent_menu_item.property_set_int(Dbusmenu.MENUITEM_PROP_TOGGLE_STATE, Dbusmenu.MENUITEM_TOGGLE_STATE_UNCHECKED)
urgent_menu_item.connect('item_activated', self.urgent_menu_item_activated)
# Make the menu item visible
urgent_menu_item.property_set_bool (Dbusmenu.MENUITEM_PROP_VISIBLE, True)
# Add the section's menu item to the Quicklist menu
quicklist.child_append(urgent_menu_item)
И вот один из пунктов меню Quicklist Quicklist:
# Create a new item for this section
section_menu_item = Dbusmenu.Menuitem.new ()
# Set the tab's name as the menu item's name
section_menu_item.property_set (Dbusmenu.MENUITEM_PROP_LABEL, tab_name)
# Make the menu item toggle-able
section_menu_item.property_set(Dbusmenu.MENUITEM_PROP_TOGGLE_TYPE, Dbusmenu.MENUITEM_TOGGLE_RADIO)
# Make the menu item visible
section_menu_item.property_set_bool (Dbusmenu.MENUITEM_PROP_VISIBLE, True)
# When the menu item is clicked, make it call menu_item_activated
# with the tab id, which is used to make that the active tab
section_menu_item.connect('item_activated', self.section_menu_item_activated, tab_id)
# Add the section's menu item to the Quicklist menu
quicklist.child_append(section_menu_item)
Просто введите alias kt="killall gnome-terminal" в командной строке (я предполагаю, что вы пользователь bash).
Чтобы сделать это постоянным, вы можете поместить эту строку в свой .bashrc, например. Выполнить echo 'alias kt="killall gnome-terminal"' >> ~/.bashrc (не забудьте повторно применить изменения, используя . ~/.bashrc)
Используйте простую команду alias, чтобы просмотреть список псевдонимов в действии.
Приветствия [ ! d3]
update: BTW, вы также можете найти это полезным: проблема с созданием постоянного псевдонима