[wmii] wmii snippet: change to previous active view

From: Boo_boo <kaitarou_AT_gmail.com>
Date: Wed, 19 Sep 2007 00:54:02 +0400

this one is simple, but it seems very handy for me -- it allows fast switching between two views: current and one that was active before.

paste this function

----
switch_view() {
	ptag_tmp=`wmiir read /tag/sel/ctl`
	wmiir xwrite /ctl view $1
	PREV_TAG=$ptag_tmp
}
----
then replace all 'wmiir xwrite /ctl view $some_value' statements by 'switch_view $some_value'
and add key action:
----
	#switch to previous active view	
	Key $MODKEY-z
		if [ -n $PREV_TAG ]
		then
			switch_view $PREV_TAG
		fi
----
-- 
With best regards,
Boo-boo
mailto: kaitarou_AT_gmail.com
Received on Tue Sep 18 2007 - 22:44:28 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 16:27:53 UTC