Hide Commands in Menu
This plugin allows you to hide any commands, including those from community plugins.
kzhovn has excellent obsidian-customizable-menu plugin, but it can’t hide different command in different menus, so I try to create one.
Github repo: GitHub - bomian98/obsidian-hide-commands-in-menu
Install: Plugins - Obsidian
Features
- Hide different commands across various menus in Obsidian.
- Automatically remove redundant dividers when commands are hidden.
- Inject different CSS classes for menu styling control.
- Use regex pattern matching for advanced rule configurations.
Menu Types
Menu Type | Trigger Location |
---|---|
file-menu (tab-header) | Right-click file tab |
file-menu (more-options) | Click workspace ··· button |
file-menu (file-explorer) | Right-click file/folder in explorer |
file-menu (link) | Right-click internal link |
files-menu (file-explorer) | Right-click multiple explorer items |
editor-menu | Right-click in editor view |
url-menu | Right-click external link |
other-menu | Any other menu |
Note: When in the editor view, right-clicking a link will also trigger either the
url-menu
orfile-menu (link)
.
To examine the displayed menu, utilize Obsidian’s Developer Tools to inspect the menu’s HTML class.
Customize Styles
- Select hide-commands:
div.custom-menu-hide-item
- Select hide-separators:
div.custom-menu-hide-separator
- Select different menus:
Menu Type | CSS Selector |
---|---|
file-menu (tab-header) | .file-menu-tab-header |
file-menu (more-options) | .file-menu-more-options |
file-menu (file-explorer) | .file-menu-file-explorer-context-menu |
file-menu (link) | .file-menu-link-context-menu |
files-menu (file-explorer) | .files-menu-file-explorer-context-menu |
editor-menu | .editor-menu |
url-menu | .url-menu |
other-menu | [class="menu"] |
Give feedbacks
The settingTab UI of this plugin is not good. It would be my pleasure if someone can give suggestions for improvement.
Suggestions for other issues of this plugin are also welcome!