[SOLVED] KDE plamsa - Creating custom full/empty icons for trash widget

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Swerve

[SOLVED] KDE plamsa - Creating custom full/empty icons for trash widget

Post by Swerve »

Hi, I've searched around a bit for this question but can't find an answer that seems to work. I would like to customize my trash can icons.

I have Mint 18.3 with KDE plasma desktop. When I first installed Mint, when I wanted to put a trash icon on my desktop, iirc I searched for something along the lines of "KDE trash icon on desktop", and ended up following some directions from somewhere to write some script which became a trash bin with a generic folder icon. I could then right click -> Properties and click on the picture to change the icon to whatever picture I wanted.

However, I recently realized that the icon never changed for empty/full trash, and I wanted to have that behaviour. While playing around with it, I stumbled onto the fact that there was actually a trash widget in the widgets. So I added that to my desktop instead, and trashed my old custom trash. Now the widget shows "full" or "empty" trash status, but I can't figure out how to customize the respective icons. I tried going into Oxygen folder, in usr/share/icons (iirc), and such; I'm finding a lot of icons in a lot of different folders that say "empty trash.png" or "full trash.png", but none of them look like the pictures I'm currently seeing on my desktop (generic blue/red folders for empty/full). So I'm not sure which ones I need to replace with custom ones. Right clicking on the widget also no longer gives me a Properties menu entry, and in the options that I do see there, I'm also not finding a clear way to do this.

Could somebody please instruct me on how to do this? Thank you very much.

___________________________________
ADVANCED VERSION OF THIS QUESTION:

Okay, so what I really want to do is more complicated and possibly impossible. Also a bit silly. But I just dreamed this up one day, after being made aware of how customizable my desktop is now, and am really hoping there's a way.

What I would REALLY like is this:

1) An empty trash icon that looks like a brown or black fuzzball. Think a cartoony version of a balled-up critter from the old movie Critters. Or possibly Grog, from the B.C. comic strip, but with no arms or legs.
2) When you hover over the brown fuzzball with trash, I would like the icon to open its large mouth, so as to eat the trash.
3) When you let go of the trash into the trash bin, I want the fuzzball to close its mouth and animate with a chewing motion. I would also like some audio here to make a "nom nom nom" sound. (I suppose 2->3 would also be what happens when you right-click->send to trash)
4) After "nom nom nom"ing, I would like the "full" trash icon to be a ballooned up version of the empty fuzzball (or anything, really. A few other ideas work here, cheeks puffed out, throat swollen, etc. It just has to be different than the empty version.
5) Finally, I would like the emptying of the trash to be accompanied by a gulping sound, and maybe another transitional animation, if doable, (what it would be depends on icon 4, and the difficulty of doing any of this), which then returns it to icon 1.

Somebody pleeeeease tell me this or something close would be possible, or has even already been done. If it's been done and requires downloading a new theme, please provide instructions on how to do this as well (I downloaded a free custom theme from KDE store already and tried to use it, but couldn't figure out how to get it working.) I know how to use GIMP well enough to draw some "fuzzball" icons and animations myself if I have to, but obviously existing things from someone who is a better artist would be awesome.

A secondary idea I had is a trash icon which is just a black spot which "sucks" stuff in once you drag it close enough, with a nice slurping sound, and then changes colors, or possibly emits colorful speckles/animates somehow, when full. Have no idea if this proximate or animation style behaviour would be doable, but figured it wouldn't hurt to ask.

