mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-21 05:53:22 -07:00
fix initial seeding of status config
This commit is contained in:
parent
18b0a02402
commit
2911e3c0f6
2 changed files with 6 additions and 3 deletions
1
debian/changelog
vendored
1
debian/changelog
vendored
|
@ -36,6 +36,7 @@ byobu (4.30) unreleased; urgency=low
|
||||||
gathering method
|
gathering method
|
||||||
* usr/bin/byobu-config:
|
* usr/bin/byobu-config:
|
||||||
- migrate to toggling on/off the list of status items
|
- migrate to toggling on/off the list of status items
|
||||||
|
- fix initial seeding of status config
|
||||||
|
|
||||||
-- Dustin Kirkland <kirkland@ubuntu.com> Thu, 11 Aug 2011 10:31:31 -0500
|
-- Dustin Kirkland <kirkland@ubuntu.com> Thu, 11 Aug 2011 10:31:31 -0500
|
||||||
|
|
||||||
|
|
|
@ -334,15 +334,17 @@ def writestatus(items):
|
||||||
path = BYOBU_CONFIG_DIR+'/status'
|
path = BYOBU_CONFIG_DIR+'/status'
|
||||||
for i in items:
|
for i in items:
|
||||||
status[i[1]] = i[0]
|
status[i[1]] = i[0]
|
||||||
# SED is hacky here, but damn effective
|
# SED is hacky here, but effective
|
||||||
if BYOBU_BACKEND == "tmux":
|
if BYOBU_BACKEND == "tmux":
|
||||||
for key in ["tmux_left", "tmux_right"]:
|
for key in ["tmux_left", "tmux_right"]:
|
||||||
val = genstatusstring(key, status)
|
val = genstatusstring(key, status)
|
||||||
commands.getoutput("%s -i -e 's/^%s=.*$/%s=\"%s\"/' %s" % (SED, key, key, val, path))
|
commands.getoutput("%s -i -e '/^%s=/d' %s" % (SED, key, path))
|
||||||
|
commands.getoutput("echo '%s=\"%s\"' >> %s" % (key, val, path))
|
||||||
else:
|
else:
|
||||||
for key in ["screen_upper_left", "screen_upper_right", "screen_lower_left", "screen_lower_right"]:
|
for key in ["screen_upper_left", "screen_upper_right", "screen_lower_left", "screen_lower_right"]:
|
||||||
val = genstatusstring(key, status)
|
val = genstatusstring(key, status)
|
||||||
commands.getoutput("%s -i -e 's/^%s=.*$/%s=\"%s\"/' %s" % (SED, key, key, val, path))
|
commands.getoutput("%s -i -e '/^%s=/d' %s" % (SED, key, path))
|
||||||
|
commands.getoutput("echo '%s=\"%s\"' >> %s" % (key, val, path))
|
||||||
|
|
||||||
def togglestatus(snackScreen, size):
|
def togglestatus(snackScreen, size):
|
||||||
itemlist=readstatus()
|
itemlist=readstatus()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue