You are looking at historical revision 8643 of this page. It may differ significantly from its current revision.

wmiirc snippets

Post your favorite wmiirc scriptlets here.

Tag cycling

Normally you have numbered tags and pressing Mod+n gives you tag n, but some people prefer to have more meaningful tag names. This means more work to type them in, so here's a way to navigate to the left or to the right of the current tab through the tabs as they appear in the bar.

   ((key ,modkey "comma")
    . ,(lambda _
	 (let loop ((list (wmii:tags))
		    (tag (wmii:tag)))
	    ((or (null? list) (null? (cdr list))) #f)
	    ((string=? (cadr list) tag) (wmii:goto-tag (car list)))
	    (else (loop (cdr list) tag))))))
   ((key ,modkey "period")
    . ,(lambda _
	 (and-let* ((tag (member (wmii:tag) (wmii:tags)))
		    ((not (null? (cdr tag)))))
	   (wmii:goto-tag (cadr tag)))))