diff --git a/byobu-config b/byobu-config index 146a26f1..972794a8 100755 --- a/byobu-config +++ b/byobu-config @@ -27,11 +27,13 @@ from ConfigParser import SafeConfigParser from snack import * HOME=os.getenv("HOME") +USER=os.getenv("USER") PKG="byobu" SHARE='/usr/share/'+PKG DOC='/usr/share/doc/'+PKG DEF_ESC="A" -RELOAD = "If you are using the default set of keybindings, press\n to activate these changes.\n\nOtherwise, exit this screen session and start a new one." +RELOAD = "If you are using the default set of keybindings, press\n or to activate these changes.\n\nOtherwise, exit this screen session and start a new one." +RELOAD_FLAG="/var/run/screen/S-"+USER+"/"+PKG+".reload-required" ESC = '' snack.hotkeys[ESC] = ord(ESC) snack.hotkeys[ord(ESC)] = ESC @@ -54,6 +56,10 @@ def ioctl_GWINSZ(fd): #### TABULATION FUNCTIONS return None return cr +def reload_required(): + f = open(RELOAD_FLAG,'w') + f.close() + def terminal_size(): ### decide on *some* terminal size cr = ioctl_GWINSZ(0) or ioctl_GWINSZ(1) or ioctl_GWINSZ(2) # try open fds if not cr: # ...then ctty @@ -141,6 +147,7 @@ def profile(screen, size): if bb.buttonPressed(g.runOnce()) != "cancel": commands.getoutput('select-screen-profile --set %s' % li.current()) + reload_required() button = messagebox(screen, 60, 4, _("Message"), _(RELOAD), \ buttons=((_("Menu"), ))) return 100 @@ -157,6 +164,7 @@ def keybindings(screen, size): g.add(bb, 0, 1, padding=(1,1,0,0)) if bb.buttonPressed(g.runOnce()) != "cancel": switch_keybindings(li.current()) + reload_required() button = messagebox(screen, 60, 4, _("Message"), _(RELOAD), \ buttons=((_("Menu"), ))) return 100 @@ -330,6 +338,7 @@ def togglestatus(screen, size): item[0] = r.getEntryValue(count)[1] count=count+1 writestatus(itemlist) + reload_required() button = messagebox(screen, 60, 4, _("Message"), _(RELOAD), \ buttons=((_("Menu"), ))) return 100 @@ -459,6 +468,7 @@ def chgesc(screen, size): screen.popWindow() if bb.buttonPressed(which) != "cancel": setesckey(esc.value()) + reload_required() button = messagebox(screen, 60, 4, _("Message"), \ _(RELOAD), \ buttons=((_("Menu"), ))) diff --git a/debian/changelog b/debian/changelog index 8cb1089f..ed1728d7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -21,11 +21,13 @@ byobu (2.13) unreleased; urgency=low * bin/reboot_required, byobu-janitor, byobu-status, byobu.1, debian/postinst: display an next to the reboot symbol, if a byobu reload is required; flag this in the postinst, after upgrading byobu + * byobu-config: add note about ctrl-a-R to reload profile, flag the + reload-required file when making changes [ Ciemon Dunville ] * byobu.1: reflect the keybinding toggle change to Ctrl-a-! - -- Dustin Kirkland Sat, 20 Jun 2009 13:35:21 -0500 + -- Dustin Kirkland Sat, 20 Jun 2009 13:46:18 -0500 byobu (2.12-0ubuntu1) karmic; urgency=low