From 18d6e6626c126a030c35eb4694209e35e67000cf Mon Sep 17 00:00:00 2001 From: Dustin Kirkland Date: Tue, 13 Oct 2009 09:58:54 -0500 Subject: [PATCH] bin/menu: improve logic for the menu button, to explicitly look for screen-escape-keys (^a-@), or none (byobu-config), else (F9), LP: #450421 --- bin/menu | 9 ++++++--- debian/changelog | 2 ++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/bin/menu b/bin/menu index 1cff2cd6..771cef89 100755 --- a/bin/menu +++ b/bin/menu @@ -21,10 +21,13 @@ PKG="byobu" bindings="$HOME/.$PKG/keybindings" -key="F9" -esc="^a-" -if ! grep -qs "^source.*f-keys$" $bindings 2>/dev/null; then +if grep -qs "^source.*screen-escape-keys$" $bindings 2>/dev/null; then esc=`grep "^escape" $bindings | sed "s/^.*\(.\)$/\1/"` [ -n "$esc" ] && key="^$esc-@" || key="^a-@" +elif grep -qs "^source.*none$" $bindings 2>/dev/null; then + key="byobu-config" +else + key="F9" fi + printf " \005{= kw}%s:<\005{-}\005{=b kw}$key\005{= kw}>" `gettext "Menu"` diff --git a/debian/changelog b/debian/changelog index 003a6269..2ffc4233 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,8 @@ byobu (2.39) unreleased; urgency=low * debian/install, desktop/byobu.desktop, desktop/byobu.svg: add a desktop icon for Byobu, LP: #449200 + * bin/menu: improve logic for the menu button, to explicitly look for + screen-escape-keys (^a-@), or none (byobu-config), else (F9), LP: #450421 -- Dustin Kirkland Sun, 11 Oct 2009 14:58:18 -0500