Re: sawfish-client newbie question



On Tue, Aug 12, 2003 at 10:09:08AM +0100, Yann Klis wrote:
> On Mon, 11 Aug 2003 23:56:07 +0100, Ewan Mellor wrote
> > On Mon, Aug 11, 2003 at 05:51:14PM +0100, Yann Klis wrote:
> > > Hello all,
> > > 
> > > I'd like to change the depth of a window which name is "Remote Video" using a
> > > command line, like using sawfish-client.
> > > Currently in my .sawfish/custom, I have 
> > > (((WM_NAME . "^Remote Video$")) (position 76 . 274) (depth . 10))
> > > I'd like to change de depth to -5, uninteractively.
> > > 
> > > How can I do that using sawfish-client ?
> > 
> > (set-window-depth (get-window-by-name "Remote Video") -5)
> > 
> > So if you want to do that from the command line, then 
> > 
> > sawfish-client -e '(set-window-depth (get-window-by-name "Remote 
> > Video") -5)'
> 
> Thanks a lot, that works great !
> 
> Now, is it possible to launch this command when the window named "Remote
> Video" appears ?

Try this in your ~/.sawfish/rc:

(define (video-map-hook w)
  (when (string-match "^Remote Video$" (window-name w))
    (set-window-depth w -5)
    )
  t
  )
(add-hook 'add-window-hook video-map-hook)


Alternatively, the Matched Windows pane in the Sawfish configurator
(sawfish-ui) will allow you to configure such a thing without writing code
yourself.

Ewan.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]