Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@flupke
Created June 28, 2013 23:01
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save flupke/5888808 to your computer and use it in GitHub Desktop.
Save flupke/5888808 to your computer and use it in GitHub Desktop.
A theme for pudb somewhat reproducing vim's desert colorscheme (needs 256 colors terminal).
default = 'light gray'
strings = 'h217'
keywords = add_setting('h222', 'bold')
callables = 'h120'
breakpoints = 'h203'
comments = 'h116'
background = 'h236'
focused_background = 'h238'
current_background = 'h240'
interface_background = 'h248'
desert_fg = {
'header': 'black',
'background': 'black',
'warning': default,
'comment': comments,
'var label': comments,
'frame class': keywords,
'keyword': keywords,
'literal': strings,
'string': strings,
'doublestring': strings,
'singlestring': strings,
'docstring': strings,
'name': callables,
'classname': callables,
'funcname': callables,
'frame name': callables,
'breakpoint': breakpoints,
'bp_star': breakpoints,
}
desert_bg = {
'header': interface_background,
'background': interface_background,
'warning': 'dark red',
}
for key, value in palette.items():
if key in desert_bg:
bg = desert_bg[key]
else:
if 'current' in key:
bg = current_background
elif 'focused' in key:
bg = focused_background
else:
bg = background
desert_key = key.replace('focused ', '') \
.replace('current ', '') \
.replace('highlighted ', '')
fg = desert_fg.get(desert_key, default)
if 'highlighted' in key:
if not fg.endswith('bold'):
fg = add_setting(fg, 'bold')
palette[key] = (fg, bg)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment