Newer
Older
twander / .twander
# 'twander' Configuration File Example
# $Id: .twander,v 1.86 2009/07/01 21:24:07 tundra Exp $
#
# Contains list of all possible variables (and defaults, if any) for:
#
#       Program Options
#       Key Bindings
#       Directory Shortcuts
#
# This file ends with an example configuration file containing:
#
#       Variable Definitions
#       Directory Shortcuts
#       Wildcards
#       Associations
#       Command Definitions
#       Conditional Expressions
#       Execution Variables
#
# THIS ENTIRE FILE IS COMMENTED OUT.  COPY WHAT YOU WANT TO
# CHANGE AND EDIT TO TASTE.  THAT WAY YOU STILL WILL HAVE
# THE ORIGINAL FILE CONTENT AS A REFERENCE FROM WHICH TO WORK.




##############################################################################

#####
# Program Option Statements
#####

# ACTUALLENGTH     = False            # Display actual file lengths
# ADAPTREFRESH     = True             # Enable adaptive refreshing
# AFTERCLEAR       = True             # Clear selection after forced refresh
# AFTERWAIT        = 1                # Wait time (sec) after forced refresh
# AUTOREFRESH      = True             # Automatically reread current directory periodically
# BCOLOR           = black            # Main window background color
# CMDMENUSORT      = False            # Sort command menu?
# CMDSHELL         =                  # Command to use when spawning shell commands
# DEBUGLEVEL       = 0                # Level of debug output desired
# DEFAULTSEP       = ===>             # Default separator string in PROMPT and YESNO constructs
# DOTFILE          = .                # What 'dotfiles' begin with
# FCOLOR           = green            # Main window foreground color
# FNAME            = Courier          # Main window font name
# FORCEUNIXPATH    = False            # Force Unix-Style paths when doing built-in substitutions
# FSZ              = 12               # Main window font size
# FWT              = bold             # Main window font width
# HBCOLOR          = lightgreen       # Help background color
# HEIGHT           = 600              # Initial window height (pixels)
# HFCOLOR          = black            # Help foreground color
# HFNAME           = Courier          # Help font name
# HFSZ             = 10               # Help font size
# HFWT             = italic           # Help font weight
# HIDEDOTFILES     = False            # Hide all dotfiles from view - i.e, Dir/filenames beginning with DOTFILE
# INVERTFILTER     = False            # Invert the sense of the logic for filtering by wildcard
# ISODATE          = False            # Display date/time in ISO 8601 format
# MAXMENU          = 32               # Maximum number of displayed menu items
# MAXMENUBUF       = 250              # Maximum number of (internally) tracked menu items
# MAXNESTING       = 32               # Maximum depth of variable definition nesting
# MBARCOL          = beige            # Menu bar color
# MBCOLOR          = beige            # Menu bar background color
# MFCOLOR          = black            # Menu bar foreground color
# MFNAME           = Courier          # Menu bar font name
# MFSZ             = 12               # Menu bar font size
# MFWT             = bold             # Menu bar font weight
# NODETAILS        = False            # Suppress display of file details
# NONAVIGATE       = False            # Prevent navigation out of start directory
# QUOTECHAR        = "                # Character to use when quoting built-in variables
# REFRESHINT       = 3000             # Interval (ms) at which to re-read current directory
# SCALEPRECISION   = 1                # # of digits of precision to use when displaying scaled lengths
# SORTBYFIELD      = Name             # Field to use as sort key
# SORTREVERSE      = False            # Reverse sort order
# SORTSEPARATE     = True             # Separate directories and files in display
# STARTDIR         =  ...             # Defaults to directory in which program started
# STARTX           = 0                # Main window starting X coordinate
# STARTY           = 0                # Main window starting Y coordinate
# SYMDIR           = True             # Sort symbolic links pointing to directories as directories
# SYMEXPAND        = True             # Expand symlink to show its target
# SYMRESOLV        = False            # Show absolute path of symlink target
# USETHREADS       = True             # Use threads to launch commands
# USEWIN32ALL      = True             # Use Win32All extensions on Win32 (if present)
# WARN             = True             # Enable warnings
# WIDTH            = 800              # Initial window width (pixels)
# WILDNOCASE       = False            # Set's case-insensitivity for wildcard matches - True on Win32 by default


##############################################################################


#####
# Key Binding Statements
#####

