Interesting method of doing it. I ended up using awk:

fn next_tag {
        awk -v ctag'='`{wmiir read /tag/sel/ctl} '
                NR==1 {ntag=$0}
                $0==ctag {
                        ntag=getline?$0:ntag;
                        print ntag
                }'
}

fn Key-$MODKEY^comma { wmiir xwrite /ctl view `{ read_tags | next_tag} }
fn Key-$MODKEY^period { wmiir xwrite /ctl view `{ read_tags | sort -r
| next_tag} }

celti

Reply via email to