1miquels, 25-Oct-1994: 2Merged the patches with my minicom version. 3The original README below from the author of the patches 4is still valid except that 5 - your menu's may look a bit different 6 - no bugs in ^control handling 7 - File mode of macro's dir is set to 0600 when created 8 - If file does not start with '/' it's assumed relative 9 to your home directory. 10 - default file name if not set is ".macros". 11 12Original MACROS readme file follows: 13 14 15(fmg 8/22/97: update e-mail) 16E-mail: filipg@paranoia.com (best) 17 fmgst+@pitt.edu (so so) 18 19---------------------------------------------------------------------------------- 20 21Intro: 22 This patch should have patched all the files, created this file, and 23 modified the Makefile (added a -DWANT_FKEYS to FLAGS and some extra 24 documentation lines). 25 26Colors: 27 These patches will allow you to modify the [ghastly] default 28 screen colors. These changes will be saved to either the system 29 or private config files. Here's a copy of my screen: 30 31 +=================[Screen and keyboard]=================+ 32 | | 33 +=| A - Command key is : ^A | 34 | | B - Backspace key sends : BS | 35 | | C - Macros file : /home/fmg/.macros | 36 | | D - Edit Macros | 37 | | E - Status line is : enabled | 38 | | F - Foreground Color (menu): YELLOW | 39 | | G - Background Color (menu): BLUE | 40 | | H - Foreground Color (term): CYAN | 41 | | I - Background Color (term): BLACK | 42 +=| J - Foreground Color (stat): RED | 43 | K - Background Color (stat): BLACK | 44 | | 45 | Change which setting? (Esc to exit) | 46 | | 47 +=======================================================+ 48 49 Hitting letters F thru K will cycle that entry thru all the 50 available colors. 51 52 Note that crude sanity checks are employed so you can't set the 53 menu or terminal foreground == background. It just won't let you. 54 You can do that for the status line since it's just another way 55 to shut it off :-) 56 57 Oh, one more thing: cycling the terminal & menu colors will only 58 change the color name (ie. the physical screen will not change 59 colors). The Status bar, OTOH, does cycle with the key presses. 60 Go figure ;-) 61 62Macros: 63 In the first version of macros for minicom, they were also saved to 64 the regular config files. A few weeks ago I ran into a situation 65 where I needed macros of more than the maximum 64 characters and 66 reworked them to take up to 256 bytes (this value is arbitrary - 67 make it 4K if you like - I do :-) bytes. Note that these mods use 68 set length strings so they take up space if you use them or not. 69 I will make them dynamic for next version of minicom, just for 70 fun ;-) 71 72 For now, the length of macros may be specified at compile time in 73 the Makefile with -DMAC_LEN=nnnn (bytes). It's set to 256 bytes 74 by default. 75 76 There was a big kludge necessary in the window.c file because the 77 window line editing functions uses a set buffer of 256 bytes. You 78 definitely don't want to see how I got around that ;-) I also made 79 a small modification to wgets function which moves the cursor to 80 the end of the line when called (useful for editing macros longer 81 than the width of the window). 82 83 BTW, I tested it with 4096 byte macros... works just fine. However, 84 most editors will choke on lines that long... 85 86Config file & Macros: 87 Since they are separate, and I didn't want to interfere with 88 people using config files with other versions of minicom, the 89 macros are saved to a file of your choice. Just run minicom, 90 press C-A O, Screen and keyboard, C, and enter something like: 91 /usr/home/filip/.macros (and pray that your full path is less 92 than 64 characters :-) 93 94 After you specify the macros file, do the above but hit D 95 (Edit Macros) and you will get a new window with 10 numbered 96 lines. Just select using 1 thru A and remember: 97 98 ^ + M = CONTROL-M (\n) 99 ^ + L = CONTROL-L (\f) 100 ^ + G = CONTROL-G (\b aka bell) 101 ^ + R = CONTROL-R (\r) 102 ^ + ~ = 1 second sleep() call (useful in login sequences) 103 ^ + ^ = ^ 104 105 (This is included at the bottom of the edit screen - see below) 106 107 There are some bugs if you try to fool it with, say, ^^^M, but 108 I plan to fix that RSN. 109 110 Examples? Here's a sample screen: 111 112 +===========================[F1 to F10 Macros]============================+ 113 | | 114 | 1 : telnet alpha.med.pitt.edu^M^~filip^M | 115 | 2 : telnet beta.med.pitt.edu^M^~fmg^M | 116 | 3 : stty rows 39^M^~stty columns 100^M | 117 | 4 : | 118 | 5 : anonymous^M | 119 | 6 : -filip@alpha.med.pitt.edu^M | 120 | 7 : /js/tmp/k/ | 121 | 8 : ftp sunsite.unc.edu^M^~^~anonymous^M^~-filip@alpha.med.pitt.edu^M^~ | 122 | 9 : | 123 | A : atdt6215954^M | 124 | | 125 | Change which setting? (Esc to exit) | 126 | | 127 | (LEGEND: ^M = C-M, ^L = C-L, ^G = C-G, ^R = C-R, ^~ = pause 1 second) | 128 +=========================================================================+ 129 +=======================================================+ 130 131 (The "A" stands for F10 because I wanted to keep things to single 132 key presses...) 133 134 Note that macro #8 is actually longer than that: 135 ftp sunsite.unc.edu^M^~^~anonymous^M^~-filip@alpha.med.pitt.edu^M^~\ 136 cd pub/Linux^M^~dir^M 137 138+-------------------------------------------------------------------------+ 139|* DANGER * DANGER * DANGER * DANGER * DANGER * DANGER * DANGER * DANGER *| 140| | 141| Be *VERY* careful with passwords!!! minicom just creates the file, | 142| it's *YOUR* responsibility to set the protections! Better yet, | 143| *NEVER* store passwords (just type them in) | 144| | 145|* DANGER * DANGER * DANGER * DANGER * DANGER * DANGER * DANGER * DANGER *| 146+-------------------------------------------------------------------------+ 147 148 The macros are store in ASCII format. I find it useful to edit 149 macros with a good editor (like vi :-) and, since I run selection, 150 I can just cut&paste complicated stuff right in, etc. (but see the 151 note above on high MAC_LENs) 152 153Saving: 154 Be sure to "Save setup as dfl" from the top menu. At this point, 155 you will also find out if the macros filename you specified was 156 good or if you'll have to change it. If name is not set and you 157 change macros and you go to save, minicom will warn you of this 158 fact (but it won't save you butt and save to a temporary file :-) 159 160 If you change any macros, don't explicily save them, and later 161 try to exit, you will be given a second chance to do so. If, 162 for some reason, the macros filename is incorrect or missing 163 and you try to exit and save macros, you will be given a chance 164 to go back and set/reset the filename. 165 166 The nice thing about keeping the macros filename in the standard 167 config file is that you can have different macro files with 168 different config files (see the -c argument to minicom) or you 169 may have the same macro file with ALL your config files :-) 170 171Bugs: 172 None. I also have a bridge for sale. Call me. If you find something 173 that's screwy with colors & macros, please send me e-mail. Please be 174 descriptive or, better yet, include a fix :-) 175 176---------------------------------------------------------------------------------- 177 178---------------- 179// fmg 2/20/93 - Added color selection to Screen & Keyboard menu 180 181---------------- 182// fmg 2/15/94 - Added macro filename & Macro define selection to 183 Screen & Keyboard menu. Added window for macro 184 definition. 185 186---------------- 187// fmg 3/1/94 - Modified the man page source to indicate changes. 188