U n i x T r e e . o r g      -     tips&tricks 


 
home
 
details
 
history
 
download
 
tips&tricks
 
guided tour
 
links
 
what's new
 
 
 
 
Partner site:
 
XTree Fan Page

 

 

Miscellaneous Tips and Tricks

Hidden Hotkeys List

Useful Applications Menu entries


 
 
 
 
 
 

Miscellaneous Tips and Tricks


 
  • Run UnixTree under the console (*not* in X !), don't hit any key and wait a few minutes, and see what's happening ... have fun !
     
     
  • As expected, a "-help" (or "-h", or "--help", or "-?") command line switch lists available command line options, while an (unexpected.. ;-) "-helpall" (or "--helpall", or "-??") lists all the "advanced" command line options !
     
     
  • The 'A'ttributes-'D'ate and the ALT-'T'ag-'D'ate (sub-)menus accept, in addition to the "standard" date entry syntax, as vaild entries also the following keywords:

    - "monday", "tuesday" ... etc., to "sunday"
    - "next" and "last" (as prefix to weekdays)
    - "yesterday", "today", and "tomorrow"
    Thus, a "last monday" string, for example, refers to the previous monday, etc.
    (while, obviously, tagging files with a date > "tomorrow" should be a no-op... :-).
     
    Also, all these names can be abbreviated to 3 characters:

    - "yes" is equivalent to "yesterday"
    - "las mon" is equivalent to "last monday"
    - etc...

     
  • According to the man-page, custom key definitions can be defined in *.trm files (preferably in $XTHOME/user.trm) with an expression like this:
    "key-name = <encoded sequence>".
    The encoded sequence value is an expression looking like this: "\e[18~", for example.
    Now, here's an easy way to determine what's the respective "encoded sequence" expression for a particular key on your system:
    Run the utility program "dispkeys" supplied with any UnixTree archive package.
    If this little helper program is invoked without any arguments, it simply displays the key's name on pressing it, for example, hitting "F7" will display:

    key: F7
    If you run the program with the "-d" command line option, it will now display the key's "encoded sequence" instead, in our example for the F7 key an output like this:

    key: escape
    key: [
    key: 1
    key: 8
    key: ~
    So now you know that a definition line for the "F7" key in a *.trm file will read as follows:

    F7 = "\e[18~"
    Basically, "dispkeys" normally interprets key strokes, while the "-d" option just dumps out raw characters.
    Note that a "CTRL-D" always ends the program.
     
     
  • Emulating the XTree 'B'ranch command:
     
    There are very few functions of the original XTree missing in UnixTree, probably the most missed one is the 'B'ranch command to view all the files under the current directory branch.
     
    But there is a way to emulate the branch view; it requires some more keystrokes, but works perfectly.
     
    The trick is to use the ALT-(New)-'N'ode command. When you are at your desired directory, hit ALT-'N'(ode) (or F4 and then N) and then again 'N'(ew node). UnixTree then prompts: "Enter node to log:" and there is a hidden hotkey, that is F2, once hitting it, it points to the current directory. Just confirm then with the enter-key twice. Now here you have been logging to a new "node", which solely consits of the directory you were pointing to before. Now just log the whole diretory by hitting "*" (asterisk) and then invoke the 'S'howall command - and voila: Now you have all the files under the specified directory/branch!
     
     

 
 
 
 

Hidden Hotkeys List


 
i.     Directory/File commands
ii.    Directory commands
iii.   File commands
iii.a  Archive node File commands
iv.    Split screen mode (F8)
v.     Input prompts
vi.    History list window
vii.   File View Window
viii.  Autoview (F7) mode
ix.    Application menu
x.     JFC (file compare) window

 
Hotkey
Function
As of version
(if applicable)
 
 
 
 
i. Directory/File commands

 
 
 
[Arrow keys]
Move the cursor from one item to another
 
SPACE
Acts like down arrow when scrolling in a window
 
PageDown
Moves the cursor down to the bottom of the display
or to the top of the next page
 
PageUp
Moves the cursor up to the top of the display
or to the top of the previous page
 
Home
Moves the cursor to the first item in a list
 
End
Moves the cursor to the last item in a list
 
"$"
Displays memory usage
 
"@"
Redraws the screen (in case something messed it up)
 
"#"
Displays version information
 
"%"
Prints the screen to the default printer
 
"!"
Takes you to a subshell in the current directory
(return to UnixTree with "exit")
 
"&"
Create a "clone" (i.e. another instance) of the program running in another window (only available if "xt" has been run with the "+w" command line option)
3.0.0
Kfunc+"?"
 
(See |note on the
 "Kfunc"-key below)
Brings up an "About" window
 
Kfunc+"!"
Shell escape (home directory)
 
Kfunc+"*"
Immediate bail (exit) after resetting screen
 
Kfunc+"("
Turn on keyboard debugging (to "keys.log" file)
 
Kfunc+")"
Turn off keyboard debugging (to "keys.log" file)
 
Kfunc+"<"
Turn on keyboard debugging (to "keys.txt" file)
3.0.0
Kfunc+">"
Turn off keyboard debugging (to "keys.txt" file)
3.0.0
Kfunc+"["
Turn on screen debugging (to "screen.log" file)
3.0.0
Kfunc+"]"
Turn off screen debugging (to "screen.log" file)
3.0.0
Kfunc+"{"
Turn on screen debugging (to "screen.txt" file)
3.0.0
Kfunc+"}"
Turn off screen debugging (to "screen.txt" file)
3.0.0
Kfunc+[(Numrow-)1...0]
Same as [F1...F10]
 
Kfunc+"-"
Same as F11
 
Kfunc+"+"
Same as F12
 
Kfunc+"u",
 "l", "d", "r"
Same as Arrow up, left, down, right
 
Kfunc+"h",
 "e", "p", "n"
Same as Home, End, PageUp, PageDown
 
Kfunc+"b"
Same as Backspace
 
Kfunc+"x"
Same as Escape
(the original vt100 keyboards didn't have an ESC !)
 
Kfunc+"w"
Refresh the screen
 
Kfunc+"q"
Print screen
 
Kfunc+"k"
Simulate caps-lock
 
Kfunc+"m"
Simulate num-lock
 
Kfunc+"s"
Simulate SHIFT
 
Kfunc+"a"
Simulate ALT
 
Kfunc+"c"
Simulate TAG
 
SHIFT+(F3 to F12)
Toggles directory display scroll mode
 
 
 
 
 
ii. Directory commands
 
 
 
 
"\"
Treespec, jumps to the directory entered (similar to XTreeGold). In contrast to the Directory "Goto" command (see below) this also works if the specified directory is not yet logged.
Hint for German keyboards: You have to hit just "AltGr" first once, then again in combination with the "ß" key
3.0.3
"/"
Directory "Goto" command, jumps to the next *logged* (sub-)directory beginning with the given characters
2.2.6
F9
Enter the application menu
 
"+"
Logs an unlogged directory, or relog an already logged directory
 
"*"
Logs all unlogged subdirectories recursively or relogs recursively all already logged subdirectories
 
"-"
Unlogs a directory and all subdirectories
 
"<" or ","
Switch to the previous logged node
 
">" or "."
Switch to the next logged node
 
Left arrow
Moves to the parent of the current directory, stopping when the parent is the first-level subdirectory
 
Right arrow
Moves down the current path to the last subdirectory in that path
 
Tab
Moves down to the next directory on the same level as the current directory, within the same branch of the tree

Backspace
Moves up to the next directory on the same level as the current directory, within the same branch of the tree
 
"~"
Toggles directory display scroll mode
 
Gray "+"
Gray "-"
Change font size
3.0.2
X11-mode (xtx)
 
 
 
 
iii. File commands
 
 
 
 
ALT+F11
 
(See |note on the
 "ALT"-key below)
Converts a text file from DOS to UNIX; i.e. removes CRs
 
ALT+F12
Converts a text file from UNIX to DOS; i.e. adds CRs
 
"H"
Invoke hex editor on current file
2.3.4
"/"
Same as 'G'oto
2.3.3
 
 
 
 
iii.a Archive node File commands
 
 
 
 
"C"
Copy/extract current file (same as 'E'xtract)
2.3.3
"/"
Same as 'G'oto
2.3.3
 
 
 
 
iv. Split screen mode (F8)
 
 
 
 
Tab
Toggles the active window
 
"?"
After an initial "?"-keypress, another "?"-hit quits the (opposite side) info window and returns to the previous (split screen) state
2.2.8
 
 
 
 
v. Input prompts
 
 
 
 
Up arrow
Invokes the history list selection window
2.3.0
Down arrow
Erase the line and place the cursor at the beginning
 
Left arrow
Move the curser one position to the left
 
Right arrow
Move the curser one position to the right
 
Home
Move the curser to the beginning of a line
 
End
Move the curser to the end of a line
 
Delete
Deletes the character under the cursor
 
Backspace
Deletes the character to the left of the cursor
 
Insert
Toggles insert mode on or off
 
F3
Paste the most recent used response to the prompt
2.3.4
F4
If a filename is expected (in copy/move/rename/link/... commands):
Paste the source filename to the prompt for editing
 
If a username is expected in the FTP node logging dialog:
Paste the login-name to the prompt
2.3.4
 
 
 
 
vi. History list window
 
 
 
 
Delete
Deletes current entry from the list
2.3.0
 
 
 
 
vi. File View Window
 
 
 
 
"V"
Same as ESCAPE (Quit file view) - except when viewing (symbol) links, then you will rather view the orginal file's contents after hitting "V" again (while the first thing you see is the link's target)! However, yet another "V"-press then finally will really quit the file view.
 
Backspace
Same as ESCAPE (Quit file view)
 
Return
Same as ESCAPE (Quit file view)
2.2.8
"Q"
Same as ESCAPE (Quit file view)
2.3.3
"B"
Same as "S" (search for text)
 
"Z"
Toggles between 8-space tabs (the default) and 4-space tabs (in ASCII mode)
 
"/"
Search next (Same as F10)
2.2.6
"."
Search previous (Same as F9)
2.2.6
Up arrow
Move display up 1 line
 
Down arrow
Move display down 1 line
 
PageDown
Moves display down one screenful (a.k.a. "page")
 
PageUp
Moves display up one screenful (a.k.a. "page")
 
Home
Jumps to the beginning of the file
 
End
Jumps to the end of the file
 
 
 
 
 
viii. Autoview (F7) mode
 
 
 
 
Right arrow
Toggle the arrow keys and PageUp and PageDown to be active for the right handed view file window
 
Left arrow
Toggle the arrow keys and PageUp and PageDown to be active for the left handed file list window
 
"Z"
Toggles between 8-space tabs (the default) and 4-space tabs (in ASCII mode)
 
F7
Quit autoview mode
 
 
 
 

ix. Application menu

 
 
 
"T"
"Graphics 'T'oggle", i.e. toggle the display of submenu line drawing characters on or off
 
"-"
Hides ("unlogs") this particular submenu
 
"+"
Shows ("logs") this particular submenu, if hidden
 
"*"
Shows ("logs") all submenus below, if hidden
 
 
 
 

x. JFC (file compare) window

 
 
 
"+"
Next difference (same as "N")
2.3.2
"-"
Previous difference (same as "P")
2.3.2
"Z"
Toggles between 8-space tabs (the default) and 4-space tabs (in ASCII mode)
2.3.2
Left arrow
Shift line display 1 character to the left
2.3.2
Right arrow
Shift line display 1 character to the right
2.3.2
Up arrow
Move display up 1 line
2.3.2
Down arrow
Move display down 1 line
2.3.2
PageDown
Moves display down one screenful (a.k.a. "page")
2.3.2
PageUp
Moves display up one screenful (a.k.a. "page")
2.3.2
Home
Jumps to the beginning of the file(s)
2.3.2
End
Jumps to the end of the file(s)
2.3.2
Explanations/abbreviations:
 
"Kfunc"
 
This key is mapped, by default to CTRL+"]", but can be defined as you like with a line like this:
  Kfunc = "[key]"
in your $XTHOME/user.trm file.
For details, please refer to the defining custom key definitions tip above.
"TAG"
 
This is the equivalent of the XTree "CTRL"-key, and is mapped by default to the SHIFT- and the F3-key. It's name is derived from the operations on tagges files which are accessed in this menu/mode.
You can define any other *additional* key for it by adding a line like this:
  Kctrl = "[key]"
in your $XTHOME/user.trm file.
For details, please refer to the defining custom key definitions tip above.
"ALT"
 
Under X11-mode (xtx binary) this is the ALT-key itself (as well as F4), while under console-mode by default only the F4-key provides the "ALT"-function(s).
You can define any other *additional* key by adding a line like this:
  Kalt = "[key]"
in your $XTHOME/user.trm file.
For details, please refer to the defining custom key definitions tip above.
"Numrow"
 
Means the number keys only from the top keyboard row
"Gray"
 
Means the keys only from the right-hand numeric keypad part

 
 
 
 
 
 

Useful Applications Menu entries


 

The UnixTree "Applications Menu" (accessed by key F9) is a flexible way to provide custom function extensions. It enable you to combine the power of your Unix shell with the user interface of UnixTree and its ability to work on a single file as well as on a selection of "tagged" files. You can even assign an entry to specific users, groups, login-tty, terminals, and time schedules!

In fact, the Application Menu in combination with 'O'pen file command turns UnixTree into a fully qualified desktop shell utility, being able to handle any kinds of files and applications!

To configure your very own Applications Menu, it's best to copy the sample "xt.mmu" file to your user's home UnixTree directory ($XTHOME, by default this is "~/.xt") and then edit it to your needs.

To prompt you to adapt and extend the examples for your personal deployment, the table below now lists a number of ideas of useful functions; the first row gives the respective literal xt.mnu entry line (with a rather self-explanatory menu title to describe the funtion), and the second row just adds, some comments and hints.

Note that there are available theses three variables:
$F - the current file
$T - all the tagges files currently shown
$D - the current directory


 
  • EDITOR:Edit all tagged files:*:*:*:*:*:vi $D/$T
     
    Under X11 you can also use, for example, gvim (or any other editor, OK...), this is extremly helpful when you selected tagged files across several nodes; but don't forget to go to the "TAG-'S'howall tagged files" mode first in the latter case!
     
     
  • DEVICES:Unmount/Eject CDROM:*:*:*:*:*:umount /cdrom && eject
     
    Seems obvious, eh? Uses eject
     
     
  • IMAGES:gqview on current directory:*:*:*:*:*:gqview $D &
     
    GQview is one of the most suitable image viewers for this purpose, IMHO
     
     
  • DIRECTORY:New xterm on curr dir:*:*:*:*:*:xterm &
     
    Note this one works without argument!
     
     
  • FILES:Untargz & delete archive:*:*:*:*:*:dialog --yesno "Attention\: This command will delete the archive file after unpacking it ! Do you really want to continue ?" 7 42 && tar -xvzf $F && rm $F
     
    Requires dialog; don't know how to live without this function any more...
     
     
  • FILES:Decrypt and view:*:*:*:*:*:xterm -e 'gpg --decrypt $F | xless' &
     
    Since it is a very good idea to protect sensible data files on your disk with an encryption tool suchs as gpg
     
     
  • DOCS:Merge tagged ps files to 1 pdf:*:*:*:*:*:gs -q -dNOPAUSE -sDEVICE=pswrite -sOutputFile=- $D/$T -c quit | ps2pdf - $D/mergedfile.pdf
     
    There are so much postscript files around, and this line makes them much more convenient to handle and saves a lot of disk space, by the way
     
     
  • DOCS:Merge tagged pnm files to 1 pdf:*:*:*:*:*:ls $T | xargs -n1 -i pnmtops {} | ps2pdf - scanfile.pdf
     
    If the command can only take one argument at a time, use xargs, here to merge a number of (scanner generated) pnm files into a single pdf one
     
     
  • VIEW:AntiWord/gv:*:*:*:*:*:antiword -p a4 $F | gv - &
     
    It is reported, that there are people around, who send you such files generated by some scary proprietary word processor program... - and now this is a nice way to conveniently view these files with help of antiword and gv
     
     
  • VIEW:Exif tags:*:*:*:*:*:exiftags -iv $F | xless -geometry 50x50 &
     
    A nice little function to view your digital camera image properties with exiftags
     
     
  • VIEWHTML:Firefox:*:*:*:*:*:firefox file\://localhost$D/$F &
     
    Again, very much obvious, I think
     
     
  • UNIXTREE:Edit appmenu file:*:*:*:*:*:vi ~/.xt/xt.mnu
     
    And of course you can use the Application Menu also to edit the Application Menu (file)!
     
     
  • More to come...

 
 
 
 
 

|Up to_top|


This page by Mathias Winkler - - Last updated 01-30-22
 
XTree and XTreeGold are registered trademarks of Symantec Inc. - Unix is a registered trademark of 'The Open Group'
Windows 95/98/NT are registered trademarks of Microsoft Corp. - Other brands and products are trademarks of their respective holders