Bug 390596 - Allow changing folder icons with the command line
Summary: Allow changing folder icons with the command line
Status: RESOLVED WORKSFORME
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 17.12.0
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-17 08:35 UTC by RaitaroH
Modified: 2018-02-17 15:34 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description RaitaroH 2018-02-17 08:35:07 UTC
I made before another suggestion here: https://bugs.kde.org/show_bug.cgi?id=389748

Would be really cool to have some command to change the icon of the folder. A use case would be something like this. You have a pictures folder. Inside you have different categories. You then write a simple script (or could be an implemented thing already) that will list the contents of the folder, then change the icon of said folder to an image inside itself, either the first one, last, with some extension (say .svg) or with some name say 1.png. It can very easily automate changing icons for folders in a recursive form (yes I have folders inside folders).

Now you might say, what about previews? Not the same thing. Previews for folder kinda look funny to me. Also with my idea you could set a file as an icon that is somewhere in the folder that may not be picked up by the preview.
Comment 1 Rog131 2018-02-17 14:09:57 UTC
You could set the icon of the folder. An example: https://imgur.com/nuO8lq3

The KDE .directory (a desktop file) file could have the the 'Icon' key. The Icon key could be set from the script. The Desktop file specification: https://standards.freedesktop.org/desktop-entry-spec/latest/ . Keys: https://standards.freedesktop.org/desktop-entry-spec/latest/ar01s06.html

A simple service menu example: Use This As Icon - https://www.kubuntuforums.net/showthread.php/25740-Service-Menus-with-Dolphin?p=408723&viewfull=1#post408723
Comment 2 RaitaroH 2018-02-17 15:14:37 UTC
(In reply to Rog131 from comment #1)
> You could set the icon of the folder. An example: https://imgur.com/nuO8lq3
> 
> The KDE .directory (a desktop file) file could have the the 'Icon' key. The
> Icon key could be set from the script. The Desktop file specification:
> https://standards.freedesktop.org/desktop-entry-spec/latest/ . Keys:
> https://standards.freedesktop.org/desktop-entry-spec/latest/ar01s06.html
> 
> A simple service menu example: Use This As Icon -
> https://www.kubuntuforums.net/showthread.php/25740-Service-Menus-with-
> Dolphin?p=408723&viewfull=1#post408723

Awesome thank you.
Comment 3 Rog131 2018-02-17 15:34:40 UTC
> Awesome thank you.

So marking this as closed (worksforme).