Announcement

Collapse
No announcement yet.

Service Menus with Dolphin

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

    #91
    This works to move up one. Doesn't warn about failure if you don;t have permission;

    Code:
    [FONT=monospace][COLOR=#000000][Desktop Entry][/COLOR]
    Type=Service
    Icon=transform-shear-up
    X-KDE-ServiceTypes=KonqPopupMenu/Plugin
    MimeType=all/allfiles;
    Actions=moveUp;
    X-KDE-Priority=TopLevel
    #X-KDE-Submenu=
    Encoding=UTF-8
    
    [Desktop Action moveUp]
    Name=Move up one level
    Icon=transform-shear-up
    Exec=echo "%U" | sed 's# /#\\n/#g' | while read url; do kdemv5 "$url" ..; done
    
    [/FONT]
    Stole most of this code from Rog...

    Please Read Me

    Comment


      #92
      Never knew of kdemv5!

      Anyway, https://forum.kde.org/viewtopic.php?t=138670#p371069
      Kubuntu 20.04

      Comment


        #93
        I made this service menu to copy a file to the same location with a timestamp added to the end of the target filename.

        Code:
        [Desktop Action copy-with-stamp]
        Exec=cp-with-timestamp.sh %U
        Name=Add timestamp as suffix
        Icon=edit-copy
        
        [Desktop Entry]
        Actions=copy-with-stamp
        ServiceTypes=KonqPopupMenu/Plugin
        MimeType=all/all
        Type=Service
        X-KDE-Priority=TopLevel
        The script, cp-with-timestamp.sh, is this:
        Code:
        #!/bin/bash
        
        cp "$@" "$@"-"$(date +%Y%m%d%H%M%S)"
        I had to use the script because I couldn't figure out how to get it done directly from the .desktop file. If it's possible can someone please show me. Thanks!
        Kubuntu 20.04

        Comment

        Working...
        X