Subject: FVWM: Sticky to desk

From: Christian Lyra <[email-masked]>
Date: Tue, 18 Jun 2002 09:23:56 -0300

Hi All,

	I would like to thanks the help of you and specially would like to thanks 
the patch from Suzanne. It works very well :-)

	Well.. I did get something like the Sticky to desk that so many has asked 
for. It's not a hack, but a little trick on fvwm config.

	I use to use 3 desks, one with a horizontal fvwmbuttons, one with a vertical 
fvwmbutton and another with nothing. The first fvwmbutton I call BBar, and 
the other NBar. On .fvwm2rc I have:

addtofunc goleftdesk    "I" gotodesk -1 1 0  2
+                       "I" PipeRead "/home/lyra/bin/ifdesk.sh $$d"           
  
addtofunc gorightdesk   "I" gotodesk 1 1 0 2
+                       "I" PipeRead "/home/lyra/bin/ifdesk.sh $$d"

and the script ifdesk.sh:

if  [[ $1 -eq 0 ]] ; then

        echo "All (BBar) move 0p 0p";
        echo "All (NBar) move 5000p 5000p";
fi

if [[ $1 -eq 1 ]] ; then
        
        echo "All (BBar) move 5000p 5000p";
        echo "All (NBar) move 5000p 5000p";
fi

if [[ $1 -eq 2 ]] ; then
        
        echo "All (BBar) move 5000p 5000p";
        echo "All (NBar) move -0p 0p";
fi
	
	You have to bind the key you want to the functions, of course...

	I hope this could be usefull for other people. If you find a way to improve 
it, please let me know :-)

	Christian Lyra
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Dominik Vogt <[email-masked]>
Date: Wed, 19 Jun 2002 13:26:44 +0200

> it, please let me know :-)

With the new state bits that can be set for windows it's even
possible to have a solution that does not rely on window names:

  addtofunc togglestickondesk
  + i thiswindow (currentdesk) stick on
  + i cond (nomatch) stick off
  + i thiswindow (state 7) stick off
  + i state 7 toggle

  addtofunc mygotodesk
  + i all (circulatehit, state 7, currentdesk) stick off
  + i gotodesk $*
  + i all (circulatehit, state 7, currentdesk) stick on
 
  mouse 1 3 N togglestickondesk

The togglestickondesk function sticks or unsticks the current
window on its current desk.  That is, as long as the mygotodesk
function is used to change desks.  Thus, if for example the pager
is used to change desks, this won't work.  (The "gotodesk" command
is hard coded in the pager).

Bye

Dominik ^_^  ^_^

-- 
Dominik Vogt, email: [email-masked]
LifeBits Aktiengesellschaft, Albrechtstr. 9, D-72072 Tuebingen
fon: ++49 (0) 7071/7965-0, fax: ++49 (0) 7071/7965-20
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Dominik Vogt <[email-masked]>
Date: Wed, 19 Jun 2002 13:45:00 +0200

>   mouse 1 3 N togglestickondesk

I forgot to mention that the "cond" command syntax will probably
be changed before 2.6 is released.

Bye

Dominik ^_^  ^_^