Skip to content

Instantly share code, notes, and snippets.

@mtgto
Created April 5, 2019 22:55
Show Gist options
  • Save mtgto/5f2a3db017e7adbdad6991dec4163581 to your computer and use it in GitHub Desktop.
Save mtgto/5f2a3db017e7adbdad6991dec4163581 to your computer and use it in GitHub Desktop.
First step to write a new Powerline segment.
# -*- coding: utf-8 -*-
def helloworld(pl):
return [{
'contents': 'こんにちは、世界',
'highlight_groups': ['information:regular']
}]
@mtgto
Copy link
Author

mtgto commented Apr 5, 2019

See detail https://powerline.readthedocs.io/en/master/develop/segments.html

  1. Save helloworld.py to ~/.config/powerline/segments
  2. Add "paths": ["~/.config/powerline/segments"] to "common" dict in ~/.config/powerline/config.json.
  3. Configure your themes/*/*.json like {"function": "helloworld.helloworld"}.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment