YWTRAY is a simple current weather indicator

Moderator: Forum moderators

Post Reply
User avatar
nilsonmorales
Posts: 173
Joined: Thu Dec 26, 2019 1:47 am
Location: El Salvador
Has thanked: 63 times
Been thanked: 101 times
Contact:

YWTRAY is a simple current weather indicator

Post by nilsonmorales »

It was written using GNU bash 5.0.17, and YAD 12.3 on a system with PuppyLinux FossaPup64 9.5. It uses curl 7.68.0, and GNU Awk 5.2.0. It is a project initiated as a way to learn bash, expect unefficient solutions to problems. Use at your own risk!
Github https://github.com/Dimorld/ywtray
Download https://github.com/Dimorld/ywtray/relea ... ywtray.pet
ImageImage
Image
ImageImage
Image

User avatar
pp4mnklinux
Posts: 1014
Joined: Wed Aug 19, 2020 5:43 pm
Location: Edinburgh
Has thanked: 598 times
Been thanked: 264 times
Contact:

Re: YWTRAY is a simple current weather indicator

Post by pp4mnklinux »

Hello everybody:

This temp indicator is really good. Installed by default in F96CE_XFCE_FUSILLI 4.4, with El Salvador as default country.

For sure, most of you wanna change it, and the process is really easy.

Right click at the icon in the taskbar and select exit.

Go to aplications folder (usr/share/aplications) and look for it (surely it is the last one at this folder, haha).

Configure your desire place and start it again

Now you have a good temp indicator at your task bar. It shows the weater using and icon, and when you need more info, you only need to put your mouse pointer on it, so a pop-up appears with info.-

Have a nice day u all.--- CHEERS :thumbup2:

:arrow:

XFCE_FUSILLI . ===> https://puppyxfcefusilli.wordpress.com/

YouTube How_To . ==> https://bit.ly/f96ce_xfce_fusilli_HOWTO

Learning EASY OS . => https://easyos.org/

User avatar
Sofiya
Posts: 2164
Joined: Tue Dec 07, 2021 9:49 pm
Has thanked: 1411 times
Been thanked: 1448 times

Re: YWTRAY is a simple current weather indicator

Post by Sofiya »

pp4mnklinux wrote: Wed May 03, 2023 7:57 am

Hello everybody:

This temp indicator is really good. Installed by default in F96CE_XFCE_FUSILLI 4.4, with El Salvador as default country.

For sure, most of you wanna change it, and the process is really easy.

Right click at the icon in the taskbar and select exit.

Go to aplications folder (usr/share/aplications) and look for it (surely it is the last one at this folder, haha).

Configure your desire place and start it again

Now you have a good temp indicator at your task bar. It shows the weater using and icon, and when you need more info, you only need to put your mouse pointer on it, so a pop-up appears with info.-

Have a nice day u all.--- CHEERS :thumbup2:

Info: If you are using the XFCE4 panel then it has its own Weather plugin :)
xfce4-weather-plugin - https://docs.xfce.org/panel-plugins/xfc ... ugin/start

Attachments
Снимок экрана от 2023-05-03 16-01-14.png
Снимок экрана от 2023-05-03 16-01-14.png (9.39 KiB) Viewed 1848 times

KL
PUPPY LINUX Simple fast free

User avatar
nilsonmorales
Posts: 173
Joined: Thu Dec 26, 2019 1:47 am
Location: El Salvador
Has thanked: 63 times
Been thanked: 101 times
Contact:

Re: YWTRAY is a simple current weather indicator

Post by nilsonmorales »

The user @Sofiya is correct but I want to emphasize this application, it can be a very good option (70kbs) for desktop environments like jwm, icewm, etc. that do not have a weather plugin like xfce does.
conky does it, but it looks very decent in the systray

User avatar
Sofiya
Posts: 2164
Joined: Tue Dec 07, 2021 9:49 pm
Has thanked: 1411 times
Been thanked: 1448 times

Re: YWTRAY is a simple current weather indicator

Post by Sofiya »

nilsonmorales wrote: Fri May 05, 2023 6:44 am

The user @Sofiya is correct but I want to emphasize this application, it can be a very good option (70kbs) for desktop environments like jwm, icewm, etc. that do not have a weather plugin like xfce does.
conky does it, but it looks very decent in the systray

Does not work with Tint2 panel, the icon shows but when you hover over it there is no pop-up window.
:shock:

Last edited by Sofiya on Fri May 05, 2023 1:08 pm, edited 1 time in total.

KL
PUPPY LINUX Simple fast free

User avatar
amethyst
Posts: 2368
Joined: Tue Dec 22, 2020 6:35 am
Has thanked: 55 times
Been thanked: 490 times

Re: YWTRAY is a simple current weather indicator

Post by amethyst »

