You are not logged in.
Pages: 1
A while ago I had written a simple weather panel plugin for Mint Os, and having machines using both cinnamon and xfce DEs, I thought I would share it here:
https://gitlab.com/christosangel/weathe … e_cinnamon
Follow the instructions in the README, feel free to give any feedback!
Offline
Also, this is the link for yet another weather plugint hat I wrote.
This is more detailed, as it uses the free Openweather API (https://openweathermap.org/)
Offline
Always like to see genmon out in the wild.
Some suggestions for the first script:
Make the icon path configurable via a variable at the top of the script (the complete gnome icon theme isn't installed on all systems).
Make the click dialog geometry also configurable via variables at the beginning of the script (so the user doesn't need to search the code to change them)
Line 201 has an errant "</clickaction>" towards the end of the line
Thanks for sharing.
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
Genmon is a gem.
Thanks for the corrections, I am happy to share, I hope someone finds those scripts useful.
The typo is fixed now (result of adjusting the script from cinnamon to xfce for a mint mac), the window geometry is also stored in the inequivocably named variable YAD_WINDOW_GEOMETRY, and the README is updated, too.
About the icon theme, I used the gnome theme because it is installed in most systems, not all. There may be a problem as well with the png names, as I am not sure that other themes have the same name for every png used. The solution could be to include a folder containing the necessary icons to the repo. So, if the user wishes to change the icon theme, they will substitute the existing icons, with others, which will have the same name.
Offline
The first one doesn't work for me. It just shows the curl text in the genmon, like "% total % received % xferd....."
Offline
Have you followed the instructions on the README?
In the Command field, you should enter : /home/user'sname/path-to-directory/forecast_xfce_cinnamon/Forecast.sh
I have correctd the code, I added the -s flag to the curl command in line 7 to make it silent.
Run the genmon with the corrected version (either download it again or just make the simple correction yourself, in line 7 instead of
curl wttr.in/~Athens,Greece?FQT -o /tmp/Forecast.txt
,put
curl -s wttr.in/~Athens,Greece?FQT -o /tmp/Forecast.txt
Let me know if that worked for you.
Last edited by christos (2023-01-23 22:38:12)
Offline
Still doesn't work. Now I just get "mkdir: cannot create directory ‘/tmp/Forecast_days’: File exists". I get the same thing if I run from the command line. The text files are all populated in the Forecast_days directory. If I run the yad command from the terminal it brings up the little GUI with the weather data in it.. I don't understand what's wrong.
Offline
I see.I have updated the code to suppress the mkdir warning. Either download it again or just make the simple correction yourself, in line 9, instead of
mkdir /tmp/Forecast_days
put
if [[ ! -d /tmp/Forecast_days ]];then mkdir /tmp/Forecast_days;fi
Let me know if that works for you.
Offline
Now it just outputs nothing! I don't understand it, the yad command works fine, and I checked that I have the icons you call for. My xfce is fairly standard, I made a few changes from default in the window and panel settings but nothing too far out.
Offline
What is the output when you run
./Forecast.sh
from the terminal?
It should be something like:
<txt>...............</txt>
<img>.............</img>
<click>.........</click>
<tool>.....</tool>
You mentioned that /tmp/Forecast.txt and /tmp/Forecast_days get populated, correct?
Offline
Currently it outputs nothing. If I revert all the changes you made in the last few posts it looks like this.
$ ./Forecast.sh
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 6573 100 6573 0 0 18448 0 --:--:-- --:--:-- --:--:-- 18463
mkdir: cannot create directory ‘/tmp/Forecast_days’: File exists
Offline
Please open a terminal and run
echo $DESKTOP_SESSION
It should output xfce.
Offline
$ echo $DESKTOP_SESSION
xubuntu
heheh.. I just changed line 198 to if [ $DESKTOP_SESSION = "xubuntu" ] and now it works. That's something to consider for people running XFCE based distros. Thanks!
Last edited by mocha (2023-01-25 06:48:51)
Offline
Well, now we know that this issue that needed resolving, thanks to your feedback.
I have updated the code so that any desktop environment other than cinnamon should be considered xfce, and now gets the output for genmon.
I have also uploaded a png folder that contains the images. Thus any user whose system has not the gnome icons, can point the code to that directory for images.
Offline
Pages: 1
[ Generated in 0.010 seconds, 7 queries executed - Memory usage: 570.22 KiB (Peak: 587.06 KiB) ]