PEM's stuff

I’m using Chinese with UTF-8 encoding on my system. And no matter which font did I use, mrxvt could not display the Chinese character currectly. And I could not find any thing about utf-8 or unicode in its man page. On it’s todo list, I saw “unicode support”. I wander if it support utf-8 now? Does anyone know? Thanks.

@ferrao
Thanks for your input. It rocks 8)

@Zer4tul
Well, I’m not a chinese but according to this screenshot, it seems to be feasible.
There is also this on the MRXVT’s home page:

@all
Did you see that this thread has been seen over 10.000 times? :open_mouth: I got to put some advertisments on it :wink:

Hi,

Thanks PE for your theme which is very nice !
I’ve used Fvwm for five years now, happy with the functionalities.
Now, it’s not only powerful, it’s nice too !!

I have a problem with Thumbmail. It does not work directly with several
applications, among which “xmms”.

If I open a console and type
Style * Icon $[fvwm_icon]/16x16/apps/gnome-help.png
then xmms does not recognize this sentence and thumbmail does not work
on xmms

On the other hand, if I type
Style xmms Icon $[fvwm_icon]/16x16/apps/gnome-help.png
then xmms does recognize the sentence and thumbmail works.

Can anyone explain this to me ?
Thanks,
Laurent.

I suppose you have something like Style * IconOverride in your configuration so that you can replace an app supplied icon with one of your own. Now Style * Icon blabla sets the default icon that’s used, eg the one on applications that don’t have one of themselves and the ones you don’t assign one to.

I hope that made things a bit clearer :slight_smile:

Yes, that’s very clear. Thanks.

I checked against the documentation and realised that I didn’t understand
it well. When the documentation explained the special meaning of
Style * Icon unknown.xpm
I thought that “unknown.xpm” was a reserved keyword.
I admit that I could have thought a bit more. :blush: Nevertheless, maybe
one could change the term “unknown.xpm” with something like “anyIcon.xpm”
in the documentation …

Now, what I don’t understand is how the function Thumbnail works.

AddToFunc Thumbnail

  • I Raise
  • I SetEnv Icon-$[w.id] $[w.IconFile]
  • I ThisWindow (!Shaded, Iconifiable, !Iconic) PipeRead
    “xwd -silent -id $[w.id] | convert -scale $[fvwm_icon_size] -quality 0
    xwd:- png:/dev/shm/icon.tmp.$[w.id].png;
    composite -geometry +5+5 $[w.IconFile]
    /dev/shm/icon.tmp.$[w.id].png /dev/shm/icon.tmp.$[w.id].png;
    echo WindowStyle IconOverride, Icon /dev/shm/icon.tmp.$[w.id].png;”
  • I Iconify

Let us say that I apply “Thumbnail” on a window whose application is
xmms. Xmms has its own Icon and the command “echo
WindowStyle…” has no effect. If I change the Icon of xmms by
something like “Style xmms Icon myIcon” before I use “Thumbnail”, then
the command “echo WindowStyle …” does change the Icon.
Why do I need to change the Icon first for the commmand “echo
WindowStyle…” to be effective ?

Laurent, still learning Fvwm :wink:

“I” means ‘immediately’. So for the window this function is axting upon, the window is raised (so that we can see all of it before the snapshot is taken.)

Because XMMS is a PITA. You only need to search these forums to determine that. :) Actually, the answer is because some applications specify their own icon which the WM must obey (according to the ICCCM) What you really want is a style line such as this:

Style ** IconOverride

HTH,

– Thomas Adam

Thanks for your thorough answer, which is more than I expected :smiley:

Ok. And when I have changed the Icon at least once,
then the application is not considered as having its own icon anymore, thus
it behaves differently under the WindowStyle command.
Is it correct ?

Does not work :frowning:
Never mind. The point for me was to understand. I can choose an icon for the
applications I use. I am not that lazy 8)

Laurent

BTW, I don’t know if you noticed it, but this thumbnailling thing is a bit sluggish. On this post, Sasha has provided us a good way to make a more efficient one. I’ve modified it a bit to match the conf your are playing with. Check it, it’s worth the detour.

Note, that there should be a better way by using the composite extension… One day, I will may be take some time to check that.

I get that a lot.

No, it isn’t. In which case, I suspect that you want “EWMHIconOverride” – see the man page, if you’re unsure.

Again, see above.

– Thomas Adam

hy, PEM, i’ve been tried to put Weather in my FVWM Root menu, but, i think i miss something, take a look:

Menu conf:

Functions:

script:

if you can tell me what i need to do, or what is wrong, whit this information, will be good

(sorry for my english)

There’s a missing accodance (the end bracket of the foreach loop) :confused:

You can test the script on the CLI, outside Fvwm :wink:

BTW, that reminds me an old post of mine related to one question you’ve asked some time ago.

In this post, I was referring to 2 scripts. The first script was intended to generate data from forecasts get from weather.com and create a log file out of them in the /dev/shm. The other was intended to generate a menu out of the log freshly created. I guess you are not calling the good script and that you need the second and missing script in my post (though, it was available in my config) :blush:

