View previous topic :: View next topic |
Author |
Message |
Zagloj Guru
Joined: 17 Jun 2005 Posts: 344
|
Posted: Sat Mar 24, 2007 12:47 pm Post subject: [FVWM] Problem with Thumbnails (solved) |
|
|
Hi, I'm trying to get the thumbnail function working like I want, but I have no succes, what I want is to have thumbnails of my windows instead icons. I tried the Taviso's function and now Im trying the program and funtcion avaible here:
http://pemarchandet.free.fr/fvwm.html
But when I make this (via heybinding)
Code: | Pick (AcceptsFocus CurrentPage !Iconic !Shaded) Thumbnail |
If I set the Style * to NoIcon, no Icon neither thumbnail appear.
Bye and thanks in advance
By the way, in my laptop with Debian, the Taviso's function makes thumbnails, no icons (and with the same config, well, not at the moment but in the past). _________________ Your ideology seems to be: "I hate the fanatics, we shoud kill them all" juantxorena dixit.
Last edited by Zagloj on Sat Mar 24, 2007 7:34 pm; edited 1 time in total |
|
Back to top |
|
|
i92guboj Bodhisattva
Joined: 30 Nov 2004 Posts: 10315 Location: Córdoba (Spain)
|
Posted: Sat Mar 24, 2007 6:06 pm Post subject: Re: [FVWM] Problem with Thumbnails (open) |
|
|
Zagloj wrote: | Hi, I'm trying to get the thumbnail function working like I want, but I have no succes, what I want is to have thumbnails of my windows instead icons. I tried the Taviso's function and now Im trying the program and funtcion avaible here:
http://pemarchandet.free.fr/fvwm.html
|
Let's try to discard some basic things. Make sure you have emerged imagemagick and xwd. Look at errors in the vt, so we can see exactly where is that function failing.
Code: |
SetEnv fvwm_icon_size 150
DestroyFunc Thumbnail
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 32x32+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
|
The composite part will miserably fail if your application has no w.IconFile property, which is not strange, since most people and wms just use w.MiniIconFile. That is, I think, another possible source of trouble. Just removing the two lines about composite would do the trick, but you probably might want to try this before doing so:
Code: |
SetEnv fvwm_icon_size 150
DestroyFunc Thumbnail
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 32x32+5+5 $[w.MiniIconFile] \
/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
|
That will use MiniIconFile instead.
Code: | Pick (AcceptsFocus CurrentPage !Iconic !Shaded) Thumbnail |
I am not sure what do you want to do with this, but in any case, better use
Code: | Pick (AcceptsFocus, CurrentPage, !Iconic, !Shaded) Thumbnail |
Quote: | If I set the Style * to NoIcon, no Icon neither thumbnail appear. |
You need Icons on, the style above will let the funtion work (wasting cpu cycles) but then will remove all the icons. Note that the only thing that the Thumbnail function does it to change the application Icon to a custom one (in this case, made out of a screenshot composed with former application icon). |
|
Back to top |
|
|
ThomasAdam Guru
Joined: 20 Mar 2005 Posts: 448 Location: England
|
Posted: Sat Mar 24, 2007 6:57 pm Post subject: Re: [FVWM] Problem with Thumbnails (open) |
|
|
6thpink wrote: |
You need Icons on, the style above will let the funtion work (wasting cpu cycles) but then will remove all the icons. |
Depends where and when it's issued as to whether it's effective or not in displaying icons.
-- Thomas Adam |
|
Back to top |
|
|
Zagloj Guru
Joined: 17 Jun 2005 Posts: 344
|
Posted: Sat Mar 24, 2007 7:09 pm Post subject: |
|
|
Thanks, it was the xwd anyways I can't remember when did I install this in debian, I forgot about that, sorry, now and with (back to the inefficient thumbnailing) Code: | DestroyFunc Thumbnail
AddToFunc Thumbnail
+ I Raise
+ I ThisWindow (!Iconic) SetEnv Icon-$[w.id] $[w.iconfile]
+ I ThisWindow (!Shaded, Iconifiable, !Iconic) PipeRead \
"xwd -silent -id $[w.id] | convert -scale 128 -frame 1x1 \
-mattecolor black -quality 0 -filter blackman xwd:- png:$[FVWM_USERDIR]/icon.tmp.$[w.id].png \
&& echo WindowStyle IconOverride, Icon $[FVWM_USERDIR]/icon.tmp.$[w.id].png \
|| echo Nop"
+ I TestRc (Match) Test (f $[w.miniiconfile], f $[FVWM_USERDIR]/icon.tmp.$[w.id].png) PipeRead \
"composite -geometry +2+4 $[w.miniiconfile] $[FVWM_USERDIR]/icon.tmp.$[w.id].png \
$[FVWM_USERDIR]/icon.tmp.$[w.id].png; echo Nop"
+ I Iconify
DestroyFunc DeThumbnail
AddToFunc DeThumbnail
+ I PipeRead "echo Test \\(i \\$\\[Icon-$[w.id]\\]\\) WindowStyle Icon \\$\\[Icon-$[w.id]\\]"
+ I TestRc (NoMatch) WindowStyle NoIconOverride, Icon
+ I Exec rm -f $[FVWM_USERDIR]/icon.tmp.$[w.id].png
+ I All (Iconic, CurrentPage) PlaceAgain icon
+ I UnsetEnv Icon-$[w.id] |
I have all working, now on my way to get the thumbnails in the Pager, thanks a lot for the support
Bye and about the Code: | Pick (AcceptsFocus, CurrentPage, !Iconic, !Shaded) Thumbnail | I use it to Iconify the current window, it worked ok, but now, following your advice it has the commas _________________ Your ideology seems to be: "I hate the fanatics, we shoud kill them all" juantxorena dixit. |
|
Back to top |
|
|
ThomasAdam Guru
Joined: 20 Mar 2005 Posts: 448 Location: England
|
Posted: Sat Mar 24, 2007 7:11 pm Post subject: |
|
|
Zagloj wrote: | I use it to Iconify the current window, it worked ok, but now, following your advice it has the commas |
The commas are there because a future version of FVWM (i.e., one that has yet to go stable), will use it to separate out different clauses within conditional statements. Not having them is acceptable, of course, for the time-being.
-- Thomas Adam |
|
Back to top |
|
|
Zagloj Guru
Joined: 17 Jun 2005 Posts: 344
|
Posted: Sat Mar 24, 2007 7:33 pm Post subject: |
|
|
ThomasAdam wrote: | The commas are there because a future version of FVWM (i.e., one that has yet to go stable), will use it to separate out different clauses within conditional statements. Not having them is acceptable, of course, for the time-being. |
Thanks for explaining that, now, its time to mark the thread as solved _________________ Your ideology seems to be: "I hate the fanatics, we shoud kill them all" juantxorena dixit. |
|
Back to top |
|
|
i92guboj Bodhisattva
Joined: 30 Nov 2004 Posts: 10315 Location: Córdoba (Spain)
|
Posted: Sat Mar 24, 2007 7:38 pm Post subject: |
|
|
Zagloj wrote: | Thanks, it was the xwd anyways I can't remember when did I install this in debian |
Well, that is due to the use of modular xorg.
In debian, if you installed xorg you got xwd, xrandr, xkill, etc. In gentoo, since 7.0, each small piece comes on its own ebuild, and xwd, to put an example, is not required to install xorg-x11 or xorg-server, so, you have to install it by hand. Same for xkill, xrandr and probably most binaries. |
|
Back to top |
|
|
Zagloj Guru
Joined: 17 Jun 2005 Posts: 344
|
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|