# The default key bindings are shown in the comments below.  To
# change a binding from its default value, conform to the following
# rules:
#
#   1) Only change the right side of the assignment.  The left side
#      is a variable name which is significant to twander and may
#      not be changed.
#
#   2) Follow the Tkinter conventions for key naming.  This should
#      be pretty easy to do - just use the defaults below as a guide.
#      Do *not* quote the key names.  Just use the <...> naming
#      convention as you see it below.
#
#   3) It is best if keyboard commands are all Control or Function keys.
#      If you assign anything to a simple key it may conflict with a user-
#      defined command.  If you assign anything to a keypad/special
#      key it  may conflict with that key's normal GUI behavior.
#
#   4) The Program Function Names (the left side of the assignments)
#      are RESERVED and may not be used as names for your own user-
#      defined variables elsewhere in the configuration file.
#
#   5) When you're done with your changes make sure to uncomment
#      them so twander can read them it and override its defaults.
#      Then either restart the program or reload the configuration
#      file to assign the new bindings.
#
#   6) Note that you CANNOT change the bindings for Mouse Buttons.
#      They are documented below for completeness sake, but any
#      attempt to change them will cause 'twander' to present
#      a warning message and ignore that line.  If you attempt
#      to even just uncomment them below, you will get an error
#      because 'twander' thinks you are trying to redefine them.


# General Program Commands
#
# CLRHIST       = <Control-y>                     # Clear Command History
# FONTDECR      = <Control-bracketleft>           # Decrease Font Size
# FONTINCR      = <Control-bracketright>          # Increase Font Size
# MOUSECTX      = <ButtonRelease-3>               # Invoke context menu
# MOUSEDIR      = <Shift-ButtonRelease-3>         # Display the directory menu
# MOUSEHIST     = <Shift-Control-ButtonRelease-3> # Pop-up History Menu
# MOUSESC       = <Alt-Control-ButtonRelease-1>   # Pop-up Shortcut Menu
# MOUSESORT     = <Alt-Shift-ButtonRelease-3>     # Pop-up Sorting Menu
# QUITPROG      = <Control-q>                     # Quit the program
# READCONF      = <Control-r>                     # Re-read the configuration file
# REFRESH       = <Control-l>                     # Refresh screen
# TOGAUTO       = <Control-o>                     # Toggle Autorefreshing
# TOGDETAIL     = <Control-t>                     # Toggle detail view
# TOGLENGTH     = <Control-0>                     # Toggle length display between actual and normalized
# TOGSYMDIR     = <Control-asciitilde>            # Toggle sorting of symbolic links pointing to directories
# TOGSYMEXPAND  = <Control-exclam>                # Toggle symbolic link expansion
# TOGSYMRESOLV  = <Control-at>                    # Toggle absolute symbolic link resolution
# TOGWIN32ALL   = <Control-w>                     # Toggle win32all Features, If Available
#
# Directory Navigation
#
# CHANGEDIR = <Control-x>                       # Enter a new path
# DIRHOME   = <Control-h>                       # Goto $HOME
# DIRBACK   = <Control-b>                       # Goto previous directory
# DIRROOT   = <Control-j>                       # Goto root directory
# DIRSTART  = <Control-s>                       # Goto starting directory
# DIRUP     = <Control-u>                       # Go up one directory level
# DRIVELIST = <Control-k>                       # On Win32, display Drive List View if possible
# MOUSEBACK = <Control-Double-ButtonRelease-1>  # Go back one directory with mouse
# MOUSEUP   = <Control-Double-ButtonRelease-3>  # Go up one directory with mouse
#
# Selection Keys
#
# SELALL    = <Control-comma>                   # Select all items
# SELINV    = <Control-i>                       # Select all items
# SELNONE   = <Control-period>                  # Unselect all items
# SELNEXT   = <Control-n>                       # Select next item
# SELPREV   = <Control-p>                       # Select previous item
# SELEND    = <Control-e>                       # Select bottom item
# SELTOP    = <Control-a>                       # Select top item
#
# Scrolling Commands
#
# PGDN      = <Control-v>                       # Move page down
# PGUP      = <Control-c>                       # Move page up
# PGRT      = <Control-g>                       # Move page right
# PGLFT     = <Control-f>                       # Move page left
#
# Execute Commands
#
# RUNCMD    = <Control-z>                       # Run arbitrary user command
# SELKEY    = <Return>                          # Select item w/keyboard
# MOUSESEL  = <Double-ButtonRelease-1>          # Select item w/mouse

