Announcement

Collapse
No announcement yet.

servicemenu question: Specific folder actions?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [SOLVED] servicemenu question: Specific folder actions?

    I'm trying to write a servicemenu that is available only in a specific folder. Is this possible?

    Further explanation: I want to right click in a certain folder using Dolphin and have a specific servicemenu available in the list. But when I right click in any other location, the option does not appear in the list.

    Please Read Me

    #2
    You can try this "trickery" (seemed to work here):

    Put a '.directory' file in the directory in question, example contents (taken from konsolehere service menu):
    Code:
    [Desktop Entry]
    Type=Service
    X-KDE-ServiceTypes=KonqPopupMenu/Plugin,inode/directory
    Actions=openTerminalHere;
    X-KDE-AuthorizeAction=shell_access
    
    [Desktop Action openTerminalHere]
    Name=Open Terminal Here
    Icon=utilities-terminal
    Exec=konsole --workdir %f
    You can change Name,Icon and Exec lines to your needs...and save as ".directory" (If your dolphin is set to remember individual folder view settings, it'll write these to .directory files...I don't know whether that'll overwrite your custom .directory or not, you can probably test it out...it shouldn't, but it might )
    Last edited by kubicle; Mar 22, 2014, 07:35 AM.

    Comment


      #3
      Genius!
      I would have never thought of that. Appears to work fine! Messing about with dolphin just added the other directory attributes to the .directory file without over-writing my code. It did rearrange the stanzas for some reason, but still works.

      Interesting effect is the folder inherits the icon from the servicemenu portion but I can totally live with that.

      Thanks guys, for the help.

      Please Read Me

      Comment


        #4
        Originally posted by oshunluvr View Post
        Interesting effect is the folder inherits the icon from the servicemenu portion but I can totally live with that.
        Did dolphin rearrange the Icon property to the [Desktop Entry] section? (this would explain why the directory inherits the icon)

        You can probably work around that by omitting the Icon definition (or use the stock "folder" icon)...alternatively you could use an icon that should match nicely with the folder and the action, like "folder-system"

        Comment


          #5
          Dolphin exactly inverted every line in what I had entered. Odd, but no matter.

          In answer to your question, I entered the icon line twice for some reason. I had it in both desktop entry and in desktop action. Removing it from desktop entry restored the original folder icon.

          I think I will make a folder-cloud icon!
          Last edited by oshunluvr; Mar 22, 2014, 10:23 AM.

          Please Read Me

          Comment


            #6
            Originally posted by oshunluvr View Post
            Dolphin exactly inverted every line in what I had entered. Odd, but no matter.

            In answer to your question, I entered the icon line twice for some reason. I had it in both desktop entry and in desktop action. Removing it from desktop entry restored the original folder icon.

            I think I will make a folder-cloud icon!
            There is also the stock folder-sync icon, if your action is about cloud sync?

            Comment


              #7
              I use Kfaenza icons - no folder-sync in that set.

              Please Read Me

              Comment


                #8
                A suggestion: http://www.softicons.com/web-icons/i...loud-sync-icon
                Using Kubuntu Linux since March 23, 2007
                "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                Comment

                Working...
                X