Xfce Forum

Sub domains
 

You are not logged in.

#1 2018-10-14 09:48:15

Valdo
Member
From: Brive La Gaillarde
Registered: 2018-10-06
Posts: 47

[SOLVED] Two icons on a launcher, it is possible ?

Hello,
is it possible to put two icons for a launcher ?
I explain myself, I manage my Desktop Xfce with Caja on Xubuntu 18.04 and I can not put my trash on this one.
so I created a launcher to access the trash, but I would like the icon to change when it is full.

Is there a pro from Cja, Xfce to scrub if anytime it is possible ?

Big thank you.

Valdo.

------------------------

Bonjour,
est t'il possible de mettre deux icônes pour un lanceur ?
je m'explique, je gère mon bureau Xfce avec Caja sur Xubuntu 18.04 et je n'arrive pas à mettre ma poubelle sur celui çi.
j'ai donc créé un lanceur pour accéder à la poubelle, mais j'aimerai bien que l'icone change lorsqu' elle est pleine.

y a t'il un pro de Cja, Xfce pour m'eguiller si toute fois cela est possible ?

Gros merci.

Valdo.

Last edited by Valdo (2018-10-15 06:34:47)


Windows is the most stable system in the world.
Bill GATES (Famous humorist)

Offline

#2 2018-10-14 12:55:50

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

Re: [SOLVED] Two icons on a launcher, it is possible ?

It is possible but it's not easy. Each launcher has it's own associated .desktop file in ~/.config/xfce4/panel/launcher-X where launcher-X is a folder name depending on the assigned plugin number. Within that directory is the .desktop file for that launcher. For example:

$ ls ~/.config/xfce4/panel
datetime-4.rc  genmon-12.rc  genmon-7.rc  launcher-8
datetime-6.rc  genmon-13.rc  genmon-9.rc  xfce4-clipman-actions.xml
genmon-10.rc   genmon-3.rc   launcher-19
genmon-11.rc   genmon-4.rc   launcher-2
$ ls ~/.config/xfce4/panel/launcher-19
15395200202.desktop

If you change the "Icon=" line on the fly, the launcher icon will change.

sed -i 's/^Icon.*/Icon=xfce-trash_full/' 15395200202.desktop

.

However, included as part of thunar is a trash panel applet. If you haven't uninstalled thunar, simply add the Trash plugin to the panel. It should work.

.

A third option would be to use the genmon plugin and a script like this:

#!/bin/bash

TRASH_NUM=$(gio list trash:// | wc -l)
TRASH_CON=$(gio list trash://)

if [ $TRASH_NUM -gt 0 ]; then
        ICON=/usr/share/icons/gnome/22x22/status/xfce-trash_full.png
else
        ICON=/usr/share/icons/gnome/22x22/places/xfce-trash_empty.png
fi

# genmon
echo "<img>$ICON</img><click>exo-open --launch FileManager trash://</click><tool
>$TRASH_CON</tool>"

...change the trash icons to suit.


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

#3 2018-10-14 16:29:02

Valdo
Member
From: Brive La Gaillarde
Registered: 2018-10-06
Posts: 47

Re: [SOLVED] Two icons on a launcher, it is possible ?

Thank you very much, but I do not understand what you mean, I saw the Trash applet in the Panel
i just want to create a launcher on the desktop with if possible two icons depending if it's full or empty.

Valdo.

---------------------

Merci beaucoup, mais Je ne comprend pas ce que vous voulez dire, j'ai vu l'applet Poubelle dans le tableau de bord
je veux juste créer un lanceur sur le bureau avec si possible deux icônes en fonction si elle est pleine ou vide.

Valdo.

Last edited by Valdo (2018-10-14 16:30:13)


Windows is the most stable system in the world.
Bill GATES (Famous humorist)

Offline

#4 2018-10-14 19:51:59

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

Re: [SOLVED] Two icons on a launcher, it is possible ?

Sorry, I thought you meant a panel launcher.

i just want to create a launcher on the desktop

Since you are using caja to manage your desktop, perhaps you should ask on a forum that has more knowledge of caja?


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 2018-10-14 22:32:02

Valdo
Member
From: Brive La Gaillarde
Registered: 2018-10-06
Posts: 47

Re: [SOLVED] Two icons on a launcher, it is possible ?

ToZ wrote:

perhaps you should ask on a forum that has more knowledge of caja?

Could you tell me one?

Valdo


Windows is the most stable system in the world.
Bill GATES (Famous humorist)

Offline

#6 2018-10-14 23:50:19

Misko_2083
Member
Registered: 2015-10-13
Posts: 211
Website

Re: [SOLVED] Two icons on a launcher, it is possible ?

First enable desktop icons

gsettings set org.mate.background show-desktop-icons true

then show the trash

gsettings set org.mate.caja.desktop trash-icon-visible true

You can enable the other icons.

gsettings list-keys org.mate.caja.desktop
text-ellipsis-limit
trash-icon-name
computer-icon-visible
home-icon-visible
computer-icon-name
trash-icon-visible
network-icon-visible
font
network-icon-name
home-icon-name
volumes-visible

Do you want to exit the Circus?
https://www.youtube.com/watch?v=ZJwQicZHp_c

Offline

#7 2018-10-15 06:34:17

Valdo
Member
From: Brive La Gaillarde
Registered: 2018-10-06
Posts: 47

Re: [SOLVED] Two icons on a launcher, it is possible ?

Misko_2083 wrote:

then show the trash

gsettings set org.mate.caja.desktop trash-icon-visible true

Great, that's exactly what I needed thank you very much Misko_2083 = D

Could you help me on this subject: https://forum.xfce.org/viewtopic.php?id=12480

Valdo.


Windows is the most stable system in the world.
Bill GATES (Famous humorist)

Offline

#8 2018-10-15 07:45:01

Misko_2083
Member
Registered: 2015-10-13
Posts: 211
Website

Re: [SOLVED] Two icons on a launcher, it is possible ?

I think that text-ellipsis-limit key in org.mate.caja.desktop shema is what you are looking for.
How long should it be 3 or 4?

gsettings set org.mate.caja.desktop text-ellipsis-limit 3

Do you want to exit the Circus?
https://www.youtube.com/watch?v=ZJwQicZHp_c

Offline

#9 2018-10-15 09:02:15

Valdo
Member
From: Brive La Gaillarde
Registered: 2018-10-06
Posts: 47

Re: [SOLVED] Two icons on a launcher, it is possible ?

Misko_2083 wrote:

I think that text-ellipsis-limit key in org.mate.caja.desktop shema is what you are looking for.
How long should it be 3 or 4?

gsettings set org.mate.caja.desktop text-ellipsis-limit 3

I do not think that's it!
in fact on the screen we see the name of the document + the type of document and I would like to display only the name. But it's better to go to the other post to talk about it, I think.

Valdo.

Last edited by Valdo (2018-10-15 09:06:32)


Windows is the most stable system in the world.
Bill GATES (Famous humorist)

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.010 seconds, 8 queries executed - Memory usage: 557.99 KiB (Peak: 574.84 KiB) ]