# Directory Shortcuts

# KDIRSC1   = <F1>                              # Go To Specified Directory
# KDIRSC2   = <F2>
# KDIRSC3   = <F3>
# KDIRSC4   = <F4>
# KDIRSC5   = <F5>
# KDIRSC6   = <F6>
# KDIRSC7   = <F7>
# KDIRSC8   = <F8>
# KDIRSC9   = <F9>
# KDIRSC10  = <F10>
# KDIRSC11  = <F11>
# KDIRSC12  = <F12>
# KDIRSCSET = <Control-8>                      # Override Selected Shortcut w/Current Directory

# Program Memories

# MEMCLR1   = <Control-F1>                      # Clear Individual Program Memory
# MEMCLR2   = <Control-F2>
# MEMCLR3   = <Control-F3>
# MEMCLR4   = <Control-F4>
# MEMCLR5   = <Control-F5>
# MEMCLR6   = <Control-F6>
# MEMCLR7   = <Control-F7>
# MEMCLR8   = <Control-F8>
# MEMCLR9   = <Control-F9>
# MEMCLR10  = <Control-F10>
# MEMCLR11  = <Control-F11>
# MEMCLR12  = <Control-F12>

# MEMCLRALL = <Control-m>                       # Clear All Program Memories

# MEMSET1   = <Alt-F1>                          # Set Individual Program Memory
# MEMSET2   = <Alt-F2>
# MEMSET3   = <Alt-F3>
# MEMSET4   = <Alt-F4>
# MEMSET5   = <Alt-F5>
# MEMSET6   = <Alt-F6>
# MEMSET7   = <Alt-F7>
# MEMSET8   = <Alt-F8>
# MEMSET9   = <Alt-F9>
# MEMSET10  = <Alt-F10>
# MEMSET11  = <Alt-F11>
# MEMSET12  = <Alt-F12>


# Sorting Keys

# SORTBYNONE   = <Shift-F10>                    # Select sorting parameters
# SORTBYPERMS  = <Shift-F1>
# SORTBYLINKS  = <Shift-F2>
# SORTBYOWNER  = <Shift-F3>
# SORTBYGROUP  = <Shift-F4>
# SORTBYLENGTH = <Shift-F5>
# SORTBYTIME   = <Shift-F6>
# SORTBYNAME   = <Shift-F7>
# SORTREV      = <Shift-F11>
# SORTSEP      = <Shift-F12>

# Wildcard Features

# MOUSEWILDFILTER  = <Alt-Control-ButtonRelease-2>   # Pop-up Filter Wildcard Menu
# MOUSEWILDSEL     = <Alt-Control-ButtonRelease-3>   # Pop-up Selection Wildcard Menu
# FILTERWILD       = <Control-equal>                 # Filter file list with wildcard
# SELWILD          = <Control-backslash>             # Select using wildcards
# TOGFILT          = <Control-minus>                 # Toggle logical sense of wildcard filtering

# Hide Dotfiles

# TOGHIDEDOT       = <Control-9>                     # Toggle hiding dotfiles



##############################################################################


#####
# Directory Shortcut Statements
#
# Enter Any Valid Path To The Right Of The Equals Sign
# To Associate A Function Key With That Directory Path
#
#####

# DIRSC1   = /path/to/a/directory/or/drive
# DIRSC2   = /path/to/a/directory/or/drive
# DIRSC3   = /path/to/a/directory/or/drive
# DIRSC4   = /path/to/a/directory/or/drive
# DIRSC5   = /path/to/a/directory/or/drive
# DIRSC6   = /path/to/a/directory/or/drive
# DIRSC7   = /path/to/a/directory/or/drive
# DIRSC8   = /path/to/a/directory/or/drive
# DIRSC9   = /path/to/a/directory/or/drive
# DIRSC10  = /path/to/a/directory/or/drive
# DIRSC11  = /path/to/a/directory/or/drive
# DIRSC12  = /path/to/a/directory/or/drive


##############################################################################


#####
# Example 'twander' Configuration File
#####

# To easily enable this example configuration, globally
# replace the string: "#-# " with a null or blank string.

