X-Git-Url: https://sipb.mit.edu/gitweb.cgi/wiki.git/blobdiff_plain/d8bfbcc20334d03e417d0dfdb7b27dbfdabf0365..6ca9912dda8fc03d69c6b7ac4d7bc1a0dbe29805:/doc/barnowl_random_zsigs.mdwn diff --git a/doc/barnowl_random_zsigs.mdwn b/doc/barnowl_random_zsigs.mdwn index cc98688..3fc36a7 100644 --- a/doc/barnowl_random_zsigs.mdwn +++ b/doc/barnowl_random_zsigs.mdwn @@ -1,38 +1,40 @@ -[[!meta title="Random Zsigs for Barnowl"]] +[[!meta title="Random Zsigs for BarnOwl"]] -## Random Zsigs for Barnowl +## Random Zsigs for BarnOwl Note: There's a lot of background information in here which can be bypassed. -First off, if you haven't already, take a look at Barnowl's internal documentation. Try the following two commands. +First off, if you haven't already, take a look at BarnOwl's internal documentation. Try the following two commands. :help :show quickstart -(Also viewable outside of Barnowl, in the form of messier-to-read source code, at [/help.c - barnowl - Trac](http://barnowl.mit.edu/browser/help.c) and the "intro" file at [/docs/intro.txt - barnowl - Trac](http://barnowl.mit.edu/browser/doc/intro.txt), +(Also viewable outside of BarnOwl, in the form of messier-to-read source code, at [/help.c - BarnOwl - Trac](http://barnowl.mit.edu/browser/help.c) and the "intro" file at [/docs/intro.txt - BarnOwl - Trac](http://barnowl.mit.edu/browser/doc/intro.txt), ### Intro to Zsigs -A "zsig" appears after your username (your Athena account name) in Zephyr (see [Using Zephyr (a.k.a. Zephyr for Dummies)](http://sipb.mit.edu/doc/zephyr) if you don't know what Zephyr is). +A "zsig" appears after your username (your Athena account name) in Zephyr (see [[Using Zephyr (a.k.a. Zephyr for Dummies)|doc/zephyr]] if you don't know what Zephyr is). By default, if your name is Jane Lillian Doe, your zsig is `(Jane L Doe)`. For instance, if you're on Zephyr, you might see 2013 / personal / jdoe 22:16 (Jane L Doe) ...hey I'm talking here. -Most people keep it that way, since people may not immediately know who you are by your username. Some people opt to remove the middle initial or leave it at an interesting quote. To do so, in Barnowl simply type in +Most people keep it that way, since people may not immediately know who you are by your username. Some people opt to remove the middle initial or leave it at an interesting quote. To do so, in BarnOwl simply type in :set zsig "This is a very interestin' quote." -(Barnowl accepts either single or double quotes to enclose your zsig, allowing you to use the other type of quote inside your zsig. Experiment, Barnowl tells you what it interpreted your command as by showing as confirmation +(BarnOwl accepts either single or double quotes to enclose your zsig, allowing you to use the other type of quote inside your zsig. Experiment, BarnOwl tells you what it interpreted your command as by showing as confirmation zsig = 'This is a very interestin' quote.' ### Random Zsig Generator But what if you want to set up a random zsig generator? -In outline, we use some bash magic that prints a zsig out to `stdout`, then set up Barnowl to run that bit of bash magic. Barnowl has something already which will automagically take that `stdout` and pipe it into your zsig. +**Deprecated: BarnOwl now has better built-in support for zsig randomization than it did when this page was written. Rather than reading the rest of this page, you may want to read `show variable zsigfunc`, and look at `random_zephyr_signature`.** -#### Steps Outside of Barnowl: Creating the zsigs file +In outline, we use some bash magic that prints a zsig out to `stdout`, then set up BarnOwl to run that bit of bash magic. BarnOwl has something already which will automagically take that `stdout` and pipe it into your zsig. + +#### Steps Outside of BarnOwl: Creating the zsigs file Connect to Athena if you haven't already. 1. Create a file of zsigs. In this article we'll call the file `.zsigs` @@ -50,13 +52,13 @@ Connect to Athena if you haven't already. The second line should be one of the zsigs from your list. Run it multiple times if you want to check for randomness. -#### Setting Up Barnowl: Using the zsigproc variable +#### Setting Up BarnOwl: Using the zsigproc variable ##### Background -Open up Barnowl now. +Open up BarnOwl now. kusername@dr-wily:~$ add barnowl; barnowl -Using the command `:show variables` inside of Barnowl we see descriptions of the variables of interest to us: +Using the command `:show variables` inside of BarnOwl we see descriptions of the variables of interest to us: zsig - zephyr signature (default: '') zsigproc - name of a program to run that will generate zsigs (default: '') @@ -72,12 +74,12 @@ We will also use the `:startup` command, which is described in ##### The Steps -1. Use the `:startup` command in Barnowl to write to the "~/.owl/startup" file (or wherever you decided to put the your startup settings file for Barnowl). (Alternatively, edit the "~/.owl/startup" file directly). As mentioned in the detailed documentation, the variable `zsig` takes precedence over `zsigproc`. Make sure that `zsig` is empty. Then set `zsigproc` to run our bit of bash magic. +1. Use the `:startup` command in BarnOwl to write to the "~/.owl/startup" file (or wherever you decided to put the your startup settings file for BarnOwl). (Alternatively, edit the "~/.owl/startup" file directly). As mentioned in the detailed documentation, the variable `zsig` takes precedence over `zsigproc`. Make sure that `zsig` is empty. Then set `zsigproc` to run our bit of bash magic. :startup set zsig '' :startup set zsigproc 'shuf -n1 ~/.zsigs' -2. Force Barnowl to reload the startup configuration file +2. Force BarnOwl to reload the startup configuration file :source "~/.owl/startup"