yi-monokai (empty) → 0.1.0.0
raw patch · 5 files changed
+200/−0 lines, 5 filesdep +basedep +yisetup-changed
Dependencies added: base, yi
Files
- LICENSE +27/−0
- README.md +8/−0
- Setup.hs +2/−0
- src/Yi/Style/Monokai.hs +144/−0
- yi-monokai.cabal +19/−0
+ LICENSE view
@@ -0,0 +1,27 @@+Copyright (c) 2013, Mateusz Kowalczyk+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.
+ README.md view
@@ -0,0 +1,8 @@+yi-monokai+==========++Monokai colour scheme for the Yi editor, at least for the Pango+back-end.++Currently looks like+
+ Setup.hs view
@@ -0,0 +1,2 @@+import Distribution.Simple+main = defaultMain
+ src/Yi/Style/Monokai.hs view
@@ -0,0 +1,144 @@+-- |+-- Module : Yi.Style.Monokai+-- Copyright : (c) Mateusz Kowalczyk 2013+-- License : BSD3+--+-- Maintainer : fuuzetsu@fuuzetsu.co.uk+-- Stability : experimental+-- Portability : portable++module Yi.Style.Monokai+ ( monokaiTheme++ -- * Colours+ , monokaiYellowLight+ , monokaiYellowDark+ , monokaiYellow+ , monokaiPurpleLight+ , monokaiMagenta+ , monokaiGreyDark+ , monokaiGreen+ , monokaiGreyLight+ , monokaiGreyLightest+ , monokaiGreyDarkest+ , monokaiGrey+ , monokaiGreyDarker+ , monokaiBlueLight+ , monokaiPurple+ , monokaiGreenLight+ )+ where++import Data.Bits (shiftR)+import Data.Monoid (mappend)+import Data.Word (Word32)+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 = monokaiTheme }+-- }+-- @+monokaiTheme :: Proto UIStyle+monokaiTheme = defaultTheme `override` \sets _ -> sets+ { baseAttributes = emptyAttributes { foreground = monokaiYellowLight+ , background = monokaiGreyDark+ , reverseAttr = False}+ , modelineAttributes = emptyAttributes { foreground = monokaiGreyLight+ , background = monokaiGreyLightest+ , reverseAttr = False }+ , selectedStyle = withBg monokaiGreyDarker+ , hintStyle = withBg monokaiGreyLightest+ , builtinStyle = withFg monokaiGreen+ , commentStyle = withFg monokaiYellowDark+ -- constantStyle would be great…+ -- no docstringStyle either?++ -- I hope variableStyle covers functions functions+ -- , variableStyle = withFg monokaiGreenLight -- monokaiMagenta+ , keywordStyle = withFg monokaiMagenta+ , stringStyle = withFg monokaiYellow+ , typeStyle = withFg monokaiBlueLight+ -- use error style for warnings+ , errorStyle = withFg monokaiPurpleLight `mappend` withBd True++ , operatorStyle = withFg monokaiMagenta++ , importStyle = withFg monokaiMagenta+ -- , preprocessorStyle = withFg preproc++ }+++-- | Convenience function+rgb :: Word32 -> Color+rgb x = RGB (fi (x `shiftR` 16))+ (fi (x `shiftR` 8))+ (fi x)+ where+ fi = fromIntegral++-- | Hex value: 0x89BDFF+monokaiBlueLight :: Color+monokaiBlueLight = rgb 0x89BDFF+-- | Hex value: 0x595959+monokaiGrey :: Color+monokaiGrey = rgb 0x595959++-- | Hex value: 0x383830+monokaiGreyDarker :: Color+monokaiGreyDarker = rgb 0x383830++-- | Hex value: 0x141411+monokaiGreyDarkest :: Color+monokaiGreyDarkest = rgb 0x141411++-- | Hex value: 0x595959+monokaiGreyLightest :: Color+monokaiGreyLightest = rgb 0x595959++-- | Hex value: 0xE6E6E6+monokaiGreyLight :: Color+monokaiGreyLight = rgb 0xE6E6E6++-- | Hex value: 0xA6E22A+monokaiGreen :: Color+monokaiGreen = rgb 0xA6E22A++-- | Hex value: 0xA6E22E+monokaiGreenLight :: Color+monokaiGreenLight = rgb 0xA6E22E++-- | Hex value: 0x272822+monokaiGreyDark :: Color+monokaiGreyDark = rgb 0x272822++-- | Hex value: 0xF92672+monokaiMagenta :: Color+monokaiMagenta = rgb 0xF92672++-- | Hex value: 0xAE81FF+monokaiPurple :: Color+monokaiPurple = rgb 0xAE81FF++-- | Hex value: 0xFD5FF1+monokaiPurpleLight :: Color+monokaiPurpleLight = rgb 0xFD5FF1++-- | Hex value: 0xE6DB74+monokaiYellow :: Color+monokaiYellow = rgb 0xE6DB74++-- | Hex value: 0x75715E+monokaiYellowDark :: Color+monokaiYellowDark = rgb 0x75715E++-- | Hex value: 0xF8F8F2+monokaiYellowLight :: Color+monokaiYellowLight = rgb 0xF8F8F2
+ yi-monokai.cabal view
@@ -0,0 +1,19 @@+name: yi-monokai+version: 0.1.0.0+synopsis: Monokai colour scheme for the Yi text editor+homepage: https://github.com/Fuuzetsu/yi-monokai+license: BSD3+license-file: LICENSE+author: Mateusz Kowalczyk+maintainer: fuuzetsu@fuuzetsu.co.uk+category: Yi+build-type: Simple+extra-source-files: README.md+cabal-version: >=1.10++library+ hs-source-dirs: src+ default-language: Haskell2010+ exposed-modules: Yi.Style.Monokai++ build-depends: base >=4.6 && <4.7, yi >=0.7