[modules/layout] Add autodetection and auto-adding of languages
Whenever the language is changed outside the bar, update the bar accordingly. Also, when a new language is used, automatically append it to the list of available languages.
This commit is contained in:
parent
ca64851687
commit
4819147410
2 changed files with 25 additions and 1 deletions
|
@ -24,7 +24,9 @@ def durationfmt(duration):
|
|||
def execute(cmd):
|
||||
args = shlex.split(cmd)
|
||||
p = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
out = p.communicate()
|
||||
out, err = p.communicate()
|
||||
|
||||
if p.returncode != 0:
|
||||
raise RuntimeError("{} exited with {}".format(cmd, p.returncode))
|
||||
|
||||
return out.decode("utf-8")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue