source: project/wiki/wmiirc snippets @ 8643

Last change on this file since 8643 was 8643, checked in by sjamaan, 12 years ago

Add wmiirc documentation and snippets

File size: 822 bytes
1== wmiirc snippets
3Post your favorite wmiirc scriptlets here.
5=== Tag cycling
7Normally you have numbered tags and pressing Mod+n gives you tag n, but
8some people prefer to have more meaningful tag names.  This means more
9work to type them in, so here's a way to navigate to the left or to
10the right of the current tab through the tabs as they appear in the bar.
12<enscript highlight=scheme>
13   ((key ,modkey "comma")
14    . ,(lambda _
15         (let loop ((list (wmii:tags))
16                    (tag (wmii:tag)))
17           (cond
18            ((or (null? list) (null? (cdr list))) #f)
19            ((string=? (cadr list) tag) (wmii:goto-tag (car list)))
20            (else (loop (cdr list) tag))))))
21   ((key ,modkey "period")
22    . ,(lambda _
23         (and-let* ((tag (member (wmii:tag) (wmii:tags)))
24                    ((not (null? (cdr tag)))))
25           (wmii:goto-tag (cadr tag)))))
Note: See TracBrowser for help on using the repository browser.