Large size exec icon for DE?

This is related to the weather app topic, a technical question.

The icon button that opens the yad dialog box, is updated with the latest weather forecast image. It works fine. But, how to create a large-size icon without enlarging all icons on the desktop? Fvwm doesn’t use desktop icons but any size of FvwmButtons. On Xfce and other DE, icons depend on the desktop setting. Can one icon be made of different size? This is how the desk looks like with the setting of 116px icons. Supposed to be 32x for all icons beside the 116px WeatherApp.

xfce-fvwm-wIcon-tmp

Setting of WeatherApp
forecaNOW.desktop

[Desktop Entry]
Version=1.0
Type=Application
Name=WeatherApp
GenericName=Fvwm Weather Extension
Comment=Screenshot of weather website
Path=/home/amurt/
Exec=/home/amurt/.fvwm/extraEXT/MODULES/WeatherB/wStartup.sh
Terminal=false
Icon=/home/amurt/FvwmEXT/extraEXT/MODULES/WeatherB/image/forecaNOW.png
StartupNotify=true

Another question. The icon setting does not allow ~/.fvwm/extraEXT/ but full folder name /home/amurt/.fvwm/extraEXT/… Is there another variable without using the username?

Here in LXDE.
This must be quoted because of the shell if the full path cannot be used.
instead of

Exec=/home/amurt/.fvwm/extraEXT/MODULES/WeatherB/wStartup.sh

so

Exec=sh -c "~/.fvwm/extraEXT/MODULES/WeatherB/wStartup.sh %f"

the icons, maybe

Icon="~/FvwmEXT/extraEXT/MODULES/WeatherB/image/forecaNOW.png"
or
# icon is located in the folder ~/.icons/
Icon=forecaNOW.png

Thanks, I am testing on Xfce. The Exec=sh -c "~/. works fine without the full folder name. Icon="~/ doesn’t work, nor in .icon. Requires a full folder name.

Alternative is to use a Yad dialog box without buttons. It shows the original size (92x175). I added wind direction and speed.

forecaNOWds

QUESTION… how to make the icon (image) in a yad dialog box clickable, to run another script? I tried this with --dclick-action

yad --image=forecaNOWds.png --dclick-action="bash -c 'weatherBOX.sh'" --no-buttons

What about

Icon="~/FvwmEXT/extraEXT/MODULES/WeatherB/image/forecaNOW.png %i"

I am not familiar with yad.

Sorry, I didn’t notice Icon=forecaNOW.png when image is in ~/.icons/. Great, it works.

Now, how to make the icon big size on the Desktop?

After searching for an answer for Yad, there is an option for an image adding it to a button, of any size.

yad --title="WeatherIcon" --button='!forecaNOWds.png!Name:bash -c "./weatherBOX.sh"'

Screenshot:

XFCE-weather-button

Note: Yad doesn’t update when the image changes as an icon does. Requires to reload. Not a problem, updated by a bash daemon.

1 Like

To update a Yad dialog, first, kill it by adding & at end of the line to memorize yad_pid.

yad --title="WeatherIcon" --button='!forecaNOWds.png!Name:bash -c "./weatherBOX.sh"' &

Kills after 15 minutes.

sleep 900
yad_pid=$(echo $!)
kill $yad_pid

A few users are asking, how to position the weather button (92x175) in Xfce. Currently, when loaded, it is placed in the center of screen. When moved, goes back to center when updated.

Yad has geometry option to place from +left+top. Depending on the screen, adjust the position. For example screen 1920x1080… --geometry="+1200+50" goes near to right upper corner.

Positioning
yad --title="WeatherIcon" --geometry="+1200+50" --button='!forecaNOWds.png!Name:bash -c "./weatherBOX.sh"' &

Also, the button is a bit large for Xfce. When cropping it, use the resize option. For example -resize 68x (68x129).

weatherButton

2 Likes