>>30176Update: I got multi-key commands working in fvwm, with
FvwmMap RootMap $[FVWM_USERDIR]/root.map
Key Space A 4 RootMap
Now i can restart fvwm with a simple s-Space C-x C-r. It calls the following awk script:
#!/usr/bin/awk -f
BEGIN {
FS = " "
senter = ""
sexit = ""
name = ARGV[1]
ARGV[1] = ""
lines = 0
}
/^#/ {
next
}
{
senter = senter "+ I Key " $1 " A " $2 " WithExit" name
for (i=3; i<=NF; i++)
senter = senter " " $i
senter = senter "\n"
sexit = sexit "+ I Key " $1 " A " $2 " -\n"
}
END {
print "DestroyFunc Exit" name
print "AddToFunc Exit" name
print sexit
print "DestroyFunc " name
print "AddToFunc " name
print senter
print "DestroyFunc WithExit" name
print "AddToFunc WithExit" name
print "+ I Exit" name
print "+ I $*"
}The top-level command map looks currently like this:
K N Close
P N Stick
T N Exec xterm
X N Exec dmenu | rc
Tab N Next (!Focused, CurrentGlobalPage) FocusWindow
Return N term
B C Direction W (CurrentScreen, CurrentGlobalPage) FocusWindow
F C Direction E (CurrentScreen, CurrentGlobalPage) FocusWindow
G C EscapeFunc
N C Direction N (CurrentScreen, CurrentGlobalPage) FocusWindow
P C Direction S (CurrentScreen, CurrentGlobalPage) FocusWindow
X C ExtendedMap
B M Direction W (!CurrentScreen, CurrentGlobalPage) FocusWindow
F M Direction E (!CurrentScreen, CurrentGlobalPage) FocusWindow
G M GotoMap
N M Direction N (!CurrentScreen, CurrentGlobalPage) FocusWindow
P M Direction S (!CurrentScreen, CurrentGlobalPage) FocusWindow