Could somebody please tell me how this kind of thing could (or can't) be done? I can always post this part of the question in a more advanced section, if that seems best, but for now I'm not even sure if something like this would be possible. If not, it's probably still in the realm of "stupid questions", so I'll leave it here for now.

Thanks in advance for any help anyone can provide.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
catweazel
Level 19
Level 19
Posts: 9763
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: KDE plamsa - Creating custom full/empty icons for trash widget

Post by catweazel »

The trash icon is controlled by the theme. All you should need do is find the two trash icons and replace them with your preferred icons. Take a look in /usr/share/plasma/desktoptheme/. Also, a filename search for trash in /usr/share/ will reveal a stack of trash icons belonging to different themes. You just have to find the right ones. For example...

Image

Image

The two blue folders in the first image, and the red folder in the second look suspiciously like the trash icons from my current theme, so I would probably take a copy of one, make a minor change in Gimp, and see where it leads.
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.
Swerve

Re: KDE plamsa - Creating custom full/empty icons for trash widget

Post by Swerve »

catweazel wrote:The trash icon is controlled by the theme. All you should need do is find the two trash icons and replace them with your preferred icons. Take a look in /usr/share/plasma/desktoptheme/. Also, a filename search for trash in /usr/share/ will reveal a stack of trash icons belonging to different themes. You just have to find the right ones. For example...

Image

Image

The two blue folders in the first image, and the red folder in the second look suspiciously like the trash icons from my current theme, so I would probably take a copy of one, make a minor change in Gimp, and see where it leads.
Thanks for that suggestion; so far I had only painstakingly rifled through the Oxygen folder, somewhere in usr/share/icons, and didn't even consider just searching the overarching directories so i could see everything at once.

But when I searched "trash" in /usr/share/plasma/desktoptheme/, it came up empty (confirmed via manual searching). When I searched in /usr/share, there are a lot of results, but the only things it returns that have the blue folder trash icon that I currently have, are the ones you showed, which Idon't think are what we want, because when I click on any of them, it asks me if I want to execute or open. They also have no file extension, so I'm not sure what those even are. Also, there is no red folder in the search results at all.

I forged ahead to see what opening/excuting them did; the one that executed was just the trash configuration file (no icon option there), and the others when opened were scripts detailing some information about who made the trash wdget and such. Like so:

Image

But there was no line about an icon, or linking to a picture that I could find in any of them.

However, the good news is that searching all of usr/share led me to some svg files. I can't preview .svg files in Dolphin apparently, but clicking on them opened them in Gimp, and after a few tries I found a 32 x 32 and a 64 x 64 version of the icons I'm looking for. And surprise surprise, they're in a Breeze folder and not an Oxygen folder! Oops. (In settings, I chose a "desktop theme" of Oxygen, but apparently the "look and feel" is that of Breeze Dark. So I've been searching in the wrong theme folder anyway, apparently.)

Also, I've never heard of an svg file before, but they do open in GIMP, so let's screw with one and see what happens. Back in a jif...
Last edited by Swerve on Mon Jan 22, 2018 8:15 pm, edited 3 times in total.
Swerve

Re: KDE plamsa - Creating custom full/empty icons for trash widget

Post by Swerve »

Okay, got it. The svg files are indeed the thing we want here. Unfortunately, while GIMP will open/view .svg files, it apparently won't export to .svg; it says to choose a known file extension. But after Googling, I downloaded the program "Inkscape", which is something something edit source vector graphics instead of raster graphics (no idea what that means). With Inkscape I was able to edit/overwrite the svg file, and it did change the trash icon on reboot.

Thanks for the help. I'll go ahead and mark this as solved, and maybe repost the more complicated, second part of the question in a different section.
User avatar
catweazel
Level 19
Level 19
Posts: 9763
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: KDE plamsa - Creating custom full/empty icons for trash widget

Post by catweazel »

Swerve wrote:Okay, got it. The svg files are indeed the thing we want here. Unfortunately, while GIMP will open/view .svg files, it apparently won't export to .svg; it says to choose a known file extension. But after Googling, I downloaded the program "Inkscape", which is something something edit source vector graphics instead of raster graphics (no idea what that means). With Inkscape I was able to edit/overwrite the svg file, and it did change the trash icon on reboot.

Thanks for the help. I'll go ahead and mark this as solved, and maybe repost the more complicated, second part of the question in a different section.
No worries. I'm glad I was able to point you in the right direction. There is an expert UI designer who vistis this forum, albeit infrequently. Rather than let you hang there with no reply until he turned up I merely posted what I would do if I were looking for the files :mrgreen:

Cheers.
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.
Locked

Return to “Beginner Questions”