Here it comes:
weather_menu.plx

#!/usr/bin/perl use strict; open(FORECASTS, "/dev/shm/weather.log") or print '+ "No forecasts available"' and exit; my $index; my $forecast; my $line; while($line = <FORECASTS>) { chomp($line); if($index == 0) { print "+ %$line%"; $index = 1; } elsif($index == 1) { if($forecast == 0) { print "\"Today\tTemp $line Hum "; } else { print "\"Day $forecast\tTemp $line Hum "; } $index = 2; } else { print "$line %%\"\n"; $index = 0; $forecast++; } }

I’ve written 2 scripts caus’ I use the log in the /dev/shm to also generate the icon in my dock. It avoids to call 2 times the same request to the poor lads at weather.com :slight_smile:

PEM Wrote:

Thanks. I’ll have a look.

Laurent

Yes, it will work with the gb2312 or gbk encoding, but not it seems will not work with utf8. For some reason, I should use utf8 instead of gb, that’s why I’m puzzled…
Anyway, thank you all the same.

thanks, pem i’ve already saw the script on you fvwm2rc conf…, i already have the dynamicmenu, but doesn’t show me information… only the day and the images… if you know where is the problem… tell me please… :smiley: tks again

When you execute the weather_log.plx on the command line, what it is its output?

shows me everything. i’m not home at the moment, but it’s something like this:

34.png day1 info here

Seems to be fine. Just for info, here’s my output:

24.png 25º/16ºC 20 % 39.png 25º/16ºC 50 % 30.png 32º/17ºC 20 % 38.png 29º/17ºC 40 % 30.png 27º/15ºC 10 % 38.png 26º/15ºC 30 % 30.png 26º/15ºC 20 % 39.png 26º/15ºC 30 % 30.png 26º/15ºC 10 %
Actually, this output corresponds to the extracted content of the html page found at the specified URL. Each 3 lines corresponds to one forecast for a day starting from today/tonigh. The first line of a forecast is a bitmap displayed to show the expected weather. The second line is the range of temperature (man and min) in celsius. The third line is the degree of humidity (as you can see, it does not rain often these days in France 8) ).

In the output, the bitmap is brute. For Fvwm or any script, it must be set along with a path. If you call this script with the right path as argument to your stored weather bitmap, it will concatenate the path with the bitmap file. Thus, it’s easy to draw some value for a menu or an icon. I provide 2 sets of bitmaps in my archive but there are more on deviantart.com for instance.

Once you have succeeded in creating the right log at the right place, I mean the /dev/shm, could you provide me with the output of your weather_menu.plx output? And BTW, could you also show me how do you call weather_log.plx in your config?

my /dev/shm/weather.log is like yours, and i call the weather_log.plx in my config, like this:

The call seems OK. Anyway, I was requesting the output of the second script because it’s this script that should provide the menu content :wink: Just to check if everything is OK, you could directly execute these scripts on the command line:

.fvwm/script/weather_log.plx /home/joao/.fvwm/img/weather/um/> /dev/shm/weather.log cat /dev/shm/weather.log /home/joao/.fvwm/img/weather/um/11.png 16ºC 60 % /home/joao/.fvwm/img/weather/um/39.png 31º/20ºC 30 % /home/joao/.fvwm/img/weather/um/39.png 30º/18ºC 30 % /home/joao/.fvwm/img/weather/um/12.png 25º/15ºC ...
And the second output which interest us most:

[code].fvwm/script/weather_menu.plx

  • %/home/joao/.fvwm/img/weather/um/11.png%“Today Temp 16ºC Hum 60 % %%”
  • %/home/joao/.fvwm/img/weather/um/39.png%“Day 1 Temp 31º/20ºC Hum 30 % %%”
  • %/home/joao/.fvwm/img/weather/um/39.png%“Day 2 Temp 30º/18ºC Hum 30 % %%”
  • %/home/joao/.fvwm/img/weather/um/12.png%“Day 3 Temp 25º/15ºC Hum 60 % %%”
  • %/home/joao/.fvwm/img/weather/um/11.png%“Day 4 Temp 24º/14ºC Hum 60 % %%”
  • %/home/joao/.fvwm/img/weather/um/11.png%“Day 5 Temp 23º/14ºC Hum 60 % %%”
  • %/home/joao/.fvwm/img/weather/um/30.png%“Day 6 Temp 25º/14ºC Hum 10 % %%”
  • %/home/joao/.fvwm/img/weather/um/32.png%“Day 7 Temp 25º/14ºC Hum 10 % %%”
  • %/home/joao/.fvwm/img/weather/um/32.png%“Day 8 Temp 26º/15ºC Hum 10 % %%”
  • %/home/joao/.fvwm/img/weather/um/32.png%“Day 9 Temp 26º/15ºC Hum 0 % %%”[/code]
    If you got this ouput and if every bitmap can be accessed in the proper directory can, now it will be time to have some Fvwm checks.