Results 1 to 7 of 7

Thread: Customizing Dolphin

  1. #1
    Join Date
    Jun 2006
    Location
    Antarctica
    Beans
    500
    Distro
    Kubuntu 12.04 Precise Pangolin

    Customizing Dolphin

    Hello all,
    I'd like to customize the Dolphin file manager so that a script is called when a key is pressed. And that the script receives the currently selected files as parameters. How would I go to do this ?
    I don't want the long-wided route of doing right-click, open with, select, etc, I want a one key solution.
    Thanks.

  2. #2
    Join Date
    Sep 2012
    Location
    Denver,Colorado
    Beans
    243
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Customizing Dolphin

    Have you tried going (in dolphin) to control configure shortcuts?
    + Linux Mint 13 Cinnamon 64bit +
    Lubuntu 12.04 PPC 32bit G4 | Ubuntu 12.04 PPC 64bit G5

  3. #3
    Join Date
    Jun 2006
    Location
    Antarctica
    Beans
    500
    Distro
    Kubuntu 12.04 Precise Pangolin

    Re: Customizing Dolphin

    Well, I see the option to add a new scheme, but I don't see how to add a new script or key. Maybe I'm missing something.

  4. #4
    Join Date
    Sep 2012
    Location
    Denver,Colorado
    Beans
    243
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Customizing Dolphin

    I don't really see any option to add a script but maybe you could add the script to the config file

    sudo nano /home/ryanepod/.kde/share/config/dolphinrc

    or maybe you could setup a script to run in the background at startup
    + Linux Mint 13 Cinnamon 64bit +
    Lubuntu 12.04 PPC 32bit G4 | Ubuntu 12.04 PPC 64bit G5

  5. #5
    Join Date
    Jun 2006
    Location
    Antarctica
    Beans
    500
    Distro
    Kubuntu 12.04 Precise Pangolin

    Re: Customizing Dolphin

    I don't see a place to add custom actions in the config file...

  6. #6
    Join Date
    Jun 2006
    Location
    Antarctica
    Beans
    500
    Distro
    Kubuntu 12.04 Precise Pangolin

    Re: Customizing Dolphin

    OK, I found part of the solution here. I wrote a file /usr/share/kde4/services/ServiceMenus/DelSameExt.desktop:
    Code:
    [Desktop Entry]
    Actions=delSameExt
    Encoding=UTF-8
    ServiceTypes=KonqPopupMenu/Plugin,all/allfiles
    ExcludeServiceTypes=kdedevice/*,inode/directory
    Type=Service
    
    [Desktop Action delSameExt]
    Name=Delete this and all files that have the same extension
    Icon=/usr/share/icons/oxygen/48x48/actions/edit-delete-shred.png
    
    #Exec=a.sh -compose “attachment=file:/$(echo %F | sed ‘s/\\ \\//,file:\\/\\//g’)”
    # bactick operator also works
    Exec=~/bin/DelSameExt.sh %F
    and a script ~/bin/DelSameExt.sh that starts with something like this:
    Code:
    #! /bin/sh
    # This needs: sudo aptitude install trash-cli
    date >>/tmp/DelSameExt.log
    echo trash-put -v "$@" >>/tmp/DelSameExt.log
    Now all I need to do is, finish the script and figure out a way to have this desktop action called when I press a chosen key. Will post here if I figure it out.

  7. #7
    Join Date
    Jun 2006
    Location
    Antarctica
    Beans
    500
    Distro
    Kubuntu 12.04 Precise Pangolin

    Re: Customizing Dolphin

    Keep replying to myself, akin to thinking out loud... Anybody knows how to add shortcut keys to service actions in Dolphin ? The two seem separate: there's no service/action in the shortcut list and there's no way to add a shortcut key to an existing service.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •