### -------------------------------------------------------------------------
###
###  AppBar (TkDesk Configuration File)
###
###  This file defines the contents and appearance of the Application Bar,
###  which can be opened from the "TkDesk" menu.
###
### -------------------------------------------------------------------------

### Max. number of buttons in one column resp. row of the application bar
### (when layout is vertical resp. horizontal):
###
set tkdesk(appbar,max) 19

### Definition of the Application Bar (AB):
### The Application Bar is defined by the elements of a Tcl list.
### (In the following I try to explain its structure, although it will
### probably best to just have a look at the example definition below.)
### Each element of the list is again a Tcl list, whose first element
### is the name of the pixmap to use (the path defaults to the "images"
### directory in TkDesk library path) while the second is another Tcl list
### defining the popup menu associated with that button. This menu list
### contains usually a set of 2-element lists. The first element always
### gives the label of the menu entry, while the second element contains
### a Tcl script to execute when this menu entry is invoked. One label has
### a special meaning: If the label of an entry is "dd", the respective
### action will be executed when files are dropped on the button (their
### names can be accessed via %A in the action specification).
### One-element lists inside the menu list are handled as follows:
### {-} adds a separator to the menu. If the list is one of {history:...}
### or {config}, TkDesk will insert the corresponding menu at that place.
### Otherwise the element is treated as a (disabled) menu entry, and can
### be used for inserting "headlines." Cascaded menus are also possible,
### have a look at the example below to see how they are to be defined.
### A single click with the left mouse button always invokes the first
### menu entry of the corresponding popup menu. The menu gets posted when
### the right mouse button is pressed over an AB button.
###
### TkDesk commands that can be used in the list definition:
### (Only the most common ones are listed here. For a complete overview
### and a detailed explanation refer to the User's Guide.)
###
### dsk_exec cmd ...   : Executes shell command cmd in background.
### dsk_view cmd ...   : Executes cmd, displays output in Editor window.
### dsk_open_dir path  : Opens a new file list for directory path.
### dsk_edit file      : Edits file.
### dsk_du path        : Displays disk usage of directory path.
### dsk_periodic cmd seconds : Executes cmd every x seconds.
### dsk_confirm text script  : Executes script when confirmation was positive.
### dsk_sound id       : Plays sound id (defined in config-file Sounds). 
### dsk_cbhelp file regexp   : Invokes TkDesk's help system on file.
### dsk_ask_exec       : Asks for a command to execute.
### dsk_ask_dir        : Asks for a directory to open.
### dsk_save_config    : Saves window layout, history, bookmarks etc.
### dsk_exit ?ask?     : Quits TkDesk. "ask" may be one 1 or 0.
###
### Abbreviations that will be replaced with file names etc.:
###
### %s : Full pathname of the first selected file.
### %f : Its filename only.
### %d : Its directory only.
### %A : List containing full pathnames of all selected resp. dropped files.
### %D : Directory of last "ative" viewer.
###
### The very first Button provides access to a few functions of TkDesk,
### like history menus, configuration menu etc. Its labels are mostly
### "internally reserved" keywords.
### The second button is only defined by the magic word "date" which inserts
### TkDesk's date display at that place into the AB.
###
set tkdesk(appbar) {
    {{comet.xpm} {
	{{Execute...} {dsk_ask_exec}}
	{{Open directory...} {dsk_ask_dir}}
	{{Home Directory} {dsk_open_dir ~}}
	{{Find Files...} {dsk_find_files}}
	{{Help...} {dsk_cbhelp $tkdesk(library)/doc/Guide howto}}
	{-}
	{bookmarks}
	{history:files}
	{history:dirs}
	{-}
	{{Application Bar}
	  {{Edit AppBar} {dsk_edit_configs AppBar}}
	  {{Reload AppBar} {dsk_reread_config AppBar}}
	  {-}
	  {{Layout}
	    {{Vertical} {dsk_appbar layout vertical}}
	    {{Horizontal } {dsk_appbar layout horizontal}}
	  }
	  {{Move...} {dsk_appbar move}}
	  {{Raise} {dsk_appbar raise}}
	  {{Hide} {dsk_appbar close}}
	}
	{config}
	{{dd} {dsk_openall %A}}
    }}
    
    date
    
    {{xterm32.xpm} {
	{{XTerm } {dsk_exec xterm -T "XTerm" -sb}}
	{{rxvt } {dsk_exec rxvt}}
	{{Processes } {dsk_periodic "ps -xw" 60}}
    }}
    
    {{checklist.xpm} {
    	{{.fvwmrc} {dsk_edit ~/.fvwmrc}}
    	{{.xinitrc} {dsk_edit ~/.xinitrc}}
    	{{.profile} {dsk_edit ~/.profile}}
    	{{.Xresources}
    	    {{Edit} {dsk_edit ~/.Xresources}}
    	    {{Reread } {dsk_exec xrdb ~/.Xresources}}
    	}
    }}
    
    {{orbit.xpm} {
    	{{Screen Saver} {dsk_exec xlock -nolock -mode flame}}
    	{{Blank Screen} {dsk_exec xlock -nolock -mode blank -delay 100000}}
    	{{Random} {dsk_exec xlock -nolock -mode random}}
	{-}
	{{Background}
	    {{Green} {dsk_exec xsetroot -solid seagreen}}
	    {{Blue} {dsk_exec xsetroot -solid steelblue}}
	    {{Gray} {dsk_exec xsetroot -solid gray}}
	}
    }}
    
    {{book_edit.xpm} {
	{{New File} {dsk_edit}}
	{{XEmacs} {dsk_exec xemacs}}
	{{Clipboard} {dsk_exec xclipboard}}
	{{dd} {dsk_edit %A}}
    }}

    {{paint.xpm} {
    	{{XPaint} {dsk_exec xpaint}}
    	{{Pixmap  } {dsk_exec pixmap}}
    	{{Bitmap  } {dsk_exec bitmap}}
    	{{XV} {dsk_exec xv -8}}
    	{{dd} {dsk_exec xv -8 %A}}
    }}
    
    {{earth2.xpm} {
    	{{Netscape} {dsk_exec netscape -ncols 64}}
	{{Elm} {dsk_exec xterm -e elm}}
    }}
	
    {{door_run.xpm} {
	{{Quit TkDesk   } {dsk_exit 1}}
    }}    
}