#-# # Associations allow you to "associate" a type of file
#-# # with the program that handles it.  A "type" is merely
#-# # a string that uses Unix-style shell globbing to
#-# # define which filenames are to be included.
#-#
#-# ASSOC *.txt  vim [SELECTION]
#-#
#-# # The right-hand-side of an association statement can
#-# # contain pretty much anything you can use in a command
#-# # definition.
#-#
#-# ASSOC *.[Tt] {PROMPT:Do You Really Want To Edit This?} vim [SELECTION]
#-#
#-# # A special association for "default" operation is also
#-# # supported.  If the user clicks on a file type without
#-# # a specific association, the default association (if any)
#-# # will be applied.
#-#
#-# ASSOC *  emacs [SELECTION]
#-#
#-#
#-# # You can also *exclude* specific file types from ever
#-# # being associated.  This has higher precedence than
#-# # than the association command does.  So, if you place
#-# # a file type on the exclusion list, even if you've
#-# # defined an association for that type, it will never
#-# # be applied.  Exclusions consist of one or more lines
#-# # in the following form:
#-#
#-# # ASSOC ! space-separated-list-of-file-types
#-#
#-# ASSOC ! *.pyo *.tx? *.r[az]
#-#
#-# # You can remove a previously defined association
#-# # by leaving the right-hand-side of the statement
#-# # blank.  This is primarily useful within conditional
#-# # blocks where you want the existence of an association
#-# # for a particular file type to depend on some condition
#-# # such as, for instance, the type of OS your're running.
#-#
#-# # This sequence first defines and then removes an
#-# # association for text files:
#-#
#-# ASSOC *.txt MyFineEditor [SELECTION]
#-# ASSOC *.txt
#-#
#-# # You can do this for any association statement.
#-#
#-# ASSOC *
#-# ASSOC !
#-#
#-# # Associations are case insensitive on Win32 systems and case
#-# # sensitive elswhere.  You can force associations to be
#-# # case-insensitive on Unix-like systems by prepending the match
#-# # pattern with the "/" character:
#-#
#-#    ASSOC !     /*tXt  # Exludes files ending in txt, TXT, TxT, TXt, ...
#-#    ASSOC /*txT emacs [SELECTION] # Invokes emacs for files ending as above
#-# 
#-# # Note that exclusion has higher precedence than association
#-# # so the association with emacs above would never actually happen.
#-#
#-# # To undo a case insensitive assocation you must use the *exact*
#-# # pattern (including the "/" character) you used to establish
#-# # the association in the first place.  Here case still matters.
#-#
#-#
#-# # Special variable(s) used below to trigger conditional logic
#-#
#-# # If you comment out or remove the following statement, the command
#-# # associated with the = key (dd) disappears.
#-#
#-# POWERUSER = Anything-You-Want
#-#
#-#
#-# # Override the default colors
#-#
#-# BCOLOR = beige
#-# FCOLOR = black
#-#
#-# # We can set system options in a user-specific way
#-# # by combining conditionals with environment variables
#-#
#-# .if [$USER] == root
#-#
#-#     BCOLOR = red
#-#     FCOLOR = yellow
#-#
#-# .endif
#-#
#-# # We can also test for inequality in conditionals
#-# # In this case, if we're not running as root,
#-# # we'll override the help menu background color
#-#
#-#
#-# .if [$USER]!= root
#-#     HBCOLOR = gray
#-# .endif
#-#
#-# # User-defined variables make maintenance easier.
#-# # Remember, that the variable name is case-sensitive.
#-#
#-# # We define some things in an OS-specific manner
#-#
#-#
#-# # Definitions for Unix-like systems
#-#
#-#
#-# .if [.OS] ==posix
#-#
#-#     DELCMD   = rm -i
#-#     DIRCMD   = ls -al
#-#     EDITOR   = [$EDITOR]
#-#     PAGER    = [$PAGER]
#-#     QUOTE    = '
#-#     SHELL    = bash -c
#-#     TERMINAL = xterm -fn 10x20 -l -fb black -bg lightgreen
#-#     VSHELL   = [XTERM] [SHELL]
#-#     XTERM    = [TERMINAL] -e
#-#
#-#     # We can nest conditionals too, for example ...
#-#
#-#     GUI-Editor = Nope                     # Assume our editor is not GUI-aware
#-#
#-#     .if [$EDITOR]== /usr/local/bin/emacs   # But emacs is
#-#         GUI-Editor = Yup
#-#     .endif
#-#
#-#     # Assign shortcuts for common Unix directories
#-#
#-#     DIRSC1  = /etc
#-#     DIRSC10 = /usr/local/bin
#-#
#-#     # Unix Wildcards
#-#
#-#     WILDSELECT = \.gz    # Items containing the string: .gz
#-#     WILDFILTER = rwx     # Items containing the string: rwx
#-#
#-#     # We can also have conditions which depend on whether a
#-#     # variable is defined or not - we don't care about its value
#-#
#-#     .if [POWERUSER]
#-#         DD = [VSHELL] 'dd if={PROMPT:In File?} of={PROMPT:Out File?==>OutFile} | [$PAGER]'
#-#     .endif
#-#
#-# .endif
#-#
#-#
#-# # Definitions for Win32 systems
#-#
#-# .if [.OS]==nt
#-#
#-#     DELCMD     = del /p
#-#     DIRCMD     = dir
#-#     EDITOR     = write
#-#     GUI-Editor = Yup
#-#     PAGER      = more
#-#     SHELL      =
#-#     QUOTE      =
#-#     TERMINAL   = cmd
#-#     VSHELL     =
#-#     XTERM      =
#-#
#-#     # Assign shortcuts for common Win32 directories
#-#
#-#     DIRSC1  = C:\Documents and Settings
#-#     DIRSC10 = C:\Program Files
#-#
#-#     # Win32 Wildcards
#-#
#-#     WILDSELECT = \.txt           # Items containing the string: .txt
#-#     WILDSELECT = \.exe           # Items containing the string: .exe
#-#     WILDFILTER = SYSTEM          # Items containing the string: SYSTEM
#-#
#-# .endif
#-#
#-#
#-#
#-# # Command definitions are in the general format:
#-# #
#-# #  command-key command-name command-string
#-# #
#-# # command-keys are case sensitive.  Any single
#-# # character which can be typed from the keyboard can
#-# # be used as a command key, *except* the '#' character
#-# # (which is always seen as a comment delimiter).
#-#
#-#
#-# # Some commands run anywhere
#-#
#-# a  anycmd        [VSHELL] {PROMPT:Enter Command:}
#-# d  delete        [XTERM] [DELCMD] [SELECTIONS]
#-# l  dir-list      [VSHELL] [QUOTE] [DIRCMD] | [$PAGER] [QUOTE]
#-# T  new-terminal  [TERMINAL]
#-# V  view          [XTERM] [PAGER] [DSELECTIONS]
#-#
#-#
#-# # Some commands are only defined under some conditions
#-# # In the following example, variable DD is only defined
#-# # for posix systems AND if the POWERUSER variable has
#-# # been set - this is all defined in the posix-specific
#-# # section above.
#-#
#-# .if [DD]
#-#
#-#    = dd [DD]
#-#
#-# .endif
#-#
#-#
#-#
#-# # Some commands are condition-specific
#-#
#-# .if [GUI-Editor]== Yup
#-#     e   edit         [EDITOR] [SELECTIONS]
#-# .endif
#-#
#-#
#-# .if [GUI-Editor] !=Yup
#-#     e   edit         [XTERM] [EDITOR] [DSELECTIONS]
#-# .endif
#-#
#-#

