changeset: 92:967716376c3a
parent: 89:436af3bfed2a
user: Kris Maglione <jg_AT_suckless.org>
date: Tue May 19 13:57:24 2009 -0400
files: wmii.suckless.org/code_snippets/index.md wmii.suckless.org/scripts_n_snips/code_snippets.md wmii.suckless.org/scripts_n_snips/index.md wmii.suckless.org/scripts_n_snips/irssi_notifier.md wmii.suckless.org/scripts_n_snips/mail_notifier.md wmii.suckless.org/scripts_n_snips/themes.md wmii.suckless.org/themes.tpl
description:
Some wmii.suckless.org reorganization
diff -r 436af3bfed2a -r 967716376c3a wmii.suckless.org/code_snippets/index.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/wmii.suckless.org/code_snippets/index.md Tue May 19 13:57:24 2009 -0400
_AT_@ -0,0 +1,13 @@
+Scripts and snippets
+====================
+
+Here, you can find all sorts of code snippets and plugins for the various
+wmiircs available for wmii. Please choose your language to the left. And
+please feel free to [contribute your own][1]! You'll just need a copy of
+[Mercurial][2] and a text editor. Arcane as this may seem, it's the best way
+we've found to cut down on spam and to keep the vast majority of our users
+happy.
+
+[1]:
http://suckless.org/wiki/
+[2]:
http://www.selenic.com/mercurial/wiki/
+
diff -r 436af3bfed2a -r 967716376c3a wmii.suckless.org/scripts_n_snips/code_snippets.md
--- a/wmii.suckless.org/scripts_n_snips/code_snippets.md Tue May 12 23:41:30 2009 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
_AT_@ -1,120 +0,0 @@
-Code snippets for wmii-snap
-===========================
-
-The [9P filesystem](
http://en.wikipedia.org/wiki/9P) backend of wmii allows for
-rich scripting possibilites, adding new features and more convenience to your
-wmii. Because of the simple nature of the 9P protocol, scripting is possible in
-any language, using either native 9P libraries in that language or external
-tools like the supplied wmiir/[ixpc](
http://libs.suckless.org/).
-
-Feel free to add your own scripts to this page!
-
-The snippets that are in `rc` syntax should be added to your `rc.wmii.local`
-file. They should go inside a function `Action-overridekeys`. The `MODKEY`
-variable should be set outside it.
-
-See this sample `rc.wmii.local`: [(3.6)](
http://sqweek.dnsdojo.org/wmii/rc.wmii.local-3.6) [(newer snapshots)](
http://sqweek.dnsdojo.org/wmii/rc.wmii.local-20080520)
-
-Cycle Views
------------
- fn next_tag {
- awk -v curtag'='`{wmiir read /tag/sel/ctl | sed 1q} '
- NR==1 {first = $0}
- $0==curtag { if(getline) print $0; else print first; exit }'
- }
- fn Key-$MODKEY-n {
- wmiir xwrite /ctl view `{ read_tags | next_tag}
- }
- fn Key-$MODKEY-b {
- wmiir xwrite /ctl view `{ read_tags | tail -r | next_tag}
- }
-
-Tag selected client and jump to new view
-----------------------------------------
-If tagged with multiple tags, it will jump to the last view of the set.
-
- fn Key-MODKEY-Control-t {
- newtag=`{wi_tags | wi_menu}
- wmiir xwrite /client/sel/tags $newtag
- newtag=`{echo $newtag | sed 's/.*\+//; s/-.*//'}
- wmiir xwrite /ctl view $newtag
- }
-
-Switch to named view by number
------------------------------
-
-This allows to switch to a view with its position number, regardless of the view's name.
-
- fn keynum {
- echo `{echo $1 | sed 's/.*-//'}
- }
- fn tagnum {
- echo `{read_tags | sed -n $1^p}
- }
-
- for(i in `{seq 0 9}) {
- fn Key-$MODKEY-$i {
- wmiir xwrite /ctl view `{tagnum `{keynum $1}}
- }
- fn Key-Shift-$MODKEY-$i {
- wmiir xwrite /client/sel/tags `{tagnum `{keynum $1}}
- }
- }
-
-Tag addition and subtraction using tag+ and tag-
-------------------------------------------------
-
-If you tend to rely on wimenu's completion for retagging, it can be annoying that + or - prefix
-renders it useless. This snippet allows you to append the + or -, rather than prepending
-it. Prepending still works as before.
-
- fn Key-$MODKEY-Shift-t {
- tag=`{wi_tags | wimenu | sed 's/(.*)([+\-])$/\2\1/'}
- wmiir xwrite /client/`{wmiir read /client/sel/ctl | sed 1q}^/tags $tag
- }
-
-Retag all clients in a view
----------------------------
- fn clients_on {
- wmiir read /tag/$1/index | awk '!/^#/ { print $2 }'
- }
-
- fn Key-$MODKEY-r {
- target=`{wi_tags | wimenu}
- for(c in `{clients_on sel}){
- wmiir xwrite /client/$c/tags -sel+$target
- }
- wmiir xwrite /ctl view $target
- }
-
-Cycle trough tags starting with a specific character
-----------------------------------------------------
-
-(No tested, but might work)
-Add a event in wmiirc that calls the following code.
-If you have 3 tags named plan9, planner and plant: by calling the script you will cycle between the 3.
-(Note: it does not work with capitals)
-
- count=1
- fn TagCycle {
- inputtag=$1
- currenttag=`{wmiir read /tag/sel/ctl | awk '{ print substr($2, 1, 1); exit }'}
- if(~ $currenttag $inputtag) {
- count=`{expr $count + 1}
- maxcount=`{wi_tags | grep '^'$inputtag | wc -l}
- if (test $count -gt $maxcount)
- count=1
- }
- if not
- count=1
- gototag=`{wi_tags | grep '^'$inputtag | sed -n $count^p}
- wmiir xwrite /ctl view $gototag
- }
-
-To easily add the entire alphabet in the bound buttons you can use this code.
-Add this to your rc.wmii BEFORE the other keys (you still want your other old keys to work right ?):
-
- # Tag cycle
- key $MODKEY-A-^(a b c d e f g h i j k l m n o p q r s t u v w x y z) || fn $key {
- TagCycle $1}
-
diff -r 436af3bfed2a -r 967716376c3a wmii.suckless.org/scripts_n_snips/index.md
--- a/wmii.suckless.org/scripts_n_snips/index.md Tue May 12 23:41:30 2009 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
_AT_@ -1,3 +0,0 @@
-Scripts and snippets
-====================
-This directory contains scripts and snippets for wmii.
diff -r 436af3bfed2a -r 967716376c3a wmii.suckless.org/scripts_n_snips/irssi_notifier.md
--- a/wmii.suckless.org/scripts_n_snips/irssi_notifier.md Tue May 12 23:41:30 2009 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
_AT_@ -1,103 +0,0 @@
-Irssi Message Notifier
-======================
-
-This script notifies you, by setting the Urgent hint on your irssi window, of messages with your nick, or in channels you care about. It can optionally display the messages on the bar. You'll need to set the title of the window running irssi to 'irssi' for this to work. I use `label`(1) from plan9port.
-
-This portion goes in your rc.wmii.local, or can be modified to run standalone:
-
- showmessage=false # true, false
-
- fn isirssi { ~ `{wmiir read /client/$"*/label} irssi }
- fn clients { wmiir ls /client | sed 's,/,,; /^sel$/d' }
-
- fn Event-IRCMessage {
- if(! isirssi sel) {
- for(c in `{clients})
- if(isirssi $c)
- wmiir xwrite /client/$c/ctl Urgent
- if($showmessage) {
- shift 2
- echo $WMII_NORMCOLORS $* | wmiir create /rbar/0status
- }
- }
- }
-
- fn Event-ClientFocus {
- if(isirssi $1)
- wmiir xwrite /client/$1/ctl NotUrgent
- }
-
-This portion is a perl script for irssi. It should go in `~/.irssi/scripts`, and can be loaded with `/script load notify`, or autoloaded by symlinking it into `~/.irssi/scripts/autoload`. The irssi `notify_channels` setting takes a list of channels to always notify you of messages to, or '*' to notify you for all channels.
-
- # ---------------------------------------------------------------------------
- # "THE BEER-WARE LICENSE" (Revision 42):
- # <fbsdaemon_AT_gmail.com> wrote this file. As long as you retain this notice you
- # can do whatever you want with this stuff. If we meet some day, and you think
- # this stuff is worth it, you can buy me a beer in return. Kris Maglione
- # ---------------------------------------------------------------------------
- # <phk_AT_FreeBSD.ORG> wrote this license. As long as you retain this notice you
- # can do whatever you want with this stuff. If we meet some day, and you think
- # this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
- # ---------------------------------------------------------------------------
-
- use strict;
-
- our $VERSION = '20070524';
- our %IRSSI = (
- authors => 'Kris Maglione',
- contact => 'bsdaemon_AT_comcast.net',
- name => 'notify',
- description => 'Writes certain messages to the wmii event FIFO',
- license => 'BEER-WARE',
- url => '',
- changed => $VERSION,
- modules => '',
- );
-
- use Irssi;
- use Fcntl;
-
- sub should_notify ($);
-
- sub message_handler {
- my ($server, $mesg, $nick, $address, $target) = _AT__;
- my $mynick = $server->{nick};
-
- if (not defined $target
- or should_notify($target)
- or $mesg =~ /\b$mynick\b/) {
- $mesg =~ s/\n/\\n/g;
- $target = ($target ? " in $target" : "");
-
- open my $fifo, '| wmiir write /event' or return;
- print $fifo "IRCMessage from $nick$target: $mesg\n";
- close $fifo;
- }
- }
-
- sub should_notify ($) {
- my $target = shift;
- my _AT_notifies = split /,\s*/, Irssi::settings_get_str('notify_channels');
-
- if (grep { $_ eq "*" || $_ eq $target } _AT_notifies) {
- return 1;
- }
-
- 0;
- }
-
- Irssi::signal_add('message private', 'message_handler');
- Irssi::signal_add('message public', 'message_handler');
- Irssi::settings_add_str('misc', 'notify_channels', '');
-
-There is another way to set the label:
-
-Use the perl script in at this website: `
http://tldp.org/HOWTO/Xterm-Title-7.html#ss7.2`
-And put it into `~/.irssi/scripts/title.pl` for example.
-
-Content of ` ~/.irssi/scripts/autorun/title.pl`:
-
- system('~/.irssi/scripts/title.pl irssi');
-
-This will nicely set the title for irssi.
-
diff -r 436af3bfed2a -r 967716376c3a wmii.suckless.org/scripts_n_snips/mail_notifier.md
--- a/wmii.suckless.org/scripts_n_snips/mail_notifier.md Tue May 12 23:41:30 2009 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
_AT_@ -1,44 +0,0 @@
-Mail Notifier
-=============
-
-This script will notify you of mail by setting the urgent hint
-on windows for mail folders in which you have new mail. It only
-works for Maildirs, and assumes that you have a window on the
-`mail` tag named for each folder you wish to check. The name
-`inbox` is special, and is treated as the root folder. When
-there are files in the `new` folder for a given window, its
-urgent hint is set. Otherwise, it is unset.
-
- #!/usr/local/plan9/bin/rc
- . 9.rc
-
- # Configuration
- delay=5
- maildir=$home/Maildir
- # End Configuration
-
- echo Start mail | wmiir write /event
-
- { wmiir read /event &
- while(echo Tick)
- sleep $delay
- } | while(*=`{read})
- switch($1) {
- case Start
- if(~ $2 mail)
- exit
- case Tick
- wmiir read /tag/mail/index |
- while(l = `{read}) {
- b = `{echo $l | awk -F: '{print $3}'}
- if(~ $b inbox)
- b = ''
- if(! ~ $#b 0 && test -d $maildir/.$b/new) {
- knot = ''
- if(~ `{ls -l $maildir/.$b/new | wc -l} 0)
- knot = Not
- wmiir xwrite /client/$l(2)^/ctl $knot^Urgent
- }
- }
- }
-
diff -r 436af3bfed2a -r 967716376c3a wmii.suckless.org/scripts_n_snips/themes.md
--- a/wmii.suckless.org/scripts_n_snips/themes.md Tue May 12 23:41:30 2009 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
_AT_@ -1,257 +0,0 @@
-THEMES
-======
-
-Various color schemes to try out.
-
-<style>
-div#content div {
- width: 100%;
- border: 1px solid;
- font-family: monospace;
- text-indent: 1em;
-}
-</style>
-
-default
--------
-<div style="background: #333333; color: #2A7F3F; border-color: #2A7F3F;">
- <div style="color: #ffffff; background: #153F1F; border: 0px; border-bottom: 1px solid #2A7F3F; margin: 0;">
- WMII_FOCUSCOLORS=('#ffffff' '#153F1F' '#2A7F3F')
- </div>
- <div style="border:0; margin:0;">WMII_BACKGROUND='#333333'</div>
-</div>
-<div style="color: #222222; background: #5FBF77; border-color: #2A7F3F; margin-top: .5em">
- WMII_NORMCOLORS=('#222222' '#5FBF77' '#2A7F3F')
-</div>
-
-gray and green
-----------------
-<div style="color: #A0FF00; background: #333333; border-color: #8c8c8c;">
- <div style="color: #A0FF00; background: #686363; border: 0px; border-bottom: 1px solid #8c8c8c; margin: 0;">
- WMII_FOCUSCOLORS=('#A0FF00' '#686363' '#8c8c8c')
- </div>
- <div style="border:0; margin:0;">WMII_BACKGROUND='#333333'</div>
-</div>
-<div style="color: #e0e0e0; background: #444444; border-color: #666666; margin-top: .5em">
- WMII_NORMCOLORS=('#e0e0e0' '#444444' '#666666')
-</div>
-
-light blue and white
-----------------------
-<div style="color: #000000; background: #ddeedd; border-color: #000000;">
- <div style="color: #000000; background: #bbc5ff; border: 0px; border-bottom: 1px solid #000000; margin: 0;">
- WMII_FOCUSCOLORS=('#000000' '#bbc5ff' '#000000')
- </div>
- <div style="border:0; margin:0;">WMII_BACKGROUND='#ddeedd'</div>
-</div>
-<div style="color: #000000; background: #f8f8f4; border-color: #f8f8f4; margin-top: .5em">
- WMII_NORMCOLORS=('#000000' '#f8f8f4' '#f8f8f4')
-</div>
-
-blue and smoke
---------------
-
-<div style="color: #ffffff; background: #333333; border-color: #4C7899;">
- <div style="color: #ffffff; background: #285577; border: 0px; border-bottom: 1px solid #4C7899; margin: 0;">
- WMII_FOCUSCOLORS=('#ffffff' '#285577' '#4C7899')
- </div>
- <div style="border:0; margin:0;">WMII_BACKGROUND='#333333'</div>
-</div>
-<div style="color: #888888; background: #222222; border-color: #333333; margin-top: .5em">
- WMII_NORMCOLORS=('#888888' '#222222' '#333333')
-</div>
-
-sleepless night
----------------
-<div style="color: #ff7700; background: #333333; border-color: #ff7700;">
- <div style="color: #ff7700; background: #11111; border: 0px; border-bottom: 1px solid #ff7700; margin: 0;">
- WMII_FOCUSCOLORS=('#ff7700' '#11111' '#ff7700')
- </div>
- <div style="burder: 0; margin: 0;">WMII_BACKGROUND='#333333'</div>
-</div>
-<div style="color: #000000; background: #ffffff; border-color: #666666; margin-top: .5em;">
- WMII_NORMCOLORS=('#000000' '#ffffff' '#666666')
-</div>
-<div style="font-family: terminus; margin-top: .5em;">
- WMII_FONT='-*-terminus-*-*-*-*-12-*-*-*-*-*-*-*'
-</div>
-
-the green
----------
-<div style="color: #66FF00; background: #888888; border-color: #66FF00;">
- <div style="color: #66FF00; background: #101010; border: 0px; border-bottom: 1px solid #66FF00; margin: 0;">
- WMII_FOCUSCOLORS=('#66FF00' '#101010' '#66FF00')
- </div>
- <div style="burder: 0; margin: 0;">WMII_BACKGROUND='#888888'</div>
-</div>
-<div style="color: #EEEEEE; background: #000000; border-color: #111111; margin-top: .5em;">
- WMII_NORMCOLORS=('#EEEEEE' '#000000' '#111111')
-</div>
-<div style="font-family: snap; margin-top: .5em;">
- WMII_FONT='-artwiz-snap-normal-*-*-*-*-*-*-*-*-*-*-*'
-</div>
-
-the orange
-----------
-<div style="color: #000000; background: #888888; border-color: #000000;">
- <div style="color: #000000; background: #CD6D37; border: 0px; border-bottom: 1px solid #000000; margin: 0;">
- WMII_FOCUSCOLORS=('#000000' '#CD6D37' '#000000')
- </div>
- <div style="burder: 0; margin: 0;">WMII_BACKGROUND='#888888'</div>
-</div>
-<div style="color: #000000; background: #848484; border-color: #000000; margin-top: .5em;">
- WMII_NORMCOLORS=('#000000' '#848484' '#000000')
-</div>
-<div style="font-family: lucidatypewriter; margin-top: .5em;">
- WMII_FONT='-b&h-lucidatypewriter-medium-r-*-*-*-100-*-*-*-*-*-*'
-</div>
-
-crystal shining style
----------------------
-<div style="color: #fefefe; background: #333333; border-color: #5090a0;">
- <div style="color: #fefefe; background: #307080; border: 0px; border-bottom: 1px solid #5090a0; margin: 0;">
- WMII_FOCUSCOLORS=('#fefefe' '#307080' '#5090a0')
- </div>
- <div style="burder: 0; margin: 0;">WMII_BACKGROUND='#333333'</div>
-</div>
-<div style="color: #cccccc; background: #004050; border-color: #002030; margin-top: .5em;">
- WMII_NORMCOLORS=('#cccccc' '#004050' '#002030')
-</div>
-<div style="font-family: fixed; margin-top: .5em;">
- WMII_FONT='-*-fixed-medium-r-normal-*-13-*-*-*-*-*-*-*'
-</div>
-
-kawai anime
------------
-<div style="color: #000000; background: #FF88FF; border-color: #000000;">
- <div style="color: #FFFFFF; background: #FF11FF; border: 0px; border-bottom: 1px solid #000000; margin: 0;">
- WMII_FOCUSCOLORS=('#FFFFFF' '#FF11FF' '#000000')
- </div>
- <div style="burder: 0; margin: 0;">WMII_BACKGROUND='#FF88FF'</div>
-</div>
-<div style="color: #000000; background: #FF55FF; border-color: #000000; margin-top: .5em;">
- WMII_NORMCOLORS=('#000000' '#FF55FF' '#000000')
-</div>
-<div style="font-family: fixed; margin-top: .5em;">
- WMII_FONT='-*-fixed-medium-r-normal-*-13-*-*-*-*-*-*-*'
-</div>
-
-
-anthrazit style
----------------
-<div style="color: #eeeeee; background: #333333; border-color: #708090;">
- <div style="color: #eeeeee; background: #506070; border: 0px; border-bottom: 1px solid #708090; margin: 0;">
- WMII_FOCUSCOLORS=('#eeeeee' '#506070' '#708090')
- </div>
- <div style="burder: 0; margin: 0;">WMII_BACKGROUND='#333333'</div>
-</div>
-<div style="color: #bbbbbb; background: #222222; border-color: #000000; margin-top: .5em;">
- WMII_NORMCOLORS=('#bbbbbb' '#222222' '#000000')
-</div>
-<div style="font-family: snap; margin-top: .5em;">
- WMII_FONT='-artwiz-snap-*-*-*-*-*-*-*-*-*-*-*-*'
-</div>
-
-acme style
-----------
-<div style="color: #000000; background: #757575; border-color: #8888cc;">
- <div style="color: #000000; background: #eaffff; border: 0px; border-bottom: 1px solid #8888cc; margin: 0;">
- WMII_FOCUSCOLORS=('#000000' '#eaffff' '#8888cc')
- </div>
- <div style="burder: 0; margin: 0;">WMII_BACKGROUND='#757575'</div>
-</div>
-<div style="color: #000000; background: #ffffea; border-color: #bdb76b; margin-top: .5em;">
- WMII_NORMCOLORS=('#000000' '#ffffea' '#bdb76b')
-</div>
-<div style="font-family: glispbold; margin-top: .5em;">
- WMII_FONT='-artwiz-glispbold-*-*-*-*-*-*-*-*-*-*-*-*'
-</div>
-
-blue style
-----------
-<div style="color: #000000; background: #333333; border-color: #444444;">
- <div style="color: #000000; background: #9191FF; border: 0px; border-bottom: 1px solid #444444; margin: 0;">
- WMII_FOCUSCOLORS=('#000000' '#9191FF' '#444444')
- </div>
- <div style="burder: 0; margin: 0;">WMII_BACKGROUND='#333333'</div>
-</div>
-<div style="color: #9191FF; background: #000000; border-color: #444444; margin-top: .5em;">
- WMII_NORMCOLORS=('#9191FF' '#000000' '#444444')
-</div>
-<div style="font-family: glispbold; margin-top: .5em;">
- WMII_FONT='-artwiz-glispbold-*-*-*-*-*-*-*-*-*-*-*-*'
-</div>
-
-bluedark style
---------------
-<div style="color: #EEEEEE; background: #111111; border-color: #006699;">
- <div style="color: #EEEEEE; background: #005577; border: 0px; border-bottom: 1px solid #006699; margin: 0;">
- WMII_FOCUSCOLORS=('#EEEEEE' '#005577' '#006699')
- </div>
- <div style="burder: 0; margin: 0;">WMII_BACKGROUND='#111111'</div>
-</div>
-<div style="color: #BBBBBB; background: #222222; border-color: #000000; margin-top: .5em;">
- WMII_NORMCOLORS=('#BBBBBB' '#222222' '#000000')
-</div>
-<div style="font-family: glispbold; margin-top: .5em;">
- WMII_FONT='-artwiz-glispbold-*-*-*-*-*-*-*-*-*-*-*-*'
-</div>
-
-gloom
------
-<div style="color: #ffffff; background: #333333; border-color: #cccccc; margin-top: .5em;">
- <div style="color: #ffffff; background: #282828; border: 0px; border-bottom: 1px solid #cccccc; margin: 0;">
- WMII_FOCUSCOLORS=('#ffffff' '#282828' '#cccccc')
- </div>
- <div style="burder: 0; margin: 0;">WMII_BACKGROUND='#333333'</div>
-</div>
-<div style="color: #e0e0e0; background: #0a0a0a; border-color: #606060; margin-top: .5em;">
- WMII_NORMCOLORS=('#e0e0e0' '#0a0a0a' '#606060')
-</div>
-
-Xterm style
---------------
-<div style="color: #54FF54; background: #000000; border-color: #73A5FF;">
- <div style="color: #54FF54; background: #000000; border: 0px; border-bottom: 1px solid #73A5FF; margin: 0;">
- WMII_FOCUSCOLORS=('#54FF54' '#000000' '#73A5FF')
- </div>
- <div style="margin: 0;">WMII_BACKGROUND='#000000'</div>
-</div>
-<div style="color: #A8A8A8; background: #000000; border-color: #A07040; margin-top: .5em;">
- WMII_NORMCOLORS=('#A8A8A8' '#000000' '#A07040')
-</div>
-<div style="margin-top: .5em;">
- WMII_FONT='*-fixed-medium-r-*-*-13-*-*-*-*-*-*-*'
-</div>
-
-#### This script will generate the above formatting given wmii color/font variables on its standard input:
-
- #/usr/local/plan9/bin/rc
- . /dev/fd/0
- * = ($WMII_FOCUSCOLORS $WMII_NORMCOLORS)
- ff = $1; fb = $2; fr = $3
- nf = $4; nb = $5; nr = $6
- bg = $WMII_BACKGROUND
-
- cat<<!
- <div style="color: $ff; background: $bg; border-color: $fr;">
- <div style="color: $ff; background: $fb; border: 0px; border-bottom: 1px solid $fr; margin: 0;">
- WMII_FOCUSCOLORS=('$ff' '$fb' '$fr')
- </div>
- <div style="margin: 0;">
- WMII_BACKGROUND='$bg'
- </div>
- </div>
- <div style="color: $nf; background: $nb; border-color: $nr; margin-top: .5em;">
- WMII_NORMCOLORS=('$nf' '$nb' '$nr')
- </div>
- !
- font=`{echo $WMII_FONT | 9 sed 's/^-[^\-]+-([^\-]+).*/\1/g'}
- if(test $"WMII_FONT) {
- cat<<!
- }
- <div style="font-family: $font;">
- WMII_FONT='$WMII_FONT'
- </div>
- !
-
diff -r 436af3bfed2a -r 967716376c3a wmii.suckless.org/themes.tpl
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/wmii.suckless.org/themes.tpl Tue May 19 13:57:24 2009 -0400
_AT_@ -0,0 +1,123 @@
+% formatter=(perl $home/werc/bin/contrib/markdown.pl)
+% {
+THEMES
+======
+
+Various color schemes to try out. These appear in `rc` syntax, so they may
+require some modification to work with your configuration.
+
+% } | $formatter
+
+<style>
+div#content div {
+ width: 100%;
+ border: 1px solid;
+ font-family: monospace;
+ text-indent: 1em;
+}
+</style>
+
+%{
+fn theme {
+ name = $1
+ * = ($WMII_FOCUSCOLORS $WMII_NORMCOLORS)
+ ff = $1; fb = $2; fr = $3
+ nf = $4; nb = $5; nr = $6
+ bg = $WMII_BACKGROUND
+%}
+ <h1>%($name%)</h1>
+ <div style="color: %($ff%); background: %($bg%); border-color: %($fr%);">
+ <div style="color: %($ff%); background: %($fb%); border: 0px; border-bottom: 1px solid %($fr%); margin: 0;">
+ WMII_FOCUSCOLORS=('%($ff%)' '%($fb%)' '%($fr%)')
+ </div>
+ <div style="margin: 0;">
+ WMII_BACKGROUND='%($bg%)'
+ </div>
+ </div>
+ <div style="color: %($nf%); background: %($nb%); border-color: %($nr%); margin-top: .5em;">
+ WMII_NORMCOLORS=('%($nf%)' '%($nb%)' '%($nr%)')
+ </div>
+%{
+ font=`{echo $WMII_FONT | 9 sed 's/^-[^\-]+-([^\-]+).*/\1/g'}
+ if(test $"WMII_FONT) {
+ %}
+ <div style="font-family: %($font%);">
+ WMII_FONT='%($WMII_FONT%)'
+ </div>
+ %{
+ }
+}
+
+WMII_FOCUSCOLORS=('#ffffff' '#153F1F' '#2A7F3F')
+WMII_BACKGROUND='#333333'
+WMII_NORMCOLORS=('#222222' '#5FBF77' '#2A7F3F')
+theme 'default'
+WMII_FOCUSCOLORS=('#A0FF00' '#686363' '#8c8c8c')
+WMII_BACKGROUND='#333333'
+WMII_NORMCOLORS=('#e0e0e0' '#444444' '#666666')
+theme 'gray and green'
+WMII_FOCUSCOLORS=('#000000' '#bbc5ff' '#000000')
+WMII_BACKGROUND='#ddeedd'
+WMII_NORMCOLORS=('#000000' '#f8f8f4' '#f8f8f4')
+theme 'light blue and white'
+WMII_FOCUSCOLORS=('#ffffff' '#285577' '#4C7899')
+WMII_BACKGROUND='#333333'
+WMII_NORMCOLORS=('#888888' '#222222' '#333333')
+theme 'blue and smoke'
+WMII_FOCUSCOLORS=('#ff7700' '#11111' '#ff7700')
+WMII_BACKGROUND='#333333'
+WMII_NORMCOLORS=('#000000' '#ffffff' '#666666')
+WMII_FONT='-*-terminus-*-*-*-*-12-*-*-*-*-*-*-*'
+theme 'sleepless night'
+WMII_FOCUSCOLORS=('#66FF00' '#101010' '#66FF00')
+WMII_BACKGROUND='#888888'
+WMII_NORMCOLORS=('#EEEEEE' '#000000' '#111111')
+WMII_FONT='-artwiz-snap-normal-*-*-*-*-*-*-*-*-*-*-*'
+theme 'the green'
+WMII_FOCUSCOLORS=('#000000' '#CD6D37' '#000000')
+WMII_BACKGROUND='#888888'
+WMII_NORMCOLORS=('#000000' '#848484' '#000000')
+WMII_FONT='-b&h-lucidatypewriter-medium-r-*-*-*-100-*-*-*-*-*-*'
+theme 'the orange'
+WMII_FOCUSCOLORS=('#fefefe' '#307080' '#5090a0')
+WMII_BACKGROUND='#333333'
+WMII_NORMCOLORS=('#cccccc' '#004050' '#002030')
+WMII_FONT='-*-fixed-medium-r-normal-*-13-*-*-*-*-*-*-*'
+theme 'crystal shining style'
+WMII_FOCUSCOLORS=('#FFFFFF' '#FF11FF' '#000000')
+WMII_BACKGROUND='#FF88FF'
+WMII_NORMCOLORS=('#000000' '#FF55FF' '#000000')
+WMII_FONT='-*-fixed-medium-r-normal-*-13-*-*-*-*-*-*-*'
+theme 'kawai anime'
+WMII_FOCUSCOLORS=('#eeeeee' '#506070' '#708090')
+WMII_BACKGROUND='#333333'
+WMII_NORMCOLORS=('#bbbbbb' '#222222' '#000000')
+WMII_FONT='-artwiz-snap-*-*-*-*-*-*-*-*-*-*-*-*'
+theme 'anthrazit style'
+WMII_FOCUSCOLORS=('#000000' '#eaffff' '#8888cc')
+WMII_BACKGROUND='#757575'
+WMII_NORMCOLORS=('#000000' '#ffffea' '#bdb76b')
+WMII_FONT='-artwiz-glispbold-*-*-*-*-*-*-*-*-*-*-*-*'
+theme 'acme style'
+WMII_FOCUSCOLORS=('#000000' '#9191FF' '#444444')
+WMII_BACKGROUND='#333333'
+WMII_NORMCOLORS=('#9191FF' '#000000' '#444444')
+WMII_FONT='-artwiz-glispbold-*-*-*-*-*-*-*-*-*-*-*-*'
+theme 'blue style'
+WMII_FOCUSCOLORS=('#EEEEEE' '#005577' '#006699')
+WMII_BACKGROUND='#111111'
+WMII_NORMCOLORS=('#BBBBBB' '#222222' '#000000')
+WMII_FONT='-artwiz-glispbold-*-*-*-*-*-*-*-*-*-*-*-*'
+theme 'bluedark style'
+WMII_FOCUSCOLORS=('#ffffff' '#282828' '#cccccc')
+WMII_BACKGROUND='#333333'
+WMII_NORMCOLORS=('#e0e0e0' '#0a0a0a' '#606060')
+theme 'gloom'
+WMII_FOCUSCOLORS=('#54FF54' '#000000' '#73A5FF')
+WMII_BACKGROUND='#000000'
+WMII_NORMCOLORS=('#A8A8A8' '#000000' '#A07040')
+WMII_FONT='*-fixed-medium-r-*-*-13-*-*-*-*-*-*-*'
+theme 'Xterm style'
+
+%}
+
Received on Tue May 19 2009 - 19:59:40 CEST