FVWM-Crystal

FVWM-Crystal aims to create an easy to use, eye-candy but also powerful desktop environment for Linux or other Unix-like operating systems. It consist of a coherent ensemble of themes, called recipes, for fvwm. It evolved a lot with time, Maciej Delmanowski started this project in January 2003 and I made my first contribution to it in 2007.

Some features unique to fvwm-crystal are:

  • In addition to the Nautilus and Rox-filer support which was not removed, fvwm-crystal provide now its own desktop manager (the icons on the desktop), which is done with fvwm, have its own preferences menu, provide dual icons, and should be able to support any file manager you can think about, even mplayer.

  • Support for different media players and their playlists.

  • For the audio pro users (I am one of them), the Music functions provides a minimal but useful control of AlsaMixer, QJackCtl and Cadence via menus and key bindings.

  • The ability to put almost any application in full screen, which in turn led to the ability, like with the AmigaOS, to navigate between the full-screened apps and the desktop, that, as we are using X11, on each desktop page.

  • The full support of the additional categories of the application menu follow follow the FreeDesktop normalization but is independent of other menus. Instead, it depend entirely on the desktop and icon files provided by the applications, or by fvwm-crystal itself, which give a very good looking, robust across updates and easy to customize application menu.

  • Many more…

  • Support of multi systems environments via $FVWM_CONFIGDIR

  • It provides its own development environment via FvwmConsole and $FVWM_USERDIR

Fvwm-crystal have a more or less up to date website at https://fvwm-crystal.sourceforge.io/ where you can download it.

The last versions of fvwm-crystal give it a modern look with the Custom recipe and its Magic button bar. But I need help for a few things with fvwm-crystal:

  • For the translations. English is not my native language, which imply I can make a lot of mistakes. French is complete, a few other languages are complete or more or less, some have not been updated from years and a lot are not existing.

  • Testing and more testing. I use gentoo and debian for the development of fvwm-crystal. This let me to test fvwm-crystal with different init systems and shells (fvwm-crystal use the default sh fvwm shell, but it can be symlinked to different shell by the distributions).

  • Bug reports. It is certainly some of them I didn’t saw…

  • First in my TODO list is a key binding editor. I just begun to think about how to do it into a simple, robust and effective way. So I am very open to any suggestion or contribution.

  • Transition to fvwm3. It is a few FvwmDialog functions which need to be updated to FvwmScript.

  • Multi screens support for use with fvwm3.

  • Update the scripts which control mpd to use the communication protocol of FvwmScript. This will make the slow parts of it to work much faster.

  • New colorsets, window button styles, recipes, media players support, or any contributions you can think about. Fvwm and fvwm-crystal are very flexible, which imply my 2 main critters will be “Is it easy to maintain on the long run?” and “Will it break existing stuffs or users preferences?”.

And yes, fvwm-crystal exercises fvwm a lot! I am really amazed to see how well fvwm is doing with crystal.

fvwm-crystal using the Custom recipe, with its Magic button on the bottom showing its preferences menu, the desktop icons button on the left and an iconic window.

Bonjour Dominique.

7 years ago, I worked on few functions that created key and mouse bindings, with names and syntax that I could easily remember. I wanted to make an interface to create/store my bindings. I never made it but the functions remain…
Maybe you can find some things that might be useful in order to create your bindings editor (for example to “store” the binding into a function). I haven’t looked at it for 7 years so there could be some errors in it. But I remember it was functional. I’ve just glanced at it and I am convinced that it can surely be improved, or that it definitely won’t suit your needs…

It is quite long because of the comments (all in french ^^). I took the idea in the config files of FvwmAmetista from Metisse Project

Bindings functions and bindings
################################################################################
###                                                                          ###
#    Fonctions utilisées dans la création des raccourcis Clavier et Souris     #
###                                                                          ###
################################################################################


#====================
# Correspondances entre les Boutons Souris lisibles et ceux
# utilisés par FVWM.
#
#   Gauche        <->   1
#   Milieu        <->   2
#   Droit         <->   3
#   MoletteHaut   <->   4
#   MoletteBas    <->   5
#
# Chaque bouton lisible est une fonction qui met à jour
# la variable "Bouton" avec l'équivalent FVWM du bouton de souris.
# Il faut donc pas oublier de libérer la variable après l'appel de 
# cette fonction afin d'éviter les effets de bord.
#
#=================================================================

DestroyFunc CreerFonctionBoutonSouris
AddToFunc CreerFonctionBoutonSouris
+ I DestroyFunc $0
+ I AddToFunc $0
+ I + I SetEnv Bouton $1