#-# # Execution variables allow you to run a *program* and have its
#-# # text output assigned to a 'twander' configuration variable.
#-# # Note that they are delimited with backticks:
#-#
#-# D showdate [VSHELL] 'echo [`date`] | [PAGER]'
#-#
#-#
#-# # If the execution variable you want to run produces
#-# # multiple lines of text, you may need to quote it
#-# # to get things to work properly:
#-#
#-# D showfiles [VSHELL] 'echo "[`ls`]" | [PAGER]'
#-#
#-#
#-# # You can also force 'twander' to strip the newlines out of
#-# # multiline output from an execution variable by inserting
#-# # a '-' at the beginning of the command name:
#-#
#-# D showfiles [VSHELL] 'echo "[`-ls`]" | [PAGER]'
#-#
#-# # Execution variables are evaluated at the time the
#-# # they are actually *used* in a command invocation,
#-# # NOT when the configuration file is being read in.
#-# # This is true even if you first assign them to
#-# # a variable:
#-#
#-# CURRENTDATE = [`date`]
#-# D showcurrentdate [VSHELL] 'echo [CURRENTDATE] | [PAGER]'
#-#
#-# # Each time 'showcurrentdate' gets run, the CURRENTDATE
#-# # variable will be set to the output of the 'date' command.
#-# # This is unlike most variables used in 'twander' that are
#-# # evaluated once when the configuration file is first read in.

#-# # End of sample twander configuration