Xfce Forum

Sub domains
 

You are not logged in.

#1 2023-12-31 15:45:56

MNS1968
Member
From: Swampville, England.
Registered: 2023-02-22
Posts: 30

Adding Emblems - the right folder?

Something I've never done before adding custom emblems to Xfce.

I've tried adding a 16 x 16px svg image to this directory: /usr/share/icons/elementary-xfce/emblems/symbolic/

In target directory:

root@Debian:/home/martin# gtk-update-icon-cache

and restarted Debian but with no luck.

Am I copying into the right directory or not?

Has the image got to be png or svg?

Have all image sizes have to be added, i.e: 10 x 10, 16 x 16, 22 x 22, 24 x 24, 32 x 32, 48 x 48, or just to the symbolic folder?

Offline

#2 2023-12-31 16:45:01

JayGursky
Member
Registered: 2023-07-04
Posts: 19

Re: Adding Emblems - the right folder?

An approach that allows to avoid the issue of overwrites from package updates.
https://forum.xfce.org/viewtopic.php?id=11721

Offline

#3 2023-12-31 20:21:03

MNS1968
Member
From: Swampville, England.
Registered: 2023-02-22
Posts: 30

Re: Adding Emblems - the right folder?

JayGursky wrote:

An approach that allows to avoid the issue of overwrites from package updates.
https://forum.xfce.org/viewtopic.php?id=11721

Sorry but that's not what I asked.

Last edited by MNS1968 (2023-12-31 20:21:27)

Offline

#4 2023-12-31 21:17:04

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,032

Re: Adding Emblems - the right folder?

MNS1968 wrote:

Have all image sizes have to be added, i.e: 10 x 10, 16 x 16, 22 x 22, 24 x 24, 32 x 32, 48 x 48, or just to the symbolic folder?

That particular icon theme uses predominantly png icons. So you need to add the emblem file to each of the specific sized folder names.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#5 2024-01-01 07:59:04

MNS1968
Member
From: Swampville, England.
Registered: 2023-02-22
Posts: 30

Re: Adding Emblems - the right folder?

ToZ wrote:
MNS1968 wrote:

Have all image sizes have to be added, i.e: 10 x 10, 16 x 16, 22 x 22, 24 x 24, 32 x 32, 48 x 48, or just to the symbolic folder?

That particular icon theme uses predominantly png icons. So you need to add the emblem file to each of the specific sized folder names.

That's what I thought. Alright if you find a set of icons to use but a bit of a pain for one or two custom icons.

Thanks.

Offline

#6 2024-01-01 08:47:01

JayGursky
Member
Registered: 2023-07-04
Posts: 19

Re: Adding Emblems - the right folder?

MNS1968 wrote:
JayGursky wrote:

An approach that allows to avoid the issue of overwrites from package updates.
https://forum.xfce.org/viewtopic.php?id=11721

Sorry but that's not what I asked.

Read that topic to see how to do what you asked.

Offline

#7 2024-01-01 10:24:55

JayGursky
Member
Registered: 2023-07-04
Posts: 19

Re: Adding Emblems - the right folder?

MNS1968 wrote:
ToZ wrote:
MNS1968 wrote:

Have all image sizes have to be added, i.e: 10 x 10, 16 x 16, 22 x 22, 24 x 24, 32 x 32, 48 x 48, or just to the symbolic folder?

That particular icon theme uses predominantly png icons. So you need to add the emblem file to each of the specific sized folder names.

That's what I thought. Alright if you find a set of icons to use but a bit of a pain for one or two custom icons.

Thanks.

A simple script putIcons.sh can convert one icon file to all sizes and add them to a theme:

#!/bin/sh
# Usage:
#
# For folders like ~/.local/share/icons/hicolor/32x32/mimetypes
#
# putIcons.sh ./my-icon.png hicolor mimetypes
#
# For folders like ~/.local/share/icons/oxy/emblems/32x32/
#
# putIcons.sh ./my-icon.png oxy/emblems

filename=$(basename $1)
dirname=$HOME/.local/share/icons/$2
[ -z "$3" ] && context="" || context=$3/
for dir in `ls -1 $dirname`
do
  mkdir -p $dirname/$dir/$context
  echo magick $1 -resize $dir $dirname/$dir/$context$filename
       magick $1 -resize $dir $dirname/$dir/$context$filename
done

Requirements: imagemagick installed.

Last edited by JayGursky (2024-01-01 10:48:32)

Offline

#8 2024-01-01 11:44:22

MNS1968
Member
From: Swampville, England.
Registered: 2023-02-22
Posts: 30

Re: Adding Emblems - the right folder?

JayGursky wrote:
MNS1968 wrote:
JayGursky wrote:

An approach that allows to avoid the issue of overwrites from package updates.
https://forum.xfce.org/viewtopic.php?id=11721

Sorry but that's not what I asked.

Read that topic to see how to do what you asked.

I knew about this post and understand what your saying, ToZ answered what wanted clarified.

It now seems, for me to use what I have, each custom icon is going to have to go through the resizing process for it to work.

Offline

#9 2024-01-04 00:16:40

JayGursky
Member
Registered: 2023-07-04
Posts: 19

Re: Adding Emblems - the right folder?

MNS1968 wrote:

It now seems, for me to use what I have, each custom icon is going to have to go through the resizing process for it to work.

If so, then the script I posted above should deal with it automatically. Imagemagick allows to resize pictures from CLI, so it resizes and puts them in corresponding folders, if those folders are already existing in the path.
Also if you create your own theme, then you could probably make svg icons work there (I don't know how to do that though, never did that myself).

Last edited by JayGursky (2024-01-04 00:17:12)

Offline

Board footer

Powered by FluxBB