Skip to content
This repository

Added Tomorrow Night theme for IPython Qt console #138

Merged
merged 3 commits into from over 1 year ago

2 participants

AndreRisnes Chris Kempson
AndreRisnes

Added a theme similar to the notepad++ tomorrow_night theme in tomorrow-theme/ipythonqt

Chris Kempson chriskempson merged commit 1241907 into from October 17, 2012
Chris Kempson chriskempson closed this October 17, 2012
Chris Kempson
Owner

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
22  ipythonqt/readme.md
Source Rendered
... ...
@@ -0,0 +1,22 @@
  1
+# Tomorrow Night Theme for IPython Qt Console 
  2
+
  3
+## Usage:
  4
+
  5
+Copy tomorrownight.py to PYTHONHOME/Lib/site-packages/PYGMENTS_FOLDER/styles, and run
  6
+
  7
+    $ ipython qtconsole --style=tomorrownight --stylesheet=/path/to/tomorrownight.css
  8
+
  9
+If you want a different font from the default, you have to specify it on the command
  10
+line by adding
  11
+
  12
+    --ConsoleWidget.font_family="Font Family" --ConsoleWidget.font_size=NUMBER
  13
+    
  14
+to the command.
  15
+
  16
+## Development info:
  17
+
  18
+* Author: André Risnes
  19
+* Master: https://github.com/ChrisKempson/Tomorrow-Theme
  20
+* Fork: https://github.com/AndreRisnes/Tomorrow-Theme
  21
+
  22
+Please report any issues or suggestions to the fork.
10  ipythonqt/tomorrownight.css
... ...
@@ -0,0 +1,10 @@
  1
+QPlainTextEdit, QTextEdit {
  2
+    background-color: #1d1f21;
  3
+    color: #c5c8c6;
  4
+    selection-background-color: #373b41
  5
+}
  6
+.error { color: #cc6666; }
  7
+.in-prompt { color: #b5bd68 }
  8
+.in-prompt-number { font-weight: normal; }
  9
+.out-prompt { color: #8abeb7; }
  10
+.out-prompt-number { font-weight: normal; }
72  ipythonqt/tomorrownight.py
... ...
@@ -0,0 +1,72 @@
  1
+# -*- coding: utf-8 -*-
  2
+"""
  3
+    pygments.styles.autumn
  4
+    ~~~~~~~~~~~~~~~~~~~~~~
  5
+
  6
+    Tomorrow Night theme for ipython qtconsole (invoke with
  7
+    ipython qtconsole --style=tomorrownight)
  8
+    
  9
+    See https://github.com/chriskempson/tomorrow-theme for theme info
  10
+
  11
+    :copyright: Copyright 2012 André Risnes, risnes@gmail.com
  12
+    :license: BSD, see LICENSE for details.
  13
+"""
  14
+
  15
+from pygments.style import Style
  16
+from pygments.token import Keyword, Name, Comment, String, Error, \
  17
+     Number, Operator, Generic, Whitespace, Text, Punctuation
  18
+
  19
+class TomorrownightStyle(Style):
  20
+    """
  21
+    Tomorrow Night theme for ipython qtconsole
  22
+    """
  23
+    background_color = '#1d1f21'
  24
+    highlight_color = '#373b41'
  25
+
  26
+    styles = {
  27
+        Whitespace:                 background_color,
  28
+
  29
+        Text:                       '#c5c8c6',
  30
+        Punctuation:                '#81a2be',
  31
+
  32
+        Comment:                    '#b5bd68',
  33
+        Comment.Preproc:            'italic #b5bd68',
  34
+        Comment.Special:            'italic #b5bd68',
  35
+
  36
+        Keyword:                    '#81a2be',
  37
+        Keyword.Type:               '#f0c674',
  38
+        Keyword.Namespace:          '#de935f',
  39
+
  40
+        Operator.Word:              '#81a2be',
  41
+
  42
+        Name:                       '#de935f',
  43
+        Name.Builtin:               '#de935f',
  44
+        Name.Function:              '#8abeb7',
  45
+        Name.Class:                 '#f0c674',
  46
+        Name.Namespace:             '#81a2be',
  47
+        Name.Variable:              '#de935f',
  48
+        Name.Constant:              '#c5c8c6',
  49
+        Name.Entity:                'bold #00aaaa',
  50
+        Name.Attribute:             '#de935f',
  51
+        Name.Tag:                   'bold #b5bd68',
  52
+        Name.Decorator:             '#cc6666',
  53
+
  54
+        String:                     '#b5bd68',
  55
+        String.Symbol:              '#b5bd68',
  56
+        String.Regex:               '#b5bd68',
  57
+
  58
+        Number:                     '#cc6666',
  59
+
  60
+        Generic.Heading:            'bold #c5c8c6',
  61
+        Generic.Subheading:         'bold #c5c8c6',
  62
+        Generic.Deleted:            '#de935f',
  63
+        Generic.Inserted:           '#8abeb7',
  64
+        Generic.Error:              '#cc6666',
  65
+        Generic.Emph:               'italic',
  66
+        Generic.Strong:             'bold',
  67
+        Generic.Prompt:             '#b5bd68',
  68
+        Generic.Output:             '#c5c8c6',
  69
+        Generic.Traceback:          '#c5c8c6',
  70
+
  71
+        Error:                      '#cc6666'
  72
+    }
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.