Desktop files

I wonder if it is possible to add files on the desk the way DE does. Not applications such as iDesk and FvwmButtons icon launcher, but doc, txt, and png files.

I found a similar topic: Create a panel with .desktop files. Does it store files or app icons?

idesk is still your best bet, I would argue.

Seeing as you’ve mentioned the other options, what other answer did you expect, may I ask?

The @aneglus topic in 2006… link in my previous post.

@Mjaakko, do you mean DND, drag-and-drop? @aneglus perl script seems to be an app launcher using .desktop files.

I don’t think D&D is possible in Fvwm.

The idea is interesting and useful when dragging a file on the desktop. Not essential on the desk, but perhaps in FvwmButtons with a Swallow file drop app.

I thought this is something that file managers use to and still do. You should be able to setup a file manager that puts an overlay on the root window which the file manager can be used to place various files on the desktop.

Yes, all file managers do drag-and-drop in DE but not in WM (what I have noticed). The directory /home/user/Desktop/ is the root desk of Xfce, Gnome, etc.

I don’t know how to put an overlay on the root window. But I found a simple drag-and-drop source/sink for X in StackExchange name: Dragon. After dropping files in the target window, it doesn’t require a file manager.

Just run make to compile dragon and get an executable you can run
immediately or put where you like.

Dragon github site.

This is a nice minimal D&D for FvwmButtons that do the basics — code in one file. The last update was two months ago.

There is one bug to address in Dargon gitHub. The --target window is too small and does not expand when files are dropped, nor does Resize. Tested in Fvwm and Xfce.
./dragon --target --print-path --keep

Screenshot

That is latest update, check release 1.2.0. --target looks and does well. Also, loads related file… pdf, png, doc, …

1 Like

I don’t know how to put an overlay on the root window.

The file manager does this, in most cases just read the manual page of the file manger you like, for pacman this is done via the launching it with the --desktop option. https://wiki.archlinux.org/title/PCManFM#Desktop_management

This is great, it’s a 2-in-1 desk. FvwmButtons are on the top. But having access to the Fvwm menu, locate pcmanFM desktop in a different place. EwmhBaseStruts 80 0 90 0

The wiki I linked explained this and told you one solution. Fvwm also supplies a ‘D’ context for clicking on a desktop window vs ‘R’ for the root window.

Thanks @somiaj, fvwm does it. PcmanFM only for mouse-right click.

Mouse 1 D    A Menu MenuFvwmRoot
Mouse 2 D    A WindowList
Mouse 3 D    A Menu MenuWindowOpsLong

Pcmanfm desktop memory usage is minimal. Appearance… wallpaper mode can be set for tile: Tile the image to fill the entire monitor area. Ideal for Fvwm.

That’s great.
I prefer that pcmanfm --desktop has left and top margin, what EwmhBaseStruts does. Odd when apps are loading in upper left corner.

This function does it, but requires loading slowly.

AddToFunc Deskdnd
+ I EwmhBaseStruts 0 0 0 0
+ I Schedule 5200 Exec exec pcmanfm --desktop
+ I Schedule 5300 EwmhBaseStruts 80 180 90 100

Closing is fast.
+ I Exec exec killall pcmanfm

Any other solution?

It becomes a bit bulky with the whole desk. Also, I couldn’t get Mouse 1 D A Menu MenuFvwmRoot to click on the file icons. But, small and does the purpose, Swallow PcmanFM. Hide the Side Pane and Toolbar (version 1.4.0 github).

Module FvwmButtons DeskDnd
DestroyModuleConfig DeskDnd:*
*DeskDnd: Geometry 590x440+100+100
*DeskDnd: (1x1, Swallow (UseOld) "pcmanfm" \
        'Exec exec pcmanfm $[HOME]/Desktop', Frame 0)

Style DeskDnd !Title, WindowListSkip, Sticky, !Handles, !Iconifiable, BorderWidth 1, NeverFocus, StaysOnBottom

There is a hide Menubar patch, but I am not familiar with how to do it. Also, how to change the background color or make it transparent?

I tested if pcmanfm exec file can run as stand-alone. Copied /usr/bin/pcmanfm and added it to another computer. Loaded it in my user folder with ./pcmanfm. It prompted me to install libfm-gtk, and it worked. Some modules are missing but not necessary for DnD. Its only 962 Kb. :+1:

It was easy to patch. I didn’t see the file names mentioned e.g. /src/app-config.c, /src/main-win-ui.c, etc.

Next, set Toolbar and Side Pane to hide as default setting. And background color.