Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show of background jobs #23

Open
lourenko opened this issue May 3, 2021 · 1 comment
Open

Show of background jobs #23

lourenko opened this issue May 3, 2021 · 1 comment

Comments

@lourenko
Copy link

lourenko commented May 3, 2021

Hello, I think this even isn't an issue. I'm just trying to migrate from bash to xonsh and my question is if it is possible to configure powerline2 to show the last segment or add an indicator when there are active (or stopped) background jobs in terminal (for example, when I Ctrl+Z in vim). I realize to make a simple stuff like this:

$PL_EXTRA_SEC = {'user': lambda: [' {user} ', 'WHITE', '#555'],
                                  "cwd": lambda: ['{cwd}'+(' ({})'.format(len($(jobs).split("\n"))-1) if len($(jobs).split("\n")) > 1 else ' '), '#000000' if len($(jobs).split("\n")) > 1 else "WHITE", "#fd971f" if len($(jobs).split("\n")) > 1 else "#444"],
                }

Which will change the color of cwd and add the number of jobs in background. But I think the performance of this approach is very poor.

Thank you in advance.

@vaaaaanquish
Copy link
Owner

@lourenko
Thx. I've tried something similar myself. But, you're right, it is "bad performance".
I'm hoping we can handle it async/await ... 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants