Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[FVWM] Problem with Thumbnails (solved)
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
Zagloj
Guru
Guru


Joined: 17 Jun 2005
Posts: 344

PostPosted: Sat Mar 24, 2007 12:47 pm    Post subject: [FVWM] Problem with Thumbnails (solved) Reply with quote

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
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10315
Location: Córdoba (Spain)

PostPosted: Sat Mar 24, 2007 6:06 pm    Post subject: Re: [FVWM] Problem with Thumbnails (open) Reply with quote

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
View user's profile Send private message
ThomasAdam
Guru
Guru


Joined: 20 Mar 2005
Posts: 448
Location: England

PostPosted: Sat Mar 24, 2007 6:57 pm    Post subject: Re: [FVWM] Problem with Thumbnails (open) Reply with quote

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
View user's profile Send private message
Zagloj
Guru
Guru


Joined: 17 Jun 2005
Posts: 344

PostPosted: Sat Mar 24, 2007 7:09 pm    Post subject: Reply with quote

Thanks, it was the xwd :oops: 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 :P

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
View user's profile Send private message
ThomasAdam
Guru
Guru


Joined: 20 Mar 2005
Posts: 448
Location: England

PostPosted: Sat Mar 24, 2007 7:11 pm    Post subject: Reply with quote

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
View user's profile Send private message
Zagloj
Guru
Guru


Joined: 17 Jun 2005
Posts: 344

PostPosted: Sat Mar 24, 2007 7:33 pm    Post subject: Reply with quote

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
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10315
Location: Córdoba (Spain)

PostPosted: Sat Mar 24, 2007 7:38 pm    Post subject: Reply with quote

Zagloj wrote:
Thanks, it was the xwd :oops: 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
View user's profile Send private message
Zagloj
Guru
Guru


Joined: 17 Jun 2005
Posts: 344

PostPosted: Sun Mar 25, 2007 10:20 am    Post subject: Reply with quote

6thpink wrote:

Well, that is due to the use of modular xorg.

Nice to know, thanks, I'll think about that if I install fvwm in another distros. ;)
_________________
Your ideology seems to be: "I hate the fanatics, we shoud kill them all" juantxorena dixit.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
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