Should warn users that you need to use a darker theme otherwise you may not see the icons (unless there is a way to change to the dark icon set for light backgrounds)....
Edit: Actually, you should see the icons if you use the light icons set instead of the dark icon set.

Last edited by amethyst on Fri May 05, 2023 1:23 pm, edited 1 time in total.
User avatar
josejp2424
Posts: 224
Joined: Sun Jul 12, 2020 11:40 pm
Has thanked: 241 times
Been thanked: 136 times

Re: YWTRAY is a simple current weather indicator

Post by josejp2424 »

Sofiya wrote: Fri May 05, 2023 9:13 am
nilsonmorales wrote: Fri May 05, 2023 6:44 am

The user @Sofiya is correct but I want to emphasize this application, it can be a very good option (70kbs) for desktop environments like jwm, icewm, etc. that do not have a weather plugin like xfce does.
conky does it, but it looks very decent in the systray

Does not work with Tint2 panel, the icon shows but when you hover over it there is no pop-up window.
jwm doesn't even have an icon.tested :shock:

hi @Sofiya
in tint2 I like to use a weater script. it uses the location of the http://openweathermap.org.

the script which is in /root/.config/tint2/executors/weather .
you must put your openwethermap api , and the location.

Image .

and in tint2rc. you must add these lines.

Code: Select all

#-------------------------------------
# executors 1
execp = new
execp_name = 
execp_command = ~/.config/tint2/executors/weather
execp_interval = 300
execp_has_icon = 1
execp_cache_icon = 1
execp_continuous = 0
execp_markup = 1
execp_monitor = all
execp_tooltip = Current weather --> click for 3 days weather forecast
execp_lclick_command = urxvt -geometry 127x36 -e /root/.config/tint2/executors/weather-run
execp_rclick_command = urxvt -geometry 127x36 -e /root/.config/tint2/executors/weather-run
execp_mclick_command = 
execp_uwheel_command = 
execp_dwheel_command = 
execp_font = DejaVu Sans Condensed 9
execp_font_color = #ffffff 100
execp_padding = 6 0
execp_background_id = 0
execp_centered = 0
execp_icon_w = 24
execp_icon_h = 24

my panel with weather.
Image

tint2-weather.tar.xz
/root/.config/tint2
(28.67 KiB) Downloaded 64 times
User avatar
Sofiya
Posts: 2164
Joined: Tue Dec 07, 2021 9:49 pm
Has thanked: 1411 times
Been thanked: 1448 times

Re: YWTRAY is a simple current weather indicator

Post by Sofiya »

josejp2424 wrote: Fri May 05, 2023 10:57 am
Sofiya wrote: Fri May 05, 2023 9:13 am
nilsonmorales wrote: Fri May 05, 2023 6:44 am

The user @Sofiya is correct but I want to emphasize this application, it can be a very good option (70kbs) for desktop environments like jwm, icewm, etc. that do not have a weather plugin like xfce does.
conky does it, but it looks very decent in the systray

Does not work with Tint2 panel, the icon shows but when you hover over it there is no pop-up window.
jwm doesn't even have an icon.tested :shock:

hi @Sofiya
in tint2 I like to use a weater script. it uses the location of the http://openweathermap.org.

HI @josejp2424
Thanks a lot ! This is what I needed

Attachments
Снимок экрана от 2023-05-05 14-43-23.png
Снимок экрана от 2023-05-05 14-43-23.png (36.06 KiB) Viewed 1774 times

KL
PUPPY LINUX Simple fast free

User avatar
mikewalsh
Moderator
Posts: 6038
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 739 times
Been thanked: 1905 times

Re: YWTRAY is a simple current weather indicator

Post by mikewalsh »

@nilsonmorales :-

Thank you, young sir. Works perfectly under Xenialpup 7.5 (this one has peebee's 64-bit compat SFS permanently loaded, so I don't know whether that has any effect).

Nice one! :thumbup:

Image

Mike. ;)

User avatar
amethyst
Posts: 2368
Joined: Tue Dec 22, 2020 6:35 am
Has thanked: 55 times
Been thanked: 490 times

Re: YWTRAY is a simple current weather indicator

Post by amethyst »

I changed the icons by overwriting the icons in the dark folder with those of the icons in the light folder. I now have colour icons (at least I see a yellow sun now, which it is here at the moment).

User avatar
amethyst
Posts: 2368
Joined: Tue Dec 22, 2020 6:35 am
Has thanked: 55 times
Been thanked: 490 times

Re: YWTRAY is a simple current weather indicator

Post by amethyst »

As a matter of interest - Attach a table providing the meaning of wind direction in terms of degrees. Now, I also know. :thumbup2:

Attachments
Wind Direction.png
Wind Direction.png (33.76 KiB) Viewed 1925 times
User avatar
amethyst
Posts: 2368
Joined: Tue Dec 22, 2020 6:35 am
Has thanked: 55 times
Been thanked: 490 times

