[Users] Keyboard shortcuts
Steve Litt
slitt at troubleshooters.com
Fri Feb 21 01:44:23 CET 2014
On Thu, 20 Feb 2014 15:29:21 -0500
Steve Litt <slitt at troubleshooters.com> wrote:
> On Thu, 20 Feb 2014 15:14:04 -0500
> Steve Litt <slitt at troubleshooters.com> wrote:
>
> > On Thu, 20 Feb 2014 18:52:33 +0000
> > Neil <senex at drofle.co.uk> wrote:
>
> > Yes. *And*, grepping menurc does little good, because it won't
> > reliably show you the default keybindings.
> >
> > Paul, is there a way to get Claws or something else to dump the key
> > bindings that actually exist, whether they exist by default or by
> > user adjustment?
>
> I think I found the answer to this question...
>
> 1) Close all instances of Claws-Mail
> 2) rename menurc backup_menurc
> 3) Run and exit from claws-mail
> 4) The newly made claws-mail (presumably) has all the defaults listed,
> but commented out.
>
> cat backup-menurc | grep -v "^\s*;" > my_changes_to_menurc
>
> cat menurc my_changes_to_menurc |
> program_moves_hotkey_to_front_then_sorts_then_counts
>
> That last program is just a simple filter that puts the hotkey at the
> start of the line, then sorts the whole bunch, then counts. Probably a
> fairly simple Python program. If you wanted to make an "m" hotkey,
> you'd just grep the output for "^\"m\"" to see whether it's already
> used. If you wanted to find already duplicate hotkeys, you could have
> that pop out on stderr.
>
> The last step, of course, would be to rename menurc to
> default_menurc, and rename backup_menurc to menurc.
>
> If several people want this to happen, I'll write the program to do
> it.
I made it. It appears to work beautifully on Linux. Just run the
clawscount.sh program. It's free software, as mentioned in
COPYING.EXPAT.
You can get the shellscript, the python file, and the license here:
http://www.a3b3.com/litt/clawscount/
Obviously, you need to properly rename, permission, and place on the
executable path the shellscript and the Python file. I only tested for
a half hour, so if I were you I'd back up $HOME/.claws-mail before
running it.
Be aware that there are two sleeps in there: One after claws-mail is
instantiated, and one after it's closed. So if it appears to hang for a
few seconds, it just appears that way. The program refuses to run if
you already have claws-mail running: It needs to start and stop Claws
on its own.
Have fun.
SteveT
Steve Litt * http://www.troubleshooters.com/
Troubleshooting Training * Human Performance
More information about the Users
mailing list