DestroyFunc InitialiseBoutonsSouris
AddToFunc InitialiseBoutonsSouris
+ I CreerFonctionBoutonSouris Gauche 1
+ I CreerFonctionBoutonSouris Milieu 2
+ I CreerFonctionBoutonSouris Droit 3
+ I CreerFonctionBoutonSouris MoletteHaut 4
+ I CreerFonctionBoutonSouris MoletteBas 5


#====================
# Correspondances entre les Modificateurs lisibles et ceux
# utilisés par FVWM.
#
#      Nimporte     <->   A
#       Aucun       <->   N
#        Ctrl       <->   C
#        Alt        <->   M
#       Shift       <->   S
#        Win        <->   4
#
# Chaque modificateur lisible est une fonction qui met à jour
# la variable "Modificateur" avec l'équivalent FVWM du modificateur.
# Il faut donc pas oublier de libérer la variable après l'appel de 
# cette fonction afin d'éviter les effets de bord.
#
#=================================================================

DestroyFunc CreerFonctionModificateur
AddToFunc CreerFonctionModificateur
+ I DestroyFunc $0
+ I AddToFunc $0
+ I + I SetEnv Modificateur $1

DestroyFunc InitialiseModificateurs
AddToFunc InitialiseModificateurs
+ I CreerFonctionModificateur Aucun N
+ I CreerFonctionModificateur Nimporte A
+ I CreerFonctionModificateur Ctrl C
+ I CreerFonctionModificateur Alt M
+ I CreerFonctionModificateur Shift S
+ I CreerFonctionModificateur Win 4
+ I CreerFonctionModificateur CtrlAlt CM
+ I CreerFonctionModificateur CtrlShift CS
+ I CreerFonctionModificateur CtrlWin C4
+ I CreerFonctionModificateur AltShift MS
+ I CreerFonctionModificateur AltWin M4
+ I CreerFonctionModificateur ShiftWin S4
+ I CreerFonctionModificateur CtrlAltShift CMS
+ I CreerFonctionModificateur CtrlAltWin CM4
+ I CreerFonctionModificateur CtrlShiftWin CS4


#====================
# Correspondances entre les Contextes lisibles et ceux
# utilisés par FVWM.
#
#   Partout          <->   A          Fenetre          <->   W
#   Bureau           <->   D          Titre            <->   T
#   FondEcran        <->   R          Bords            <->   S
#   Bouton1          <->   1          BordHaut         <->   -
#   Bouton2          <->   2          BordDroite       <->   ]
#   Bouton3          <->   3          BordBas          <->   _
#   Bouton4          <->   4          BordGauche       <->   [
#   Bouton5          <->   5          Coins            <->   F
#   Bouton6          <->   6          CoinHautGauche   <->   <
#   Bouton7          <->   7          CoinHautDroite   <->   ^
#   Bouton8          <->   8          CoinBasDroite    <->   >
#   Bouton9          <->   9          CoinBasGauche    <->   v
#   Bouton0          <->   0          Icone            <->   I
#
# Les contextes spéciaux ci-dessous sont en fait des alias
# pour plusieurs des contextes précédents, utilisés simultanément.
#
#   TousLesBoutons   <->  Les boutons activés dans la config
#   BordsCoins       <->  Tout le contour d'une fenêtre
#   TitreBordsCoins  <->  Le contour d'une fenêtre + sa barre de titre
#   FenetreComplete  <->  Ensemble des composants d'une fenêtre
#
# Chaque contexte lisible est une fonction qui met à jour
# la variable "Contexte" avec l'équivalent FVWM du contexte.
# Il faut donc pas oublier de libérer la variable après l'appel de 
# cette fonction afin d'éviter les effets de bord.
#
#=================================================================

DestroyFunc CreerFonctionContexte
AddToFunc CreerFonctionContexte
+ I DestroyFunc $0
+ I AddToFunc $0
+ I + I SetEnv Contexte $1

DestroyFunc InitialiseContextesSpeciaux
AddToFunc InitialiseContextesSpeciaux
+ I CreerFonctionContexte BordsCoins SF
+ I CreerFonctionContexte TitreBordsCoins TSF
+ I CreerFonctionContexte TousLesBoutons 12468
+ I CreerFonctionContexte FenetreComplete WTSF12468

