将KDE文件管理器dolphin右键菜单中的动作(Actions) 子菜单移到外面。

copy path插件

为了解决复制文件路径时总是用 file://前缀的问题,决定使用一个右键复制链接的扩展,https://store.kde.org/p/998249 ,因为这个下载量比较多,就用了这个。 但是发现有时候这个Copy Path 藏在 动作(Actions)子菜单里面,不是很方便。有没有办法将其弄出来呢。还真有人问过这个问题。https://www.reddit.com/r/kde/comments/9c78fx/move_actions_out_of_actions_menu_in_dolphin/ 。 但是reddit被墙,上不去,我截了个图在下面。

move-actions-out-of-actions-menu-in-dolphin-2019-11-26-18-43-47.jpg

KDE Service Menus(Older: https://techbase.kde.org/Development/Tutorials/Creating_Konqueror_Service_Menus )​​ “In KDE-speak a “servicemenu” is a special entry that appears in a context menu (or other context-based interface) for a file (or for directory), depending on the type of files that are selected.” Servicemenus are defined using .desktop files ​​By default the service menu are located under the ‘Actions’ submenu. The user can add to the desktop file guides where the service menu should be located. Top level: ​ X-KDE-Priority=TopLevel​ Sub menu: X-KDE-Submenu=

在 这个菜单对应的 .desktop 文件中添加 X-KDE-Priority=TopLevel 即可让菜单显示在外面。

然后我又发现了一个新的 Copy Path 扩展:https://store.kde.org/p/1190998/ ,源代码:https://github.com/rccavalcanti/KDE-ServiceMenus/blob/master/copyPath.desktop 。

插件路径:

1
2
3
~/.local/share/kservices5/ServiceMenus/
# 或者使用下面的命令查看
kf5-config --path services

KDE 文档: https://techbase.kde.org/Development/Tutorials/Creating_Konqueror_Service_Menus