Themes — bpython "0.26.dev4" documentation (original) (raw)
This chapter is about bpython’s theming capabilities.
bpython uses .theme files placed in your $XDG_CONFIG_HOME/bpython
directory[1]. You can set the theme in the color_scheme option in your $XDG_CONFIG_HOME/bpython/config
file (Configuration).
Available Colors¶
- k = black
- r = red
- g = green
- y = yellow
- b = blue
- m = magenta
- c = cyan
- w = white
- d = default, this will make the switch default to the bpython default theme
Any letter writing uppercase will make the switch bold.
Available Switches¶
- keyword
- name
- comment
- string
- error
- number
- operator
- punctuation
- token
- background
- output
- main
- prompt
- prompt_more
- right_arrow_suggestion
Default Theme¶
The default theme included in bpython is as follows:
1# Each letter represents a colour marker: 2# k, r, g, y, b, m, c, w, d 3# which stands for: 4# blacK, Red, Green, Yellow, Blue, Magenta, Cyan, White, Default 5# Capital letters represent bold 6# Copy to $XDG_CONFIG_HOME/bpython/foo.theme and set "color_scheme = foo" in 7# XDGCONFIGHOME/bpython/config(XDG_CONFIG_HOME/bpython/config (XDGCONFIGHOME/bpython/config(XDG_CONFIG_HOME defaults to ~/.config) 8 9[syntax] 10keyword = y 11name = c 12comment = b 13string = m 14error = r 15number = G 16operator = Y 17punctuation = y 18token = C 19paren = R 20 21[interface] 22# XXX: gnome-terminal appears to be braindead. The cursor will disappear unless 23# you set the background colour to "d". 24background = k 25output = w 26main = c 27prompt = c 28prompt_more = g 29right_arrow_suggestion = K