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
Bash Powerline not showing git branch info, but vi is working correctly. #186
Comments
You have to enable the default_leftonly theme in your user configuration. |
I tried to do that but I have no idea how to "change my user configuration" :( What should I change to get git branch on my prompt? |
WOW I have just read the docs (https://powerline.readthedocs.org/en/latest/configuration.html) and understood! ( sorry about the comment above :S ) |
@danieltdt that documentation is confusing. I can't figure out which file to change (and what to change) |
@DanielGGordon Either modify main config.json or make a local copy (into ~/.config/powerline) and change shell->theme from "default" to "default_leftonly" |
thanx! |
I have followed all the steps but still have this problem on Fedora 23: {
"common": {
"term_truecolor": false
},
"ext": {
"ipython": {
"colorscheme": "default",
"theme": "in",
"local_themes": {
"rewrite": "rewrite",
"out": "out",
"in2": "in2"
}
},
"shell": {
"colorscheme": "solarized",
"theme": "default_leftonly",
"local_themes": {
"continuation": "continuation",
"select": "select"
}
},
"tmux": {
"colorscheme": "default",
"theme": "default"
}
}
} Edited main config .json in powerline install root/config_files - still nothing. |
For the people from google: mkdir -p ~/.config/powerline
cat <<-'EOF' > ~/.config/powerline/config.json
{
"ext": {
"shell": {
"theme": "default_leftonly"
}
}
}
EOF
powerline-daemon --replace This works because configs are merged |
I agree that the documentation for customization managed to be verbose and confusing at the same time. I still have no idea where is @xenithorb worked for me btw ^^ |
Are you saying there a master config.json of sorts? And The docs I was reading dont seem to efficaciously educate the json schema |
I found some language on a website after googling for more info. I think this is how it's supposed to be done to get the user started with the base/defaults. Then can edit as needed I happen to install with pip --user , so my bits are in ~/.local/ , note: ~/.local/lib
Then as @xenithorb mentioned, edit ex: { "common": { "term_truecolor": false }, "ext": { "ipython": { "colorscheme": "default", "theme": "in", "local_themes": { "rewrite": "rewrite", "out": "out", "in2": "in2" } }, "pdb": { "colorscheme": "default", "theme": "default" }, "shell": { "colorscheme": "default", "theme": "default_leftonly", "local_themes": { "continuation": "continuation", "select": "select" } }, "tmux": { "colorscheme": "default", "theme": "default" }, "vim": { "colorscheme": "default", "theme": "default", "local_themes": { "__tabline__": "tabline", "cmdwin": "cmdwin", "help": "help", "quickfix": "quickfix", "powerline.matchers.vim.plugin.nerdtree.nerdtree": "plugin_nerdtree", "powerline.matchers.vim.plugin.commandt.commandt": "plugin_commandt", "powerline.matchers.vim.plugin.gundo.gundo": "plugin_gundo", "powerline.matchers.vim.plugin.gundo.gundo_preview": "plugin_gundo-preview" } }, "wm": { "colorscheme": "default", "theme": "default" } } } Also |
This was the command that I needed.
Thanks @xenithorb |
Hi, Is there a way to get extra information on git. I'd love to know if:
I've seen this https://github.com/jaspernbrouwer/powerline-gitstatus#installation and I was wondering if such things already exist or not in powerline ? |
No, you would need to use third-party modules like the one you mentioned. |
Archlinux Bash PowerlineEverything is detailed in the official documentation. This comment is just a quick TL;DR for those who doesn't have time to read and/or are lucky to succeed with those steps. Installation's commands$ pacman -S powerline powerline-fonts Create a per-user configuration folder$ mkdir -p ~/.config/powerline/ Copy the configuration file$ cp /usr/lib/python3.6/site-packages/powerline/config_files/config.json ~/.config/powerline The python version is likely to change. Check your local path to see if it does match with mine. Change the themeYou have to change the {
...
"ext": {
...
"shell": {
"colorscheme": "default",
"theme": "default_leftonly",
"local_themes": {
"continuation": "continuation",
"select": "select"
}
},
...
}
} Appy changespowerline-daemon --replace Or simply close and open a new shell. |
Bash Powerline with Git status - Deepin Linux 15(Debian and Ubuntu should work the same way) TL;DRpip install powerline-status
wget https://github.com/powerline/powerline/raw/develop/font/PowerlineSymbols.otf
wget https://github.com/powerline/powerline/raw/develop/font/10-powerline-symbols.conf
# NOTE: adjust fonts paths properly!
mv PowerlineSymbols.otf /usr/share/fonts/
fc-cache -vf /usr/share/fonts/
mv 10-powerline-symbols.conf ~/.config/fontconfig/conf.d/
# add this to your .bashrc
powerline-daemon -q
POWERLINE_BASH_CONTINUATION=1
POWERLINE_BASH_SELECT=1
. {powerline-installation-dir}/bindings/bash/powerline.sh
mkdir -p ~/.config/powerline
# NOTE: adjust your {powerline-installation-dir} properly!
cp /{powerline-installation-dir}/config_files/config.json ~/.config/powerline
# edit ~/.config/powerline/config.json to see git status and branch name in prompt
{ ...
"theme": "default_leftonly",
...
}
# edit "def __call_()" function in vcs.py (may require sudo)
# vcs.py location --> /{powerline-installation-dir}/segments/common/vcs.py
# change "status_colors=False" --> status_colors=True
# change "ignore_statuses=()" --> ignore_statuses=(["U"]) to ignore untracked files
def __call__(self, pl, segment_info, create_watcher, status_colors=True, ignore_statuses=()):
# FINISH! APPLY CHANGES!
powerline-daemon --replace Need a bit more details? --> Gist - 10 Steps to Bash Powerline for Deepin Linux (Debian / Ubuntu) Need even more details? --> Official Documentation |
Added .config/powerline/config.json copied from default location of: /usr/lib/python3.7/site-packages/powerline/config_files/ *This in prep to modify status line to show git branches *powerline/powerline#186
Besides |
I had trouble installing |
Another thing... in my .bashrc file I only added:
Nothing about the daemon and this stuff:
My questions are: |
I installed Powerline-status using pip3:
Created these directories:
And created these files based on various comments above:
Added these lines to ~/.bashrc as queried above:
Note the last line contains a variable because I'm doing all this through Ansible. Now my Konsole looks like this: I'm also using Ansible to install the Powerline patched fonts, but that's outside the scope of this issue & question. |
but if I do vi set.py I do see git branch info
in my vimrc i have the following
. /Users/felix/Personalization/powerline/powerline/bindings/bash/powerline.sh
running iterm2 1.0.0.20130204-nightly on OSX 10.8.2
also if someone can tell me how to add server info to my prompt that would be great.
The text was updated successfully, but these errors were encountered: