# ====================[ macmak ]==================== # [ Time-stamp: "2009-04-21 17:12:08 leycec" ] # # Configuration file for optimizing carpalx towards the "macmak" keyboard # layout. (That is, towards this Apple MacBook-specific, Colemak-inspired # layout.) # # --------------------( USAGE )-------------------- # To use this configuration, run: # # carpalx -conf etc/macmak.conf # # To see help on carpalx, run: # # carpalx -h # carpalx -man # # for the complete manpage. # # Please note, lastly, that all paths specified in this configuration file # (particularly, via <<${INCLUDE_FILE}>>), must be relative to this file. # ....................{ ACTION }.................... # The action variable controls what the script does. The following # options are available, and some require others to be present in # order for the script to work. # # loadtriads - read the input corpus and parse its triads # # loadkeyboard - read the initial keyboard configuration # # optimize - using the input corpus (loadtriads) and the initial # keyboard configuration (loadkeyboard), attempts to minimize typing # effort by rearranging key location. Parameters for this process are # defined elsewhere in this file. # # reporteffort - report stroke frequency, typing effort and other # details of the current keyboard layout. If this action is called # before (after) optimize, then the report is based on the initial # (optimized) keyboard layout. If you want to generate statistics # for an arbitrary (e.g. unoptimized, potentially optimized) keybard # layout, this option is for you. # # quit/exit - stop the script # # Some examples: # # action = loadkeyboard,loadtriads,reporteffort,quit # generate statistics for input keyboard using the corpus # # action = loadkeyboard,loadtriads,optimize,quit # load the keybard and corpus and then optimize the keyboard layout # # action = loadkeyboard,loadtriads,optimize,reporteffort,quit # like above, but generate optimized keyboard statistics before quitting action = loadkeyboard,loadtriads,optimize,reporteffort,quit # ....................{ RUNID }.................... # A random job identifier. You can use the value of this variable in other # configuration variables to generate unique files for each run. runid = __join("", map { chr(97+rand(26)) } (0..5))__ # ....................{ TRAINING CORPUS }.................... # The training corpus is the body of text that is used to optimize # keyboard layout. Depending on your application, this may be a text or # set of texts in your spoken language, perhaps a programming language # if you want to torture yourself with an optimized layout for coding, # or any other text that you find yourself needing to type a lot. # # The corpus will be parsed and triads extracted based on the # setting of the "mode" variable. You can limit the number of triads # extracted (triad_max_num, useful for short runs and debugging). # You also have the option to avoid rare triads (if triads_min_freq is # set then only triads that appear at least this many times will be # kept). # # Triads can be extracted to overlap if triads_overlap is set. # # triad_overap = yes school -> sch,cho,hoo,ool # triad_overap = no school -> sch,ool corpus = ../corpus/books.txt # Include training corpus modes as defined by this external file. <> # Use the training corpus mode defined below as an enumeration on the set: # code | english | english-extended| letter | perl | raw mode = code #triads_max_num = 5000 triads_overlap = yes triads_min_freq = 2 # ....................{ WORD-BASED STATISTICS }.................... # The action "wordreport" will generate a report of word efforts, # based on words found in the file defined here. You can limit the # length of the words to a range. # # The purpose of the report is to generate a ranked-order list of # words that are easy-vs-hard to type. # # Note that these words do not play a role in keyboard layout # optimization - they are used for reporting efforts. words = ../corpus/words.480k.txt wordlength = 6-10 # ....................{ KEYBOARD DEFINITION }.................... # The parameters here (keyboard_*) define the input keyboard, which is # used for reporting initial typing effort and, if requested, is used # as the base layout for optimization. See keyboards/README for # a description of how the keyboard input files are formatted. # # keyboard_input defines the input keyboard. # # keyboard_output defines the filename that stores the current # (e.g. current best) layout during optimization. The format of this # file is the same as expected by keyboard_input, which makes it # possible to resume a job. # # keyboard_output_show_parameters defines which parameters to embed in # the keyboard_output file. keyboard_input = keyboards/culemak.conf keyboard_output = ../out/macmak.__$CONF{runid}__.conf keyboard_output_show_parameters = current,annealing # ....................{ SIMULATED ANNEALING PARAMETERS }.................... action = minimize iterations = 10000 t0 = 10 p0 = 1 # p0 = 0 to avoid transitions to layouts with higher effort k = 10 minswaps = 1 maxswaps = 3 onestep = no # each layout perturbation taken from original layout (no cumulative changes) # ....................{ TYPING MODEL PARAMETERS }.................... # The effort model configuration (e.g. 01.conf) itself imports # a variety of parametes from effort/* directories <> # the mask defines which keys can be relocated <> # ....................{ KEYBOARD REPORTING AND IMAGES }.................... # This family of parameters controls how frequently the current # keyboard layout is reported (report_*) during the optimization stage. You can # generate a PNG image of the current keyboard layout (draw_*). report_period = 1 report_filter = lower_monotonic # all | lower | lower_monotonic | update | none draw_period = 1 draw_filter = none # all | lower | lower_monotonic | update | none # ....................{ KEYBOARD IMAGE PARAMETERS }.................... <> # regular font font = /usr/local/fonts/ttf/lucon.ttf # condensed font fontc = /usr/local/fonts/ttf/MINIC___.TTF pngfile_keyboard_input = /tmp/macmak.input.png pngfile_keyboard_output = /tmp/macmak.output.png # Image detail (key annotations) and parameters (colors, keysize, etc) # are defined in blocks below and here the name of the parameter # block you wish to use is set. imagedetaillevel = 1 # use block named 1 for detail level imageparamset = 1 # use block named 1 for image parameters keysize = 35 fontsize = 11 xshift = 4 ucyshift = 14 lcyshift = 16 keyspacing = 0.2 shadowsize = 1 bottommargin = 30 imageborder = grey keyshadow = grey background = white effort_color_i = lred effort_color_f = lgreen key = white keyborder = black keysize = 23 fontsize = 8 xshift = 3 ucyshift = 11 lcyshift = 9 keyspacing = 0.2 shadowsize = 1 bottommargin = 15 imageborder = grey keyshadow = grey background = white effort_color_i = lred effort_color_f = lgreen key = white keyborder = black keyshadow = yes upcase = some lowcase = yes effortcolor = yes fillkey = yes keyborder = yes finger = yes effort = yes hand = yes imageborder = no parameters = no keyshadow = yes upcase = some lowcase = yes capitalize = yes effortcolor = no fillkey = yes keyborder = yes finger = no effort = no hand = no imageborder = no parameters = no