Re: FVWM: Force application to use my icons

2014-08-03 Thread Walter A. Iglesias
On Sun, Aug 03, 2014 at 12:59:46PM +1200, Chris Bannister wrote:
 On Sat, Aug 02, 2014 at 10:12:22AM +0100, Dominik Vogt wrote:
  On Fri, Aug 01, 2014 at 10:04:51PM +0200, Walter Alejandro Iglesias wrote:
   On Fri, Aug 01, 2014 at 05:25:40PM +0100, Dominik Vogt wrote:
And I also noticed that if I define a MiniIcon style for the
window and run the scripts too, the mini icon is displayed on top
of the real icon.  I wonder if that's a bug or if it's a secret
feature that I could not find in the documentation yet.
  
   The function I've posted?  Well the aim is to get something similar to
   what MacOSX does.
 
  Oh, that's something your function does.  I didn't even read the
  image processing functions.  :-)
 
   Let me explain the whole history.  I borrowed the
   idea from here:
  
   http://zensites.net/fvwm/guide/advanced_functions.html
  
   And combined it with what I've read in the fvwm.org FAQ:
  
   http://www.fvwm.org/documentation/faq/#toc_7.18
  
   Note that Thomas put two versions in the FAQ, the first using
   DestrowWindowStyle and the second using SetEnv.
 
  Actually, it was me who put Q7.18 into the FAQ.  I cannot remember
  who wrote these functions in the first place, though.  ;-)
 
   I got the thing working (the function I've pasted in my second message),
   I simplified a bit the pipe commands (used just import) and instead of
   icons like the guy of the first site did I used mini icons at the top of
   the thumbnail.  The result I got was:
  
   http://roquesor.com/Downloads/fvwm_desktop.png
 
  Nice.
 
   The problem came because, time ago I'd borrowed from some place (I don't
   remember from where) a ShowDesktop function, I modified it a bit too:
  
   DestroyFunc ShowDesktop
   AddToFunc   ShowDesktop
   + I SendToModule FvwmAnimate pause
   + I All (AcceptsFocus, CurrentPage, Iconic, State 1) RestoreDesktop
   + I TestRc (Match) Break
   + I All (AcceptsFocus, CurrentPage, !Iconic, !State 1) ThisWindow State 1 
   True
   + I All (AcceptsFocus, CurrentPage, !Iconic, State 1) Thumbnail
 ^
(replaced with 
   Iconify)
   + I SendToModule FvwmAnimate play
  
   DestroyFunc RestoreDesktop
   AddToFunc   RestoreDesktop
   + I SendToModule FvwmAnimate pause
   + I All (AcceptsFocus, CurrentPage, Iconic, State 1, !Focused) Iconify
   + I All (AcceptsFocus, CurrentPage, Iconic, State 1) Iconify
   + I All (AcceptsFocus, CurrentPage, State 1) ThisWindow State 1 False
   + I SendToModule FvwmAnimate play
  
   Thumbnail was too slow for this function, the idea is ShowDesktop to be
   instantaneous.  Hence I put here Iconify.  I forgot DeThumbnail
   function :-), FvwmEvent reseted the icon each time the application was
   de-iconified that's why the icon setted in styles worked just the first
   time and the IconOverride was ignored.
 
  Oh, I see.  MoveToDesk should work better and faster and not
  trigger any unwanted application behaviour on iconification:
 
  --
  addtofunc showdesktop
  + i all (currentdesk, !iconic) movetodesk 42
 
  addtofunc restoredesktop
  + i gotodesk 42
  + i all (currentdesk) movetodesk -42
  + i gotodesk -42
  --
 
  The restoration function is a bit complicated because at the
  moment you cannot say all (desk 42) ...; you can only check for
  the current desk.  Note that sticky windows are not affected.  If
  that is necessary, you would have to unstick them, store their
  sticky status in one of the windowstate flags and restore their
  stickyness in the restoredesktop function.  I'm to lazy to do that
  now, but if you would like to see how to do that, just ask.

 Wow! Sorry, for butting in, but is there a link where all this is
 explained for the layman?

 I've tried reading the man page - not easy! :(


Being me a layman too I ignore how all this functionality was added to
FVWM.  I agree that to be really accessible it should go with a book
analog to The C Programming Language by Dennis Ritchie :-).

Start like me, cutting, pasting and using your intuition.


-- 
Walter



FVWM: Force application to use my icons

2014-07-31 Thread Walter Alejandro Iglesias
Hello,

Is there a effective way to force applications to use the icon I set
with Style * Icon someicon.png?

I accomplished that for mini icons with:

Style * EWMHMiniIconOverride

But I couldn't with icons.  I've tried IconOverride,
Icon[Dont]DonateIcon, both settings fails.




Re: FVWM: Force application to use my icons

2014-07-31 Thread Dominik Vogt
On Thu, Jul 31, 2014 at 12:23:45PM +0200, Walter Alejandro Iglesias wrote:
 Is there a effective way to force applications to use the icon I set
 with Style * Icon someicon.png?
 
 I accomplished that for mini icons with:
 
 Style * EWMHMiniIconOverride
 
 But I couldn't with icons.  I've tried IconOverride,
 Icon[Dont]DonateIcon, both settings fails.

Overriding icons is tricky.  :-)

Try something like this

  Style SeaMonkey IconOverride, Icon the_icon_you_want_wo_use.xpm

As far as I can see it is *not* possible to simply remove the icon
image, you would have to make a small transparent pixmap and use
it as the icon to achieve that.

Note that setting icons works differently if the style name is '*',
in other words: the Icon style needs to be present on a style
line with a real name to work here.

Ciao

Dominik ^_^  ^_^

-- 

Dominik Vogt



Re: FVWM: Force application to use my icons

2014-07-31 Thread Thomas Funk
Walter Alejandro Iglesias wrote:
 Hello,
 
 Is there a effective way to force applications to use the icon I set
 with Style * Icon someicon.png?
 
 I accomplished that for mini icons with:
 
 Style * EWMHMiniIconOverride
 
 But I couldn't with icons.  I've tried IconOverride,
 Icon[Dont]DonateIcon, both settings fails.
 


Style your_app EWMHMiniIconOverride, Icon bomb.svg:48x48, MiniIcon 
bomb.svg:16x16

your_app is the window's name, class, visible name, or resource string (in 
that order)

For the Icon/MiniIcon you have to use the full path or set it in ImagePath

Test it in FvwmConsole. It'll change it on the fly.

-- Thomas --


-- 
--
Two things are infinite: the universe and human stupidity; and I'm not sure 
about the the universe.   --   Albert Einstein