JWM (Joe’s Window Manager) is a lightweight window manager used in FunOS, known for its speed, minimal resource usage, and high configurability. One of the most powerful features of JWM is its support for customizable key bindings, which allow users to control window behavior and launch applications quickly from the keyboard.
In FunOS, these key bindings are defined in the file:
~/.config/jwm/keys
This article provides a complete explanation of the structure, syntax, and function of this file, as well as how you can customize it to suit your workflow.
1. Backing Up Before Editing
Before making changes to this file, it’s a good idea to back it up:
cp ~/.config/jwm/keys ~/.config/jwm/keys.bak
If anything goes wrong, you can easily restore the original.
2. Accessing the Key Bindings File
You can access the JWM Key Bindings configuration file in two main ways:
a. File Manager
- Click Menu > File Manager
- Press Ctrl + H or click View > Show Hidden to display hidden files.
- Navigate to the
.config/jwm/
directory and open thekeys
file with a text editor.
b. Terminal
mousepad ~/.config/jwm/keys
This opens the file in the Mousepad text editor, allowing you to view or modify its contents.
3. Understanding the Structure
The file is an XML document, wrapped in a <JWM>
root tag. Inside this, each key binding is defined with a <Key>
tag:
<Key key="KEY_NAME">ACTION</Key>
Optionally, you can specify a modifier mask (mask="..."
) for combinations like Alt (A
), Control (C
), or Shift (S
).
4. Default Key Bindings in FunOS
Here are the default key bindings shipped with FunOS:
Arrow Keys and Vim-like Navigation
<Key key="Up">up</Key>
<Key key="Down">down</Key>
<Key key="Left">left</Key>
<Key key="Right">right</Key>
<Key key="h">left</Key>
<Key key="j">down</Key>
<Key key="k">up</Key>
<Key key="l">right</Key>
These bindings help navigate JWM menus using both arrow keys and Vim-style keys (h
, j
, k
, l
).
Menu and Window Controls
<Key key="Return">select</Key>
<Key key="Escape">escape</Key>
<Key mask="A" key="Tab">next</Key>
<Key mask="A" key="F4">close</Key>
Return
selects a menu item.Escape
cancels a menu or dialog.Alt + Tab
cycles to the next window.Alt + F4
closes the active window.
Desktop Switching
<Key mask="A" key="Right">rdesktop</Key>
<Key mask="A" key="Left">ldesktop</Key>
<Key mask="A" key="Up">udesktop</Key>
<Key mask="A" key="Down">ddesktop</Key>
<Key mask="A" key="#">desktop#</Key>
Alt + Arrow keys
switch between virtual desktops.Alt + #
jumps directly to a numbered desktop (e.g.,Alt + 1
for desktop 1).
Accessing Menus
<Key mask="A" key="F1">root:1</Key>
<Key mask="A" key="F2">window</Key>
Alt + F1
: Opens the main root menu.Alt + F2
: Opens the window operations menu.
Window Actions
<Key mask="A" key="F10">maximize</Key>
Alt + F10
: Toggles maximized state for the current window.
Launching Applications
<Key mask="CA" key="t">exec:lxterminal</Key>
Ctrl + Alt + T
: Launches the terminal (lxterminal
).
5. Customizing Key Bindings
You can easily add new key bindings by editing the ~/.config/jwm/keys
file. For example, to launch your web browser with Ctrl + Alt + W
:
<Key mask="CA" key="w">exec:firefox-esr</Key>
Modifiers:
A
= AltC
= ControlS
= Shift- Combine them as needed, e.g.,
CA
for Ctrl + Alt
6. Applying Changes
After making changes to the key bindings configuration, apply them by restarting JWM:
Run the command in Terminal:
jwm -restart
7. Summary
The ~/.config/jwm/keys
file in FunOS gives you full control over your keyboard-driven workflow. Whether you prefer navigating with the keyboard, launching apps quickly, or managing windows efficiently, customizing key bindings is a great way to personalize your FunOS experience.
By understanding and tailoring this file, you can unlock the full potential of JWM’s minimalist power.
Leave a Reply