WILY(1x)
πΈ WILY(1x) β bestie's guide to interactive text windows πΈ
okay so. sit down. hydrate. this is wily(1x), plus its two little sidekicks win and awd, and honestly? it's giving window manager but make it text. let's get into it π
β¨ NAME β¨
wily, win, awd β interactive text windows. yes that's the whole name section, she's short and she knows it π
β¨ SYNOPSIS β¨
wily [ -f varfont ] [ -F fixfont ] [ -c ncol ]
win [ command ]
awd [ label ]
like. that's it. that's the whole vibe check. π
β οΈ NOTE β οΈ
bestie. i have to be so real with you rn. this manual page is out of date. the original documentation lives in /usr/share/doc/wily. so if something here doesn't match reality, it's not you, it's the docs. π
π DESCRIPTION π
So wily manages windows of text that can be edited interactively or by external programs. the interactive interface uses a different interface (yes, that's what it says, and yes, we're all just living with that sentence π«Ά).
Any named files get read into wily windows before wily accepts input. Plain files display as text. Directories display as columnated lists of the names of their components, exactly like ls -p directory|mc β with one lil twist: the names of subdirectories get a slash appended. cute, right? πΈ
The -f (-F) option sets the default variable-pitch (fixed-pitch) font. the defaults are /lib/font/bit/lucidasans/euro.8.font (.../lucm/unicode.9.font). Tab intervals get set to the width of 4(8) numeral zeros in the variable-pitch font. numbers, bestie. we love a specific number. β¨
πͺ Windows πͺ
Wily windows come in two parts: a short tag above a multi-line body.
- the body typically contains an image of a file, as in
sam(1), or the output of a program, as in an8Β½(1)window. - the tag contains a number of blank-separated words, then a vertical bar character, then literally anything.
The first word of the tag is the name of the window β usually the name of the associated file or directory. The other words are commands available in that window. Any text may be added after the bar; examples include strings to search for, or commands to execute in that window. iykyk π
If a window holds a directory, the name (first word of the tag) will end with a slash. that's it. that's the rule. /
π±οΈ Scrolling π±οΈ
Every window has a scroll bar to the left of the body. It behaves much as in sam(1) or 8Β½(1) β except that scrolling happens when the button is pressed, rather than released, and it keeps going as long as the mouse button is held down in the scroll bar.
For example, to scroll slowly through a file, hold button 3 down near the top of the scroll bar. Moving the mouse down the scroll bar speeds up the rate of scrolling. so like. press and drag. no cap. π₯
π Layout π
Wily windows are arranged in columns. By default, it creates two columns when starting; this can be overridden with the -c option.
Placement is automatic, but you can adjust it using the layout box in the upper left corner of each window and column. Pressing and holding any mouse button in the box drags the associated window or column.
For windows, just clicking in the layout box grows the window in place:
- button 1 β grows it a little
- button 2 β grows it as much as it can, still leaving all other tags in that column visible
- button 3 β takes over the column completely, temporarily hiding other windows in the column
(they will return en masse if any of them needs attention. they always come back. they're loyal like that π₯Ή)
The layout box in a window is normally white; when it's black in the center, it records that the file is dirty: wily believes it is modified from its original contents. dirty lil file. messy. we respect it. π
Tags exist at the top of each column and across the whole display. Wily pre-loads them with useful commands. Also, the tag across the top maintains a list of executing long-running commands. she's keeping receipts. π
β¨οΈ Typing β¨οΈ
The behavior of typed text is similar to that in 8Β½(1), except that the characters are delivered to the tag or body under the mouse β there is no click to type. The usual backspacing conventions apply.
As in sam(1) but not 8Β½, the ESC key selects the text typed since the last mouse action. this is especially useful when executing commands. β
A side effect: typing ESC with text already selected is identical to a Cut command (q.v.). yeah. it just does that. be careful. π
All text, including the names of windows, may be edited uniformly. everything. all of it. β¨
π Directory context π
Each window's tag names a directory:
- explicitly if the window holds a directory
- implicitly if it holds a regular file (e.g. the directory
/admif the window holds/adm/users)
This directory provides a context for interpreting file names in that window. For example, the string users in a window labeled /adm/ or /adm/keys will be interpreted as the file name /adm/users. π¦
The directory is defined purely textually, so it can be a non-existent directory, or a real directory associated with a non-existent file (e.g. /adm/not-a-file). File names beginning with a slash are assumed to be absolute file names. slay, textual rules, we love a consistent girlboss β¨
π¨ Errors π¨
Windows whose names begin with - or + conventionally hold diagnostics and other data not directly associated with files.
- A window labeled
+Errorsreceives all diagnostics produced by wily itself. - Diagnostics from commands run by wily appear in a window named
directory/+Errors, where directory is identified by the context of the command.
These error windows are created when needed. so like. they just appear. when you least expect them. π
π±οΈ Mouse button 1 π±οΈ
Mouse button 1 selects text just as in sam(1) or 8Β½(1), including the usual double-clicking conventions. classic. iconic. no notes. π
π±οΈ Mouse button 2 π±οΈ
By an action similar to selecting text with button 1, button 2 indicates text to execute as a command.
If the indicated text has multiple white-space-separated words, the first is the command name and the second and subsequent are its arguments.
If button 2 is clicked β indicating a null string β wily expands the indicated text to find a command to run:
- if the click is within button-1-selected text, wily takes that selection as the command
- otherwise it takes the largest string of valid file name characters containing the click
Valid file name characters are alphanumerics and _ . - + /.
This behavior is similar to double-clicking with button 1 but, because a null command is meaningless, only a single click is required. efficiency!! π
π§ Built-ins π§
Some commands, all by convention starting with a capital letter, are built-ins that are executed directly by wily:
Cutβ Delete most recently selected text and place in snarf buffer.Delβ Delete window. If window is dirty, saves a backup of the file.Delcolβ Delete column and all its windows, after checking that windows are not dirty.Quitβ Exit wily after checking that windows are not dirty.Fontβ With no arguments, change the font of the associated window or column from fixed-spaced to proportional-spaced or vice versa. Given a font name argument, change the font of the window to the named font. Other existing windows are unaffected.Getβ Load file into window, replacing previous contents (after checking for dirtiness as inDel). With no argument, use the existing file name of the window. Given an argument, use that file but do not change the window's file name.Killβ Send a kill note to wily-initiated commands named as arguments.Lookβ Search in body for occurrence of literal text indicated by the argument or, if none is given, by the selected text in the body.Newβ Make new window. With arguments, load the named files into windows.Newcolβ Make new column.Pasteβ Replace most recently selected text with contents of snarf buffer.Putβ Write window to the named file. With no argument, write to the file named in the tag of the window.Putallβ Write all dirty windows whose names indicate existing regular files.Redoβ Complement ofUndo.Sendβ Append selected text or snarf buffer to end of body; used mainly withwin.Snarfβ Place selected text in snarf buffer.Sortβ Arrange the windows in the column from top to bottom in lexicographical order based on their names.Splitβ Create a copy of the window containing most recently selected text.Undoβ Undo last textual change or set of changes.
A common place to store text for commands is in the tag; in fact wily maintains a set of commands appropriate to the state of the window to the left of the bar in the tag. she's thoughtful like that π
π Shell commands π
If the text indicated with button 2 is not a recognized built-in, it is executed as a shell command. For example, indicating date with button 2 runs date(1). ποΈ
The standard and error outputs of commands are sent to the error window associated with the directory from which the command was run, which will be created if necessary.
For example:
- in a window
/adm/users, executingpwdwill produce the output/admin a (possibly newly-created) window labeled/adm/+Errors - in a window containing
/sys/src/cmd/sam/sam.c, executingmakewill runmake(1)in/sys/src/cmd/sam, producing output in a window labeled/sys/src/cmd/sam/+Errors
look at that. clean. contextual. correct. π
π±οΈ Mouse button 3 π±οΈ
Pointing at text with button 3 instructs wily to locate or acquire the file, string, etc. described by the indicated text and its context.
This description follows the actions taken when button 3 is released after sweeping out some text. In the description, text refers to the text of the original sweep or, if it was null, the result of applying similar expansion rules that apply to button 2 actions.
Here's the whole flow, bestie:
- Existing window? If the text names an existing window, wily moves the mouse cursor to the selected text in the body of that window. π―
- Existing file, no window? If the text names an existing file with no associated window, wily loads the file into a new window and moves the mouse there.
- Starts with a colon? If the text begins with a colon, it is taken to be an address, in the style of
sam(1), within the body of the window containing the text. The address is evaluated, the resulting text highlighted, and the mouse moved to it. Thus, in wily, one must type:/regexpor:127β not just/regexpor127. (there is an easier way to locate literal text; see below π) - File name + colon + address? If the text is a file name followed by a colon and an address, wily loads the file and evaluates the address. For example, clicking button 3 anywhere in the text
file.c:27will openfile.c, select line27, and put the mouse at the beginning of the line. The rules about Error files, directories, and so on all combine to make this an efficient way to investigate errors from compilers, etc. literally the best feeling ever. π₯ - Not an address or file? If the text is not an address or file, it is taken to be literal text, which is then searched for in the body of the window in which button 3 was clicked. If a match is found, it is selected and the mouse is moved there. Thus, to search for occurrences of a word in a file, just click button 3 on the word. Because of the rule of using the selection as the button 3 action, subsequent clicks will find subsequent occurrences without moving the mouse. obsessed. π
And one last lil caveat, and it matters:
In all these actions, the mouse motion is not done if the text is a null string within a non-null selected string in the tag β so that (for example) complex regular expressions may be selected and applied repeatedly to the body by just clicking button 3 over them. π
<div align="center">β¨ part 1 of 2 β more incoming bestie β¨</div>
β¨ Chords of mouse buttons β¨
Okay bestie, this is the part where your mouse becomes a whole instrument πΉ like, several operations are literally bound to multiple-button actions. Not a single click, a chord.
Here's the tea:
- Select some text, keep button 1 held down, then press button 2 β that's Cut. Press button 3 instead β that's Paste. Two buttons, one vibe π
- After you click one button, the other one undoes the first. So, while you're holding down button 1:
2then3is a Snarf that leaves the file undirtied (clean, pristine, no cap β¨), and3then2is a no-op β literally nothing, a lil ghost click π» - And this whole thing also applies to text you selected by double-clicking?? Yes fr fr. Because the double-click expansion happens when the second click starts, not when it ends. Timing is everything, iykyk β±οΈ
Now the spicy part πΆοΈ β commands can get extra arguments from a mouse chord using buttons 2 and 1.
While you're holding down button 2 on text that's gonna be executed as a command, clicking button 1 appends the text last pointed to by button 1 as a distinct final argument.
Example time, because this one's iconic:
Wanna search for literal text? You can executeLook textwith button 2. Or β the cool way β point at the text with button 1 in any window, release button 1, then executeLook, clicking button 1 while 2 is held down. π«Ά
And when an external command (like echo(1)) gets executed this way, the extra argument is passed as expected, plus an environment variable $wilyaddr is created that holds β in the form interpreted by button 3 β the fully-qualified address of the extra argument. She's got receipts π¬
π Support programs π
Winβ creates a new wily window and runs a command in it (default$SHELL), which turns that window into something analogous to an8Β½(1)window. And executing text in a win window with button 2 is similar to using Send. Same energy, different door πͺβ¨Awdβ loads the tag line of its window with the directory it's running in, suffixed with-label(defaultrc). It's intended to be executed by acdfunction for use in win windows. An example definition is:
fn cd { builtin cd $1 && awd $sysname }
π FILES π
$home/.wilybakβ default directory for backup files. Your lil safety net, bestie π§
π SEE ALSO π
wily(4)- Rob Pike, Acme: A User Interface for Programmers.
π BUGS π
Not a single bug listed here. The bugs section is giving absolutely nothing β an empty plate, a clean slate, a flawless queen π (which is either iconic or deeply suspicious, and we simply do not know π).
And that's a wrap on the WILY(1x) manual page, section 1x, bestie. You read the whole thing, every last flag and chord, and honestly? slay. Go forth and click with intention πβ¨π
π¦ where this page comes from
- debian bookworm: wily 0.13.42-1
- debian trixie: wily 0.13.42-3
- ubuntu jammy: wily 0.13.41-10
- ubuntu noble: wily 0.13.42-2
- ubuntu questing: wily 0.13.42-4
- ubuntu resolute: wily 0.13.42-4build1
- ubuntu stonking: wily 0.13.42-4build1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms