8. Configuration files explained

Abstract

As pointed above, NsCDE has a number of configuration files. Approximately 75% of them are the FVWM configurations, where a line between using FVWM directives for it's core and modular functionality as a desktop-building material and tool, and merely configuring aspects for end use are wastly blurred and cannot be really distinguished and separated in that strict categories. This system of configurations is arranged in some logical and consistent way. For example, keyboard shortcuts in Keybindings.<keybtype>, FvwmBacker configuration in Backer.fvwmconf, (generated) colorsets in Colorset.fvwmgen etc.

All this configurations are included from the Main.fvwmconf. This is the starting FVWM configuration which sets core options and safe defaults, and reads the rest of the configuration files which are included there. It defines StartFunction which starts all additional modules and calls important things during start or restart of the Window Manager. System Wide configuration files are located in $NSCDE_DATADIR/fvwm and $NSCDE_DATADIR/defaults, while user local hooks or user complete overrides are stored in $FVWM_USERDIR.

This is default list of system-wide configurations:

8.1. FrontPanel.actions

A non-FVWM file. Lines in this file are default actions and icons for Front Panel. This file is parsed by the fpexec and fpseticon shell script tools. All or individual entries from this file can be overridden by creating $FVWM_USERDIR/FrontPanel.actions file. This is a CSV-like file (comma is a field separator), and it defines buttons of the Front Panel, their actions and icons.

File format is:

  • Button Number (Btn1, Btn2, BtnN ...)

  • Icon path (FVWM relative from ImagePath)

  • Mouse Button (3 mouse buttons for 3 different actions if needed)

  • Program executable to check for or NOCHK for check avoidance

  • Actions (commands) with options and arguments to the end of the line

If Icon Path field is __APPLET__ for mouse button 1, then in the check/nocheck field an applet program may be defined for FvwmButtons based Front Panel to be swallowed instead of an icon. In this field, direct FvwmButtons(1) syntax must be manually written with this exceptions:

  • Comma (,) must be replaced with a pipe (|)

  • Double quotes (") must be escaped by the two backslashed (\\)

If the swallowed applet has it's own action on mouse buttons clicks, then declaration of the applet must be prefixed with a ActionIgnoresClientWindow. In this case, last filed with the actions can be "Nop" because Front Panel will not accept this clicks (it may accept them if possible transparent area around applet exists and is clicked). If the applet is not clickable, a standard FVWM Action or command can be put in the last field to make a click on the applet useful.

Here is the example of the custom swallowed applet. This one was initially created for the Window Maker window manager:


   Btn10,__APPLET__,M1,
   "ActionIgnoresClientWindow| Swallow (Respawn) \\"WmstickynotesApplet\\" 
   \\"Exec exec wmstickynotes\\"",Nop

   Btn10,,M2,FVWM,Nop

   Btn10,,M3,FVWM,f_FrontPanelPropsMenu 10 APPLET

Figure 59. Visual: resulting applet on the Front Panel

Visual: resulting applet on the Front Panel


Here is the example of the custom swallowed applet which does not accept mouse clicks:


   Btn10,__APPLET__,M1,
   "Swallow (Respawn) \\"MyFavoriteApplet\\" 
   \\"Exec exec mfa -s\\"",Exec exec vlc

   Btn10,,M2,FVWM,Nop

   Btn10,,M3,FVWM,f_FrontPanelPropsMenu 10 VLC

This example is replacing standard Front Panel Clock with Solaris Globe Icon based Front Panel clock, using the same pclock program as standard one, but with a slightly different options:


   Btn1,__APPLET__,M1,"Swallow (Respawn) \\"pclock\\"
   \\"Exec exec $NSCDE_TOOLSDIR/$(uname -s)_$(uname -m)/fpclock
   -H red -S white --hands-width=4
   --hour-hand-length=15 --minute-hand-length=20
   --second-hand-length=22 -w 
   -B $NSCDE_DATADIR/icons/NsCDE/SDtEarth.l.xpm\\",Exec exec firefox

   Btn1,,M2,FVWM,Nop

   Btn1,,M3,FVWM,f_FrontPanelPropsMenu 1 Browser

Notice that button definition for mouse M1 (first line) is split in 3 lines in this examples, but in the FrontPanel.actions must be written as one line.

After editing this file (system-wide or user's) nothing needs to be reloaded because file is read from the f_FrontPanelAction function on every click on every icon on the Front Panel. There is no GUI tool for fully managing this file yet, but currently, Copy to Main Panel action from the submenu will edit FrontPanel.actions and put choosen entry there, binding it to the choosen button. Options Move Button Left and Move Button Right from the contextual menu of icons on the main panel will push icons and their subpanels (if enabled) left or right, implicitly editing FrontPanel.actions in that way.