Desktop environment based on Fvwm

ENVIRONMENT SPECIFICATIONS

Global Variables

There are some Fvwm-Nightshade specific variables. Valid in the shell and Fvwm namespace:

FVWM_USERDIR

It holds the user directory ~/.fvwm-nightshade.

FNS_SYSTEMDIR

It contains the system path to the shared files of Fvwm-Nightshade - /usr/local/share/fvwm-nightshade or /usr/share/fvwm-nightshade.

FNS_INITFILE

It holds the path to the pre config fns-init.

FNS_DEBUG

If you want to raise the message output of Fvwm-Nightshade into ~/.xsession-errors set it to 1. Default is 0.

$[MenuIconSize]

It holds the used menu icon size set with fvwm-menu-desktop2-config to adapt menu icons on the fly.

There are also some variables in the Fvwm-Nightshade namespace defined in the system config and .settings file.

config

$[infostore.wallpaper_dir]

The wallpaper directory located in $[FVWM_USERDIR]/wallpapers.

$[infostore.fvwm_wallpaper]

The current wallpaper located in $[FVWM_USERDIR]/.wallpaper.

$[infostore.ratio]

The screen ratio used for layout, panel, pager calculations.

$[infostore.hratio]

The height ratio used for layout, panel, pager calculations.

$[infostore.wratio]

The width ratio used for layout, panel, pager calculations.

settings

$[infostore.used_theme]

The actual theme. Changed dynamically via FuncChangeDecor.

$[SplashOn]

Run Banner at startup.

$[infostore.used_banner]

Banner image for FvwmBanner.

$[infostore.used_font]

Default used font for all Fvwm parts.

$[infostore.fontsize]

Default font size for all Fvwm parts.

$[infostore.used_layout]

The actual layout.

$[infostore.x_desks]

The actual desktop count X.

$[infostore.y_desks]

The actual desktop count Y.

$[infostore.used_menutint]

The actual menu tint level.

$[use_composite]

Use composite manager.

$[infostore.comp_command]

Composite manager command.

$[infostore.used_windowtransparency]

The actual (inactive) window transparency level (used by transset).

$[infostore.used_windowopacity]

The actual (active) window opacity level (used by transset).

$[infostore.DesktopIconsOn]

Use Icons on desktop.

$[infostore.DesktopScrollOn]

Activate page scrolling.

$[infostore.PcmanFmStatus]

State of pcmanfm.

$[infostore.additional_wp_dirs]

Additional wallpaper directories.

$[infostore.default_terminal]

The default used terminal program.

$[infostore.default_editor]

The default used editor.

$[infostore.default_browser]

The default used browser.

$[infostore.default_transset]

The default used transset program.

DEBUGING

If you want to debug something there are some functions available you can use to get output in ~/.xsession-errors:

FuncPrintDbgMsg <string or value>

This prints debug message but only if you have set FNS_DEBUG to 1 in <system>/share/fvwm-nightshade/fns-init.

FuncPrintMsg <name> <string or value>

This function prints normal messages. Yo can use it for normal messages.

THEME CREATION

A theme consists of the following parts either in <system>/share/fvwm-nightshade/themes/<name>/ or <user>/themes/<name>/:

colorsets

Colorsets of decorations, menus, modules etc.

decor

Styles of titlebar, buttons, menus and theme related mouse bindings.

images

optional folder for button images (SVG).

If you want to build a new theme create in <user>/themes/ a theme directory with it’s name and copy the colorset template from <system>/share/docs/fvwm-nightshade/templates into the directory.

Two different decors exist - vector based (Clean theme) and image based (Air, Ambiance, etc). Copy one of these decor files into your theme directory.

If you want to build an image related theme create also an "images" folder for the button images.

Important

All image related themes are SVG themes! You can use bitmaps, but than you have problems with the button scaling! Also bear in mind If you want to send us an image related theme only SVG themes will be accepted.

Now you can adapt the files for your needs. The theme appears automatically in the menu

Configuration -> Fvwm-Nightshade -> Decoration -> Decors

and can be tested by clicking on the name easily.

LAYOUT CREATION

