Xfce Forum

Sub domains
 

You are not logged in.

#1 2022-01-12 15:23:18

badsector
Member
Registered: 2014-08-28
Posts: 19

Mix of big/small icons on deskbars?

Because 16:9 is more or less forced on me I use a deskbar on each side with generally two columns (or rows in panelese) of icons in mission-groups. Exception to this (when running Plasma) are the Menu icons on top of each panel and a few frequently used ones like a browser, GoogleEarth and my mailer Sylpheed. I make these big ones occupying full panel width. Is this possible with XFCE?  I'd attach an image but I don't know how to do that in this forum-hosting frontend.

Offline

#2 2022-01-12 15:52:27

KBar
Member
Registered: 2021-11-05
Posts: 189

Re: Mix of big/small icons on deskbars?

It's good to have a graphical representation for things related to, well, graphics.

If you have xfce4-screenshooter, you can choose to upload to Imgur at confirmation dialog.

Otherwise, take a screenshot and upload it to an image hosting service of your choice.

Offline

#3 2022-01-13 02:54:57

badsector
Member
Registered: 2014-08-28
Posts: 19

Re: Mix of big/small icons on deskbars?

KBar wrote:

It's good to have a graphical representation for things related to, well, graphics.

If you have xfce4-screenshooter, you can choose to upload to Imgur at confirmation dialog.

cool

I booted my Devuan-XFCE making xfce4-screenshot available

Dev-XFCE desktop + Suse-Plasma deskbars

I will also use XFCE w. Slackware but that tweak's on hold awaiting 15.0 release.

Offline

#4 2022-01-13 03:44:27

KBar
Member
Registered: 2021-11-05
Posts: 189

Re: Mix of big/small icons on deskbars?

I'm confused here. Is the green panel from Plasma and the grey one is xfce4-panel?

If so, then no. xfce4-panel doesn't support sizing of individual elements. You can define the maximum icon size for the whole panel and for items like Notification Area and Status Notifier Plugin, but not their individual constituents.

Are the big ones just launchers? In that case, you can manually create individual launchers for them in your xfce4-panel and resize them within gtk.css, which was discussed in detail in this topic.

If they are not just launchers and instead are status icons inside statusnotifier, you can possibly resize them individually with something like this:

#statusnotifier-X button:nth-child(N) { -gtk-icon-transform: scale(2); }

where X is part of the plugin's internal name, and N is the position of a button in the statusnotifier widget, which is counted from left to right.
NFfJsl8l.png

Keep in mind that GTK's icon scaling is subpar since it blurs them in the process.

Offline

#5 2022-01-13 04:06:05

badsector
Member
Registered: 2014-08-28
Posts: 19

Re: Mix of big/small icons on deskbars?

KBar wrote:

I'm confused here. Is the green panel from Plasma and the grey one is xfce4-panel?

Yes green is Plasma, where several methods avail: one can just select a menu item and copy it to the desktop or the a panel, one can just drag any icon to the panel and associate it with any executable, or place widgets on the panel or launchers. I'm on Devuan right now with XFCE so I can't detail. I'll try to digest the rest tomorrow, thanks  :-)

Offline

#6 2022-01-13 19:06:08

ToZ
Moderator
From: Canada
Registered: 2011-06-02
Posts: 8,506

Re: Mix of big/small icons on deskbars?

Allow me to suggest an alternative.

You can use the xfce4-genmon-plugin as a launcher. There are two benefits to this approach:
1. It allows for the stretching of the plugin to greater than 1 column/row
2. You can run a script that acts as a launcher with logic (for example, if the app is running, show it, otherwise start it).

To do so, add the generic monitor plugin to the panel and configure it like this:
- Command = /path/to/mylauncher <APP> <ICON_IMAGE> <TOOLTIP>
- uncheck label

The mylauncher script is this:

#!/bin/bash
# requires: wmctrl

# $1 is the executable
# $2 is the image file to use
# $3 is the tooltip

echo "<img>$2</img>"
echo "<click>bash -c 'wmctrl -a $1 || $1'</click>"
echo "<tool>$3</tool>"

...make it executable.

As an example, for mousepad, you could use something like the following command:

/home/toz/mylauncher mousepad /usr/share/icons/Adwaita/48x48/apps/accessories-text-editor.png "Text Editor"

g.png

Offline

#7 2022-01-14 02:27:44

badsector
Member
Registered: 2014-08-28
Posts: 19

Re: Mix of big/small icons on deskbars?

ToZ wrote:

Allow me to suggest an alternative.

You can use the xfce4-genmon-plugin as a launcher. There are two benefits to this approach:
1. It allows for the stretching of the plugin to greater than 1 column/row
2. You can run a script that acts as a launcher with logic (for example, if the app is running, show it, otherwise start it).

To do so, add the generic monitor plugin to the panel and configure it like this:
- Command = /path/to/mylauncher <APP> <ICON_IMAGE> <TOOLTIP>
- uncheck label

The mylauncher script is this:

#!/bin/bash
# requires: wmctrl

# $1 is the executable
# $2 is the image file to use
# $3 is the tooltip

echo "<img>$2</img>"
echo "<click>bash -c 'wmctrl -a $1 || $1'</click>"
echo "<tool>$3</tool>"

...make it executable.

