create folders with an icon  [Solved]

Any background image or other artwork submissions must include copyright information and explicit permission of the image's original creator to use the image. This includes a direct post of the image or links to a compiled image archive.
Message
Author
User avatar
Melber
Developer
Posts: 1329
Joined: Tue Mar 23, 2021 4:19 pm

Re: create folders with an icon  [Solved]

#41 Post by Melber »

Hooray, finally got it to work for me in MXFB.

Based on the xfce docs page here https://docs.xfce.org/xfce/tumbler/avai ... or_folders
and this xfce forum thread https://forum.xfce.org/viewtopic.php?id=17051
I created the files ~/.local/share/thumbnailers/folder.thumbnailer and ~/bin/folder-thumbnailer with the relevant contents and edits.
I also needed to change the sh to bash in the .thumbnailer file.

Made a folder, copied over the Papirus icon folder-yellow-code.svg, renamed it to folder.svg and ta da
quickshot_241009_160942.png


For info, here are the edited files

~/.local/share/thumbnailers/folder.thumbnailer

Code: Select all

[Thumbnailer Entry]
Version=1.0
Encoding=UTF-8
Type=X-Thumbnailer
Name=Folder Thumbnailer
MimeType=inode/directory;
Exec=bash -c '~/bin/folder-thumbnailer %s %i %o %u'
~/bin/folder-thumbnailer

Code: Select all

#!/bin/bash

covers=("$2"/{.,}{folder,cover}.{jpg,png,svg})
for f in "${covers[@]}"; do
  [ -f "$f" ] && {
    cover=$f
    break
  }
done

if [ -z "$cover" ] || ! convert -background none -thumbnail "$1" "$cover" "$3"; then
  gdbus call --session --dest=org.freedesktop.thumbnails.Cache1 --object-path /org/freedesktop/thumbnails/Cache1 \
             --method org.freedesktop.thumbnails.Cache1.Delete "['$4']" >/dev/null
fi

You do not have the required permissions to view the files attached to this post.
Last edited by Melber on Wed Oct 09, 2024 11:36 am, edited 1 time in total.

User avatar
Melber
Developer
Posts: 1329
Joined: Tue Mar 23, 2021 4:19 pm

Re: create folders with an icon

#42 Post by Melber »

btw @Jerry3904 , this sort of what you're looking for?

folder-deeporange-code
Screenshot_20241009-165753.png
++edit to add++
icon is in the standard Papirus set. I took the 64x64 version
You do not have the required permissions to view the files attached to this post.
Last edited by Melber on Wed Oct 09, 2024 3:09 pm, edited 2 times in total.

User avatar
Jerry3904
Administrator
Posts: 23269
Joined: Wed Jul 19, 2006 6:13 am

Re: create folders with an icon

#43 Post by Jerry3904 »

Well, lookee there! Well done. Will try to replicate this for my system on the weekend.

:toast:

I had no idea what a hornet's nest I was whacking with this topic.

Image
Production: 5.10, MX-23 Xfce, AMD FX-4130 Quad-Core, GeForce GT 630/PCIe/SSE2, 16 GB, SSD 120 GB, Data 1TB
Personal: Lenovo X1 Carbon with MX-23 Fluxbox
Other: Raspberry Pi 5 with MX-23 Xfce Raspberry Pi Respin

Aronticuz
Posts: 353
Joined: Wed May 04, 2022 1:04 pm

Re: create folders with an icon

#44 Post by Aronticuz »

Some interesting features from years ago:
When using transparency, cut outs and folder contents.

Often folder contents were shown automatically and that could be used to a design advantage by placing a file in the folder with first character as a dot (full stop) so it would not appear in a directory listing

(Every file must have had its own image)

When images of contents appears they followed an increasing order on file name.
To design an intended first page that would always appear I used filenames such as .000000 (extension if needed)

Aim achieved: to have unique personalized designs using varying levels of transparencies and cot out shapes partially showing contents on a filename sorted on alphanumeric increasing order AND a means to keep an appropriate image in the first file position.

So on a Mac for example your chosen design be the first one to pop out off the folder on animation effects

I don't think it slowed down the Mac much at all really - not noticeably anyway.

Short summary: so a folder of your own design could be made useful AND a first item in that folder could be made to pop up if the folder had animation effects.
Result: animated folder with predictable first object in that folder

User avatar
i_ri
Posts: 1106
Joined: Tue Jun 30, 2015 12:26 am

Re: create folders with an icon

#45 Post by i_ri »

Hello Jerry3904 and Everyone
The word directory. Is it allowed to use the word directory in a file name? Does it strike as odd, use of the word folder in the file names folder thumb..s?

Aronticuz
Posts: 353
Joined: Wed May 04, 2022 1:04 pm

Re: create folders with an icon

#46 Post by Aronticuz »

As a follow on from my earlier post... making one fixed hidden file that "appeared" in an animation was a lot better than several fixed files.

Mostly because a set of fixed animated files took something away of transient relevance once those file contents were changed.

In short: it just turned yo another version of same old of the same old

User avatar
AVLinux
Posts: 3022
Joined: Wed Jul 15, 2020 1:15 am

Re: create folders with an icon

#47 Post by AVLinux »

Thank you @Melber !!

Your scripts also worked for me with Thunar/tumbler on Enlightenment! The "PROGRAMS" folder was previously an emblem and is now using the folder.svg hack.
shot-2024-10-09_19-00-55.jpg
You do not have the required permissions to view the files attached to this post.

User avatar
i_ri
Posts: 1106
Joined: Tue Jun 30, 2015 12:26 am

Re: create folders with an icon

#48 Post by i_ri »

Hello Jerry3904 and everyone
As follow-up on the mention of the systemd only respin Those did folder thumbnailing after install package <librsvg2-bin>


First time booting live made persistent MX 23.4mxfluxbox 64
installed package <desktop-defaults-mx-xfce-system> and reboot.
The folder thumbnailing is working.

In /usr/bin/folder-thumbnailer
Can add any name to designate as the folder directory thumbnailer png icon reference.
Image
in /.fluxbox that is an xpm a svg a png and a png

User avatar
Melber
Developer
Posts: 1329
Joined: Tue Mar 23, 2021 4:19 pm

Re: create folders with an icon

#49 Post by Melber »

i_ri wrote: Thu Oct 10, 2024 4:36 am ...In /usr/bin/folder-thumbnailer ...
aha, that's maybe the difference.
The script seems to be part of the default xfce install but is not included in the default mxfb install.

User avatar
AVLinux
Posts: 3022
Joined: Wed Jul 15, 2020 1:15 am

Re: create folders with an icon

#50 Post by AVLinux »

For what it's worth I put @Melber scripts system-wide in /usr/share/thumbnailers and /usr/local/bin and they work as expected as long as you correctly point to where you've placed the folder-thumbnailer script. So if you don't want to necessarily install several other unwanted XFCE4 default items in Fluxbox or other non-XFCE4 DE's it would be pretty easy to make a small Deb to install Melber's assets system-wide.

Post Reply

Return to “MX Art”