summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarioPastorelli <>2014-05-08 22:52:00 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2014-05-08 22:52:00 (GMT)
commit2ec432ca9a5f678666034684e934dd594f4c229d (patch)
tree2c6fea6887a928df1fb631ba392f23e9f2c58aee
version 0.1HEAD0.1master
-rw-r--r--LICENSE27
-rw-r--r--README.md4
-rw-r--r--Setup.hs2
-rw-r--r--src/Yi/Style/Spolsky.hs87
-rw-r--r--yi-spolsky.cabal24
5 files changed, 144 insertions, 0 deletions
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..e032e03
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,27 @@
+Copyright (c) 2014, Mario Pastorelli
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice, this
+ list of conditions and the following disclaimer in the documentation and/or
+ other materials provided with the distribution.
+
+* Neither the name of the {organization} nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..d2c60b1
--- /dev/null
+++ b/README.md
@@ -0,0 +1,4 @@
+yi-spolsky
+==========
+
+Spolsky colour scheme for the Yi Editor based on the [Emacs Spolsky Theme](https://github.com/owainlewis/emacs-color-themes#spolsky). \ No newline at end of file
diff --git a/Setup.hs b/Setup.hs
new file mode 100644
index 0000000..9a994af
--- /dev/null
+++ b/Setup.hs
@@ -0,0 +1,2 @@
+import Distribution.Simple
+main = defaultMain
diff --git a/src/Yi/Style/Spolsky.hs b/src/Yi/Style/Spolsky.hs
new file mode 100644
index 0000000..4449644
--- /dev/null
+++ b/src/Yi/Style/Spolsky.hs
@@ -0,0 +1,87 @@
+-- |
+-- Module : Yi.Style.Spolsky
+-- Copyright : (c) Mario Pastorelli 2014
+-- License : BSD3
+--
+-- Maintainer : pastorelli.mario@gmail.com
+-- Stability : experimental
+-- Portability : portable
+
+module Yi.Style.Spolsky
+ ( spolskyTheme
+
+ -- Colours
+ , spolskyNormal
+ , spolskyBackground
+ , spolskyVisualSelection
+ , spolskyCurrentLine
+ , spolskyOperators
+ , spolskyComments
+ , spolskyKeywords
+ , spolskyString
+ , spolskyTypeFace
+ , spolskyWarning
+ )
+ where
+
+import Data.Monoid (mappend, mempty)
+import Yi
+
+-- | The main theme specification. An example use in your @yi.hs@ might
+-- look something like
+--
+-- @
+-- main :: IO ()
+-- main = yi $ myConfig {
+-- defaultKm = defaultKm myConfig
+-- , startFrontEnd = start
+-- , configUI = (configUI defaultConfig) { configTheme = spolskyTheme }
+-- }
+-- @
+spolskyTheme :: Proto UIStyle
+spolskyTheme = defaultTheme `override` \sets _ -> sets
+ { baseAttributes = emptyAttributes { foreground = spolskyNormal
+ , background = spolskyBackground
+ , reverseAttr = False}
+ , modelineAttributes = emptyAttributes { foreground = spolskyBackground
+ , background = spolskyNormal
+ , reverseAttr = False }
+ , selectedStyle = withBg spolskyVisualSelection
+ , hintStyle = withBg spolskyCurrentLine
+ , strongHintStyle = withBg spolskyCurrentLine
+ , builtinStyle = withFg spolskyOperators
+ , commentStyle = withFg spolskyComments
+ , keywordStyle = withFg spolskyKeywords
+ , stringStyle = withFg spolskyString
+ , typeStyle = withFg spolskyTypeFace
+ , errorStyle = withFg spolskyWarning
+ , operatorStyle = withFg spolskyOperators
+ , importStyle = withFg spolskyKeywords
+ , numberStyle = withFg spolskyNumber
+ , preprocessorStyle = withFg spolskyKeywords
+ --, variableStyle = withFg spolskyMethodDeclaration
+
+ }
+
+spolskyBackground = RGB 22 26 31
+spolskyComments = RGB 140 140 140
+spolskyConstant = RGB 255 128 244
+spolskyCurrentLine = RGB 21 21 21
+spolskyCursorUnderscore = RGB 238 220 130
+spolskyKeywords = RGB 249 38 114
+spolskyLineNumber = RGB 22 26 31
+spolskyLineFg = RGB 102 102 102
+spolskyTypeFace = RGB 102 217 239
+spolskyMethodDeclaration = RGB 166 226 46
+spolskyModeLineBg = RGB 51 51 51
+spolskyModeInactiveBg = RGB 34 34 34
+spolskyModeLineFg = RGB 238 220 130
+spolskyModeInactiveFg = RGB 85 85 85
+spolskyNormal = RGB 222 222 222
+spolskyNumber = RGB 252 88 12
+spolskyOperators = RGB 255 140 0
+spolskyWarning = RGB 255 108 96
+spolskyRegexp = RGB 166 58 98
+spolskyString = RGB 238 220 130
+spolskyVariable = RGB 253 151 31
+spolskyVisualSelection = RGB 85 85 85 \ No newline at end of file
diff --git a/yi-spolsky.cabal b/yi-spolsky.cabal
new file mode 100644
index 0000000..627a238
--- /dev/null
+++ b/yi-spolsky.cabal
@@ -0,0 +1,24 @@
+name: yi-spolsky
+version: 0.1
+synopsis: Spolsky colour theme for the Yi text editor
+description: Spolsky colour theme for Yi. Check source for yi.hs usage.
+homepage: https://github.com/melrief/yi-spolsky
+license: BSD3
+license-file: LICENSE
+author: Mario Pastorelli
+maintainer: pastorelli.mario@gmail.com
+category: Editor
+build-type: Simple
+extra-source-files: README.md
+cabal-version: >=1.10
+source-repository head
+ type: git
+ location: git@github.com:melrief/yi-spolsky.git
+
+library
+ hs-source-dirs: src
+ default-language: Haskell2010
+ exposed-modules: Yi.Style.Spolsky
+
+ build-depends: base >=4.6 && <4.7
+ ,yi >=0.7