[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[patch] ratmenu keyboard shortcuts (was Re: [RP] Re: ratmenu feature req

From: Rupert
Subject: [patch] ratmenu keyboard shortcuts (was Re: [RP] Re: ratmenu feature requests (really well thought over))
Date: Fri Oct 18 16:09:02 2002

On Fri, 18 Oct 2002 09:51:40 -0700
Jonathan Walther <address@hidden> wrote:

> This is the shell script I use to replace the "windows" command.  Try it
> out and report back.  This script also has the current window seleted as
> the default :)

Yes, that's very nice!

The next thing I wanted was keyboard shortcuts in ratmenu, and 


does that; with this patch,

  ratpoison menu1 cmd1 -shortcut 1 menu2 cmd2 menu3 cmd3 -shortcut z

should define keys 1 and z to be shortcuts to menu1 and menu3
respectively. Using this, I've changed your replacement for rp's window
command to give keyboard shortcuts for the first 16 rp-managed windows.

RATMENU_OPTIONS=" -style dreary -font 7x13bold -fg lightgray -bg black "

killall $RATMENU

ratpoison -c "windows %l %n %s %t" | sort -rn|while read l x s z; do
    a=$(printf "%3q" $x); b="ratpoison -c \"select $x\"";
    printf " %q\\ %q\\ %q %q" "$a" "$s" "$z" "$b";
    if [[ $((x < 0x10)) == 1 ]]; then printf " -shortcut %x" "$x"; fi
done; )|sh

reply via email to

[Prev in Thread] Current Thread [Next in Thread]