Skip to content

Commit 828f2d1

Browse files
committed
Update theme paths and sample themes and the documentation
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
1 parent 5659aa8 commit 828f2d1

File tree

4 files changed

+22
-15
lines changed

4 files changed

+22
-15
lines changed

doc/sphinx/source/themes.rst

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ Themes
44
======
55
This chapter is about bpython's themeing capabalities.
66

7-
bpython uses .theme files placed in your ~/.bpython directory. You can set the
8-
theme in the :ref:`configuration_color_scheme` option in your
9-
`~/bpython/config`` file (:ref:`configuration`). You can find some of our
10-
themes in our gallery on our website:
11-
http://bpython-interpreter.org/themes/
7+
bpython uses .theme files placed in your ``$XDG_CONFIG_HOME/bpython`` directory
8+
[#f1]_. You can set the theme in the :ref:`configuration_color_scheme` option
9+
in your ``$XDG_CONFIG_HOME/bpython/config`` file (:ref:`configuration`). You can
10+
find some of our themes in our gallery on our website:
11+
`<http://bpython-interpreter.org/themes/>`_
1212

1313
Available Colors
1414
----------------
@@ -53,7 +53,8 @@ The default theme included in bpython is as follows:
5353
# which stands for:
5454
# blacK, Red, Green, Yellow, Blue, Magenta, Cyan, White, Default
5555
# Capital letters represent bold
56-
# Copy to ~/.bpython/foo.theme and set "color_scheme = foo" in ~/bpython/config
56+
# Copy to $XDG_CONFIG_HOME/bpython/foo.theme and set "color_scheme = foo" in
57+
# $XDG_CONFIG_HOME/bpython/config ($XDG_CONFIG_HOME defaults to ~/.config)
5758
5859
[syntax]
5960
keyword = y
@@ -66,7 +67,7 @@ The default theme included in bpython is as follows:
6667
punctuation = y
6768
token = C
6869
paren = R
69-
70+
7071
[interface]
7172
# XXX: gnome-terminal appears to be braindead. The cursor will disappear unless
7273
# you set the background colour to "d".
@@ -76,3 +77,7 @@ The default theme included in bpython is as follows:
7677
prompt = c
7778
prompt_more = g
7879
80+
.. :: Footnotes
81+
82+
.. [#f1] ``$XDG_CONFIG_HOME`` defaults to ``~/.config`` if not set.
83+

light.theme

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
# which stands for:
44
# blacK, Red, Green, Yellow, Blue, Magenta, Cyan, White, Default
55
# Capital letters represent bold
6-
# Copy to ~/.bpython/foo.theme and set "color_scheme = foo" in
7-
# ~/.bpython/config
6+
# Copy to $XDG_CONFIG_HOME/bpython/foo.theme and set "color_scheme = foo" in
7+
# $XDG_CONFIG_HOME/bpython/config ($XDG_CONFIG_HOME defaults to ~/.config)
88

99
[syntax]
1010
keyword = M

sample-config

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# This is a standard python config file
22
# Valid values can be True, False, integer numbers, strings
3-
# By default bpython will look for ~/.config/bpython/config or you
4-
# can specify a file with the --config option on the command line
3+
# By default bpython will look for $XDG_CONFIG_HOME/bpython/config
4+
# ($XDG_CONFIG_HOME defaults to ~/.config) or you can specify a file with the
5+
# --config option on the command line
56

67
# General section tag
78
[general]
@@ -26,9 +27,9 @@ hist_length = 100
2627
# Soft tab size (default: 4, see pep-8):
2728
tab_length = 4
2829

29-
# Color schemes should be put in ~/.bpython/
30-
# e.g. to use the theme ~/.bpython/foo.theme set color_scheme = foo
31-
# Leave blank or set to "default" to use the default theme
30+
# Color schemes should be put in $XDG_CONFIG_HOME/bpython/ e.g. to use the theme
31+
# $XDG_CONFIG_HOME/bpython/foo.theme set color_scheme = foo. Leave blank or set
32+
# to "default" to use the default theme
3233
color_scheme = default
3334

3435
[keyboard]

sample.theme

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
# which stands for:
44
# blacK, Red, Green, Yellow, Blue, Magenta, Cyan, White, Default
55
# Capital letters represent bold
6-
# Copy to ~/.bpython/foo.theme and set "color_scheme = foo" in ~/.bython/config
6+
# Copy to $XDG_CONFIG_HOME/bpython/foo.theme and set "color_scheme = foo" in
7+
# $XDG_CONFIG_HOME/bpython/config ($XDG_CONFIG_HOME defaults to ~/.config)
78

89
[syntax]
910
keyword = y

0 commit comments

Comments
 (0)