# 'twander' Configuration File Example # $Id: .twander,v 1.63 2005/01/29 04:35:10 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 # Command Definitions # Conditional Expressions # # 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 # CMDSHELL = # Command to use when spawning shell commands # DEBUGLEVEL = 0 # Level of debug output desired # DEFAULTSEP = ===> # Default separator string in PROMPT and YESNO constructs # 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 # INVERTFILTER = False # Invert the sense of the logic for filtering by wildcard # 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 # 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 # 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 = <Control-ButtonRelease-3> # 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 # 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> # 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 # MOUSEWILD = <Alt-Control-ButtonRelease-3> # Pop-up 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 ############################################################################## ##### # 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. #-# # 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 #-# #-# WILDCARD = \.gz # Items containing the string: .gz #-# WILDCARD = 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 #-# #-# WILDCARD = \.txt # Items containing the string: .txt #-# WILDCARD = \.exe # Items containing the string: .exe #-# WILDCARD = 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) and #-# #-# #-# # 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] #-# #-# # Finally, 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 #-# #-# #-# # End of sample twander configuration