rox/jwm dragging files/folders to other desktops

Window managers, icon programs, widgets, etc.
Post Reply
Message
Author
User avatar
rufwoof
Posts: 3690
Joined: Mon 24 Feb 2014, 17:47

rox/jwm dragging files/folders to other desktops

#1 Post by rufwoof »

Rox and jwm ... you can drag a window title across desktops (holding alt whilst dragging a window title to a screen edge will flip to that desktop quicker), however you can't drag a icon/folder across desktops. Unless that is :) ....

I don't use multiple desktops, instead I just use multiple pinboards and flip between them using rox -p <pinboardname>

Create a rox app folder and in that folder create a file called AppRun with content something like

Code: Select all

#!/bin/sh
rox -p /home/user/.pinboards/family.pb

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">
<PinboardAdd>
<Path>$1</Path>
<X>554</X>
<Y>128</Y>
<Label>`basename $1`</Label>
<Args></Args>
<Locked>false</Locked>
<Shortcut></Shortcut>
</PinboardAdd>
</env:Body>
</env:Envelope>
EOF
change that first line to where you store your pinboards.
Make the file executable and in that same rox app directory drop in a icon (.png or whatever) for that rox app, renaming the file to .DirIcon

Now in rox whenever you run that rox app (click on the icon), it will flip to that pinboard. If however you drag a file or folder onto that icon in rox then it will create a pinboard entry for that file/folder on the pinboard (the above is hard coded to drop the icon in at X=554 and Y=128).

The pinboard from where that file/folder came will still also have a icon for that dragged/dropped file/folder, i.e. its a form of copy rather than move. If you wanted it to be more of a move type action then you'd add additional SOAP code into AppRun ... something like

Code: Select all

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">
<PinboardRemove>
<Path>/home/user/.pinboards/office.pb</Path>
<Label>`basename $1`</Label>
</PinboardRemove> 
</env:Body>
</env:Envelope>
EOF
which as coded to remove from my office.pb pinboard, assuming that is the pinboard from where the icon being moved came from.

I have a rox panel and with my different pinboard rox apps (AppDirs similar to the above) have been included (dragged/dropped onto the rox panel). So when I'm on one pinboard (desktop) and want to drag a file or folder to another pinboard (desktop), I just drag it to the rox panel icon for the target desktop and drop it there, and it switches to that desktop (pinboard) with the dropped icon showing there.

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#2 Post by musher0 »

Hi rufwoof.

Thanks for your tips and your scripts. Most appreciated.

However, there are a couple of other approaches to this, if I may.

You could use a different WM! That I know of, echinus, pekwm, icewm
(probably others) all have simple config files where you can associate an
app with a desk. So app A will launch in desk Y.

As to the desktop icons, the user can create as many "Pinboards" (aka
"PuppyPins") in ~/Choices/ROX-Filer as (s)he likes, repeating some icons
or not in each.

To change pinboards, the one-liner is

Code: Select all

rox -p /Proper/Path/Name-of-new-PinBoard
. You associate this one-liner with an icon on PinBoard1 to display
PinBoard2, and on PinBoard2, you do the reverse.

To the above one-liner, add

Code: Select all

wmctrl -s <DESK>
or

Code: Select all

aedesk +1
(aedesk is a companion but stand-alone utility from the aewm WM), and
you can change desk and desktop at the same time.

Finally, the user also has the possibility of using a ROX-panel (see below).

Code: Select all

