Reply to topic

Konqueror Servicemenus

Registered Member

Konqueror Servicemenus

Sat Feb 03, 2018 10:45 pm
I have a number of bash scripts I use constantly for making changes to files in sub-directories in my Music directory. Some of these do things like read all the mp3 files in the directory and create an up to date m3u playlist for that directory. Some check and see if the directory contains mp3's, images, folders, or whatever and sets the .directory file to the attributes I want for the type of file that directory contains. For instance, I want to have directories to contain all of a bands albums, if the script finds a file called "band.png" inside the directory it makes the default image for that folder "band.png" then sets the preview attribute and hidden attribute to the default I chose and store in a predetermined file. Such as having the .directory file contain the following settings:

Code: Select all

[Desktop Entry]



The procedure I must presently use is as follows:

1) Start Konqueror.
2) Browser to desired directory.
3) Click [Settings] button.
4) Scroll down and Click [Show Terminal Window] button.
5) Type one of it not multiple commands for custom scripts.
6) Click [Settings] button.
7) Scroll down and Click [Show terminal Window] button.
8) Repeat steps 2 through 8 until all changes in directories have been completed

Using the terminal to navigate is a lot more extra steps as I must "ls" each directory I go into to remember what sub-directories exist in each. Using konqueror to navigate in alphabetic order to check all the directories I have added for a few hours or days is less tedious but still arduous. I have tried making a script_name.desktop file to try to add a menu item in konqueror to make this easier but ALL methods I have read about fail. All seem like I need to right click on a file to make them work. My scripts do not need to know a filename as they always act on either files that always exist in these directories or file that may exist, but need to be freshly generated, and overwrite any existing files. The only thing that need to be done is to open the script in directory being acted upon. The script then looks for the data it need within said directory and does it's job without outside intervention.

So how do I either add a menu for my scripts and add my script to that menu, or simply add my script to an existing menu. It would be best If I could right-click an empty area of the open folder (where no file or sub-directories are) and select my script from the right-click menu. Got a solution?
Registered Member

Re: Konqueror Servicemenus

Tue Feb 06, 2018 9:31 pm
There are a few service menus available on the KDE Store (the category says Dolphin Service Menus, but Konqueror uses Dolphin for file management, including the service menus).

From what I understand trying to set up my own, a service menu is a .desktop file with several sections. The first section is the Desktop Entry and lists the actions provided by menu. The remaining sections are for the individual Desktop Actions, including the name, optional icon and what to run.

(doing some searching through the various kde documentation sites, I don't see anything useful, which is unfortunate. There have been a few other discussions on these forums about them though)

airdrik, proud to be a member of KDE forums since 2008-Dec.

Reply to topic


Who is online

Registered users: Bing [Bot], fbg13, Google [Bot], guyaloni, kauwlquabbe, luciusoflegend, Makinars-Studio, Yahoo [Bot]