# 'twander' Configuration File Example # $Id: .twander,v 1.54 2004/03/11 00:11:35 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 ##### # AUTOREFRESH = True # BCOLOR = black # CMDSHELL = # DEBUGLEVEL = 0 # FCOLOR = green # FNAME = Courier # FSZ = 12 # FWT = bold # HBCOLOR = lightgreen # HEIGHT = 600 # HFCOLOR = black # HFNAME = Courier # HFSZ = 10 # HFWT = italic # MAXMENU = 32 # MAXMENUBUF = 250 # MAXNESTING = 32 # MBARCOL = beige # MBCOLOR = beige # MFCOLOR = black # MFNAME = Courier # MFSZ = 12 # MFWT = bold # NODETAILS = False # NONAVIGATE = False # QUOTECHAR = " # REFRESHINT = 3000 # SORTBYFIELD = Name # SORTREVERSE = False # SORTSEPARATE = True # STARTDIR = Defaults To Wherever Program Was Started # STARTX = 0 # STARTY = 0 # USETHREADS = True # USEWIN32ALL = True # WARN = True # WIDTH = 800 ############################################################################## ##### # 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 # 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 # 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 # SELWILD = <Control-backslash> # Select using wildcards # # 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> ############################################################################## ##### # 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?] | [$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