Newer
Older
twander / .twander
@tundra tundra on 10 Jan 2007 19 KB Updated TOGSYM* key bindings.
  1. # 'twander' Configuration File Example
  2. # $Id: .twander,v 1.83 2007/01/10 22:13:17 tundra Exp $
  3. #
  4. # Contains list of all possible variables (and defaults, if any) for:
  5. #
  6. # Program Options
  7. # Key Bindings
  8. # Directory Shortcuts
  9. #
  10. # This file ends with an example configuration file containing:
  11. #
  12. # Variable Definitions
  13. # Directory Shortcuts
  14. # Wildcards
  15. # Associations
  16. # Command Definitions
  17. # Conditional Expressions
  18. # Execution Variables
  19. #
  20. # THIS ENTIRE FILE IS COMMENTED OUT. COPY WHAT YOU WANT TO
  21. # CHANGE AND EDIT TO TASTE. THAT WAY YOU STILL WILL HAVE
  22. # THE ORIGINAL FILE CONTENT AS A REFERENCE FROM WHICH TO WORK.
  23.  
  24.  
  25.  
  26.  
  27. ##############################################################################
  28.  
  29. #####
  30. # Program Option Statements
  31. #####
  32.  
  33. # ACTUALLENGTH = False # Display actual file lengths
  34. # ADAPTREFRESH = True # Enable adaptive refreshing
  35. # AFTERCLEAR = True # Clear selection after forced refresh
  36. # AFTERWAIT = 1 # Wait time (sec) after forced refresh
  37. # AUTOREFRESH = True # Automatically reread current directory periodically
  38. # BCOLOR = black # Main window background color
  39. # CMDMENUSORT = False # Sort command menu?
  40. # CMDSHELL = # Command to use when spawning shell commands
  41. # DEBUGLEVEL = 0 # Level of debug output desired
  42. # DEFAULTSEP = ===> # Default separator string in PROMPT and YESNO constructs
  43. # DOTFILE = . # What 'dotfiles' begin with
  44. # FCOLOR = green # Main window foreground color
  45. # FNAME = Courier # Main window font name
  46. # FORCEUNIXPATH = False # Force Unix-Style paths when doing built-in substitutions
  47. # FSZ = 12 # Main window font size
  48. # FWT = bold # Main window font width
  49. # HBCOLOR = lightgreen # Help background color
  50. # HEIGHT = 600 # Initial window height (pixels)
  51. # HFCOLOR = black # Help foreground color
  52. # HFNAME = Courier # Help font name
  53. # HFSZ = 10 # Help font size
  54. # HFWT = italic # Help font weight
  55. # HIDEDOTFILES = False # Hide all dotfiles from view - i.e, Dir/filenames beginning with DOTFILE
  56. # INVERTFILTER = False # Invert the sense of the logic for filtering by wildcard
  57. # ISODATE = False # Display date/time in ISO 8601 format
  58. # MAXMENU = 32 # Maximum number of displayed menu items
  59. # MAXMENUBUF = 250 # Maximum number of (internally) tracked menu items
  60. # MAXNESTING = 32 # Maximum depth of variable definition nesting
  61. # MBARCOL = beige # Menu bar color
  62. # MBCOLOR = beige # Menu bar background color
  63. # MFCOLOR = black # Menu bar foreground color
  64. # MFNAME = Courier # Menu bar font name
  65. # MFSZ = 12 # Menu bar font size
  66. # MFWT = bold # Menu bar font weight
  67. # NODETAILS = False # Suppress display of file details
  68. # NONAVIGATE = False # Prevent navigation out of start directory
  69. # QUOTECHAR = " # Character to use when quoting built-in variables
  70. # REFRESHINT = 3000 # Interval (ms) at which to re-read current directory
  71. # SORTBYFIELD = Name # Field to use as sort key
  72. # SORTREVERSE = False # Reverse sort order
  73. # SORTSEPARATE = True # Separate directories and files in display
  74. # STARTDIR = ... # Defaults to directory in which program started
  75. # STARTX = 0 # Main window starting X coordinate
  76. # STARTY = 0 # Main window starting Y coordinate
  77. # SYMDIR = True # Sort symbolic links pointing to directories as directories
  78. # SYMEXPAND = True # Expand symlink to show its target
  79. # SYMRESOLV = False # Show absolute path of symlink target
  80. # USETHREADS = True # Use threads to launch commands
  81. # USEWIN32ALL = True # Use Win32All extensions on Win32 (if present)
  82. # WARN = True # Enable warnings
  83. # WIDTH = 800 # Initial window width (pixels)
  84. # WILDNOCASE = False # Set's case-insensitivity for wildcard matches - True on Win32 by default
  85.  
  86.  
  87. ##############################################################################
  88.  
  89.  
  90. #####
  91. # Key Binding Statements
  92. #####
  93.  
  94. # The default key bindings are shown in the comments below. To
  95. # change a binding from its default value, conform to the following
  96. # rules:
  97. #
  98. # 1) Only change the right side of the assignment. The left side
  99. # is a variable name which is significant to twander and may
  100. # not be changed.
  101. #
  102. # 2) Follow the Tkinter conventions for key naming. This should
  103. # be pretty easy to do - just use the defaults below as a guide.
  104. # Do *not* quote the key names. Just use the <...> naming
  105. # convention as you see it below.
  106. #
  107. # 3) It is best if keyboard commands are all Control or Function keys.
  108. # If you assign anything to a simple key it may conflict with a user-
  109. # defined command. If you assign anything to a keypad/special
  110. # key it may conflict with that key's normal GUI behavior.
  111. #
  112. # 4) The Program Function Names (the left side of the assignments)
  113. # are RESERVED and may not be used as names for your own user-
  114. # defined variables elsewhere in the configuration file.
  115. #
  116. # 5) When you're done with your changes make sure to uncomment
  117. # them so twander can read them it and override its defaults.
  118. # Then either restart the program or reload the configuration
  119. # file to assign the new bindings.
  120. #
  121. # 6) Note that you CANNOT change the bindings for Mouse Buttons.
  122. # They are documented below for completeness sake, but any
  123. # attempt to change them will cause 'twander' to present
  124. # a warning message and ignore that line. If you attempt
  125. # to even just uncomment them below, you will get an error
  126. # because 'twander' thinks you are trying to redefine them.
  127.  
  128.  
  129. # General Program Commands
  130. #
  131. # CLRHIST = <Control-y> # Clear Command History
  132. # FONTDECR = <Control-bracketleft> # Decrease Font Size
  133. # FONTINCR = <Control-bracketright> # Increase Font Size
  134. # MOUSECTX = <ButtonRelease-3> # Invoke context menu
  135. # MOUSEDIR = <Shift-ButtonRelease-3> # Display the directory menu
  136. # MOUSEHIST = <Shift-Control-ButtonRelease-3> # Pop-up History Menu
  137. # MOUSESC = <Alt-Control-ButtonRelease-1> # Pop-up Shortcut Menu
  138. # MOUSESORT = <Alt-Shift-ButtonRelease-3> # Pop-up Sorting Menu
  139. # QUITPROG = <Control-q> # Quit the program
  140. # READCONF = <Control-r> # Re-read the configuration file
  141. # REFRESH = <Control-l> # Refresh screen
  142. # TOGAUTO = <Control-o> # Toggle Autorefreshing
  143. # TOGDETAIL = <Control-t> # Toggle detail view
  144. # TOGLENGTH = <Control-0> # Toggle length display between actual and normalized
  145. # TOGSYMDIR = <Control-asciitilde> # Toggle sorting of symbolic links pointing to directories
  146. # TOGSYMEXPAND = <Control-exclam> # Toggle symbolic link expansion
  147. # TOGSYMRESOLV = <Control-at> # Toggle absolute symbolic link resolution
  148. # TOGWIN32ALL = <Control-w> # Toggle win32all Features, If Available
  149. #
  150. # Directory Navigation
  151. #
  152. # CHANGEDIR = <Control-x> # Enter a new path
  153. # DIRHOME = <Control-h> # Goto $HOME
  154. # DIRBACK = <Control-b> # Goto previous directory
  155. # DIRROOT = <Control-j> # Goto root directory
  156. # DIRSTART = <Control-s> # Goto starting directory
  157. # DIRUP = <Control-u> # Go up one directory level
  158. # DRIVELIST = <Control-k> # On Win32, display Drive List View if possible
  159. # MOUSEBACK = <Control-Double-ButtonRelease-1> # Go back one directory with mouse
  160. # MOUSEUP = <Control-Double-ButtonRelease-3> # Go up one directory with mouse
  161. #
  162. # Selection Keys
  163. #
  164. # SELALL = <Control-comma> # Select all items
  165. # SELINV = <Control-i> # Select all items
  166. # SELNONE = <Control-period> # Unselect all items
  167. # SELNEXT = <Control-n> # Select next item
  168. # SELPREV = <Control-p> # Select previous item
  169. # SELEND = <Control-e> # Select bottom item
  170. # SELTOP = <Control-a> # Select top item
  171. #
  172. # Scrolling Commands
  173. #
  174. # PGDN = <Control-v> # Move page down
  175. # PGUP = <Control-c> # Move page up
  176. # PGRT = <Control-g> # Move page right
  177. # PGLFT = <Control-f> # Move page left
  178. #
  179. # Execute Commands
  180. #
  181. # RUNCMD = <Control-z> # Run arbitrary user command
  182. # SELKEY = <Return> # Select item w/keyboard
  183. # MOUSESEL = <Double-ButtonRelease-1> # Select item w/mouse
  184.  
  185. # Directory Shortcuts
  186.  
  187. # KDIRSC1 = <F1> # Go To Specified Directory
  188. # KDIRSC2 = <F2>
  189. # KDIRSC3 = <F3>
  190. # KDIRSC4 = <F4>
  191. # KDIRSC5 = <F5>
  192. # KDIRSC6 = <F6>
  193. # KDIRSC7 = <F7>
  194. # KDIRSC8 = <F8>
  195. # KDIRSC9 = <F9>
  196. # KDIRSC10 = <F10>
  197. # KDIRSC11 = <F11>
  198. # KDIRSC12 = <F12>
  199. # KDIRSCSET = <Control-8> # Override Selected Shortcut w/Current Directory
  200.  
  201. # Program Memories
  202.  
  203. # MEMCLR1 = <Control-F1> # Clear Individual Program Memory
  204. # MEMCLR2 = <Control-F2>
  205. # MEMCLR3 = <Control-F3>
  206. # MEMCLR4 = <Control-F4>
  207. # MEMCLR5 = <Control-F5>
  208. # MEMCLR6 = <Control-F6>
  209. # MEMCLR7 = <Control-F7>
  210. # MEMCLR8 = <Control-F8>
  211. # MEMCLR9 = <Control-F9>
  212. # MEMCLR10 = <Control-F10>
  213. # MEMCLR11 = <Control-F11>
  214. # MEMCLR12 = <Control-F12>
  215.  
  216. # MEMCLRALL = <Control-m> # Clear All Program Memories
  217.  
  218. # MEMSET1 = <Alt-F1> # Set Individual Program Memory
  219. # MEMSET2 = <Alt-F2>
  220. # MEMSET3 = <Alt-F3>
  221. # MEMSET4 = <Alt-F4>
  222. # MEMSET5 = <Alt-F5>
  223. # MEMSET6 = <Alt-F6>
  224. # MEMSET7 = <Alt-F7>
  225. # MEMSET8 = <Alt-F8>
  226. # MEMSET9 = <Alt-F9>
  227. # MEMSET10 = <Alt-F10>
  228. # MEMSET11 = <Alt-F11>
  229. # MEMSET12 = <Alt-F12>
  230.  
  231.  
  232. # Sorting Keys
  233.  
  234. # SORTBYNONE = <Shift-F10> # Select sorting parameters
  235. # SORTBYPERMS = <Shift-F1>
  236. # SORTBYLINKS = <Shift-F2>
  237. # SORTBYOWNER = <Shift-F3>
  238. # SORTBYGROUP = <Shift-F4>
  239. # SORTBYLENGTH = <Shift-F5>
  240. # SORTBYTIME = <Shift-F6>
  241. # SORTBYNAME = <Shift-F7>
  242. # SORTREV = <Shift-F11>
  243. # SORTSEP = <Shift-F12>
  244.  
  245. # Wildcard Features
  246.  
  247. # MOUSEWILDFILTER = <Alt-Control-ButtonRelease-2> # Pop-up Filter Wildcard Menu
  248. # MOUSEWILDSEL = <Alt-Control-ButtonRelease-3> # Pop-up Selection Wildcard Menu
  249. # FILTERWILD = <Control-equal> # Filter file list with wildcard
  250. # SELWILD = <Control-backslash> # Select using wildcards
  251. # TOGFILT = <Control-minus> # Toggle logical sense of wildcard filtering
  252.  
  253. # Hide Dotfiles
  254.  
  255. # TOGHIDEDOT = <Control-9> # Toggle hiding dotfiles
  256.  
  257.  
  258.  
  259. ##############################################################################
  260.  
  261.  
  262. #####
  263. # Directory Shortcut Statements
  264. #
  265. # Enter Any Valid Path To The Right Of The Equals Sign
  266. # To Associate A Function Key With That Directory Path
  267. #
  268. #####
  269.  
  270. # DIRSC1 = /path/to/a/directory/or/drive
  271. # DIRSC2 = /path/to/a/directory/or/drive
  272. # DIRSC3 = /path/to/a/directory/or/drive
  273. # DIRSC4 = /path/to/a/directory/or/drive
  274. # DIRSC5 = /path/to/a/directory/or/drive
  275. # DIRSC6 = /path/to/a/directory/or/drive
  276. # DIRSC7 = /path/to/a/directory/or/drive
  277. # DIRSC8 = /path/to/a/directory/or/drive
  278. # DIRSC9 = /path/to/a/directory/or/drive
  279. # DIRSC10 = /path/to/a/directory/or/drive
  280. # DIRSC11 = /path/to/a/directory/or/drive
  281. # DIRSC12 = /path/to/a/directory/or/drive
  282.  
  283.  
  284. ##############################################################################
  285.  
  286.  
  287. #####
  288. # Example 'twander' Configuration File
  289. #####
  290.  
  291. # To easily enable this example configuration, globally
  292. # replace the string: "#-# " with a null or blank string.
  293.  
  294. #-# # Associations allow you to "associate" a type of file
  295. #-# # with the program that handles it. A "type" is merely
  296. #-# # a string that uses Unix-style shell globbing to
  297. #-# # define which filenames are to be included.
  298. #-#
  299. #-# ASSOC *.txt vim [SELECTION]
  300. #-#
  301. #-# # The right-hand-side of an association statement can
  302. #-# # contain pretty much anything you can use in a command
  303. #-# # definition.
  304. #-#
  305. #-# ASSOC *.[Tt] {PROMPT:Do You Really Want To Edit This?} vim [SELECTION]
  306. #-#
  307. #-# # A special association for "default" operation is also
  308. #-# # supported. If the user clicks on a file type without
  309. #-# # a specific association, the default association (if any)
  310. #-# # will be applied.
  311. #-#
  312. #-# ASSOC * emacs [SELECTION]
  313. #-#
  314. #-#
  315. #-# # You can also *exclude* specific file types from ever
  316. #-# # being associated. This has higher precedence than
  317. #-# # than the association command does. So, if you place
  318. #-# # a file type on the exclusion list, even if you've
  319. #-# # defined an association for that type, it will never
  320. #-# # be applied. Exclusions consist of one or more lines
  321. #-# # in the following form:
  322. #-#
  323. #-# # ASSOC ! space-separated-list-of-file-types
  324. #-#
  325. #-# ASSOC ! *.pyo *.tx? *.r[az]
  326. #-#
  327. #-# # You can removed a previously defined association
  328. #-# # by leaving the right-hand-side of the statement
  329. #-# # blank. This is primarily useful within conditional
  330. #-# # blocks where you want the existence of an association
  331. #-# # for a particular file type to depend on some condition
  332. #-# # such as, for instance, the type of OS your're running.
  333. #-#
  334. #-# # This sequence first defines and then removes an
  335. #-# # association for text files:
  336. #-#
  337. #-# ASSOC *.txt MyFineEditor [SELECTION]
  338. #-# ASSOC *.txt
  339. #-#
  340. #-# # You can do this for any association statement.
  341. #-#
  342. #-# ASSOC *
  343. #-# ASSOC !
  344. #-#
  345. #-#
  346. #-# # Special variable(s) used below to trigger conditional logic
  347. #-#
  348. #-# # If you comment out or remove the following statement, the command
  349. #-# # associated with the = key (dd) disappears.
  350. #-#
  351. #-# POWERUSER = Anything-You-Want
  352. #-#
  353. #-#
  354. #-# # Override the default colors
  355. #-#
  356. #-# BCOLOR = beige
  357. #-# FCOLOR = black
  358. #-#
  359. #-# # We can set system options in a user-specific way
  360. #-# # by combining conditionals with environment variables
  361. #-#
  362. #-# .if [$USER] == root
  363. #-#
  364. #-# BCOLOR = red
  365. #-# FCOLOR = yellow
  366. #-#
  367. #-# .endif
  368. #-#
  369. #-# # We can also test for inequality in conditionals
  370. #-# # In this case, if we're not running as root,
  371. #-# # we'll override the help menu background color
  372. #-#
  373. #-#
  374. #-# .if [$USER]!= root
  375. #-# HBCOLOR = gray
  376. #-# .endif
  377. #-#
  378. #-# # User-defined variables make maintenance easier.
  379. #-# # Remember, that the variable name is case-sensitive.
  380. #-#
  381. #-# # We define some things in an OS-specific manner
  382. #-#
  383. #-#
  384. #-# # Definitions for Unix-like systems
  385. #-#
  386. #-#
  387. #-# .if [.OS] ==posix
  388. #-#
  389. #-# DELCMD = rm -i
  390. #-# DIRCMD = ls -al
  391. #-# EDITOR = [$EDITOR]
  392. #-# PAGER = [$PAGER]
  393. #-# QUOTE = '
  394. #-# SHELL = bash -c
  395. #-# TERMINAL = xterm -fn 10x20 -l -fb black -bg lightgreen
  396. #-# VSHELL = [XTERM] [SHELL]
  397. #-# XTERM = [TERMINAL] -e
  398. #-#
  399. #-# # We can nest conditionals too, for example ...
  400. #-#
  401. #-# GUI-Editor = Nope # Assume our editor is not GUI-aware
  402. #-#
  403. #-# .if [$EDITOR]== /usr/local/bin/emacs # But emacs is
  404. #-# GUI-Editor = Yup
  405. #-# .endif
  406. #-#
  407. #-# # Assign shortcuts for common Unix directories
  408. #-#
  409. #-# DIRSC1 = /etc
  410. #-# DIRSC10 = /usr/local/bin
  411. #-#
  412. #-# # Unix Wildcards
  413. #-#
  414. #-# WILDSELECT = \.gz # Items containing the string: .gz
  415. #-# WILDFILTER = rwx # Items containing the string: rwx
  416. #-#
  417. #-# # We can also have conditions which depend on whether a
  418. #-# # variable is defined or not - we don't care about its value
  419. #-#
  420. #-# .if [POWERUSER]
  421. #-# DD = [VSHELL] 'dd if={PROMPT:In File?} of={PROMPT:Out File?==>OutFile} | [$PAGER]'
  422. #-# .endif
  423. #-#
  424. #-# .endif
  425. #-#
  426. #-#
  427. #-# # Definitions for Win32 systems
  428. #-#
  429. #-# .if [.OS]==nt
  430. #-#
  431. #-# DELCMD = del /p
  432. #-# DIRCMD = dir
  433. #-# EDITOR = write
  434. #-# GUI-Editor = Yup
  435. #-# PAGER = more
  436. #-# SHELL =
  437. #-# QUOTE =
  438. #-# TERMINAL = cmd
  439. #-# VSHELL =
  440. #-# XTERM =
  441. #-#
  442. #-# # Assign shortcuts for common Win32 directories
  443. #-#
  444. #-# DIRSC1 = C:\Documents and Settings
  445. #-# DIRSC10 = C:\Program Files
  446. #-#
  447. #-# # Win32 Wildcards
  448. #-#
  449. #-# WILDSELECT = \.txt # Items containing the string: .txt
  450. #-# WILDSELECT = \.exe # Items containing the string: .exe
  451. #-# WILDFILTER = SYSTEM # Items containing the string: SYSTEM
  452. #-#
  453. #-# .endif
  454. #-#
  455. #-#
  456. #-#
  457. #-# # Command definitions are in the general format:
  458. #-# #
  459. #-# # command-key command-name command-string
  460. #-# #
  461. #-# # command-keys are case sensitive. Any single
  462. #-# # character which can be typed from the keyboard can
  463. #-# # be used as a command key, *except* the '#' character
  464. #-# # (which is always seen as a comment delimiter).
  465. #-#
  466. #-#
  467. #-# # Some commands run anywhere
  468. #-#
  469. #-# a anycmd [VSHELL] {PROMPT:Enter Command:}
  470. #-# d delete [XTERM] [DELCMD] [SELECTIONS]
  471. #-# l dir-list [VSHELL] [QUOTE] [DIRCMD] | [$PAGER] [QUOTE]
  472. #-# T new-terminal [TERMINAL]
  473. #-# V view [XTERM] [PAGER] [DSELECTIONS]
  474. #-#
  475. #-#
  476. #-# # Some commands are only defined under some conditions
  477. #-# # In the following example, variable DD is only defined
  478. #-# # for posix systems AND if the POWERUSER variable has
  479. #-# # been set - this is all defined in the posix-specific
  480. #-# # section above.
  481. #-#
  482. #-# .if [DD]
  483. #-#
  484. #-# = dd [DD]
  485. #-#
  486. #-# .endif
  487. #-#
  488. #-#
  489. #-#
  490. #-# # Some commands are condition-specific
  491. #-#
  492. #-# .if [GUI-Editor]== Yup
  493. #-# e edit [EDITOR] [SELECTIONS]
  494. #-# .endif
  495. #-#
  496. #-#
  497. #-# .if [GUI-Editor] !=Yup
  498. #-# e edit [XTERM] [EDITOR] [DSELECTIONS]
  499. #-# .endif
  500. #-#
  501. #-#
  502.  
  503. #-# # Execution variables allow you to run a *program* and have its
  504. #-# # text output assigned to a 'twander' configuration variable.
  505. #-# # Note that they are delimited with backticks:
  506. #-#
  507. #-# D showdate [VSHELL] 'echo [`date`] | [PAGER]'
  508. #-#
  509. #-#
  510. #-# # If the execution variable you want to run produces
  511. #-# # multiple lines of text, you may need to quote it
  512. #-# # to get things to work properly:
  513. #-#
  514. #-# D showfiles [VSHELL] 'echo "[`ls`]" | [PAGER]'
  515. #-#
  516. #-#
  517. #-# # You can also force 'twander' to strip the newlines out of
  518. #-# # multiline output from an execution variable by inserting
  519. #-# # a '-' at the beginning of the command name:
  520. #-#
  521. #-# D showfiles [VSHELL] 'echo "[`-ls`]" | [PAGER]'
  522. #-#
  523. #-# # Execution variables are evaluated at the time the
  524. #-# # they are actually *used* in a command invocation,
  525. #-# # NOT when the configuration file is being read in.
  526. #-# # This is true even if you first assign them to
  527. #-# # a variable:
  528. #-#
  529. #-# CURRENTDATE = [`date`]
  530. #-# D showcurrentdate [VSHELL] 'echo [CURRENTDATE] | [PAGER]'
  531. #-#
  532. #-# # Each time 'showcurrentdate' gets run, the CURRENTDATE
  533. #-# # variable will be set to the output of the 'date' command.
  534. #-# # This is unlike most variables used in 'twander' that are
  535. #-# # evaluated once when the configuration file is first read in.
  536.  
  537. #-# # End of sample twander configuration