jun7 / rox-filer

ROX file manager
24 stars 6 forks source link

Adding a right click function #205

Closed frankzen closed 4 years ago

frankzen commented 4 years ago

How difficult would it be to add a right click on a file in an open directory containing jpegs to set the wallpaper? This would be similar to the way Caja in Mate does it.

jun7 commented 4 years ago

I don't use rox desktop. So I can't add any function. If you are using other desktop having shell interface, customizing [Send To...] solves it.

frankzen commented 4 years ago

I am using Rox to put icons on the desktop. Customizing wallpaper now needs right click on icon on backdrop, then dragging wallpaper. Looking for a better way.

zen2 commented 4 years ago

I use a custom script that use rox RPC for that:

#!/bin/sh
#
# /opt/scripts/rox-wallpaper
#
# Set rox wallpaper
#
# Right click on an image icon, select "Customise menu"
# and create symlink of this script using the case values of $link:
#   Use as wallpaper (Centered) -> /opt/scripts/rox-wallpaper
#   Use as wallpaper (Scaled) -> /opt/scripts/rox-wallpaper
#   Use as wallpaper (Stretched) /opt/scripts/rox-wallpaper
#   Use as wallpaper (Tiled) -> /opt/scripts/rox-wallpaper
#
# Zentoo 2008-2020 (b4b1@free.fr)

link="${0##*/}"
case $link in
    "Use as wallpaper (Centered)" )  mystyle="Centre" ;;
    "Use as wallpaper (Tiled)" ) mystyle="Tile" ;;
    ² )  mystyle="Scale" ;;
    "Use as wallpaper (Stretched)" ) mystyle="Stretch" ;;
esac

rox --RPC << EOF
<?xml version="1.0"?>
<env:Envelope xmlns:env="http://www.w3.org/2001/12/soap-envelope">
 <env:Body xmlns="http://rox.sourceforge.net/SOAP/ROX-Filer">
  <SetBackdrop>
   <Filename>$1</Filename>
   <Style>$mystyle</Style>
  </SetBackdrop>
 </env:Body>
</env:Envelope>
EOF
frankzen commented 4 years ago

That's great! I'll try that. Thanks