mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-22 14:24:39 -07:00
byobu-config: correct logic in determining if byobu is set to auto
launch
This commit is contained in:
parent
ac6c1b2e76
commit
34d3a85f8d
2 changed files with 13 additions and 15 deletions
4
debian/changelog
vendored
4
debian/changelog
vendored
|
@ -1,10 +1,12 @@
|
|||
byobu (2.57) unreleased; urgency=low
|
||||
byobu (2.57-0ubuntu1) lucid; urgency=low
|
||||
|
||||
* debian/postinst, usr/bin/byobu-config, usr/bin/byobu-launcher,
|
||||
usr/bin/byobu-launcher-uninstall: install the profile.d script
|
||||
at Z98-* to ensure that it's sourced last-ish; clean up and check
|
||||
for the new location; check if shell is interactive before exec'ing
|
||||
in the launcher
|
||||
* byobu-config: correct logic in determining if byobu is set to auto
|
||||
launch
|
||||
|
||||
-- Dustin Kirkland <kirkland@ubuntu.com> Tue, 09 Feb 2010 00:07:27 -0600
|
||||
|
||||
|
|
|
@ -405,22 +405,18 @@ def defaultwindows(screen, size):
|
|||
return 100
|
||||
|
||||
def install(screen, size, isInstalled):
|
||||
if not isInstalled:
|
||||
out = commands.getoutput("byobu-launcher-install")
|
||||
if out == "":
|
||||
out = _("Byobu will be launched automatically next time you login.")
|
||||
|
||||
button = messagebox(screen, 60, 2, "Message", out, \
|
||||
buttons=((_("Menu"), )))
|
||||
return 100
|
||||
else:
|
||||
if isInstalled:
|
||||
out = commands.getoutput("byobu-launcher-uninstall")
|
||||
if out == "":
|
||||
out = _("Byobu will not be used next time you login.")
|
||||
|
||||
button = messagebox(screen, 60, 2, _("Message"), out, \
|
||||
buttons=((_("Menu"), )))
|
||||
button = messagebox(screen, 60, 2, _("Message"), out, buttons=((_("Menu"), )))
|
||||
return 101
|
||||
else:
|
||||
out = commands.getoutput("byobu-launcher-install")
|
||||
if out == "":
|
||||
out = _("Byobu will be launched automatically next time you login.")
|
||||
button = messagebox(screen, 60, 2, "Message", out, buttons=((_("Menu"), )))
|
||||
return 100
|
||||
|
||||
def appendtofile(p, s):
|
||||
f = open(p, 'a')
|
||||
|
@ -499,7 +495,7 @@ def chgesc(screen, size):
|
|||
def autolaunch():
|
||||
if os.path.exists("%s/.%s/disable-autolaunch" % (HOME, PKG)):
|
||||
return 0
|
||||
if commands.getoutput('grep -qs byobu-launcher %s/.profile' % HOME):
|
||||
if commands.getstatusoutput('grep -qs byobu-launcher %s/.profile' % HOME):
|
||||
return 1
|
||||
if os.path.exists("/etc/profile.d/Z98-%s.sh" % PKG):
|
||||
return 1
|
||||
|
@ -541,7 +537,7 @@ def main():
|
|||
tag = defaultwindows(screen, size)
|
||||
elif tag == 9:
|
||||
tag = install(screen, size, isInstalled)
|
||||
isInstalled=(tag == 100)
|
||||
isInstalled = autolaunch()
|
||||
|
||||
screen.finish()
|
||||
sys.exit(0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue