Remontoire utilizes the concept of a category
to group items, action
to denote the human description, and keybinding
to define the specific keys corresponding to the action. The format is designed to be both easily parsable by program but also readable in it's native form by people:
## <category> // <action> // <keybinding> ## <reserved for user notes>
Text within <category>
, <action>
, and <keybinding>
must not contain the sequences ##
, //
, or line feeds.
Examples:
...
## Navigate // Relative Window // <Super> ↑ ↓ ← → ##
bindsym $mod+Left focus left
...
...
## Launch // Application // <Super> Space ## some extra notes that are ignored by Remontoire but maybe of interest to those reading the config file.
bindsym $mod+space exec $i3-wm.program.launcher.app
Any line that doesn't contain the structure listed here will be ignored.
Usage:
remontoire [OPTION?]
Help Options:
-h, --help Show help options
Application Options:
-v, --version Display version number
-s, --socket=<Socket URI> Socket path for i3
-c <Path to config file> Config file
-i <Read from standard input> Read from standard input
-t <Path to style file> CSS file
-p <comment line prefix> Prefix of comment line
With -s
, Remontoire communicates with i3 via domain sockets to retrieve the active i3 config file. To determine the socket path on a system running i3:
$ i3 --get-socketpath
Or altogether:
$ remontoire -s `i3 --get-socketpath`
Remontoire can also be passed a file path and will read from that instead of the i3 socket. In this mode, Remontoire can be used to display keybindings from any file that utilize the comment format.
$ remontoire -c /etc/something/interesting.conf
As a third option to provide your config files, Remontoire can read from STDIN. Use this option if you want to pass in the contents of multiple config files.
Once executed Remontoire will display a sticky floating window on the right-center of the primary monitor. Upon first launch, all categories are collapsed. User selections to open categories are persisted across instantiations of the program.
It is suggested to use a small shell script to allow the dialog to be toggled on and off with a hotkey. Here is one such script from Regolith:
#!/bin/bash
# If remontoire is running, kill it. Otherwise start it.
remontoire_PID=$(pidof remontoire)
if [ -z "$remontoire_PID" ]; then
/usr/bin/remontoire -s $(printenv I3SOCK) &
else
kill $remontoire_PID
fi
Remontoire utilizes GLib settings to store configuration using the namespace org.regolith-linux.remontoire
. The following settings are available for user customization:
window-position <north|south|east|west>
$ gsettings set org.regolith-linux.remontoire window-position "west"
Vertical and horizontal padding can be specified independently, allowing for bars or other UI widgets to be accounted for when placing the window. The keys for padding are window-padding-width
and window-padding-height
and the value units are pixels.
$ gsettings set org.regolith-linux.remontoire window-padding-width 10
$ gsettings set org.regolith-linux.remontoire window-padding-height 20
You can specify a custom CSS file to change the look of the dialog. The built-in CSS as of version 1.3.0:
.window {
margin: 4px;
}
*:selected {
background-color: @theme_bg_color;
color: @theme_text_color;
}
.category {
padding-top: 2px;
padding-bottom: 2px;
font-weight: bold;
font-size: .95em;
color: @theme_unfocused_fg_color;
}
.action {
padding-right: 10px;
padding-left: 15px;
font-weight: lighter;
}
.error {
padding: 15px;
font-size: 1.2em;
font-weight: bold;
}
.metakey {
font-family: monospace;
font-weight: normal;
background-color: @insensitive_bg_color;
border: 1px solid;
border-color: @insensitive_base_color;
color: @theme_unfocused_fg_color;
padding: 2px;
margin: 2px;
font-size: .9em;
}
.rangekey {
font-family: monospace;
font-weight: normal;
background-color: @insensitive_bg_color;
border: 1px solid;
border-color: @insensitive_base_color;
color: @theme_unfocused_fg_color;
padding: 2px;
margin: 2px;
font-size: .9em;
}
.key {
font-family: monospace;
font-weight: normal;
background-color: @insensitive_bg_color;
border: 1px solid;
border-color: @insensitive_base_color;
color: @theme_unfocused_fg_color;
padding: 2px;
margin: 2px;
font-size: .9em;
}
.detail {
margin: 2px;
}
Since Remontoire parses comments and not actual keybindings, it can be used as a keybinding viewer for any app that stores keybindings in plain text and supports comments, like Sway or Vim. Use the -c
or -i
options documented above to supply the config files. If config doesn't use #
as a comment prefix, you use the -p
option to supply comment prefix to go immediately before '##'. Here's an example of parsing a comment using Vim's quote character as a prefix:
echo '"## Category // Description // <Super> J ##' | remontoire -i -p '"'
Remontoire is available from the Regolith Linux stable
PPA:
$ sudo add-apt-repository ppa:regolith-linux/stable
$ sudo apt install remontoire
Remontoire is available from the X11:Utilities devel project:
$ sudo zypper ar -f obs://X11:Utilities X11Utilities
$ sudo zypper ref
$ sudo zypper in remontoire
Meson, Vala and Gtk+ libraries are required to build. After downloading sources, from within the project root, execute the following:
$ meson build
$ cd build
$ ninja
$ src/remontoire -c <path to your config>
... or ...
$ src/remontoire -s `i3 --get-socketpath`