ਸਿਸਟਮ ਮੇਨੂ ਸੋਧ ਕਰਨੀ
You can edit menu configuration files and menu data files manually to customize menus.
- 2.5.1. ਮੇਨੂ ਜੋੜਨਾ
- 2.5.2. ਇੱਕ ਇਕਾਈ ਮੇਨੂ 'ਚ ਜੋੜਨੀ
- 2.5.3. Editing the Properties of a Menu
- 2.5.4. ਇੱਕ ਮੇਨੂ ਇਕਾਈ ਸੋਧਣੀ
- 2.5.5. ਮੇਨੂ 'ਚੋਂ ਇੱਕ ਇਕਾਈ ਹਟਾਉਣੀ
2.5.1. ਮੇਨੂ ਜੋੜਨਾ
To add a menu for all users, perform the following steps:
- Create a directory entry file for the item that you want to add. Place the directory entry file in the $XDG_DATA_DIRS/desktop-directories directory. For more information on directory entry files, see ਸ਼ੈਕਸ਼ਨ 2.4 ― ਡਾਇਰੈਕਟਰੀ ਇੰਦਰਾਜ਼ ਫਾਇਲਾਂ.
- Locate the $XDG_CONFIG_DIRS/menus/applications.menu file.
- In the .menu file, add a <Menu> element for the new menu. For more information on .menu files, see ਸ਼ੈਕਸ਼ਨ 2.2 ― ਮੇਨੂ ਪਰਿਭਾਸ਼ਾ ਫਾਇਲਾਂ.
- Create a <Name> element below <Menu>. The content of the element should contain the name for the menu.
- Create a <Directory> element below <Menu>. The content of the element should contain the name of the directory entry file.
- See ਸ਼ੈਕਸ਼ਨ 2.5.2 ― ਇੱਕ ਇਕਾਈ ਮੇਨੂ 'ਚ ਜੋੜਨੀ for how to add an item to the menu.
The next time that users log in, the menu should appear in the menu bar.
If you did not specify any matching rules in the <Include> element, or if the rule did not match any desktop entries, then you may not see the menu in the menu bar.
2.5.2. ਇੱਕ ਇਕਾਈ ਮੇਨੂ 'ਚ ਜੋੜਨੀ
To add an item to a menu for all users, perform the following steps:
- Create a desktop entry file for the item that you want to add. For more information on desktop entry files, see ਸ਼ੈਕਸ਼ਨ 2.3 ― Desktop Entry Files.
- Place the desktop entry file in the $XDG_DATA_DIRS/applications folder.
- Locate the $XDG_CONFIG_DIRS/menus/applications.menu file.
- Verify that a <Menu> element contains an <Include> element with a matching rule that selects the desktop entry file made in step 1.
The next time that users log in, the menu item is in the assigned location.
2.5.3. Editing the Properties of a Menu
To edit the properties of a menu for all users, perform the following steps:
- Locate the $XDG_CONFIG_DIRS/menus/applications.menu file.
- Find the <Menu> entry in this file that corresponds to the menu you want to modify. Note the filename of the directory entry in the <Directory> element.
- Locate the directory entry for this menu. Modify the contents to change the properties of the menu. For more information on .directory files, see ਸ਼ੈਕਸ਼ਨ 2.4 ― ਡਾਇਰੈਕਟਰੀ ਇੰਦਰਾਜ਼ ਫਾਇਲਾਂ.
2.5.4. ਇੱਕ ਮੇਨੂ ਇਕਾਈ ਸੋਧਣੀ
To edit a menu item, perform the following steps:
- Locate the desktop entry in the $XDG_DATA_DIRS/applications directory that corresponds to the menu item.
- Edit the desktop entry to change the properties of the menu item. For more information on desktop entry files, see ਸ਼ੈਕਸ਼ਨ 2.3 ― Desktop Entry Files.
2.5.5. ਮੇਨੂ 'ਚੋਂ ਇੱਕ ਇਕਾਈ ਹਟਾਉਣੀ
To delete an item from a menu for all users:
- Locate the $XDG_CONFIG_DIRS/menus/applications.menu file.
- Find the <Menu> element in this file that contains the desktop entry you want to delete.
- Insert an <Exclude> element after the closing tag for the <Include> element. Make sure this is in the <Menu> element determined in step 2.
- Insert the <Filename> matching rule as a subelement of <Exclude> to specifically exclude a desktop entry.
The next time that users log in, the menu item is not displayed in the menu. ਉਦਾਹਰਨ 2-2 shows how this done in the applications.menu file. The desktop entry for dasher.desktop is explicitly excluded from showing up in the accessibility menu.
<!-- ... --> <Menu> <Name>Accessibility</Name> <Directory>Accessibility.directory</Directory> <Include> <And> <Category>Accessibility</Category> <Not><Category>Settings</Category></Not> </And> </Include> <Exclude> <Filename>dasher.desktop</Filename> </Exclude> </Menu> <!-- ... -->