Commits

Iñigo Serna committed 868cd45

Documented ~/.lfmrc configuration file

* README (.lfmrc configuration file): documented configuration file

  • Participants
  • Parent commits 0854e03

Comments (0)

Files changed (4)

+Fri May 20 21:03:22 2011  Iñigo Serna  <inigoserna@gmail.com>
+
+	* README (.lfmrc configuration file): documented configuration file
+
 Mon May 16 21:58:06 2011  Iñigo Serna  <inigoserna@gmail.com>
 
 	* lfm/config.py (Config.__init__): use unicode
 
 :Author: Iñigo Serna, inigoserna AT gmail DOT com
 
-:Version: 2.3, January XXth. 2011
+:Version: 2.3, May 21st. 2011
 
 :Home page: https://inigo.katxi.org/devel/lfm/  or  http://www.terra.es/personal7/inigoserna/lfm/
 
 
           There is NO WARRANTY.
 
-:Last update: Mon May 16 18:41:00 2011
+:Last update: Fri May 20 21:04:13 2011
 
 .. contents:: Table of Contents
 
    +---------+------------------+------------+
    | Version |       File       |    Date    |
    +=========+==================+============+
-   |   2.3   | lfm-2.3.tar.gz_  | 2011/XX/XX |
+   |   2.3   | lfm-2.3.tar.gz_  | 2011/05/21 |
    +---------+------------------+------------+
    |   2.2   | lfm-2.2.tar.gz_  | 2010/05/22 |
    +---------+------------------+------------+
 =========================
 Program preferences are saved in `~/.lfmrc` file.
 