Layouts are a summary of different parts of modules like FvwmPager, FvwmButtons or FvwmIconMan and applets from e.g. conky.

The main part is the layout file where the positions, calculations, key bindings and module loadings are done. This can be very tricky and the only thing we can say is - look into the Horizontal, Vertical or G2like layout to get an overview

Generally the structure is as follow:

  1. You have to thought about the positioning of your elements and their dependencies to each other.

  2. You must define your working area (maximized window) and the Iconbox for your iconified windows.

  3. Now the "Load" part follows to initialize your modules with the calculated positioning values.

  4. The next step is to include your modules in the Start Function that your theme will be loaded correctly after a restart.

  5. In the ReloadLayoutParts function you define all your layout needed to function properly after calling it from the configuration menu.

  6. Next you have to define your key bindings if any. Mostly needed for the pager module or if you have other special things implemented.

  7. Then the menus following. Also needed mostly for the pager.

You can test it easily by clicking your layout name under

Configuration -> Fvwm-Nightshade -> Decoration -> Layouts

if it found under <user>/layouts/. It appears automatically.

That’s it. Not much but hopefully enough for playing ;).

LANGUAGE CREATION

Fvwm-Nightshade supports a couple of languages - at the moment german, russian, spanish, italian and french. If you want to create your own translation you can use the "fvwm-nightshade.pot" template located in <system>/templates.

We support two locations where your translation can copy to:

  1. The system wide in /usr/share/locale/ or /usr/local/share/locale/

  2. The user wide in ~/fvwm-nightshade/locale/

The following Howto uses the user wide one.

Steps for your own translation

  1. Create the directory with its' sub directories:

    ~/.fvwm-nightshade/locale/<your_lang>/LC_MESSAGES
  2. Copy fvwm-nightshade.pot to this directory:

    $> cp <system>/templates/fvwm-nightshade.pot ~/.fvwm-nightshade/locale/<your_lang>/LC_MESSAGES/fvwm-nightshade.po
    Tip

    You can look to /usr/share/locale which token is normally used for your language.

  3. Open it with your favorite editor, fill out the header and translate the messages into your language.

  4. Create the machine readable code with msgfmt

    $> msgfmt fvwm-nightshade.po -o fvwm-nightshade.mo
  5. Restart Fvwm-Nightshade.

Now all menus, messages and tools should be shown in your language.

Remark:

  • Some messages have a fixed size and spaces at the beginning or the end. They should used in the translation just as well! For example:

    msgid "              (E.g. 10, 11, 13)"
    msgstr "              (z.B. 10, 11, 13)"
  • Menu entries have & for hotkeys. So you should set them that no double underlines exist.

  • Every time you change something in the po file a restart of Fvwm-Nightshade is necessary if it is related to menu entries. All others like in FvwmScripts or FvwmForms are shown after restart of the application.

Tip

You can use poedit or KBabel instead of an editor for translation. It’s a matter of choice ;-) …

If you need more information about the used translation process see http://www.gnu.org/software/gettext/manual/gettext.html

MODULE CREATION

If you want to create your own modules based on fvwm-perlib you have three possibilities to put them in:

  1. Fvwm its own directory, usually /usr/lib/fvwm/<Fvwm-version/.

  2. Fvwm-Nightshades system directory - <system>/share/fvwm-nightshade/lib/.

  3. The user directory in <user>/lib/

The easiest way is the user directory. Create the directory ~/.fvwm-nightshade/lib and put your module in it. Now you can start it from within FvwmConsole with

Module <Modulename>

or in the StartFunction with

+ I Module <Modulename>

AUTHORS

© 2013 - 2016 by the Fvwm-Nightshade team <fvwmnightshade@gmail.com>.

Fvwm-Nightshade and all the scripts and other files coming with the distribution are subject to the GNU General Public License (GPL). Please refer to the COPYING file that came with Fvwm-Nightshade for details.

BUGS

Bug reports can be sent to the fvwmnightshade-workers mailing list at https://groups.google.com/forum/?hl=en#!forum/fvwmnightshade-workers or submit them under https://github.com/Fvwm-Nightshade/Fvwm-Nightshade/issues.