MX-Dockmaker is a GUI application for MX-Fluxbox. It is designed to make the creating and managing of docks–that is, of a series of program launchers–easy for the average user. It makes use of a recent CLI app developed by Sébastien Ballet called wmalauncher.
The docks are basically scripts that set the location and list commands for one or more launchers (see Technical details, below). These scripts are stored in ~/.fluxbox/scripts and listed in the menu. The docks are installed in the “slit,” a fluxbox feature that can contain any dockable application and be located in one of 8 (top left, top center, etc.) fixed positions on the screen.
The app is installed by default with MX-Fluxbox versions > 2.0, but it also can be obtained from the repos using Synaptic or the CLI: sudo apt install mx-dockmaker. Source: https://github.com/MX-Linux/mx-dockmaker .
When the app is launched, the user is first presented with a small Mode screen to select which mode to run:
- Create a new dock
- Edit an existing dock
- Delete an existing dock
1. Create a new dock
After providing a name for the dock that will appear in the Menu (Look > Docks & Launchers), the user is presented with the main creation screen.
The dock is constructed one app at a time, and there are two ways to add an application using mx-dockmaker:
- Select a desktop file from the list that pops up (=contents of /usr/share/applications): the icon is automatically set by the desktop file.
- Insert a command, being careful to use the actual command required; F6 will show the apps available, and a right-click > Edit will reveal the correct command. The icon must be selected separately, which offers the user a flexibility not available with a desktop file, and a large range of image formats are accepted.
For each app, the user next has a few format choices:
- Size: 32×32, 48×48 (default) or 64×64
- Background: the color of the field between the icon itself and the frame (default: black)
- Frame: the color of the edge (default: white)
Finally, clicking the “Add application” records each app for the dock and displays its icon in the preview space. When all desired apps have been added, clicking the Save button registers the dock, refreshes the application and inserts the dock’s name into the menu for easy access.
NOTE: many more options are available when using the CLI app, and the interested user should consult the man file (in a terminal: man wmalauncher).
2. Edit an existing dock
Clicking the Edit button on the Mode screen opens a selector screen where the user selects the dock to edit. Clicking the OK button at the bottom brings up the main Edit screen.
Any of the traits already discussed can be changed by going through the apps one at a time. Also, any app may be deleted and another added. (Note: an app can be temporarily removed from a running dock by right-clicking it.) When done the user clicks on Save, agrees to overwrite the existing file, and the application is refreshed.
The effect of changing colors can be quite dramatic. Compare this dock against a gray background with the default white frame:
and with a black frame:
Many other wmalauncher options are available that are not accessible in mx-dockmaker. Users interested in adding options listed in the man document can simply open the script and insert them.
3. Delete an existing dock
Clicking the Delete button on the Mode screen opens a selector screen where the user selects the dock to delete. Clicking the OK button at the bottom presents the user with a confirmation screen, deletes the dock and returns to the Mode screen.
The dock scripts combine a slit location with a set of launcher commands. A typical example might look like this:
sed -i 's/^session.screen0.slit.placement:.*/session.screen0.slit.placement: BottomCenter/' $HOME/.fluxbox/init
wmalauncher --desktop-file firefox.desktop --background-color black --border-color white --window-size 48 -x & sleep 0.1 wmalauncher --desktop-file thunar.desktop --background-color black --border-color white --window-size 48 -x & sleep 0.1 wmalauncher --desktop-file clementine.desktop --background-color black --border-color white --window-size 48 -x & sleep 0.1
The “sed” command relocates the slit to where the user wishes the dock to be placed, followed by a restart to enable that change to take effect. The commands below that combine the following elements:
- the application command
- the method to use
- the desktop file (or command and icon)
- background, frame color and size
- a switch (-x) to allow deletion by right click
- an ampersand for continuous operation
- a sleep command to preserve icon order
Development history: Adrian, Jerry3904