-Configuration (`General Menu [F9] -> Edit Configuration [c]`)
-Sections
-.
-.
-.
+To configure *lfm* `General Menu [F9] -> Edit Configuration [c]`.
+To restore default configuration exit from all instances of *lfm* and
+delete  `~/.lfmrc` file.
+
+In next subsections we will discuss the default configuration.
+
+Header
+------
+Always the same text. It is used to validate the configuration file::
+
+    ########## lfm - Last File Manager Configuration File ##########
+
+[Programs]
+----------
+Default programs *lfm* use for common file types::
+
+    audio: mplayer
+    ebook: FBReader
+    editor: vi
+    graphics: gthumb
+    pager: pyview
+    pdf: evince
+    shell: bash
+    video: mplayer
+    web: firefox
+
+[File Types]
+------------
+File extensions associated with default programs. See previous subsection::
+
+    audio: ogg, flac, mp3, wav, au, midi
+    ebook: epub, chm, mobi, prc, azw, lit, fb2
+    graphics: png, jpeg, jpg, gif, tiff, tif, xpm, svg
+    pdf: pdf, ps
+    video: mpeg, mpg, avi, asf, ogv, flv, mkv
+    web: html, htm
+
+[Bookmarks]
+-----------
+User-defined 10 bookmarks. / by default::
+
+    0: /
+    1: /
+    2: /
+    3: /
+    4: /
+    5: /
+    6: /
+    7: /
+    8: /
+    9: /
+
+[PowerCLI commands]
+-------------------
+User-defined 10 favourites PowerCLI stored commands::
+
+    0: mv "$f" "{$f.replace('', '')}"
+    1: pyview "$f" %
+    2: find "$d" -name "*" -print0 | xargs --null grep -EHcni "TODO|WARNING|FIXME|BUG"
+    3: find "$d" -name "*" -print0 | xargs --null grep -EHcni "TODO|WARNING|FIXME|BUG" >output.txt &
+    4: cp $s "$o"
+    5:
+    6:
+    7:
+    8:
+    9:
+
+[Colors]
+--------
+User interface colors. Each entry represents a different entity.
+Allowed colors are: black, blue, cyan, green, magenta, red, white and yellow::
+
+    archive_files: yellow black
+    buttons: yellow red
+    cli_prompt: blue black
+    cli_text: white black
+    current_file: blue cyan
+    current_file_otherpane: black white
+    current_selected_file: yellow cyan
+    current_selected_file_otherpane: yellow white
+    data_files: magenta black
+    directories: green black
+    document_files: blue black
+    error_messages1: white red
+    error_messages2: black red
+    exe_files: red black
+    file_info: red black
+    files: white black
+    graphics_files: magenta black
+    help: green black
+    media_files: blue black
+    messages: magenta cyan
+    selected_file: yellow black
+    source_files: cyan black
+    tabs: white blue
+    temp_files: white black
+    title: yellow blue
+
+[Options]
+---------
+Main settings::
+
+    # automatic_file_encoding_conversion: never = -1, ask = 0, always = 1
+    # sort:	None = 0, byName = 1, byName_rev = 2, bySize = 3,
+    # 	bySize_rev = 4, byDate = 5, byDate_rev = 6
+    automatic_file_encoding_conversion: 0
+    color_files: 1
+    detach_terminal_at_exec: 1
+    grep_ignorecase: 1
+    grep_regex: 1
+    manage_otherpane: 0
+    num_panes: 2
+    rebuild_vfs: 0
+    save_conf_at_exit: 1
+    save_history_at_exit: 1
+    show_dotfiles: 1
+    show_output_after_exec: 1
+    sort: 1
+    sort_mix_cases: 1
+    sort_mix_dirs: 0
+
+* *automatic_file_encoding_conversion*: Automatically convert filenames when wrong encoding found? Default 1 (yes)
+* *color_files*: Colorize files by extension? Default 1 (yes)
+* *detach_terminal_at_exec*: Detach terminal at execute? Default 1 (yes)
+* *grep_ignorecase*: Ignore case in grep? Default 1 (yes)
+* *grep_regex*: Use regex as grep pattern? Default 1 (yes)
+* *manage_otherpane*: Allow cursor navigation for the non-active panel? Default 0 (no), but can be enabled with Ctrl-W
+* *num_panes*: Number of panels to show? Default 2
+* *rebuild_vfs*: Rebuild vfs? Useful if automatic in confirmations->ask_rebuild_vfs. Default 0 (no)
+* *save_conf_at_exit*: Save configuration at exit? Default 1 (yes)
+* *save_history_at_exit*: Save history at exit for future sessions? Default 1 (yes)
+* *show_dotfiles*: Show .files? Default 1 (yes)
+* *show_output_after_exec*: Show output after exec? Default 1 (yes)
+* *sort*: Sort type. Default 1 (sort by name)
+* *sort_mix_cases*: Mix upper and lower case files in sort? Default 1 (yes)
+* *sort_mix_dirs*: Mix files and directories in sort? Default 0 (no)
+
+[Misc]
+------
+Settings which require a string value::
+
+    # diff_type: context, unified, ndiff
+    backup_extension: .bak
+    diff_type: unified
+
+* *backup_extension*: Backup file extensions? Default .bak
+* *diff_type*: Diff output format? Default unified
+
+[Confirmations]
+---------------
+These settings indicate whether the user will be prompted in these actions::
+
+    ask_rebuild_vfs: 1
+    delete: 1
+    overwrite: 1
+    quit: 1
+
+*ask_rebuild_vfs*: when abandoning compressed files, prompt if we should
+rebuild the file in case we've modified contents.
+
+[Files]
+-------
+File extensions for different file types. Used to color them::
+
+    archive_files: .gz, .bz2, .xz, .tar, .tgz, .Z, .zip, .rar, .7z, .arj, .cab, .lzh, .lha, .zoo, .arc, .ark, .rpm, .deb
+    data_files: .dta, .nc, .dbf, .mdn, .db, .mdb, .dat, .fox, .dbx, .mdx, .sql, .mssql, .msql, .ssql, .pgsql, .cdx, .dbi, .sqlite
+    document_files: .txt, .text, .rtf, .odt, .odc, .odp, .abw, .gnumeric, .sxw, .sxc, .sxp, .sdw, .sdc, .sdp, .ps, .pdf, .djvu, .dvi, .bib, .tex, .epub, .chm, .prc, .mobi, .azw, .lit, .imp, .xml, .xsd, .xslt, .sgml, .dtd, .html, .shtml, .htm, .css, .mail, .msg, .letter, .ics, .vcs, .vcard, .lsm, .po, .man, .1, .info, .doc, .xls, .ppt, .pps
+    graphics_files: .jpg, .jpeg, .gif, .png, .tif, .tiff, .pcx, .bmp, .xpm, .xbm, .eps, .pic, .rle, .ico, .wmf, .omf, .ai, .cdr, .xcf, .dwb, .dwg, .dxf, .svg, .dia
+    media_files: .mp2, .mp3, .mpg, .ogg, .flac, .mpeg, .wav, .avi, .asf, .mov, .mol, .mpl, .xm, .med, .mid, .midi, .umx, .wma, .acc, .wmv, .swf, .flv, .ogv
+    source_files: .c, .h, .cc, .hh, .cpp, .hpp, .py, .pl, .pm, .inc, .rb., .asm, .pas, .f, .f90, .pov, .m, .pas, .cgi, .php, .phps, .tcl, .tk, .js, .java, .jav, .jasm, .diff, .patch, .sh, .bash, .awk, .m4, .el, .st, .mak, .sl, .ada, .caml, .ml, .mli, .mly, .mll, .mlp, .prg
+    temp_files: .tmp, .$$$, ~, .bak
 
 
 FAQ
 ============================================================================
-Last update:	Time-stamp: <2011-05-16 22:00:54 inigo>
+Last update:	Time-stamp: <2011-05-20 21:02:34 inigo>
 ============================================================================
 
+Bugs:
+- SelectItem: h = min(len(entries), h)
+- PowerCLI history contains duped entries, but History doesn't
+- w=80 => .: /zzz/Music or /zzz/Books
+
 
 General:
 ========
         http://bugs.python.org/issue6755
         http://stackoverflow.com/questions/2476953/python-utf-8-howto-align-printout
   + documentation:
-    - document .lfmrc contents
     - be sure version and release date is correct in all files
     - update NEWS, clean TODO
 
   . mention python v2.5+
   . reorganized and fixed key bindings section
   . added link to public BitBucket repository
+  . documented .lfmrc contents
 
 
 THANKS:

File lfm/pyview.py

         if self.large:
             status = ''
         else:
-            status = 'Press a key to continue'
+            status = 'Press any key to continue'
             self.win_status.addstr(0, int((app.maxw-len(status))/2), status)
         self.win_title.refresh()
         self.win_status.refresh()