Re: [wmii] wmii snippet: change to previous active view

From: Aaron Grattafiori <Cogitate_AT_sonic.net>
Date: Tue, 18 Sep 2007 13:50:52 -0700 (PDT)

Awesome! I've been meaning to add this myself but keep putting it off for
more important things. Having a "cd -" functionality I think is a great
feature.

 -Aaron

> 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:50:56 UTC

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