I tried that with a duplicate firefox command and got it on a panel (see bottom right) but it won't execute and varying the icon size doesn't seem to work either. It's an interesting idea though, seems to be at developer level a few yards over my head :-)

{varying icon size does work for the Sylpheed/Tor/GE icons on the right but with too much spacing}

But I did a bit of cheating too, and used extra panels, made of bit of progress especially for the Menu icons at the top each side; those really HAVE to stand out IMO.

Devuan-XFCE-Desktop

Plasma gives me an option for columns or rows for each launcher, that 'could' be one way of approaching the issue though I would not want to get in even deeper over my head :-))))

Offline

#8 2022-01-14 03:45:51

ToZ
Moderator
From: Canada
Registered: 2011-06-02
Posts: 8,506

Re: Mix of big/small icons on deskbars?

If you are using version 4.1.0 or greater of the genmon plugin, you can substitute <icon> for <img> (and just specify an icon name) and <iconclick> for <click>. This will display an icon using the panel's built in automatic icon sizing routines. For example:

/home/toz/mylauncher mousepad accessories-text-editor "Text Editor"

...and the script:

#!/bin/bash
# requires: wmctrl

# $1 is the executable
# $2 is the icon to use
# $3 is the tooltip

echo "<icon>$2</icon>"
echo "<iconclick>bash -c 'wmctrl -a $1 || $1'</iconclick>"
echo "<tool>$3</tool>"

If clicking on it isn't working, have a look at your logs files (~/.xsession-errors) or post back the actual command you are using in the plugin to verify it is correct. Also make sure you have "wmctrl" installed.

Offline

#9 2022-01-15 17:29:11

badsector
Member
Registered: 2014-08-28
Posts: 19

Re: Mix of big/small icons on deskbars?

ToZ wrote:

If you are using version 4.1.0 or greater of the genmon plugin, you can substitute <icon> for <img> (and just specify an icon name) and <iconclick> for <click>. This will display an icon using the panel's built in automatic icon sizing routines. For example:

/home/toz/mylauncher mousepad accessories-text-editor "Text Editor"

...and the script:

#!/bin/bash
# requires: wmctrl

# $1 is the executable
# $2 is the icon to use
# $3 is the tooltip

echo "<icon>$2</icon>"
echo "<iconclick>bash -c 'wmctrl -a $1 || $1'</iconclick>"
echo "<tool>$3</tool>"

If clicking on it isn't working, have a look at your logs files (~/.xsession-errors) or post back the actual command you are using in the plugin to verify it is correct. Also make sure you have "wmctrl" installed.

I'll try that, always wondered what difference there could be between icons and images :-)


I tried it, but I can't tell what version of Generic Monitor I have, and the image is a *.png which may not be an 'icon'? The changes edited into the script caused a blank icon of a large size to appear alright, which is great, but only to vanish a little later :-)

The large black blank icon has returned, and clicking it does start Firefox, the intended executable

#!/bin/bash
# requires: wmctrl
# $1 is the executable
# $2 is the image file to use
# $3 is the tooltip
# ~/0/mycommand.bsh firefox ~/0/icons/netscape.png "Browser"
echo "<icon>$2</icon>"
echo "<iconclick>bash -c 'wmctrl -a $1 || $1'</iconclick>"
echo "<tool>$3</tool>"

Last edited by badsector (2022-01-16 01:25:14)

Offline

#10 2022-01-15 19:42:24

Skaperen
Member
From: right by Jesus, our Saviour
Registered: 2013-06-15
Posts: 589

Re: Mix of big/small icons on deskbars?

badsector wrote:

I'll try that, always wondered what difference there could be between icons and images :-)

IMHO, the only real difference is how it is defined to act and/or be acted on.  for example if an image has no properties it just sits there based on inherited/default properties.  if it has its own property to wiggle 3 times every 20 seconds then that's what it shall do.  clicking on that will do nothing.  but, it may also have a click-action property to define what happens if it is clicked on.  and this could get very sophisticated where pressing shift+alt and rolling the mouse roller (or pressing up or down keys) adjusts the contrast of the displayed image/icon (despite other properties).

Last edited by Skaperen (2022-01-15 19:43:18)

Offline

#11 2022-01-16 11:58:15

ToZ
Moderator
From: Canada
Registered: 2011-06-02
Posts: 8,506

Re: Mix of big/small icons on deskbars?

badsector wrote:

The large black blank icon has returned, and clicking it does start Firefox, the intended executable

#!/bin/bash
# requires: wmctrl
# $1 is the executable
# $2 is the image file to use
# $3 is the tooltip
# ~/0/mycommand.bsh firefox ~/0/icons/netscape.png "Browser"
echo "<icon>$2</icon>"
echo "<iconclick>bash -c 'wmctrl -a $1 || $1'</iconclick>"
echo "<tool>$3</tool>"

If using the "icon" parameter, you need to specify an icon name from your icon theme - not an image file. So for firefox, it would be something like "firefox" (or "netscape" if your icon theme has an icon called netscape). If not, just copy your netscape.png file to ~/.icons and it should work.

Edit: to get the genmon version, right-click the plugin and select the "About" option.

Last edited by ToZ (2022-01-16 11:59:51)

Offline

Board footer

Powered by FluxBB