DestroyFunc InitialiseContextes
AddToFunc InitialiseContextes
+ I CreerFonctionContexte Partout A
+ I CreerFonctionContexte Bureau D
+ I CreerFonctionContexte FondEcran R
+ I CreerFonctionContexte Fenetre W
+ I CreerFonctionContexte Titre T
+ I CreerFonctionContexte Bords S
+ I CreerFonctionContexte Coins F
+ I CreerFonctionContexte Icone I
+ I PipeRead 'for n in $(seq 0 9); \
                do echo CreerFonctionContexte Bouton$n $n; \
              done'
+ I InitialiseContextesSpeciaux


#====================
# ActiverModificateurRaccourcisSouris
# ------------------------------------
#  Cette fonction sert à en définir d'autres permettant, elles,
#  de créer les raccourcis souris avec le modificateur indiqué.
#  Ces nouvelles fonctions ont un nom explicite quant au
#  modificateur utilisé.
#
# Syntaxe
# ---------
#    ActiverModificateurRaccourcisSouris  Modificateur
#
#  La fonction va créer la fonction Souris${Modificateur}
#  qui s'utilisera sous la forme :
#
#    Souris${Modificateur}  BoutonSouris Contexte "Action" "Restrictions aux applications"
#
#  ainsi que la fonction SupprimerSouris${Modificateur}
#  qui s'utilisera sous la forme :
#
#  SupprimerSouris${Modificateur}  BoutonSouris Contexte "Restrictions aux applications"
#
#  Rq.: Les options "Restrictions aux applications" sont facultatives
#=================================================================

DestroyFunc ActiverModificateurRaccourcisSouris
AddToFunc ActiverModificateurRaccourcisSouris
+ I DestroyFunc Souris$0
+ I AddToFunc Souris$0
+ I + I $0
+ I + I $$$0
+ I + I $$1
+ I + I SetEnv Restrictions "\"$$3\""
+ I + I Test (EnvMatch Restrictions "\"\"") Mouse $$[Bouton] $$[Contexte] $[Modificateur] $$2
+ I + I TestRc (NoMatch) Mouse ($$3) $$[Bouton] $$[Contexte] $[Modificateur] $$2
+ I + I UnSetEnv Modificateur
+ I + I UnSetEnv Bouton
+ I + I UnSetEnv Contexte
+ I + I UnSetEnv Restrictions
+ I DestroyFunc SupprimerSouris$0
+ I AddToFunc SupprimerSouris$0
+ I + I $0
+ I + I $$$0
+ I + I $$1
+ I + I SetEnv Restrictions "\"$$2\""
+ I + I Test (EnvMatch Restrictions "\"\"") Mouse $$[Bouton] $$[Contexte] $[Modificateur] -
+ I + I TestRc (NoMatch) Mouse ($$2) $$[Bouton] $$[Contexte] $[Modificateur] -
+ I + I UnSetEnv Modificateur
+ I + I UnSetEnv Bouton
+ I + I UnSetEnv Contexte
+ I + I UnSetEnv Restrictions


#====================
# ActiverModificateurRaccourcisClavier
# -------------------------------------
#  Cette fonction sert à en définir d'autres permettant, elles,
#  de créer les raccourcis clavier avec le modificateur indiqué.
#  Ces nouvelles fonctions ont un nom explicite quant au
#  modificateur utilisé.
#
# Syntaxe
# ---------
#    ActiverModificateurRaccourcisClavier  Modificateur
#
#  La fonction va créer la fonction Clavier${Modificateur}
#  qui s'utilisera sous la forme :
#
#    Clavier${Modificateur}  Touche Contexte "Action" "Restrictions aux applications"
#
#  ainsi que la fonction SupprimerClavier${Modificateur}
#  qui s'utilisera sous la forme :
#
#  SupprimerClavier${Modificateur}  Touche Contexte "Restrictions aux applications"
#
#  Rq.: Les options "Restrictions aux applications" sont facultatives
#=================================================================

DestroyFunc ActiverModificateurRaccourcisClavier
AddToFunc ActiverModificateurRaccourcisClavier
+ I DestroyFunc Clavier$0
+ I AddToFunc Clavier$0
+ I + I $0
+ I + I $$1
+ I + I SetEnv Restrictions "\"$$3\""
+ I + I Test (EnvMatch Restrictions "\"\"") Key $$$0 $$[Contexte] $[Modificateur] $$2
+ I + I TestRc (NoMatch) Key ($$3) $$$0 $$[Contexte] $[Modificateur] $$2
+ I + I UnSetEnv Modificateur
+ I + I UnSetEnv Contexte
+ I + I UnSetEnv Restrictions
+ I DestroyFunc SupprimerClavier$0
+ I AddToFunc SupprimerClavier$0
+ I + I $0
+ I + I $$1
+ I + I SetEnv Restrictions "\"$$2\""
+ I + I Test (EnvMatch Restrictions "\"\"") Key $$$0 $$[Contexte] $[Modificateur] -
+ I + I TestRc (NoMatch) Key ($$2) $$$0 $$[Contexte] $[Modificateur] -
+ I + I UnSetEnv Modificateur
+ I + I UnSetEnv Contexte
+ I + I UnSetEnv Restrictions


