mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-22 06:23:19 -07:00
* byobu-config, debian/rules, keybindings/common.disable,
keybindings/f-keys, keybindings/screen-escape-keys: massive fix for byobu keybindings; use ctrl-a-! to toggle on/off byobu's f-keys; also support a new keyset, screen-escape-keys which profiles ctrl-a keybindings for common byobu functions, LP: #380944 Signed-off-by: Dustin Kirkland <kirkland@canonical.com>
This commit is contained in:
parent
c0151638d3
commit
c4678a31b1
7 changed files with 71 additions and 59 deletions
|
@ -148,7 +148,9 @@ def profile(screen, size):
|
|||
def keybindings(screen, size):
|
||||
li = Listbox(height = 6, width = 60, returnExit = 1)
|
||||
for choice in commands.getoutput('ls '+SHARE+'/keybindings').splitlines():
|
||||
li.append(choice, choice)
|
||||
if choice != "common" and choice != "none":
|
||||
li.append(choice, choice)
|
||||
li.append("none", "none")
|
||||
bb = ButtonBar(screen, ((_("Apply"), "apply"), (_("Cancel"), "cancel", ESC)), compact = 1)
|
||||
g = GridForm(screen, _("Which set of keybindings would you like to use?"), 1, 2)
|
||||
g.add(li, 0, 0, padding=(4,2,4,2))
|
||||
|
|
8
debian/changelog
vendored
8
debian/changelog
vendored
|
@ -40,7 +40,13 @@ byobu (2.12) unreleased; urgency=low
|
|||
|
||||
* byobu-config: have ESC be a hotkey for 'cancel', LP: #373473
|
||||
|
||||
-- Dustin Kirkland <kirkland@ubuntu.com> Wed, 17 Jun 2009 11:07:18 -0500
|
||||
* byobu-config, debian/rules, keybindings/common.disable,
|
||||
keybindings/f-keys, keybindings/screen-escape-keys: massive fix for
|
||||
byobu keybindings; use ctrl-a-! to toggle on/off byobu's f-keys;
|
||||
also support a new keyset, screen-escape-keys which profiles ctrl-a
|
||||
keybindings for common byobu functions, LP: #380944
|
||||
|
||||
-- Dustin Kirkland <kirkland@ubuntu.com> Wed, 17 Jun 2009 14:17:15 -0500
|
||||
|
||||
byobu (2.11-0ubuntu1) karmic; urgency=low
|
||||
|
||||
|
|
1
debian/rules
vendored
1
debian/rules
vendored
|
@ -49,6 +49,7 @@ install: build install-po
|
|||
dh_testroot
|
||||
dh_clean -k
|
||||
dh_link usr/bin/byobu-status usr/bin/screen-profiles-status
|
||||
dh_link usr/share/byobu/keybindings/f-keys usr/share/byobu/keybindings/common
|
||||
dh_install -X.bzr
|
||||
|
||||
# Everything else is handled by dh_install
|
||||
|
|
|
@ -1,34 +0,0 @@
|
|||
###############################################################################
|
||||
# Disable Byobu's common keybindings
|
||||
# This configuration profile is intended to be a common header of useful
|
||||
# keybindings, included by other profiles.
|
||||
#
|
||||
# Copyright (C) 2008 Nick Barcet <nick.barcet@canonical.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, version 3 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
###############################################################################
|
||||
|
||||
# This file disables the common key bindings
|
||||
|
||||
bindkey -k k2
|
||||
bindkey -k k3
|
||||
bindkey -k k4
|
||||
bindkey -k k5
|
||||
bindkey -k k6
|
||||
bindkey -k k7
|
||||
bindkey -k k8
|
||||
bindkey -k k9
|
||||
bindkey -k F2
|
||||
bind $
|
||||
bind @
|
||||
bind R
|
|
@ -1,9 +1,10 @@
|
|||
###############################################################################
|
||||
# GNU Screen common keybindings
|
||||
# This configuration profile is intended to be a common header of useful
|
||||
# keybindings, included by other profiles.
|
||||
# Byobu f-key keybindings
|
||||
# This configuration profile is intended to provide a useful
|
||||
# keybindings using the keyboard's f-keys
|
||||
#
|
||||
# Copyright (C) 2008 Nick Barcet <nick.barcet@canonical.com>
|
||||
# Dustin Kirkland <kirkland@canonical.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -18,21 +19,9 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
###############################################################################
|
||||
|
||||
# This file defines the common key bindings
|
||||
#
|
||||
# For a keybinding to live in the "common" area, it must be verified to
|
||||
# work in at least:
|
||||
# * gnome-terminal
|
||||
# * console tty
|
||||
#
|
||||
# bindkey commands should be followed by a comment that will be used in the
|
||||
# help file (one day). The command should be formated as:
|
||||
# # <key> | explanation
|
||||
|
||||
# F-keys seem to work well in both gnome-terminal and tty consoles
|
||||
# F1 | 'help' in gnome-terminal
|
||||
register n "^a^c" # | Goes with the F2 definition
|
||||
bindkey -k k2 process n # F2 | Create new window
|
||||
bindkey -k k2 screen # F2 | Create new window
|
||||
bindkey -k k3 prev # F3 | Previous Window
|
||||
bindkey -k k4 next # F4 | Next Window
|
||||
register r "^a:source $HOME/.byobu/profile^M" # | Goes with F5 definition
|
||||
|
@ -49,9 +38,6 @@ bind $ screen -t status 0 byobu-status-detail # ctrl-a $ | show detailed statu
|
|||
bind @ screen -t help 0 byobu-config # ctrl-a @ | Configuration
|
||||
bind R process r # ctrl-a R | Reload profile
|
||||
|
||||
# toggle common keybindings off
|
||||
register d "^a:source /usr/share/byobu/keybindings/common.disable^M"
|
||||
bind ) process d
|
||||
# toggle common keybindings on
|
||||
register e "^a:source /usr/share/byobu/keybindings/common^M"
|
||||
bind ( process e
|
||||
# toggle f-key keybindings off
|
||||
register d "^a:source /usr/share/byobu/keybindings/screen-escape-keys^M"
|
||||
bind ! process d
|
|
@ -1 +0,0 @@
|
|||
# This is intended to be a completely empty set of keybindings
|
52
keybindings/screen-escape-keys
Normal file
52
keybindings/screen-escape-keys
Normal file
|
@ -0,0 +1,52 @@
|
|||
###############################################################################
|
||||
# Disable Byobu's f-key keybindings, define a set using screen's escape
|
||||
# sequence.
|
||||
#
|
||||
# Copyright (C) 2009 Dustin Kirkland <kirkland@canonical.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, version 3 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
###############################################################################
|
||||
|
||||
# This file disables the f-key bindings, but retains the
|
||||
# keybindings that use screen's built-in escape sequence
|
||||
|
||||
# Disable the f-key bindings
|
||||
bindkey -k k2
|
||||
bindkey -k k3
|
||||
bindkey -k k4
|
||||
bindkey -k k5
|
||||
bindkey -k k6
|
||||
bindkey -k k7
|
||||
bindkey -k k8
|
||||
bindkey -k k9
|
||||
bindkey -k F2
|
||||
|
||||
# Use the following sequences for byobu functionality
|
||||
# SEQUENCE ACTION F-Key equivalent
|
||||
# ctrl-a-c Create a new window F2
|
||||
# ctrl-a-p Previous window F3
|
||||
# ctrl-a-n Next window F4
|
||||
# ctrl-a-R Reload profile F5
|
||||
register r "^a:source $HOME/.byobu/profile^M"
|
||||
bind R process r
|
||||
# ctrl-a-d Detach from this session F6
|
||||
# ctrl-a-[ Enter copy/scrollback mode F7
|
||||
# ctrl-a-A Re-title a window F8
|
||||
# ctrl-a-@ Configuration F9
|
||||
bind @ screen -t help 0 byobu-config
|
||||
# ctrl-a-x Lock this terminal F12
|
||||
# ctrl-a-$ Show detailed status
|
||||
bind $ screen -t status 0 byobu-status-detail
|
||||
# ctrl-a-! Toggle f-key keybindings on
|
||||
register e "^a:source /usr/share/byobu/keybindings/f-keys^M"
|
||||
bind ! process e
|
Loading…
Add table
Add a link
Reference in a new issue