Re: YWTRAY is a simple current weather indicator

Post by amethyst »

The configuration file is /root/.config/ywtray/ywtray.conf. To change the icon scheme to light, exit the application, add the following line to ywtray.conf and save, restart:

Code: Select all

icons_dir="/opt/yww-icons/light"

To change to the dark icons scheme, repeat above mentioned steps and change to icons_dir="/opt/yww-icons/dark"

User avatar
amethyst
Posts: 2368
Joined: Tue Dec 22, 2020 6:35 am
Has thanked: 55 times
Been thanked: 490 times

Re: YWTRAY is a simple current weather indicator

Post by amethyst »

Made a little utility for this app. Attached the .pet.
IMPORTANT:
1. When the application is first set up (or when a total reset is done), the icon directory may not be specified in the configuration file. If this is the case, the utility will not work because it's looking for that entry in the config file to change. So, in this case you need to add the following line to the config file:

Code: Select all

icons_dir="/opt/yww-icons/dark"

After that the application should work fine whenever interchanging the icons theme.
2. You can use the utility when the application is already running or if it is not running yet. In both scenarios, a new instance of the application will start with your newly chosen colour scheme. You need to be online before running the app/utility.

Attachments
Ywtray-Icons-Chooser.jpg
Ywtray-Icons-Chooser.jpg (13.01 KiB) Viewed 1817 times
ywtray-icons-chooser.pet
(1.54 KiB) Downloaded 65 times
User avatar
amethyst
Posts: 2368
Joined: Tue Dec 22, 2020 6:35 am
Has thanked: 55 times
Been thanked: 490 times

Re: YWTRAY is a simple current weather indicator

Post by amethyst »

See important information previous post.

User avatar
Sofiya
Posts: 2164
Joined: Tue Dec 07, 2021 9:49 pm
Has thanked: 1411 times
Been thanked: 1448 times

Re: YWTRAY is a simple current weather indicator

Post by Sofiya »

josejp2424 wrote: Fri May 05, 2023 10:57 am
Sofiya wrote: Fri May 05, 2023 9:13 am
nilsonmorales wrote: Fri May 05, 2023 6:44 am

The user @Sofiya is correct but I want to emphasize this application, it can be a very good option (70kbs) for desktop environments like jwm, icewm, etc. that do not have a weather plugin like xfce does.
conky does it, but it looks very decent in the systray

Does not work with Tint2 panel, the icon shows but when you hover over it there is no pop-up window.
jwm doesn't even have an icon.tested :shock:

tint2-weather.tar.xz

in order for the forecast for 3 days to be displayed in your country language, add the code to the script line 21
curl -H "Accept-Language:ru" https://wttr.in

path to script : /root/.config/tint2/executors/weather.sh

Code: Select all

#!/bin/bash
program=Weather
version=1.1
year=2018
developer=computer-geek64

case $1 in
-h | --help)
	echo "$program $version"
	echo "Copyright $year $developer. All rights reserved."
	echo
	echo "Usage: weather [options]"
	echo "Option          Long Option             Description"
	echo "-h              --help                  Show the help screen"
	echo "-l [location]   --location [location]   Specifies the location"
	;;
-l | --location)
	curl https://wttr.in/$2
	;;
*)
	curl -H "Accept-Language:ru" https://wttr.in
	;;
esac
Attachments
Снимок экрана.png
Снимок экрана.png (168.42 KiB) Viewed 1642 times
Last edited by Sofiya on Sat May 13, 2023 5:53 pm, edited 3 times in total.

KL
PUPPY LINUX Simple fast free

User avatar
nilsonmorales
Posts: 173
Joined: Thu Dec 26, 2019 1:47 am
Location: El Salvador
Has thanked: 63 times
Been thanked: 101 times
Contact:

Re: YWTRAY is a simple current weather indicator

Post by nilsonmorales »

Thank your both @Sofiya and @amethyst
very nice

User avatar
nilsonmorales
Posts: 173
Joined: Thu Dec 26, 2019 1:47 am
Location: El Salvador
Has thanked: 63 times
Been thanked: 101 times
Contact:

Re: YWTRAY is a simple current weather indicator

Post by nilsonmorales »

Something happened in the weather API, and the application stopped working, so the developer had to make changes to the /usr/local/bin/ywtray-functions file
You can download it from here https://github.com/Dimorld/ywtray/blob/ ... -functions and replace it. thank you so much

User avatar
spiritwild
Posts: 81
Joined: Wed Jul 22, 2020 1:34 am
Been thanked: 24 times

Re: YWTRAY is a simple current weather indicator

Post by spiritwild »

Thanks, I was wondering what was broken.

Post Reply

Return to “Utilities”