Replies: 2 comments
-
Greetings @SwampFalc,
This is correct - Bash-it's powerline theme is fully coded in bash and does not interact with the powerline daemon. That said, there are several ways to either customize the various powerline themes, or even add custom segments. You can find the bash code for the base theme here: If you like, we can discuss the changes you were trying to make and see how we might achieve them in Bash-it. Lemme know, and thanks for using Bash-it ! |
Beta Was this translation helpful? Give feedback.
-
I've basically managed to pull it off, but here's what I wanted / looked at. It's specifically in the realm of displaying the "name" of the python virtual environment. One of the emerging workflows with venvs is creating them inside the project, using the generic "venv" or ".venv" names. This is of course not very informative. The actual powerline code (https://github.com/powerline/powerline/blob/develop/powerline/segments/common/env.py#L21) shows that they have enabled the option of ignoring those strings, and falling back to the name of the parent folder. This might be something worth looking into, I have no clue how bash could do that. But in the same vein, since python 3.6, the official venv library (https://docs.python.org/3/library/venv.html#creating-virtual-environments) has included the option to specify the prompt when creating a new venv, in other words, the displayed name instead of the actual folder name. This results in the following block in the "activate" script:
As you can see, a new environment variable gets created, containing an (unfortunately slightly mangled) version of the name given when creating the venv (domainservicebus in my case). This was a whole lot easier for me to put into place in bash, since this just involves dropping the first and last two characters:
|
Beta Was this translation helpful? Give feedback.
-
So, genuine question because I'm kinda confused...
The powerline-inspired themes do not actually use the powerline-daemon software, right?
Because I've been trying to change a segment something by editing the python code of the daemon, and it's just not doing anything. And I'm not fluent enough in bash to be 100% certain just from reading the files that the daemon is ignored, so I thought I'd better just ask.
Beta Was this translation helpful? Give feedback.
All reactions