特定のファイル拡張子にKDE / Dolphin Servicesメニューを追加できますか?

特定のファイル拡張子にKDE / Dolphin Servicesメニューを追加できますか?

Windowsでは、特定のファイル形式にのみ表示されるコンテキストメニュー項目を使用できます。

Dolphinでは、.desktopファイルを使用してサービスメニュー項目を追加する方法を知っています。しかし、特定のファイル形式のサービスメニューのみを表示する方法はありますか?

ベストアンサー1

このセクションの下には、[Desktop Entry]発生するファイルの種類を指定する行が必要ですMimeType=

mp4ファイルに制限するには、MimeType=video/mp4すべてのビデオをMimeType=video/*ビデオとフォルダに制限する必要がありますMimeTypevideo=video/*;inode/directory;

[Desktop Entry]また、必要なセクションの下でType=Serviceいいえ Application)とActions=サービスメニューの1つ以上のジョブ名を指定する必要がある行。各タスクは、別々のフォームを使用するファイルの別々のセクションnameです[Desktop Action name]

この行は各セクションExec=の下に設定されます([Desktop Action name]いいえ以下[Desktop Entry])。

以下は、複数のタスクを含む例です。

[Desktop Entry]
Type=Service
Name=Download subtitles (filebot)
ServiceTypes=KonqPopupMenu/Plugin
Actions=en;fr;ro;it;
MimeType=video/*;inode/directory;
Icon=gnome-subtitles
Encoding=UTF-8
X-KDE-Priority=TopLevel
X-KDE-Submenu=Subtitles

[Desktop Action en]
Exec=filebot -get-subtitles -rename -non-strict %f
Icon=gnome-subtitles
Name=English (filebot)
Termial=true

[Desktop Action fr]
Exec=terminator -e "filebot -get-subtitles --lang fr -rename -non-strict %f" -p ttt
Icon=gnome-subtitles
Name=Français (filebot)

[Desktop Action ro]
Exec=terminator -e "filebot -get-subtitles --lang ro -rename -non-strict %f" -p ttt
Icon=gnome-subtitles
Name=Româneşte (filebot)

[Desktop Action it]
Exec=terminator -e "filebot -get-subtitles --lang it -rename -non-strict %f" -p ttt
Icon=gnome-subtitles
Name=Italiano (filebot)

これは、ビデオとディレクトリに関する次の情報を提供します。

ここに画像の説明を入力してください。

1つ以上の操作がある可能性があります。

その他の設定は次のとおりです[Desktop Entry]

X-KDE-Priority=TopLevelタスク(またはそのグループ:下の画像を参照)は、上の画像に示すようにメニューに直接表示されます。それ以外の場合は、「作業」グループの下に表示されます。

X-KDE-Submenu=somethingこの行を含むファイルのすべての操作は、「Something」というメニューグループの下にグループ化されます。 (ジョブが別のサービスメニューファイルにある場合でもこれ質問も参照してください。これ質問。 )

おすすめ記事