diff --git a/byobu-config b/byobu-config index e3fd5425..ba6d8270 100755 --- a/byobu-config +++ b/byobu-config @@ -34,6 +34,7 @@ DOC='/usr/share/doc/'+PKG DEF_ESC="A" 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" +RELOAD_CMD="screen -X at 0 source $HOME/."+PKG+"/profile" ESC = '' snack.hotkeys[ESC] = ord(ESC) snack.hotkeys[ord(ESC)] = ESC @@ -59,6 +60,7 @@ def ioctl_GWINSZ(fd): #### TABULATION FUNCTIONS def reload_required(): f = open(RELOAD_FLAG,'w') f.close() + commands.getoutput(RELOAD_CMD) def terminal_size(): ### decide on *some* terminal size cr = ioctl_GWINSZ(0) or ioctl_GWINSZ(1) or ioctl_GWINSZ(2) # try open fds @@ -99,8 +101,6 @@ def menu(screen, size, isInstalled): g.add(bb, 0, 1, padding=(1,1,0,0)) if bb.buttonPressed(g.runOnce()) == "exit": - win="screen -X at 0 source $HOME/."+PKG+"/profile" - commands.getoutput(win) return 0 else: return li.current() @@ -150,8 +150,6 @@ def profile(screen, size): if bb.buttonPressed(g.runOnce()) != "cancel": commands.getoutput('byobu-select-profile --set %s' % li.current()) reload_required() - button = messagebox(screen, 60, 4, _("Message"), _(RELOAD), \ - buttons=((_("Menu"), ))) return 100 def keybindings(screen, size): @@ -167,8 +165,6 @@ def keybindings(screen, size): if bb.buttonPressed(g.runOnce()) != "cancel": switch_keybindings(li.current()) reload_required() - button = messagebox(screen, 60, 4, _("Message"), _(RELOAD), \ - buttons=((_("Menu"), ))) return 100 def switch_keybindings(set): @@ -348,8 +344,6 @@ def togglestatus(screen, size): count=count+1 writestatus(itemlist) reload_required() - button = messagebox(screen, 60, 4, _("Message"), _(RELOAD), \ - buttons=((_("Menu"), ))) return 100 def writewindows(winlist): @@ -478,9 +472,6 @@ def chgesc(screen, size): if bb.buttonPressed(which) != "cancel": setesckey(esc.value()) reload_required() - button = messagebox(screen, 60, 4, _("Message"), \ - _(RELOAD), \ - buttons=((_("Menu"), ))) if button == "exit": return 0 return 100 diff --git a/debian/changelog b/debian/changelog index c4cdfc04..80baed7e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,7 +5,11 @@ byobu (2.27) unreleased; urgency=low with minor modifications (install keybindings/common as a symlink to f-keys) - -- Dustin Kirkland Mon, 17 Aug 2009 15:46:14 -0500 + [ Dustin Kirkland ] + * byobu-config: use Derek's *awesome* "screen -X" hack to reload profiles + automatically, and drop the "reload" prompt + + -- Dustin Kirkland Mon, 17 Aug 2009 16:08:53 -0500 byobu (2.26-0ubuntu1) karmic; urgency=low