Permalink
Browse files

Merge pull request #138 from AndreRisnes/master

Added Tomorrow Night theme for IPython Qt console
  • Loading branch information...
2 parents cc9079e + 9643730 commit 1241907755fa011b704416e7e6a27cd3f45bf72e @chriskempson committed Oct 17, 2012
Showing with 104 additions and 0 deletions.
  1. +22 −0 ipythonqt/readme.md
  2. +10 −0 ipythonqt/tomorrownight.css
  3. +72 −0 ipythonqt/tomorrownight.py
View
22 ipythonqt/readme.md
@@ -0,0 +1,22 @@
+# Tomorrow Night Theme for IPython Qt Console
+
+## Usage:
+
+Copy tomorrownight.py to PYTHONHOME/Lib/site-packages/PYGMENTS_FOLDER/styles, and run
+
+ $ ipython qtconsole --style=tomorrownight --stylesheet=/path/to/tomorrownight.css
+
+If you want a different font from the default, you have to specify it on the command
+line by adding
+
+ --ConsoleWidget.font_family="Font Family" --ConsoleWidget.font_size=NUMBER
+
+to the command.
+
+## Development info:
+
+* Author: André Risnes
+* Master: https://github.com/ChrisKempson/Tomorrow-Theme
+* Fork: https://github.com/AndreRisnes/Tomorrow-Theme
+
+Please report any issues or suggestions to the fork.
View
10 ipythonqt/tomorrownight.css
@@ -0,0 +1,10 @@
+QPlainTextEdit, QTextEdit {
+ background-color: #1d1f21;
+ color: #c5c8c6;
+ selection-background-color: #373b41
+}
+.error { color: #cc6666; }
+.in-prompt { color: #b5bd68 }
+.in-prompt-number { font-weight: normal; }
+.out-prompt { color: #8abeb7; }
+.out-prompt-number { font-weight: normal; }
View
72 ipythonqt/tomorrownight.py
@@ -0,0 +1,72 @@
+# -*- coding: utf-8 -*-
+"""
+ pygments.styles.autumn
+ ~~~~~~~~~~~~~~~~~~~~~~
+
+ Tomorrow Night theme for ipython qtconsole (invoke with
+ ipython qtconsole --style=tomorrownight)
+
+ See https://github.com/chriskempson/tomorrow-theme for theme info
+
+ :copyright: Copyright 2012 André Risnes, risnes@gmail.com
+ :license: BSD, see LICENSE for details.
+"""
+
+from pygments.style import Style
+from pygments.token import Keyword, Name, Comment, String, Error, \
+ Number, Operator, Generic, Whitespace, Text, Punctuation
+
+class TomorrownightStyle(Style):
+ """
+ Tomorrow Night theme for ipython qtconsole
+ """
+ background_color = '#1d1f21'
+ highlight_color = '#373b41'
+
+ styles = {
+ Whitespace: background_color,
+
+ Text: '#c5c8c6',
+ Punctuation: '#81a2be',
+
+ Comment: '#b5bd68',
+ Comment.Preproc: 'italic #b5bd68',
+ Comment.Special: 'italic #b5bd68',
+
+ Keyword: '#81a2be',
+ Keyword.Type: '#f0c674',
+ Keyword.Namespace: '#de935f',
+
+ Operator.Word: '#81a2be',
+
+ Name: '#de935f',
+ Name.Builtin: '#de935f',
+ Name.Function: '#8abeb7',
+ Name.Class: '#f0c674',
+ Name.Namespace: '#81a2be',
+ Name.Variable: '#de935f',
+ Name.Constant: '#c5c8c6',
+ Name.Entity: 'bold #00aaaa',
+ Name.Attribute: '#de935f',
+ Name.Tag: 'bold #b5bd68',
+ Name.Decorator: '#cc6666',
+
+ String: '#b5bd68',
+ String.Symbol: '#b5bd68',
+ String.Regex: '#b5bd68',
+
+ Number: '#cc6666',
+
+ Generic.Heading: 'bold #c5c8c6',
+ Generic.Subheading: 'bold #c5c8c6',
+ Generic.Deleted: '#de935f',
+ Generic.Inserted: '#8abeb7',
+ Generic.Error: '#cc6666',
+ Generic.Emph: 'italic',
+ Generic.Strong: 'bold',
+ Generic.Prompt: '#b5bd68',
+ Generic.Output: '#c5c8c6',
+ Generic.Traceback: '#c5c8c6',
+
+ Error: '#cc6666'
+ }

0 comments on commit 1241907

Please sign in to comment.