#====================================================================================================#
#           ---------------------------------------------------------------------------              #
#           |                  Création    des    raccourcis    Souris                |              #
#           ---------------------------------------------------------------------------              #
#====================================================================================================#

# Initialiser les variables nécessaires
#========================================
InitialiseBoutonsSouris
InitialiseModificateurs
InitialiseContextes


# Créer les fonctions de raccourcis avec modificateur
#======================================================
ActiverModificateurRaccourcisSouris Aucun
ActiverModificateurRaccourcisSouris Nimporte
ActiverModificateurRaccourcisSouris Ctrl
ActiverModificateurRaccourcisSouris Alt
ActiverModificateurRaccourcisSouris CtrlAlt
ActiverModificateurRaccourcisSouris Win


# Créer les raccourcis
#=======================

# Bureau - Fond d'écran
#-----------------------
SourisNimporte     Gauche          FondEcran           "Menu MenuRacine"

SourisAucun        Milieu          FondEcran           ListeFenetresSouris
SourisAucun        Droit           FondEcran           "Menu MenuApplications"
SourisAucun        MoletteHaut     FondEcran           "VolumeFunc 5+"
SourisAucun        MoletteBas      FondEcran           "VolumeFunc 5-"

# Fenêtres
#----------
SourisAucun        Gauche          Bouton1             "Menu MenuOperationsFenetre"
SourisAucun        Gauche          Bouton2             Fermer
SourisAucun        Gauche          Bouton4             Maximiser
SourisAucun        Gauche          Bouton6             Iconifier
SourisAucun        Gauche          Bouton8             Coller

SourisAucun        Milieu          TitreBordsCoins     PlacerDessusDessousEtPagerDessous
SourisAucun        Droit           TitreBordsCoins     "Menu MenuOperationsFenetre"
SourisAucun        Gauche          BordsCoins          PlacerDessusEtRedimensionner
SourisAucun        Gauche          Titre               PlacerDessusEtDeplacerOuEnroulerDerouler
SourisAucun        MoletteHaut     Titre               PlacerDessusEtEnrouler
SourisAucun        MoletteBas      Titre               PlacerDessusEtDerouler

SourisCtrlAlt      Droit           FenetreComplete     "Menu MenuOperationsFenetre"

SourisAlt          Gauche          Fenetre             Deplacer
SourisAlt          Droit           Fenetre             PlacerDessusEtRedimensionner

# Icônes
#--------
SourisNimporte     Gauche          Icone               Iconifier
SourisNimporte     Droit           Icone               "Pick Module FvwmIdent"

# Spécifiques aux applications
#------------------------------
SourisCtrl         Gauche          Fenetre             ChangePage             FvwmPager



#====================================================================================================#
#           ---------------------------------------------------------------------------              #
#           |                 Création    des    raccourcis    Clavier                |              #
#           ---------------------------------------------------------------------------              #
#====================================================================================================#

# Créer les fonctions de raccourcis avec modificateur
#======================================================
ActiverModificateurRaccourcisClavier Aucun
ActiverModificateurRaccourcisClavier Nimporte
ActiverModificateurRaccourcisClavier Ctrl
ActiverModificateurRaccourcisClavier Alt
ActiverModificateurRaccourcisClavier CtrlAlt
ActiverModificateurRaccourcisClavier CtrlAltShift
ActiverModificateurRaccourcisClavier Win
ActiverModificateurRaccourcisClavier CtrlWin


# Créer les raccourcis
#=======================

# Partout - Raccourcis système
#------------------------------
ClavierAlt              Escape    Partout     "SendToModule FvwmProxy ShowToggle"
ClavierAlt              Tab       Partout     ListeFenetresClavier
ClavierCtrlAlt          R         Partout     Redemarrer
ClavierCtrlAlt          F4        Partout     Quitter

# Partout - Lancement d'applications
#------------------------------------
ClavierAlt              F1        Partout     "Executer $[Terminal]"
ClavierAlt              F2        Partout     "Module FvwmConsole -terminal $[Terminal]"
ClavierAlt              F3        Partout     "Executer gvim"
ClavierAlt              F10       Partout     "Executer import -window root screenshot.png"
ClavierCtrlWin          F         Partout     "Executer firefox"
ClavierCtrlWin          O         Partout     "Executer opera"

# Partout - Touches multimédia
#------------------------------
ClavierNimporte         XF86AudioMute            Partout     "Executer volume.sh toggle"
ClavierNimporte         XF86AudioRaiseVolume     Partout     "Executer volume.sh 5+"
ClavierNimporte         XF86AudioLowerVolume     Partout     "Executer volume.sh 5-"

# Partout - Changements de pages et de bureau
#---------------------------------------------
ClavierCtrlAlt          Left      Partout     "GotoPage -1p +0p"
ClavierCtrlAlt          Up        Partout     "GotoPage +0p -1p"
ClavierCtrlAlt          Right     Partout     "GotoPage +1p +0p"
ClavierCtrlAlt          Down      Partout     "GotoPage +0p +1p"
ClavierCtrlAltShift     Left      Partout     "GoToDesk -1 0 1"
ClavierCtrlAltShift     Right     Partout     "GotoDesk +1 0 1"

# Fenêtres des applications
#---------------------------
ClavierAlt              F4        FenetreComplete     "Pick Fermer"
ClavierAlt              F10       FenetreComplete     "Executer import -window $[w.id] screen.png"
ClavierAlt              I         FenetreComplete     "Pick Module FvwmIdent"
ClavierAlt              Space     FenetreComplete     "Current Menu MenuOperationsFenetre"
ClavierCtrlAltShift     X         FenetreComplete     "Pick Detruire"

###################################################################

DD

Thank you for the idea and functions.

Fvwm-crystal have a lot of functions already, and I don’t want to mess with them. For now, I done a list of all bindings and where they are loaded. I am still into the preliminary work. As example, doing this list, I fond some non used files like the Dvorak bindings and some other, and I must decide what I want to do with them (new preference setting, trash, whatever…). From that, I will have to make a file with all current bindings, check if it is already some user changes and merge them and the first file into a second file, which will be the one the user will edit.

I will even need a third file in order to cancel the not in use bindings. Most of the job will be to figure out how to generate these 3 files into a reliable way.

The second one is the most important because it is the one the user will see and edit. I want something as simple than possible both for the user to edit, and for me to develop.

The simplest to edit that file is just to use $EDITOR which is defined from the preferences menu. A FvwmScript can be a good way to go because into it, I can have that file open for editing, a xev widget and a help widget, and maybe be able to generate the third file and to apply the new bindings on the fly for testing. And maybe mix the whole thing with some kind of cancel or undo.

Dom, I used FVWM-Crystal years ago on 2.6.6. I now have both 2.6.9 and 3.0.0-master installed in a Slackware64 14,2 multi-monitor (different size) configuration. I have not installed FVWM-Crystal, but I am willing to help with testing and spelling. Do you have a list of tests that need to be completed? Let me know. Cheers, BrianA_MN

Hi BrianA, Thanks for caring. The best is to install from the svn: https://fvwm-crystal.sourceforge.io/download.html

In the source, the dependencies are listed into the INSTALL file. You will need python 3, any version should work. If you want to use mpd, python-mpd is required. The README file show how to start fvwm-crystal with startx. That way you can get error messages. Please use fvwm-2.6.9 for now with fvwm-crystal. It mostly work with fvwm-3, but I am not working on this for now.

As it is a fresh install, I will appreciate to know about any comment on the first start or any issue you can encounter.

For the spelling, you will find all the strings with their corresponding file into the addons/*.potfiles. For English, these corresponding files must be edited into a copy of the source tree. When done, you can run ./make.pot from the addons directory of the copy. If no po files was copied here, this will update the pot files. Last, you can do a diff of the 2 source trees and send it to me.

Making some progress with the bindings preferences here: GitHub - fvwm-crystal/fvwm-crystal at keybindings

The first commit introduce “IncludeKeyBinding” and “IncludeMouseBinding” which make 2 bindings file lists from the bindings files loaded by Crystal. As it is a WIP, they also load these bindings for now.

The 2nd commit is cosmetic, and the third one introduce a script that generate a binding preference file. At that time, it only works fine with the keybindings and it is not integrated into FVWM-Crystal. That will be for 3.8.0.

Edit: Fixed the Mouse bindings.

Great, Fvwm Crystal is updated. One of my first config intro to Fvwm. Has a nice mixture of VM and DE.

How to install everything to user home directory ~/.fvwm-crystal ?
Window iconify is under ApplicationPanel. Doesn’t deiconify with mouse click (left, middle or right).

iconify