<?xml version="1.0"?>
<panel side="Left">
  <options style="2" width="52" avoid="1" xinerama="1" monitor="0"/>
  <start>
    <icon label="transparent-48x.png">/usr/share/backgrounds/gtkrc-mine/transparent-48x.png</icon>
    <icon label="transparent-8x24.png">/usr/share/backgrounds/gtkrc-mine/transparent-8x24.png</icon>
    <icon label="pifpag3-cairo.sh" shortcut="Control+Shift+Alt+m">/opt/local/bin/pifpag3-cairo.sh</icon>
    <icon label="transparent-8x24.png">/usr/share/backgrounds/gtkrc-mine/transparent-8x24.png</icon>
    <icon label="Categories.sh">/root/.aewm/ae/Categories.sh</icon>
    <icon label="transparent-8x24.png">/usr/share/backgrounds/gtkrc-mine/transparent-8x24.png</icon>
    <icon label="transparent-8x24.png">/usr/share/backgrounds/gtkrc-mine/transparent-8x24.png</icon>
    <icon label="Boussole-et-Partitions.sh">/root/.aewm/ae/Boussole-et-Partitions.sh</icon>
    <icon label="transparent-8x24.png">/usr/share/backgrounds/gtkrc-mine/transparent-8x24.png</icon>
    <icon label="design-bureau.sh">/root/.aewm/ae/design-bureau.sh</icon>
    <icon label="transparent-8x24.png">/usr/share/backgrounds/gtkrc-mine/transparent-8x24.png</icon>
    <icon label="pfind">/usr/local/pfind/pfind</icon>
  </start>
  <end>
    <icon label="transparent-48x.png">/usr/share/backgrounds/gtkrc-mine/transparent-48x.png</icon>
    <icon label="transparent-8x24.png">/usr/share/backgrounds/gtkrc-mine/transparent-8x24.png</icon>
    <icon label="tilt.sh">/opt/local/bin/tilt.sh</icon>
    <icon label="transparent-8x24.png">/usr/share/backgrounds/gtkrc-mine/transparent-8x24.png</icon>
    <icon label="barre">/root/.config/rox.sourceforge.net/ROX-Filer/gauche.sh</icon>
    <icon label="transparent-24x.png">/usr/share/backgrounds/gtkrc-mine/transparent-24x.png</icon>
    <icon label="Leafpad">/usr/share/applications/Leafpad.desktop</icon>
    <icon label="my-documents">/root/my-documents</icon>
    <icon label="transparent-24x.png">/usr/share/backgrounds/gtkrc-mine/transparent-24x.png</icon>
    <icon label="i-ching.sh">/usr/local/DOSBox/i-ching.sh</icon>
    <icon label="transparent-8x24.png">/usr/share/backgrounds/gtkrc-mine/transparent-8x24.png</icon>
    <icon label="Gauche.sh" shortcut="Control+Alt+Left">/root/.aewm/ae/Gauche.sh</icon>
  </end>
</panel>
In the above, icons of smallish transparent png images linking to
themselves (it sounds complicated but it is not) are used as separators
between the program icons, to make things clearer to the eye. An empty
conky can also help as separator at top, middle and bottom (if you need
such separators.)

This panel is controlled by the following on-off switch:

Code: Select all

#!/bin/sh
# /root/.config/rox.sourceforge.net/ROX-Filer/gauche.sh
####
cd /root/.config/rox.sourceforge.net/ROX-Filer
if [ "`grep gauche panels`" ];then
	rox -l ""
else
	rox -l gauche
fi
Instead of an on and off script, you could have one that displays
"themed" icons in succession (e.g. one panel for games, one for serious
work and one for multimedia/graphics), and again link the panels with a
particular desktop. You have an icon of this change script on every desk,
and you click on it as you need to.

I hope the above helps users better understand how to take advantage
of the ROX desktop.

Best regards.
Attachments
.gtkrc.mine(1).zip
This file contains config code GTK uses for the main color of the ROX-panel.
(1.54 KiB) Downloaded 154 times
overall-appearance.jpg
WM here is waimea. Tasks-and-tray bar at bottom is bmpanel2.
(126.44 KiB) Downloaded 284 times
rox-panel-at-left.jpg
Main color of the panel is defined through file /root/.gtkrc.mine (pls see attached).
(30.68 KiB) Downloaded 281 times
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
MochiMoppel
Posts: 2084
Joined: Wed 26 Jan 2011, 09:06
Location: Japan

Re: rox/jwm dragging files/folders to other desktops

#3 Post by MochiMoppel »

rufwoof wrote:Rox and jwm ... you can drag a window title across desktops (holding alt whilst dragging a window title to a screen edge will flip to that desktop quicker)
Holding ALT has no effect on speed for me. Same speed as determined by <MoveMode> parameter in the JWM config file
however you can't drag a icon/folder across desktops.
Of course not :lol:
musher0 wrote:You could use a different WM! That I know of, echinus, pekwm, icewm
(probably others) all have simple config files where you can associate an
app with a desk.
So does JWM.

Post Reply