make sprachenatelier working..

This commit is contained in:
chris committed 2022-02-20 23:36:51 +01:00
1 parent 42c3774ca6
commit 1c57c66dca
87 files changed
+19196 -1382

No files matched your search

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,11 @@
let g:netrw_dirhistmax =10
let g:netrw_dirhist_cnt =9
let g:netrw_dirhist_1='/home/chris/devel/git/git.oopen.de/script/bash/snippets'
let g:netrw_dirhist_2='/home/chris/O.OPEN/Kunden/Anwaltsbuero-Kottbusser_Damm/carsten/ThinkPad_L380'
let g:netrw_dirhist_3='/home/chris/devel/git/git.oopen.de/ansible/mbr-bln/group_vars/all'
let g:netrw_dirhist_4='/home/chris/O.OPEN/Kunden/Gemeinschaft Altenschlirf/Intranet/VPN/VPN-GA-NH-chris'
let g:netrw_dirhist_5='/home/chris/devel/git/git.oopen.de/firewall/ipt-server'
let g:netrw_dirhist_6='/home/chris/devel/git/git.oopen.de/firewall/ipt-server/conf'
let g:netrw_dirhist_7='/home/chris/devel/git/git.oopen.de/ansible/oopen-server/group_vars'
let g:netrw_dirhist_8='/home/chris/devel/git/git.oopen.de/ansible/oopen-server/roles/ansible_dependencies'
let g:netrw_dirhist_9='/home/chris/devel/git/git.oopen.de/ansible/oopen-server/roles/ansible_dependencies/tasks'
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,547 @@
" File: afterglow.vim
" Author: Danilo Augusto <daniloaugusto.ita16@gmail.com>
" Date: 2017-02-27
" Vim color file - Afterglow (monokai version)
"
" Hex color conversion functions borrowed from the theme 'Desert256'
set background=dark
if version > 580
hi clear
if exists("syntax_on")
syntax reset
endif
endif
let g:colors_name = "afterglow"
" Default GUI Colours
let s:foreground = "d6d6d6"
let s:background = "1a1a1a"
let s:selection = "5a647e"
let s:line = "393939"
let s:comment = "797979"
let s:red = "ac4142"
let s:orange = "e87d3e"
let s:yellow = "e5b567"
let s:green = "b4c973"
let s:blue = "6c99bb"
let s:wine = "b05279"
let s:purple = "9e86c8"
let s:window = "4d5057"
if has("gui_running") || &t_Co == 88 || &t_Co == 256
" Returns an approximate grey index for the given grey level
fun <SID>grey_number(x)
if &t_Co == 88
if a:x < 23
return 0
elseif a:x < 69
return 1
elseif a:x < 103
return 2
elseif a:x < 127
return 3
elseif a:x < 150
return 4
elseif a:x < 173
return 5
elseif a:x < 196
return 6
elseif a:x < 219
return 7
elseif a:x < 243
return 8
else
return 9
endif
else
if a:x < 14
return 0
else
let l:n = (a:x - 8) / 10
let l:m = (a:x - 8) % 10
if l:m < 5
return l:n
else
return l:n + 1
endif
endif
endif
endfun
" Returns the actual grey level represented by the grey index
fun <SID>grey_level(n)
if &t_Co == 88
if a:n == 0
return 0
elseif a:n == 1
return 46
elseif a:n == 2
return 92
elseif a:n == 3
return 115
elseif a:n == 4
return 139
elseif a:n == 5
return 162
elseif a:n == 6
return 185
elseif a:n == 7
return 208
elseif a:n == 8
return 231
else
return 255
endif
else
if a:n == 0
return 0
else
return 8 + (a:n * 10)
endif
endif
endfun
" Returns the palette index for the given grey index
fun <SID>grey_colour(n)
if &t_Co == 88
if a:n == 0
return 16
elseif a:n == 9
return 79
else
return 79 + a:n
endif
else
if a:n == 0
return 16
elseif a:n == 25
return 231
else
return 231 + a:n
endif
endif
endfun
" Returns an approximate colour index for the given colour level
fun <SID>rgb_number(x)
if &t_Co == 88
if a:x < 69
return 0
elseif a:x < 172
return 1
elseif a:x < 230
return 2
else
return 3
endif
else
if a:x < 75
return 0
else
let l:n = (a:x - 55) / 40
let l:m = (a:x - 55) % 40
if l:m < 20
return l:n
else
return l:n + 1
endif
endif
endif
endfun
" Returns the actual colour level for the given colour index
fun <SID>rgb_level(n)
if &t_Co == 88
if a:n == 0
return 0
elseif a:n == 1
return 139
elseif a:n == 2
return 205
else
return 255
endif
else
if a:n == 0
return 0
else
return 55 + (a:n * 40)
endif
endif
endfun
" Returns the palette index for the given R/G/B colour indices
fun <SID>rgb_colour(x, y, z)
if &t_Co == 88
return 16 + (a:x * 16) + (a:y * 4) + a:z
else
return 16 + (a:x * 36) + (a:y * 6) + a:z
endif
endfun
" Returns the palette index to approximate the given R/G/B colour levels
fun <SID>colour(r, g, b)
" Get the closest grey
let l:gx = <SID>grey_number(a:r)
let l:gy = <SID>grey_number(a:g)
let l:gz = <SID>grey_number(a:b)
" Get the closest colour
let l:x = <SID>rgb_number(a:r)
let l:y = <SID>rgb_number(a:g)
let l:z = <SID>rgb_number(a:b)
if l:gx == l:gy && l:gy == l:gz
" There are two possibilities
let l:dgr = <SID>grey_level(l:gx) - a:r
let l:dgg = <SID>grey_level(l:gy) - a:g
let l:dgb = <SID>grey_level(l:gz) - a:b
let l:dgrey = (l:dgr * l:dgr) + (l:dgg * l:dgg) + (l:dgb * l:dgb)
let l:dr = <SID>rgb_level(l:gx) - a:r
let l:dg = <SID>rgb_level(l:gy) - a:g
let l:db = <SID>rgb_level(l:gz) - a:b
let l:drgb = (l:dr * l:dr) + (l:dg * l:dg) + (l:db * l:db)
if l:dgrey < l:drgb
" Use the grey
return <SID>grey_colour(l:gx)
else
" Use the colour
return <SID>rgb_colour(l:x, l:y, l:z)
endif
else
" Only one possibility
return <SID>rgb_colour(l:x, l:y, l:z)
endif
endfun
" Returns the palette index to approximate the 'rrggbb' hex string
fun <SID>rgb(rgb)
let l:r = ("0x" . strpart(a:rgb, 0, 2)) + 0
let l:g = ("0x" . strpart(a:rgb, 2, 2)) + 0
let l:b = ("0x" . strpart(a:rgb, 4, 2)) + 0
return <SID>colour(l:r, l:g, l:b)
endfun
" Sets the highlighting for the given group
fun <SID>X(group, fg, bg, attr)
if a:fg != ""
exec "hi " . a:group . " guifg=#" . a:fg . " ctermfg=" . <SID>rgb(a:fg)
endif
if a:bg != ""
exec "hi " . a:group . " guibg=#" . a:bg . " ctermbg=" . <SID>rgb(a:bg)
endif
if a:attr != ""
exec "hi " . a:group . " gui=" . a:attr . " cterm=" . a:attr
endif
endfun
" Vim Highlighting
call <SID>X("Normal", s:foreground, s:background, "")
call <SID>X("LineNr", s:comment, "", "")
call <SID>X("NonText", s:selection, "", "")
call <SID>X("SpecialKey", s:selection, "", "")
call <SID>X("Search", s:background, s:yellow, "")
call <SID>X("TabLine", s:window, s:foreground, "reverse")
call <SID>X("TabLineFill", s:window, s:foreground, "reverse")
call <SID>X("StatusLine", s:window, s:yellow, "reverse")
call <SID>X("StatusLineNC", s:window, s:foreground, "reverse")
call <SID>X("VertSplit", s:window, s:window, "none")
call <SID>X("Visual", "", s:selection, "")
call <SID>X("Directory", s:blue, "", "")
call <SID>X("ModeMsg", s:green, "", "")
call <SID>X("MoreMsg", s:green, "", "")
call <SID>X("Question", s:green, "", "")
call <SID>X("WarningMsg", s:orange, "", "bold")
call <SID>X("MatchParen", "", s:selection, "")
call <SID>X("Folded", s:comment, s:background, "")
call <SID>X("FoldColumn", "", s:background, "")
if version >= 700
call <SID>X("CursorLine", "", s:line, "none")
call <SID>X("CursorLineNR", s:orange, "", "none")
call <SID>X("CursorColumn", "", s:line, "none")
call <SID>X("PMenu", s:foreground, s:selection, "none")
call <SID>X("PMenuSel", s:foreground, s:selection, "reverse")
call <SID>X("SignColumn", "", s:background, "none")
end
if version >= 703
call <SID>X("ColorColumn", "", s:line, "none")
end
" Standard Highlighting
call <SID>X("Comment", s:comment, "", "")
call <SID>X("Todo", s:red, s:background, "bold")
call <SID>X("Title", s:comment, "", "bold")
call <SID>X("Identifier", s:orange, "", "")
call <SID>X("Statement", s:wine, "", "")
call <SID>X("Conditional", s:wine, "", "")
call <SID>X("Repeat", s:wine, "", "")
call <SID>X("Structure", s:wine, "", "")
call <SID>X("Function", s:orange, "", "")
call <SID>X("Constant", s:purple, "", "")
call <SID>X("Keyword", s:orange, "", "")
call <SID>X("String", s:yellow, "", "")
call <SID>X("Special", s:blue, "", "")
call <SID>X("PreProc", s:green, "", "")
call <SID>X("Operator", s:purple, "", "")
call <SID>X("Type", s:blue, "", "")
call <SID>X("Define", s:wine, "", "")
call <SID>X("Include", s:wine, "", "")
call <SID>X("Tag", s:orange, "", "bold")
call <SID>X("Underlined", s:orange, "", "underline")
syntax match commonOperator "\(+\|=\|-\|*\|\^\|\/\||\)"
hi link commonOperator Operator
" Vim Highlighting
call <SID>X("vimCommand", s:wine, "", "none")
" C Highlighting
call <SID>X("cType", s:wine, "", "")
call <SID>X("cStorageClass", s:orange, "", "")
call <SID>X("cConditional", s:wine, "", "")
call <SID>X("cRepeat", s:wine, "", "")
" PHP Highlighting
call <SID>X("phpVarSelector", s:wine, "", "")
call <SID>X("phpKeyword", s:wine, "", "")
call <SID>X("phpRepeat", s:wine, "", "")
call <SID>X("phpConditional", s:wine, "", "")
call <SID>X("phpStatement", s:wine, "", "")
call <SID>X("phpMemberSelector", s:foreground, "", "")
" Ruby Highlighting
call <SID>X("rubySymbol", s:blue, "", "")
call <SID>X("rubyConstant", s:green, "", "")
call <SID>X("rubyAccess", s:yellow, "", "")
call <SID>X("rubyAttribute", s:blue, "", "")
call <SID>X("rubyInclude", s:blue, "", "")
call <SID>X("rubyLocalVariableOrMethod", s:orange, "", "")
call <SID>X("rubyCurlyBlock", s:orange, "", "")
call <SID>X("rubyStringDelimiter", s:yellow, "", "")
call <SID>X("rubyInterpolationDelimiter", s:orange, "", "")
call <SID>X("rubyConditional", s:wine, "", "")
call <SID>X("rubyRepeat", s:wine, "", "")
call <SID>X("rubyControl", s:wine, "", "")
call <SID>X("rubyException", s:wine, "", "")
" Crystal Highlighting
call <SID>X("crystalSymbol", s:green, "", "")
call <SID>X("crystalConstant", s:yellow, "", "")
call <SID>X("crystalAccess", s:yellow, "", "")
call <SID>X("crystalAttribute", s:blue, "", "")
call <SID>X("crystalInclude", s:blue, "", "")
call <SID>X("crystalLocalVariableOrMethod", s:orange, "", "")
call <SID>X("crystalCurlyBlock", s:orange, "", "")
call <SID>X("crystalStringDelimiter", s:green, "", "")
call <SID>X("crystalInterpolationDelimiter", s:orange, "", "")
call <SID>X("crystalConditional", s:wine, "", "")
call <SID>X("crystalRepeat", s:wine, "", "")
call <SID>X("crystalControl", s:wine, "", "")
call <SID>X("crystalException", s:wine, "", "")
" Python Highlighting
call <SID>X("pythonInclude", s:green, "", "italic")
call <SID>X("pythonStatement", s:blue, "", "")
call <SID>X("pythonConditional", s:wine, "", "")
call <SID>X("pythonRepeat", s:wine, "", "")
call <SID>X("pythonException", s:wine, "", "")
call <SID>X("pythonFunction", s:green, "", "italic")
call <SID>X("pythonPreCondit", s:wine, "", "")
call <SID>X("pythonExClass", s:orange, "", "")
call <SID>X("pythonBuiltin", s:blue, "", "")
call <SID>X("pythonOperator", s:wine, "", "")
call <SID>X("pythonNumber", s:purple, "", "")
call <SID>X("pythonString", s:yellow, "", "")
call <SID>X("pythonRawString", s:yellow, "", "")
call <SID>X("pythonDecorator", s:wine, "", "")
call <SID>X("pythonDoctest", s:yellow, "", "")
call <SID>X("pythonImportFunction", s:orange, "", "")
call <SID>X("pythonImportModule", s:orange, "", "")
call <SID>X("pythonImportObject", s:orange, "", "")
call <SID>X("pythonImportedClassDef", s:orange, "", "")
call <SID>X("pythonImportedFuncDef", s:orange, "", "")
call <SID>X("pythonImportedModule", s:orange, "", "")
call <SID>X("pythonImportedObject", s:orange, "", "")
" JavaScript Highlighting
call <SID>X("javaScriptEndColons", s:foreground, "", "")
call <SID>X("javaScriptOpSymbols", s:foreground, "", "")
call <SID>X("javaScriptLogicSymbols", s:foreground, "", "")
call <SID>X("javaScriptBraces", s:foreground, "", "")
call <SID>X("javaScriptParens", s:foreground, "", "")
call <SID>X("javaScriptFunction", s:green, "", "")
call <SID>X("javaScriptComment", s:comment, "", "")
call <SID>X("javaScriptLineComment", s:comment, "", "")
call <SID>X("javaScriptDocComment", s:comment, "", "")
call <SID>X("javaScriptCommentTodo", s:red, "", "")
call <SID>X("javaScriptString", s:yellow, "", "")
call <SID>X("javaScriptRegexpString", s:yellow, "", "")
call <SID>X("javaScriptTemplateString", s:yellow, "", "")
call <SID>X("javaScriptNumber", s:purple, "", "")
call <SID>X("javaScriptFloat", s:purple, "", "")
call <SID>X("javaScriptGlobal", s:purple, "", "")
call <SID>X("javaScriptCharacter", s:blue, "", "")
call <SID>X("javaScriptPrototype", s:blue, "", "")
call <SID>X("javaScriptConditional", s:blue, "", "")
call <SID>X("javaScriptBranch", s:blue, "", "")
call <SID>X("javaScriptIdentifier", s:orange, "", "")
call <SID>X("javaScriptRepeat", s:blue, "", "")
call <SID>X("javaScriptStatement", s:blue, "", "")
call <SID>X("javaScriptMessage", s:blue, "", "")
call <SID>X("javaScriptReserved", s:blue, "", "")
call <SID>X("javaScriptOperator", s:blue, "", "")
call <SID>X("javaScriptNull", s:purple, "", "")
call <SID>X("javaScriptBoolean", s:purple, "", "")
call <SID>X("javaScriptLabel", s:blue, "", "")
call <SID>X("javaScriptSpecial", s:blue, "", "")
call <SID>X("javaScriptExceptions", s:red, "", "")
call <SID>X("javaScriptDeprecated", s:red, "", "")
call <SID>X("javaScriptError", s:red, "", "")
" LaTeX
call <SID>X("texStatement",s:blue, "", "")
call <SID>X("texMath", s:wine, "", "none")
call <SID>X("texMathMacher", s:yellow, "", "none")
call <SID>X("texRefLabel", s:wine, "", "none")
call <SID>X("texRefZone", s:blue, "", "none")
call <SID>X("texComment", s:comment, "", "none")
call <SID>X("texDelimiter", s:purple, "", "none")
call <SID>X("texMathZoneX", s:purple, "", "none")
" CoffeeScript Highlighting
call <SID>X("coffeeRepeat", s:wine, "", "")
call <SID>X("coffeeConditional", s:wine, "", "")
call <SID>X("coffeeKeyword", s:wine, "", "")
call <SID>X("coffeeObject", s:yellow, "", "")
" HTML Highlighting
call <SID>X("htmlTag", s:blue, "", "")
call <SID>X("htmlEndTag", s:blue, "", "")
call <SID>X("htmlTagName", s:wine, "", "bold")
call <SID>X("htmlArg", s:green, "", "italic")
call <SID>X("htmlScriptTag", s:wine, "", "")
" Diff Highlighting
call <SID>X("diffAdd", "", "4c4e39", "")
call <SID>X("diffDelete", s:background, s:red, "")
call <SID>X("diffChange", "", "2B5B77", "")
call <SID>X("diffText", s:line, s:blue, "")
" ShowMarks Highlighting
call <SID>X("ShowMarksHLl", s:orange, s:background, "none")
call <SID>X("ShowMarksHLo", s:wine, s:background, "none")
call <SID>X("ShowMarksHLu", s:yellow, s:background, "none")
call <SID>X("ShowMarksHLm", s:wine, s:background, "none")
" Lua Highlighting
call <SID>X("luaStatement", s:wine, "", "")
call <SID>X("luaRepeat", s:wine, "", "")
call <SID>X("luaCondStart", s:wine, "", "")
call <SID>X("luaCondElseif", s:wine, "", "")
call <SID>X("luaCond", s:wine, "", "")
call <SID>X("luaCondEnd", s:wine, "", "")
" Cucumber Highlighting
call <SID>X("cucumberGiven", s:blue, "", "")
call <SID>X("cucumberGivenAnd", s:blue, "", "")
" Go Highlighting
call <SID>X("goDirective", s:wine, "", "")
call <SID>X("goDeclaration", s:wine, "", "")
call <SID>X("goStatement", s:wine, "", "")
call <SID>X("goConditional", s:wine, "", "")
call <SID>X("goConstants", s:orange, "", "")
call <SID>X("goTodo", s:red, "", "")
call <SID>X("goDeclType", s:blue, "", "")
call <SID>X("goBuiltins", s:wine, "", "")
call <SID>X("goRepeat", s:wine, "", "")
call <SID>X("goLabel", s:wine, "", "")
" Clojure Highlighting
call <SID>X("clojureConstant", s:orange, "", "")
call <SID>X("clojureBoolean", s:orange, "", "")
call <SID>X("clojureCharacter", s:orange, "", "")
call <SID>X("clojureKeyword", s:green, "", "")
call <SID>X("clojureNumber", s:orange, "", "")
call <SID>X("clojureString", s:green, "", "")
call <SID>X("clojureRegexp", s:green, "", "")
call <SID>X("clojureParen", s:wine, "", "")
call <SID>X("clojureVariable", s:yellow, "", "")
call <SID>X("clojureCond", s:blue, "", "")
call <SID>X("clojureDefine", s:wine, "", "")
call <SID>X("clojureException", s:red, "", "")
call <SID>X("clojureFunc", s:blue, "", "")
call <SID>X("clojureMacro", s:blue, "", "")
call <SID>X("clojureRepeat", s:blue, "", "")
call <SID>X("clojureSpecial", s:wine, "", "")
call <SID>X("clojureQuote", s:blue, "", "")
call <SID>X("clojureUnquote", s:blue, "", "")
call <SID>X("clojureMeta", s:blue, "", "")
call <SID>X("clojureDeref", s:blue, "", "")
call <SID>X("clojureAnonArg", s:blue, "", "")
call <SID>X("clojureRepeat", s:blue, "", "")
call <SID>X("clojureDispatch", s:blue, "", "")
" Scala Highlighting
call <SID>X("scalaKeyword", s:wine, "", "")
call <SID>X("scalaKeywordModifier", s:wine, "", "")
call <SID>X("scalaOperator", s:blue, "", "")
call <SID>X("scalaPackage", s:wine, "", "")
call <SID>X("scalaFqn", s:foreground, "", "")
call <SID>X("scalaFqnSet", s:foreground, "", "")
call <SID>X("scalaImport", s:wine, "", "")
call <SID>X("scalaBoolean", s:orange, "", "")
call <SID>X("scalaDef", s:wine, "", "")
call <SID>X("scalaVal", s:wine, "", "")
call <SID>X("scalaVar", s:wine, "", "")
call <SID>X("scalaClass", s:wine, "", "")
call <SID>X("scalaObject", s:wine, "", "")
call <SID>X("scalaTrait", s:wine, "", "")
call <SID>X("scalaDefName", s:blue, "", "")
call <SID>X("scalaValName", s:foreground, "", "")
call <SID>X("scalaVarName", s:foreground, "", "")
call <SID>X("scalaClassName", s:foreground, "", "")
call <SID>X("scalaType", s:yellow, "", "")
call <SID>X("scalaTypeSpecializer", s:yellow, "", "")
call <SID>X("scalaAnnotation", s:orange, "", "")
call <SID>X("scalaNumber", s:orange, "", "")
call <SID>X("scalaDefSpecializer", s:yellow, "", "")
call <SID>X("scalaClassSpecializer", s:yellow, "", "")
call <SID>X("scalaBackTick", s:green, "", "")
call <SID>X("scalaRoot", s:foreground, "", "")
call <SID>X("scalaMethodCall", s:blue, "", "")
call <SID>X("scalaCaseType", s:yellow, "", "")
call <SID>X("scalaLineComment", s:comment, "", "")
call <SID>X("scalaComment", s:comment, "", "")
call <SID>X("scalaDocComment", s:comment, "", "")
call <SID>X("scalaDocTags", s:comment, "", "")
call <SID>X("scalaEmptyString", s:green, "", "")
call <SID>X("scalaMultiLineString", s:green, "", "")
call <SID>X("scalaUnicode", s:orange, "", "")
call <SID>X("scalaString", s:green, "", "")
call <SID>X("scalaStringEscape", s:green, "", "")
call <SID>X("scalaSymbol", s:orange, "", "")
call <SID>X("scalaChar", s:orange, "", "")
call <SID>X("scalaXml", s:green, "", "")
call <SID>X("scalaConstructorSpecializer", s:yellow, "", "")
call <SID>X("scalaBackTick", s:blue, "", "")
" Git
call <SID>X("diffAdded", s:green, "", "")
call <SID>X("diffRemoved", s:red, "", "")
call <SID>X("gitcommitSummary", "", "", "bold")
" Delete Functions
delf <SID>X
delf <SID>rgb
delf <SID>colour
delf <SID>rgb_colour
delf <SID>rgb_level
delf <SID>rgb_number
delf <SID>grey_colour
delf <SID>grey_level
delf <SID>grey_number
endif
@@ -0,0 +1,268 @@
" Initialisation:"{{{
" ----------------------------------------------------------------------------
hi clear
if exists("syntax_on")
syntax reset
endif
let s:style = get(g:, 'ayucolor', 'dark')
let g:colors_name = "ayu"
"}}}
" Palettes:"{{{
" ----------------------------------------------------------------------------
let s:palette = {}
let s:palette.bg = {'dark': "#0F1419", 'light': "#FAFAFA", 'mirage': "#212733"}
let s:palette.comment = {'dark': "#5C6773", 'light': "#ABB0B6", 'mirage': "#5C6773"}
let s:palette.markup = {'dark': "#F07178", 'light': "#F07178", 'mirage': "#F07178"}
let s:palette.constant = {'dark': "#FFEE99", 'light': "#A37ACC", 'mirage': "#D4BFFF"}
let s:palette.operator = {'dark': "#E7C547", 'light': "#E7C547", 'mirage': "#80D4FF"}
let s:palette.tag = {'dark': "#36A3D9", 'light': "#36A3D9", 'mirage': "#5CCFE6"}
let s:palette.regexp = {'dark': "#95E6CB", 'light': "#4CBF99", 'mirage': "#95E6CB"}
let s:palette.string = {'dark': "#B8CC52", 'light': "#86B300", 'mirage': "#BBE67E"}
let s:palette.function = {'dark': "#FFB454", 'light': "#F29718", 'mirage': "#FFD57F"}
let s:palette.special = {'dark': "#E6B673", 'light': "#E6B673", 'mirage': "#FFC44C"}
let s:palette.keyword = {'dark': "#FF7733", 'light': "#FF7733", 'mirage': "#FFAE57"}
let s:palette.error = {'dark': "#FF3333", 'light': "#FF3333", 'mirage': "#FF3333"}
let s:palette.accent = {'dark': "#F29718", 'light': "#FF6A00", 'mirage': "#FFCC66"}
let s:palette.panel = {'dark': "#14191F", 'light': "#FFFFFF", 'mirage': "#272D38"}
let s:palette.guide = {'dark': "#2D3640", 'light': "#D9D8D7", 'mirage': "#3D4751"}
let s:palette.line = {'dark': "#151A1E", 'light': "#F3F3F3", 'mirage': "#242B38"}
let s:palette.selection = {'dark': "#253340", 'light': "#F0EEE4", 'mirage': "#343F4C"}
let s:palette.fg = {'dark': "#E6E1CF", 'light': "#5C6773", 'mirage': "#D9D7CE"}
let s:palette.fg_idle = {'dark': "#3E4B59", 'light': "#828C99", 'mirage': "#607080"}
"}}}
" Highlighting Primitives:"{{{
" ----------------------------------------------------------------------------
function! s:build_prim(hi_elem, field)
let l:vname = "s:" . a:hi_elem . "_" . a:field " s:bg_gray
let l:gui_assign = "gui".a:hi_elem."=".s:palette[a:field][s:style] " guibg=...
exe "let " . l:vname . " = ' " . l:gui_assign . "'"
endfunction
let s:bg_none = ' guibg=NONE ctermbg=NONE'
let s:fg_none = ' guifg=NONE ctermfg=NONE'
for [key_name, d_value] in items(s:palette)
call s:build_prim('bg', key_name)
call s:build_prim('fg', key_name)
endfor
" }}}
" Formatting Options:"{{{
" ----------------------------------------------------------------------------
let s:none = "NONE"
let s:t_none = "NONE"
let s:n = "NONE"
let s:c = ",undercurl"
let s:r = ",reverse"
let s:s = ",standout"
let s:b = ",bold"
let s:u = ",underline"
let s:i = ",italic"
exe "let s:fmt_none = ' gui=NONE". " cterm=NONE". " term=NONE" ."'"
exe "let s:fmt_bold = ' gui=NONE".s:b. " cterm=NONE".s:b. " term=NONE".s:b ."'"
exe "let s:fmt_bldi = ' gui=NONE".s:b. " cterm=NONE".s:b. " term=NONE".s:b ."'"
exe "let s:fmt_undr = ' gui=NONE".s:u. " cterm=NONE".s:u. " term=NONE".s:u ."'"
exe "let s:fmt_undb = ' gui=NONE".s:u.s:b. " cterm=NONE".s:u.s:b. " term=NONE".s:u.s:b."'"
exe "let s:fmt_undi = ' gui=NONE".s:u. " cterm=NONE".s:u. " term=NONE".s:u ."'"
exe "let s:fmt_curl = ' gui=NONE".s:c. " cterm=NONE".s:c. " term=NONE".s:c ."'"
exe "let s:fmt_ital = ' gui=NONE".s:i. " cterm=NONE".s:i. " term=NONE".s:i ."'"
exe "let s:fmt_stnd = ' gui=NONE".s:s. " cterm=NONE".s:s. " term=NONE".s:s ."'"
exe "let s:fmt_revr = ' gui=NONE".s:r. " cterm=NONE".s:r. " term=NONE".s:r ."'"
exe "let s:fmt_revb = ' gui=NONE".s:r.s:b. " cterm=NONE".s:r.s:b. " term=NONE".s:r.s:b."'"
"}}}
" Vim Highlighting: (see :help highlight-groups)"{{{
" ----------------------------------------------------------------------------
exe "hi! Normal" .s:fg_fg .s:bg_bg .s:fmt_none
exe "hi! ColorColumn" .s:fg_none .s:bg_line .s:fmt_none
" Conceal, Cursor, CursorIM
exe "hi! CursorColumn" .s:fg_none .s:bg_line .s:fmt_none
exe "hi! CursorLine" .s:fg_none .s:bg_line .s:fmt_none
exe "hi! CursorLineNr" .s:fg_accent .s:bg_line .s:fmt_none
exe "hi! LineNr" .s:fg_guide .s:bg_none .s:fmt_none
exe "hi! Directory" .s:fg_fg_idle .s:bg_none .s:fmt_none
exe "hi! DiffAdd" .s:fg_string .s:bg_panel .s:fmt_none
exe "hi! DiffChange" .s:fg_tag .s:bg_panel .s:fmt_none
exe "hi! DiffText" .s:fg_fg .s:bg_panel .s:fmt_none
exe "hi! ErrorMsg" .s:fg_fg .s:bg_error .s:fmt_stnd
exe "hi! VertSplit" .s:fg_bg .s:bg_none .s:fmt_none
exe "hi! Folded" .s:fg_fg_idle .s:bg_panel .s:fmt_none
exe "hi! FoldColumn" .s:fg_none .s:bg_panel .s:fmt_none
exe "hi! SignColumn" .s:fg_none .s:bg_panel .s:fmt_none
" Incsearch"
exe "hi! MatchParen" .s:fg_fg .s:bg_bg .s:fmt_undr
exe "hi! ModeMsg" .s:fg_string .s:bg_none .s:fmt_none
exe "hi! MoreMsg" .s:fg_string .s:bg_none .s:fmt_none
exe "hi! NonText" .s:fg_bg .s:bg_none .s:fmt_none
exe "hi! Pmenu" .s:fg_fg .s:bg_selection .s:fmt_none
exe "hi! PmenuSel" .s:fg_fg .s:bg_selection .s:fmt_revr
" PmenuSbar"
" PmenuThumb"
exe "hi! Question" .s:fg_string .s:bg_none .s:fmt_none
exe "hi! Search" .s:fg_bg .s:bg_constant .s:fmt_none
exe "hi! SpecialKey" .s:fg_selection .s:bg_none .s:fmt_none
exe "hi! SpellCap" .s:fg_tag .s:bg_none .s:fmt_undr
exe "hi! SpellLocal" .s:fg_keyword .s:bg_none .s:fmt_undr
exe "hi! SpellBad" .s:fg_error .s:bg_none .s:fmt_undr
exe "hi! SpellRare" .s:fg_regexp .s:bg_none .s:fmt_undr
exe "hi! StatusLine" .s:fg_fg .s:bg_panel .s:fmt_none
exe "hi! StatusLineNC" .s:fg_fg_idle .s:bg_panel .s:fmt_none
exe "hi! WildMenu" .s:fg_bg .s:bg_markup .s:fmt_none
exe "hi! TabLine" .s:fg_fg .s:bg_panel .s:fmt_revr
" TabLineFill"
" TabLineSel"
exe "hi! Title" .s:fg_keyword .s:bg_none .s:fmt_none
exe "hi! Visual" .s:fg_none .s:bg_selection .s:fmt_none
" VisualNos"
exe "hi! WarningMsg" .s:fg_error .s:bg_none .s:fmt_none
" TODO LongLineWarning to use variables instead of hardcoding
hi LongLineWarning guifg=NONE guibg=#371F1C gui=underline ctermfg=NONE ctermbg=NONE cterm=underline
" WildMenu"
"}}}
" Generic Syntax Highlighting: (see :help group-name)"{{{
" ----------------------------------------------------------------------------
exe "hi! Comment" .s:fg_comment .s:bg_none .s:fmt_none
exe "hi! Constant" .s:fg_constant .s:bg_none .s:fmt_none
exe "hi! String" .s:fg_string .s:bg_none .s:fmt_none
" Character"
" Number"
" Boolean"
" Float"
exe "hi! Identifier" .s:fg_tag .s:bg_none .s:fmt_none
exe "hi! Function" .s:fg_function .s:bg_none .s:fmt_none
exe "hi! Statement" .s:fg_keyword .s:bg_none .s:fmt_none
" Conditional"
" Repeat"
" Label"
exe "hi! Operator" .s:fg_operator .s:bg_none .s:fmt_none
" Keyword"
" Exception"
exe "hi! PreProc" .s:fg_special .s:bg_none .s:fmt_none
" Include"
" Define"
" Macro"
" PreCondit"
exe "hi! Type" .s:fg_tag .s:bg_none .s:fmt_none
" StorageClass"
exe "hi! Structure" .s:fg_special .s:bg_none .s:fmt_none
" Typedef"
exe "hi! Special" .s:fg_special .s:bg_none .s:fmt_none
" SpecialChar"
" Tag"
" Delimiter"
" SpecialComment"
" Debug"
"
exe "hi! Underlined" .s:fg_tag .s:bg_none .s:fmt_undr
exe "hi! Ignore" .s:fg_none .s:bg_none .s:fmt_none
exe "hi! Error" .s:fg_fg .s:bg_error .s:fmt_none
exe "hi! Todo" .s:fg_markup .s:bg_none .s:fmt_none
" Quickfix window highlighting
exe "hi! qfLineNr" .s:fg_keyword .s:bg_none .s:fmt_none
" qfFileName"
" qfLineNr"
" qfError"
exe "hi! Conceal" .s:fg_guide .s:bg_none .s:fmt_none
exe "hi! CursorLineConceal" .s:fg_guide .s:bg_line .s:fmt_none
" Terminal in NVIM
" ---------
if has("nvim")
let g:terminal_color_0 = s:palette.bg[s:style]
let g:terminal_color_1 = s:palette.markup[s:style]
let g:terminal_color_2 = s:palette.string[s:style]
let g:terminal_color_3 = s:palette.accent[s:style]
let g:terminal_color_4 = s:palette.tag[s:style]
let g:terminal_color_5 = s:palette.constant[s:style]
let g:terminal_color_6 = s:palette.regexp[s:style]
let g:terminal_color_7 = "#FFFFFF"
let g:terminal_color_8 = s:palette.fg_idle[s:style]
let g:terminal_color_9 = s:palette.error[s:style]
let g:terminal_color_10 = s:palette.string[s:style]
let g:terminal_color_11 = s:palette.accent[s:style]
let g:terminal_color_12 = s:palette.tag[s:style]
let g:terminal_color_13 = s:palette.constant[s:style]
let g:terminal_color_14 = s:palette.regexp[s:style]
let g:terminal_color_15 = s:palette.comment[s:style]
let g:terminal_color_background = g:terminal_color_0
let g:terminal_color_foreground = s:palette.fg[s:style]
endif
" NerdTree
" ---------
exe "hi! NERDTreeOpenable" .s:fg_fg_idle .s:bg_none .s:fmt_none
exe "hi! NERDTreeClosable" .s:fg_accent .s:bg_none .s:fmt_none
" exe "hi! NERDTreeBookmarksHeader" .s:fg_pink .s:bg_none .s:fmt_none
" exe "hi! NERDTreeBookmarksLeader" .s:fg_bg .s:bg_none .s:fmt_none
" exe "hi! NERDTreeBookmarkName" .s:fg_keyword .s:bg_none .s:fmt_none
" exe "hi! NERDTreeCWD" .s:fg_pink .s:bg_none .s:fmt_none
exe "hi! NERDTreeUp" .s:fg_fg_idle .s:bg_none .s:fmt_none
exe "hi! NERDTreeDir" .s:fg_fg_idle .s:bg_none .s:fmt_none
exe "hi! NERDTreeFile" .s:fg_fg_idle .s:bg_none .s:fmt_none
exe "hi! NERDTreeDirSlash" .s:fg_guide .s:bg_none .s:fmt_none
" GitGutter
" ---------
exe "hi! GitGutterAdd" .s:fg_string .s:bg_none .s:fmt_none
exe "hi! GitGutterChange" .s:fg_tag .s:bg_none .s:fmt_none
exe "hi! GitGutterDelete" .s:fg_markup .s:bg_none .s:fmt_none
exe "hi! GitGutterChangeDelete" .s:fg_function .s:bg_none .s:fmt_none
"}}}
" Diff Syntax Highlighting:"{{{
" ----------------------------------------------------------------------------
" Diff
" diffOldFile
" diffNewFile
" diffFile
" diffOnly
" diffIdentical
" diffDiffer
" diffBDiffer
" diffIsA
" diffNoEOL
" diffCommon
hi! link diffRemoved Constant
" diffChanged
hi! link diffAdded String
" diffLine
" diffSubname
" diffComment
"}}}
"
" This is needed for some reason: {{{
let &background = s:style
" }}}
@@ -0,0 +1,276 @@
" Vim color file
"
" Author: Tomas Restrepo <tomas@winterdom.com>
" https://github.com/tomasr/molokai
"
" Note: Based on the Monokai theme for TextMate
" by Wimer Hazenberg and its darker variant
" by Hamish Stuart Macpherson
"
hi clear
if version > 580
" no guarantees for version 5.8 and below, but this makes it stop
" complaining
hi clear
if exists("syntax_on")
syntax reset
endif
endif
let g:colors_name="molokai"
if exists("g:molokai_original")
let s:molokai_original = g:molokai_original
else
let s:molokai_original = 0
endif
hi Boolean guifg=#AE81FF
hi Character guifg=#E6DB74
hi Number guifg=#AE81FF
hi String guifg=#E6DB74
hi Conditional guifg=#F92672 gui=bold
hi Constant guifg=#AE81FF gui=bold
hi Cursor guifg=#000000 guibg=#F8F8F0
hi iCursor guifg=#000000 guibg=#F8F8F0
hi Debug guifg=#BCA3A3 gui=bold
hi Define guifg=#66D9EF
hi Delimiter guifg=#8F8F8F
hi DiffAdd guibg=#13354A
hi DiffChange guifg=#89807D guibg=#4C4745
hi DiffDelete guifg=#960050 guibg=#1E0010
hi DiffText guibg=#4C4745 gui=italic,bold
hi Directory guifg=#A6E22E gui=bold
hi Error guifg=#E6DB74 guibg=#1E0010
hi ErrorMsg guifg=#F92672 guibg=#232526 gui=bold
hi Exception guifg=#A6E22E gui=bold
hi Float guifg=#AE81FF
hi FoldColumn guifg=#465457 guibg=#000000
hi Folded guifg=#465457 guibg=#000000
hi Function guifg=#A6E22E
hi Identifier guifg=#FD971F
hi Ignore guifg=#808080 guibg=bg
hi IncSearch guifg=#C4BE89 guibg=#000000
hi Keyword guifg=#F92672 gui=bold
hi Label guifg=#E6DB74 gui=none
hi Macro guifg=#C4BE89 gui=italic
hi SpecialKey guifg=#66D9EF gui=italic
hi MatchParen guifg=#000000 guibg=#FD971F gui=bold
hi ModeMsg guifg=#E6DB74
hi MoreMsg guifg=#E6DB74
hi Operator guifg=#F92672
" complete menu
hi Pmenu guifg=#66D9EF guibg=#000000
hi PmenuSel guibg=#808080
hi PmenuSbar guibg=#080808
hi PmenuThumb guifg=#66D9EF
hi PreCondit guifg=#A6E22E gui=bold
hi PreProc guifg=#A6E22E
hi Question guifg=#66D9EF
hi Repeat guifg=#F92672 gui=bold
hi Search guifg=#000000 guibg=#FFE792
" marks
hi SignColumn guifg=#A6E22E guibg=#232526
hi SpecialChar guifg=#F92672 gui=bold
hi SpecialComment guifg=#7E8E91 gui=bold
hi Special guifg=#66D9EF guibg=bg gui=italic
if has("spell")
hi SpellBad guisp=#FF0000 gui=undercurl
hi SpellCap guisp=#7070F0 gui=undercurl
hi SpellLocal guisp=#70F0F0 gui=undercurl
hi SpellRare guisp=#FFFFFF gui=undercurl
endif
hi Statement guifg=#F92672 gui=bold
hi StatusLine guifg=#455354 guibg=fg
hi StatusLineNC guifg=#808080 guibg=#080808
hi StorageClass guifg=#FD971F gui=italic
hi Structure guifg=#66D9EF
hi Tag guifg=#F92672 gui=italic
hi Title guifg=#ef5939
hi Todo guifg=#FFFFFF guibg=bg gui=bold
hi Typedef guifg=#66D9EF
hi Type guifg=#66D9EF gui=none
hi Underlined guifg=#808080 gui=underline
hi VertSplit guifg=#808080 guibg=#080808 gui=bold
hi VisualNOS guibg=#403D3D
hi Visual guibg=#403D3D
hi WarningMsg guifg=#FFFFFF guibg=#333333 gui=bold
hi WildMenu guifg=#66D9EF guibg=#000000
hi TabLineFill guifg=#1B1D1E guibg=#1B1D1E
hi TabLine guibg=#1B1D1E guifg=#808080 gui=none
if s:molokai_original == 1
hi Normal guifg=#F8F8F2 guibg=#272822
hi Comment guifg=#75715E
hi CursorLine guibg=#3E3D32
hi CursorLineNr guifg=#FD971F gui=none
hi CursorColumn guibg=#3E3D32
hi ColorColumn guibg=#3B3A32
hi LineNr guifg=#BCBCBC guibg=#3B3A32
hi NonText guifg=#75715E
hi SpecialKey guifg=#75715E
else
hi Normal guifg=#F8F8F2 guibg=#1B1D1E
hi Comment guifg=#7E8E91
hi CursorLine guibg=#293739
hi CursorLineNr guifg=#FD971F gui=none
hi CursorColumn guibg=#293739
hi ColorColumn guibg=#232526
hi LineNr guifg=#465457 guibg=#232526
hi NonText guifg=#465457
hi SpecialKey guifg=#465457
end
"
" Support for 256-color terminal
"
if &t_Co > 255
if s:molokai_original == 1
hi Normal ctermbg=234
hi CursorLine ctermbg=235 cterm=none
hi CursorLineNr ctermfg=208 cterm=none
else
hi Normal ctermfg=252 ctermbg=233
hi CursorLine ctermbg=234 cterm=none
hi CursorLineNr ctermfg=208 cterm=none
endif
hi Boolean ctermfg=135
hi Character ctermfg=144
hi Number ctermfg=135
hi String ctermfg=144
hi Conditional ctermfg=161 cterm=bold
hi Constant ctermfg=135 cterm=bold
hi Cursor ctermfg=16 ctermbg=253
hi Debug ctermfg=225 cterm=bold
hi Define ctermfg=81
hi Delimiter ctermfg=241
hi DiffAdd ctermbg=24
hi DiffChange ctermfg=181 ctermbg=239
hi DiffDelete ctermfg=162 ctermbg=53
hi DiffText ctermbg=102 cterm=bold
hi Directory ctermfg=118 cterm=bold
hi Error ctermfg=219 ctermbg=89
hi ErrorMsg ctermfg=199 ctermbg=16 cterm=bold
hi Exception ctermfg=118 cterm=bold
hi Float ctermfg=135
hi FoldColumn ctermfg=67 ctermbg=16
hi Folded ctermfg=67 ctermbg=16
hi Function ctermfg=118
hi Identifier ctermfg=208 cterm=none
hi Ignore ctermfg=244 ctermbg=232
hi IncSearch ctermfg=193 ctermbg=16
hi keyword ctermfg=161 cterm=bold
hi Label ctermfg=229 cterm=none
hi Macro ctermfg=193
hi SpecialKey ctermfg=81
hi MatchParen ctermfg=233 ctermbg=208 cterm=bold
hi ModeMsg ctermfg=229
hi MoreMsg ctermfg=229
hi Operator ctermfg=161
" complete menu
hi Pmenu ctermfg=81 ctermbg=16
hi PmenuSel ctermfg=255 ctermbg=242
hi PmenuSbar ctermbg=232
hi PmenuThumb ctermfg=81
hi PreCondit ctermfg=118 cterm=bold
hi PreProc ctermfg=118
hi Question ctermfg=81
hi Repeat ctermfg=161 cterm=bold
hi Search ctermfg=0 ctermbg=222 cterm=NONE
" marks column
hi SignColumn ctermfg=118 ctermbg=235
hi SpecialChar ctermfg=161 cterm=bold
hi SpecialComment ctermfg=245 cterm=bold
hi Special ctermfg=81
if has("spell")
hi SpellBad ctermbg=52
hi SpellCap ctermbg=17
hi SpellLocal ctermbg=17
hi SpellRare ctermfg=none ctermbg=none cterm=reverse
endif
hi Statement ctermfg=161 cterm=bold
hi StatusLine ctermfg=238 ctermbg=253
hi StatusLineNC ctermfg=244 ctermbg=232
hi StorageClass ctermfg=208
hi Structure ctermfg=81
hi Tag ctermfg=161
hi Title ctermfg=166
hi Todo ctermfg=231 ctermbg=232 cterm=bold
hi Typedef ctermfg=81
hi Type ctermfg=81 cterm=none
hi Underlined ctermfg=244 cterm=underline
hi VertSplit ctermfg=244 ctermbg=232 cterm=bold
hi VisualNOS ctermbg=238
hi Visual ctermbg=235
hi WarningMsg ctermfg=231 ctermbg=238 cterm=bold
hi WildMenu ctermfg=81 ctermbg=16
hi Comment ctermfg=59
hi CursorColumn ctermbg=236
hi ColorColumn ctermbg=236
hi LineNr ctermfg=250 ctermbg=236
hi NonText ctermfg=59
hi SpecialKey ctermfg=59
if exists("g:rehash256") && g:rehash256 == 1
hi Normal ctermfg=252 ctermbg=234
hi CursorLine ctermbg=236 cterm=none
hi CursorLineNr ctermfg=208 cterm=none
hi Boolean ctermfg=141
hi Character ctermfg=222
hi Number ctermfg=141
hi String ctermfg=222
hi Conditional ctermfg=197 cterm=bold
hi Constant ctermfg=141 cterm=bold
hi DiffDelete ctermfg=125 ctermbg=233
hi Directory ctermfg=154 cterm=bold
hi Error ctermfg=222 ctermbg=233
hi Exception ctermfg=154 cterm=bold
hi Float ctermfg=141
hi Function ctermfg=154
hi Identifier ctermfg=208
hi Keyword ctermfg=197 cterm=bold
hi Operator ctermfg=197
hi PreCondit ctermfg=154 cterm=bold
hi PreProc ctermfg=154
hi Repeat ctermfg=197 cterm=bold
hi Statement ctermfg=197 cterm=bold
hi Tag ctermfg=197
hi Title ctermfg=203
hi Visual ctermbg=238
hi Comment ctermfg=244
hi LineNr ctermfg=239 ctermbg=235
hi NonText ctermfg=239
hi SpecialKey ctermfg=239
endif
end
" Must be at the end, because of ctermbg=234 bug.
" https://groups.google.com/forum/#!msg/vim_dev/afPqwAFNdrU/nqh6tOM87QUJ
set background=dark
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,4 @@
let s:dir = expand('<sfile>:p:h').(!exists("+shellslash") || &shellslash ? '/' : '\')
set background=dark
execute "source" s:dir."solarized8.vim"
unlet s:dir
@@ -0,0 +1,124 @@
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
# don't put duplicate lines or lines starting with space in the history.
# See bash(1) for more options
HISTCONTROL=ignoreboth
# append to the history file, don't overwrite it
shopt -s histappend
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1000
HISTFILESIZE=2000
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize
# If set, the pattern "**" used in a pathname expansion context will
# match all files and zero or more directories and subdirectories.
#shopt -s globstar
# make less more friendly for non-text input files, see lesspipe(1)
#[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi
# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
xterm-color) color_prompt=yes;;
esac
# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
#force_color_prompt=yes
if [ -n "$force_color_prompt" ]; then
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
# We have color support; assume it's compliant with Ecma-48
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
# a case would tend to support setf rather than setaf.)
color_prompt=yes
else
color_prompt=
fi
fi
__hostname="$(hostname -f)"
__hostname="${__hostname%.*}"
__hostname="${__hostname%.*}"
if [ "$color_prompt" = yes ]; then
#PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@${__hostname}:\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
else
#PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
PS1='${debian_chroot:+($debian_chroot)}\u@${__hostname}:\w\$ '
fi
unset color_prompt force_color_prompt
# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
;;
*)
;;
esac
# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto'
#alias dir='dir --color=auto'
#alias vdir='vdir --color=auto'
#alias grep='grep --color=auto'
#alias fgrep='fgrep --color=auto'
#alias egrep='egrep --color=auto'
fi
# some more ls aliases
alias ll='ls -l'
alias la='ls -A'
alias l='ls -CF'
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if ! shopt -oq posix; then
if [ -f /usr/share/bash-completion/bash_completion ]; then
. /usr/share/bash-completion/bash_completion
elif [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
fi
export EDITOR=vim
## - set beep more quiet
## -
#xset b 10 500 50
@@ -0,0 +1,32 @@
# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.
# the default umask is set in /etc/profile; for setting the umask
# for ssh logins, install and configure the libpam-umask package.
#umask 022
# if running bash
if [ -n "$BASH_VERSION" ]; then
# include .bashrc if it exists
if [ -f "$HOME/.bashrc" ]; then
. "$HOME/.bashrc"
fi
fi
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi
# this is for the midnight-commander
# to become the last directory the midnight commander was in
# as the current directory when leaving the midnight commander
#
if [[ -f /usr/share/mc/bin/mc.sh ]]; then
source /usr/share/mc/bin/mc.sh
fi
export LANG="de_DE.utf8"
@@ -0,0 +1,134 @@
# {{ ansible_managed }}
# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.
# the default umask is set in /etc/profile; for setting the umask
# for ssh logins, install and configure the libpam-umask package.
#umask 022
# if running bash
if [ -n "$BASH_VERSION" ]; then
# include .bashrc if it exists
if [ -f "$HOME/.bashrc" ]; then
. "$HOME/.bashrc"
fi
fi
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi
# this is for the midnight-commander
# to become the last directory the midnight commander was in
# as the current directory when leaving the midnight commander
#
#. /usr/lib/mc/bin/mc.sh
#
if [ -f "/usr/share/mc/bin/mc.sh" ] ; then
source /usr/share/mc/bin/mc.sh
fi
export LANG="de_DE.utf8"
{% if item.item.is_samba_user is defined and item.item.is_samba_user|bool %}
# ---
# Mmount samba shares
# ---
# Don't try to mount samba shares if login at samba server
#
[[ "$(hostname --long)" = "{{ samba_server }}" ]] && return
SERVER="{{ samba_server }}"
USER="{{ item.item.name }}"
PASSWORD='{{ item.item.password }}'
VERSION="1.0"
# Use NTLMv2 password hashing and force packet signing
#
# SEC="ntlmv2i"
#
# Use NTLMv2 password hashing encapsulated in Raw NTLMSSP message, and force packet signing
#
# SEC="ntlmsspi"
#
SEC="ntlmsspi"
# - uid/guid of the user at fielserver
# -
_UID="$(id -u)"
_GID="$(id -g)"
# Logfile to see what happened..
#
_logfile=/tmp/profile_${USER}.log
echo "" > $_logfile
echo "$(date +"%Y-%m-%d-%H%M")" >> $_logfile
# Network present
#
_network=false
if [ "X$_addr" = "X" ] ; then
echo "no inet address assigned yet.." >> $_logfile
declare -i count=1
while ! $_network && [[ $count -lt 5 ]] ; do
echo "sleeping 2 seconds.." >> $_logfile
sleep 2
_addr="$(hostname --ip-address)"
if [ "X$_addr" != "X" ] ; then
_network=true
echo "inet address present: $_addr" >> $_logfile
fi
((count++))
done
fi
for dir in $(ls /mnt/$USER) ; do
MOUNT_POINT=/mnt/$USER/$dir
SHARE=$dir
[ ! -d $MOUNT_POINT ] && continue
if ! mount | grep $MOUNT_POINT > /dev/null ; then
echo "Going to mount share '${SHARE}' .." >> $_logfile
if [ -x /usr/bin/smb4k_mount ]; then
## - Ubuntu <= 12.04
if [[ -z "$VERSION" ]] ; then
sudo /usr/bin/smb4k_mount -o user=$USER,password=$PASSWORD,iocharset=utf8,uid=$_UID,gid=$_GID \
-n -t cifs //$SERVER/$SHARE $MOUNT_POINT >> $_logfile 2>&1
elif [[ "$VERSION" = "1.0" ]]; then
sudo /usr/bin/smb4k_mount -o user=$USER,password=$PASSWORD,iocharset=utf8,vers=$VERSION \
-n -t cifs //$SERVER/$SHARE $MOUNT_POINT >> $_logfile 2>&1
else
sudo /usr/bin/smb4k_mount -o user=$USER,password=$PASSWORD,iocharset=utf8,uid=$_UID,gid=$_GID,vers=$VERSION \
-n -t cifs //$SERVER/$SHARE $MOUNT_POINT >> $_logfile 2>&1
fi
else
## - Ubuntu Version >= 14.04
if [[ -z "$VERSION" ]] ; then
sudo /bin/mount -o user=$USER,password=$PASSWORD,iocharset=utf8,uid=$USER,gid=$_GID \
-n -t cifs //$SERVER/$SHARE $MOUNT_POINT >> $_logfile 2>&1
elif [[ "$VERSION" = "1.0" ]]; then
sudo /bin/mount -o user=$USER,password=$PASSWORD,iocharset=utf8,cifsacl,vers=1.0 \
-n -t cifs //$SERVER/$SHARE $MOUNT_POINT >> $_logfile 2>&1
else
sudo /bin/mount -o user=$USER,password=$PASSWORD,iocharset=utf8,cifsacl,uid=$USER,sec=${SEC},vers=$VERSION \
-n -t cifs //$SERVER/$SHARE $MOUNT_POINT >> $_logfile 2>&1
fi
fi
else
echo "mount point $MOUNT_POINT already exists. nothing left to do.." >> $_logfile
fi
done
{% endif %}
@@ -0,0 +1,173 @@
" An example for a vimrc file.
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last change: 1999 Sep 09
"
" To use it, copy it to
" for Unix and OS/2: ~/.vimrc
" for Amiga: s:.vimrc
" for MS-DOS and Win32: $VIM\_vimrc
" This line should not be removed as it ensures that various options are
" properly set to work with the Vim-related packages available in Debian.
runtime! debian.vim
set nocompatible " Use Vim defaults (much better!)
set bs=2 " allow backspacing over everything in insert mode
set ai " always set autoindenting on
" set backup " keep a backup file
"set viminfo='20,\"50 " read/write a .viminfo file, don't store more
" than 50 lines of registers
set viminfo='20,\"50,:20,%,n~/.viminfo
set history=50 " keep 50 lines of command line history
set ruler " show the cursor position all the time
set ignorecase " suchen case-insenitiv
set showmatch " zeige passende klammern
set shell=/bin/bash " shell to start with !
set expandtab " tabs --> blanks
set showmode " anzeige INSERT/REPLACE/...
" set smartcase " Do smart case matching
set incsearch " Incremental search
" Start searching when you type the first character of
" the search string. As you type in more characters, the
" search is refined.
set t_Co=256 " To enable 256 colors in vim, put this your .vimrc before setting the colorscheme
" einrueckung
set shiftwidth=3
set tabstop=3
" Round indent to multiple of 'shiftwidth' for > and < commands
set shiftround
" For Win32 GUI: remove 't' flag from 'guioptions': no tearoff menu entries
" let &guioptions = substitute(&guioptions, "t", "", "g")
" Don't use Ex mode, use Q for formatting
map Q gq
" Make p in isual Visual mode replace the selected text with the "" register.
vnoremap p <Esc>:let current_reg = @"<CR>gvdi<C-R>=current_reg<CR><Esc>
" Switch syntax highlighting on, when the terminal has colors
" Also switch on highlighting the last used search pattern.
if &t_Co > 2 || has("gui_running")
syntax on
set hlsearch
endif
" Only do this part when compiled with support for autocommands.
if has("autocmd")
" In text files, always limit the width of text to 78 characters
autocmd BufRead *.txt set tw=78
augroup cprog
" Remove all cprog autocommands
au!
" When starting to edit a file:
" For C and C++ files set formatting of comments and set C-indenting on.
" For other files switch it off.
" Don't change the order, it's important that the line with * comes first.
autocmd FileType * set formatoptions=tcql nocindent comments&
autocmd FileType c,cpp set formatoptions=croql cindent comments=sr:/*,mb:*,el:*/,://
augroup END
augroup gzip
" Remove all gzip autocommands
au!
" Enable editing of gzipped files
" set binary mode before reading the file
autocmd BufReadPre,FileReadPre *.gz,*.bz2 set bin
autocmd BufReadPost,FileReadPost *.gz call GZIP_read("gunzip")
autocmd BufReadPost,FileReadPost *.bz2 call GZIP_read("bunzip2")
autocmd BufWritePost,FileWritePost *.gz call GZIP_write("gzip")
autocmd BufWritePost,FileWritePost *.bz2 call GZIP_write("bzip2")
autocmd FileAppendPre *.gz call GZIP_appre("gunzip")
autocmd FileAppendPre *.bz2 call GZIP_appre("bunzip2")
autocmd FileAppendPost *.gz call GZIP_write("gzip")
autocmd FileAppendPost *.bz2 call GZIP_write("bzip2")
" After reading compressed file: Uncompress text in buffer with "cmd"
fun! GZIP_read(cmd)
let ch_save = &ch
set ch=2
execute "'[,']!" . a:cmd
set nobin
let &ch = ch_save
execute ":doautocmd BufReadPost " . expand("%:r")
endfun
" After writing compressed file: Compress written file with "cmd"
fun! GZIP_write(cmd)
if rename(expand("<afile>"), expand("<afile>:r")) == 0
execute "!" . a:cmd . " <afile>:r"
endif
endfun
" Before appending to compressed file: Uncompress file with "cmd"
fun! GZIP_appre(cmd)
execute "!" . a:cmd . " <afile>"
call rename(expand("<afile>:r"), expand("<afile>"))
endfun
augroup END
" This is disabled, because it changes the jumplist. Can't use CTRL-O to go
" back to positions in previous files more than once.
if 0
" When editing a file, always jump to the last cursor position.
" This must be after the uncompress commands.
autocmd BufReadPost * if line("'\"") && line("'\"") <= line("$") | exe "normal `\"" | endif
endif
endif " has("autocmd")
" toggle syntax highlighting
map <F12> :if exists("syntax_on") <Bar> syntax off <Bar> else <Bar> syntax on <Bar> endif <CR><ESC>
map <F11> :nohls <CR>
" use <F6> to toggle line numbers
nmap <silent> <F6> :set number!<CR>
" If using a dark background within the editing area and syntax highlighting
" turn on this option as well
set background=dark
" set color for search
hi clear search
hi search term=bold,reverse cterm=bold,reverse gui=bold,reverse
" set color for Comment
hi clear Comment
"highlight Comment term=bold cterm=bold ctermfg=LightBlue guifg=#80a0ff gui=bold
"highlight Comment term=none cterm=none ctermfg=LightBlue guifg=#80a0ff gui=bold
"highlight Comment term=bold cterm=bold ctermfg=grey guifg=#80a0ff gui=bold
highlight Comment term=none cterm=none ctermfg=grey guifg=#80a0ff gui=bold
"highlight Comment term=none cterm=none ctermfg=177 guifg=#80a0ff gui=bold
"highlight Comment term=none cterm=none ctermfg=215 guifg=#80a0ff gui=bold
" Go back to the position the cursor was on the last time this file was edited
au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$")|execute("normal `\"")|endif
" visual shifting (does not exit Visual mode)
vnoremap < <gv
vnoremap > >gv
" Scroll when cursor gets within 3 characters of top/bottom edge
set scrolloff=3
" Show line, column number, and relative position within a file in the status line
" set statusline=%F%m%r%h%w\ [FORMAT=%{&ff}]\ [TYPE=%Y]\ [ASCII=\%03.3b]\ [HEX=\%02.2B]\ [POS=%04l,%04v][%p%%]\ [LEN=%L]
"set statusline=\ %F\ %(\|\ flags:\ %R%M%H%W\ %)%(\|\ type:\ %Y\ %)%(\|\ format:\ %{&ff}\ %)%(\|\ syntax:\ %{synIDattr(synID(line('.'),col('.'),0),'name')}%)\ \ %=line:\ %l/%L\ \|\ column:\ %c%V\ \|\ relative\:\ %p%%\
set statusline=\ %F\ %(\|\ flags:\ %R%M%H%W\ %)%(\|\ type:\ %Y\ %)%(\|\ format:\ %{&ff}\ %)\ \ %=line:\ %l/%L\ \|\ col:\ %c%V\ \|\ %p%%
" Always show status line, even for one window
set laststatus=2
highlight StatusLine cterm=none ctermfg=white ctermbg=blue
@@ -0,0 +1,11 @@
let g:netrw_dirhistmax =10
let g:netrw_dirhist_cnt =9
let g:netrw_dirhist_1='/home/chris/devel/git/git.oopen.de/script/bash/snippets'
let g:netrw_dirhist_2='/home/chris/O.OPEN/Kunden/Anwaltsbuero-Kottbusser_Damm/carsten/ThinkPad_L380'
let g:netrw_dirhist_3='/home/chris/devel/git/git.oopen.de/ansible/mbr-bln/group_vars/all'
let g:netrw_dirhist_4='/home/chris/O.OPEN/Kunden/Gemeinschaft Altenschlirf/Intranet/VPN/VPN-GA-NH-chris'
let g:netrw_dirhist_5='/home/chris/devel/git/git.oopen.de/firewall/ipt-server'
let g:netrw_dirhist_6='/home/chris/devel/git/git.oopen.de/firewall/ipt-server/conf'
let g:netrw_dirhist_7='/home/chris/devel/git/git.oopen.de/ansible/oopen-server/group_vars'
let g:netrw_dirhist_8='/home/chris/devel/git/git.oopen.de/ansible/oopen-server/roles/ansible_dependencies'
let g:netrw_dirhist_9='/home/chris/devel/git/git.oopen.de/ansible/oopen-server/roles/ansible_dependencies/tasks'
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,547 @@
" File: afterglow.vim
" Author: Danilo Augusto <daniloaugusto.ita16@gmail.com>
" Date: 2017-02-27
" Vim color file - Afterglow (monokai version)
"
" Hex color conversion functions borrowed from the theme 'Desert256'
set background=dark
if version > 580
hi clear
if exists("syntax_on")
syntax reset
endif
endif
let g:colors_name = "afterglow"
" Default GUI Colours
let s:foreground = "d6d6d6"
let s:background = "1a1a1a"
let s:selection = "5a647e"
let s:line = "393939"
let s:comment = "797979"
let s:red = "ac4142"
let s:orange = "e87d3e"
let s:yellow = "e5b567"
let s:green = "b4c973"
let s:blue = "6c99bb"
let s:wine = "b05279"
let s:purple = "9e86c8"
let s:window = "4d5057"
if has("gui_running") || &t_Co == 88 || &t_Co == 256
" Returns an approximate grey index for the given grey level
fun <SID>grey_number(x)
if &t_Co == 88
if a:x < 23
return 0
elseif a:x < 69
return 1
elseif a:x < 103
return 2
elseif a:x < 127
return 3
elseif a:x < 150
return 4
elseif a:x < 173
return 5
elseif a:x < 196
return 6
elseif a:x < 219
return 7
elseif a:x < 243
return 8
else
return 9
endif
else
if a:x < 14
return 0
else
let l:n = (a:x - 8) / 10
let l:m = (a:x - 8) % 10
if l:m < 5
return l:n
else
return l:n + 1
endif
endif
endif
endfun
" Returns the actual grey level represented by the grey index
fun <SID>grey_level(n)
if &t_Co == 88
if a:n == 0
return 0
elseif a:n == 1
return 46
elseif a:n == 2
return 92
elseif a:n == 3
return 115
elseif a:n == 4
return 139
elseif a:n == 5
return 162
elseif a:n == 6
return 185
elseif a:n == 7
return 208
elseif a:n == 8
return 231
else
return 255
endif
else
if a:n == 0
return 0
else
return 8 + (a:n * 10)
endif
endif
endfun
" Returns the palette index for the given grey index
fun <SID>grey_colour(n)
if &t_Co == 88
if a:n == 0
return 16
elseif a:n == 9
return 79
else
return 79 + a:n
endif
else
if a:n == 0
return 16
elseif a:n == 25
return 231
else
return 231 + a:n
endif
endif
endfun
" Returns an approximate colour index for the given colour level
fun <SID>rgb_number(x)
if &t_Co == 88
if a:x < 69
return 0
elseif a:x < 172
return 1
elseif a:x < 230
return 2
else
return 3
endif
else
if a:x < 75
return 0
else
let l:n = (a:x - 55) / 40
let l:m = (a:x - 55) % 40
if l:m < 20
return l:n
else
return l:n + 1
endif
endif
endif
endfun
" Returns the actual colour level for the given colour index
fun <SID>rgb_level(n)
if &t_Co == 88
if a:n == 0
return 0
elseif a:n == 1
return 139
elseif a:n == 2
return 205
else
return 255
endif
else
if a:n == 0
return 0
else
return 55 + (a:n * 40)
endif
endif
endfun
" Returns the palette index for the given R/G/B colour indices
fun <SID>rgb_colour(x, y, z)
if &t_Co == 88
return 16 + (a:x * 16) + (a:y * 4) + a:z
else
return 16 + (a:x * 36) + (a:y * 6) + a:z
endif
endfun
" Returns the palette index to approximate the given R/G/B colour levels
fun <SID>colour(r, g, b)
" Get the closest grey
let l:gx = <SID>grey_number(a:r)
let l:gy = <SID>grey_number(a:g)
let l:gz = <SID>grey_number(a:b)
" Get the closest colour
let l:x = <SID>rgb_number(a:r)
let l:y = <SID>rgb_number(a:g)
let l:z = <SID>rgb_number(a:b)
if l:gx == l:gy && l:gy == l:gz
" There are two possibilities
let l:dgr = <SID>grey_level(l:gx) - a:r
let l:dgg = <SID>grey_level(l:gy) - a:g
let l:dgb = <SID>grey_level(l:gz) - a:b
let l:dgrey = (l:dgr * l:dgr) + (l:dgg * l:dgg) + (l:dgb * l:dgb)
let l:dr = <SID>rgb_level(l:gx) - a:r
let l:dg = <SID>rgb_level(l:gy) - a:g
let l:db = <SID>rgb_level(l:gz) - a:b
let l:drgb = (l:dr * l:dr) + (l:dg * l:dg) + (l:db * l:db)
if l:dgrey < l:drgb
" Use the grey
return <SID>grey_colour(l:gx)
else
" Use the colour
return <SID>rgb_colour(l:x, l:y, l:z)
endif
else
" Only one possibility
return <SID>rgb_colour(l:x, l:y, l:z)
endif
endfun
" Returns the palette index to approximate the 'rrggbb' hex string
fun <SID>rgb(rgb)
let l:r = ("0x" . strpart(a:rgb, 0, 2)) + 0
let l:g = ("0x" . strpart(a:rgb, 2, 2)) + 0
let l:b = ("0x" . strpart(a:rgb, 4, 2)) + 0
return <SID>colour(l:r, l:g, l:b)
endfun
" Sets the highlighting for the given group
fun <SID>X(group, fg, bg, attr)
if a:fg != ""
exec "hi " . a:group . " guifg=#" . a:fg . " ctermfg=" . <SID>rgb(a:fg)
endif
if a:bg != ""
exec "hi " . a:group . " guibg=#" . a:bg . " ctermbg=" . <SID>rgb(a:bg)
endif
if a:attr != ""
exec "hi " . a:group . " gui=" . a:attr . " cterm=" . a:attr
endif
endfun
" Vim Highlighting
call <SID>X("Normal", s:foreground, s:background, "")
call <SID>X("LineNr", s:comment, "", "")
call <SID>X("NonText", s:selection, "", "")
call <SID>X("SpecialKey", s:selection, "", "")
call <SID>X("Search", s:background, s:yellow, "")
call <SID>X("TabLine", s:window, s:foreground, "reverse")
call <SID>X("TabLineFill", s:window, s:foreground, "reverse")
call <SID>X("StatusLine", s:window, s:yellow, "reverse")
call <SID>X("StatusLineNC", s:window, s:foreground, "reverse")
call <SID>X("VertSplit", s:window, s:window, "none")
call <SID>X("Visual", "", s:selection, "")
call <SID>X("Directory", s:blue, "", "")
call <SID>X("ModeMsg", s:green, "", "")
call <SID>X("MoreMsg", s:green, "", "")
call <SID>X("Question", s:green, "", "")
call <SID>X("WarningMsg", s:orange, "", "bold")
call <SID>X("MatchParen", "", s:selection, "")
call <SID>X("Folded", s:comment, s:background, "")
call <SID>X("FoldColumn", "", s:background, "")
if version >= 700
call <SID>X("CursorLine", "", s:line, "none")
call <SID>X("CursorLineNR", s:orange, "", "none")
call <SID>X("CursorColumn", "", s:line, "none")
call <SID>X("PMenu", s:foreground, s:selection, "none")
call <SID>X("PMenuSel", s:foreground, s:selection, "reverse")
call <SID>X("SignColumn", "", s:background, "none")
end
if version >= 703
call <SID>X("ColorColumn", "", s:line, "none")
end
" Standard Highlighting
call <SID>X("Comment", s:comment, "", "")
call <SID>X("Todo", s:red, s:background, "bold")
call <SID>X("Title", s:comment, "", "bold")
call <SID>X("Identifier", s:orange, "", "")
call <SID>X("Statement", s:wine, "", "")
call <SID>X("Conditional", s:wine, "", "")
call <SID>X("Repeat", s:wine, "", "")
call <SID>X("Structure", s:wine, "", "")
call <SID>X("Function", s:orange, "", "")
call <SID>X("Constant", s:purple, "", "")
call <SID>X("Keyword", s:orange, "", "")
call <SID>X("String", s:yellow, "", "")
call <SID>X("Special", s:blue, "", "")
call <SID>X("PreProc", s:green, "", "")
call <SID>X("Operator", s:purple, "", "")
call <SID>X("Type", s:blue, "", "")
call <SID>X("Define", s:wine, "", "")
call <SID>X("Include", s:wine, "", "")
call <SID>X("Tag", s:orange, "", "bold")
call <SID>X("Underlined", s:orange, "", "underline")
syntax match commonOperator "\(+\|=\|-\|*\|\^\|\/\||\)"
hi link commonOperator Operator
" Vim Highlighting
call <SID>X("vimCommand", s:wine, "", "none")
" C Highlighting
call <SID>X("cType", s:wine, "", "")
call <SID>X("cStorageClass", s:orange, "", "")
call <SID>X("cConditional", s:wine, "", "")
call <SID>X("cRepeat", s:wine, "", "")
" PHP Highlighting
call <SID>X("phpVarSelector", s:wine, "", "")
call <SID>X("phpKeyword", s:wine, "", "")
call <SID>X("phpRepeat", s:wine, "", "")
call <SID>X("phpConditional", s:wine, "", "")
call <SID>X("phpStatement", s:wine, "", "")
call <SID>X("phpMemberSelector", s:foreground, "", "")
" Ruby Highlighting
call <SID>X("rubySymbol", s:blue, "", "")
call <SID>X("rubyConstant", s:green, "", "")
call <SID>X("rubyAccess", s:yellow, "", "")
call <SID>X("rubyAttribute", s:blue, "", "")
call <SID>X("rubyInclude", s:blue, "", "")
call <SID>X("rubyLocalVariableOrMethod", s:orange, "", "")
call <SID>X("rubyCurlyBlock", s:orange, "", "")
call <SID>X("rubyStringDelimiter", s:yellow, "", "")
call <SID>X("rubyInterpolationDelimiter", s:orange, "", "")
call <SID>X("rubyConditional", s:wine, "", "")
call <SID>X("rubyRepeat", s:wine, "", "")
call <SID>X("rubyControl", s:wine, "", "")
call <SID>X("rubyException", s:wine, "", "")
" Crystal Highlighting
call <SID>X("crystalSymbol", s:green, "", "")
call <SID>X("crystalConstant", s:yellow, "", "")
call <SID>X("crystalAccess", s:yellow, "", "")
call <SID>X("crystalAttribute", s:blue, "", "")
call <SID>X("crystalInclude", s:blue, "", "")
call <SID>X("crystalLocalVariableOrMethod", s:orange, "", "")
call <SID>X("crystalCurlyBlock", s:orange, "", "")
call <SID>X("crystalStringDelimiter", s:green, "", "")
call <SID>X("crystalInterpolationDelimiter", s:orange, "", "")
call <SID>X("crystalConditional", s:wine, "", "")
call <SID>X("crystalRepeat", s:wine, "", "")
call <SID>X("crystalControl", s:wine, "", "")
call <SID>X("crystalException", s:wine, "", "")
" Python Highlighting
call <SID>X("pythonInclude", s:green, "", "italic")
call <SID>X("pythonStatement", s:blue, "", "")
call <SID>X("pythonConditional", s:wine, "", "")
call <SID>X("pythonRepeat", s:wine, "", "")
call <SID>X("pythonException", s:wine, "", "")
call <SID>X("pythonFunction", s:green, "", "italic")
call <SID>X("pythonPreCondit", s:wine, "", "")
call <SID>X("pythonExClass", s:orange, "", "")
call <SID>X("pythonBuiltin", s:blue, "", "")
call <SID>X("pythonOperator", s:wine, "", "")
call <SID>X("pythonNumber", s:purple, "", "")
call <SID>X("pythonString", s:yellow, "", "")
call <SID>X("pythonRawString", s:yellow, "", "")
call <SID>X("pythonDecorator", s:wine, "", "")
call <SID>X("pythonDoctest", s:yellow, "", "")
call <SID>X("pythonImportFunction", s:orange, "", "")
call <SID>X("pythonImportModule", s:orange, "", "")
call <SID>X("pythonImportObject", s:orange, "", "")
call <SID>X("pythonImportedClassDef", s:orange, "", "")
call <SID>X("pythonImportedFuncDef", s:orange, "", "")
call <SID>X("pythonImportedModule", s:orange, "", "")
call <SID>X("pythonImportedObject", s:orange, "", "")
" JavaScript Highlighting
call <SID>X("javaScriptEndColons", s:foreground, "", "")
call <SID>X("javaScriptOpSymbols", s:foreground, "", "")
call <SID>X("javaScriptLogicSymbols", s:foreground, "", "")
call <SID>X("javaScriptBraces", s:foreground, "", "")
call <SID>X("javaScriptParens", s:foreground, "", "")
call <SID>X("javaScriptFunction", s:green, "", "")
call <SID>X("javaScriptComment", s:comment, "", "")
call <SID>X("javaScriptLineComment", s:comment, "", "")
call <SID>X("javaScriptDocComment", s:comment, "", "")
call <SID>X("javaScriptCommentTodo", s:red, "", "")
call <SID>X("javaScriptString", s:yellow, "", "")
call <SID>X("javaScriptRegexpString", s:yellow, "", "")
call <SID>X("javaScriptTemplateString", s:yellow, "", "")
call <SID>X("javaScriptNumber", s:purple, "", "")
call <SID>X("javaScriptFloat", s:purple, "", "")
call <SID>X("javaScriptGlobal", s:purple, "", "")
call <SID>X("javaScriptCharacter", s:blue, "", "")
call <SID>X("javaScriptPrototype", s:blue, "", "")
call <SID>X("javaScriptConditional", s:blue, "", "")
call <SID>X("javaScriptBranch", s:blue, "", "")
call <SID>X("javaScriptIdentifier", s:orange, "", "")
call <SID>X("javaScriptRepeat", s:blue, "", "")
call <SID>X("javaScriptStatement", s:blue, "", "")
call <SID>X("javaScriptMessage", s:blue, "", "")
call <SID>X("javaScriptReserved", s:blue, "", "")
call <SID>X("javaScriptOperator", s:blue, "", "")
call <SID>X("javaScriptNull", s:purple, "", "")
call <SID>X("javaScriptBoolean", s:purple, "", "")
call <SID>X("javaScriptLabel", s:blue, "", "")
call <SID>X("javaScriptSpecial", s:blue, "", "")
call <SID>X("javaScriptExceptions", s:red, "", "")
call <SID>X("javaScriptDeprecated", s:red, "", "")
call <SID>X("javaScriptError", s:red, "", "")
" LaTeX
call <SID>X("texStatement",s:blue, "", "")
call <SID>X("texMath", s:wine, "", "none")
call <SID>X("texMathMacher", s:yellow, "", "none")
call <SID>X("texRefLabel", s:wine, "", "none")
call <SID>X("texRefZone", s:blue, "", "none")
call <SID>X("texComment", s:comment, "", "none")
call <SID>X("texDelimiter", s:purple, "", "none")
call <SID>X("texMathZoneX", s:purple, "", "none")
" CoffeeScript Highlighting
call <SID>X("coffeeRepeat", s:wine, "", "")
call <SID>X("coffeeConditional", s:wine, "", "")
call <SID>X("coffeeKeyword", s:wine, "", "")
call <SID>X("coffeeObject", s:yellow, "", "")
" HTML Highlighting
call <SID>X("htmlTag", s:blue, "", "")
call <SID>X("htmlEndTag", s:blue, "", "")
call <SID>X("htmlTagName", s:wine, "", "bold")
call <SID>X("htmlArg", s:green, "", "italic")
call <SID>X("htmlScriptTag", s:wine, "", "")
" Diff Highlighting
call <SID>X("diffAdd", "", "4c4e39", "")
call <SID>X("diffDelete", s:background, s:red, "")
call <SID>X("diffChange", "", "2B5B77", "")
call <SID>X("diffText", s:line, s:blue, "")
" ShowMarks Highlighting
call <SID>X("ShowMarksHLl", s:orange, s:background, "none")
call <SID>X("ShowMarksHLo", s:wine, s:background, "none")
call <SID>X("ShowMarksHLu", s:yellow, s:background, "none")
call <SID>X("ShowMarksHLm", s:wine, s:background, "none")
" Lua Highlighting
call <SID>X("luaStatement", s:wine, "", "")
call <SID>X("luaRepeat", s:wine, "", "")
call <SID>X("luaCondStart", s:wine, "", "")
call <SID>X("luaCondElseif", s:wine, "", "")
call <SID>X("luaCond", s:wine, "", "")
call <SID>X("luaCondEnd", s:wine, "", "")
" Cucumber Highlighting
call <SID>X("cucumberGiven", s:blue, "", "")
call <SID>X("cucumberGivenAnd", s:blue, "", "")
" Go Highlighting
call <SID>X("goDirective", s:wine, "", "")
call <SID>X("goDeclaration", s:wine, "", "")
call <SID>X("goStatement", s:wine, "", "")
call <SID>X("goConditional", s:wine, "", "")
call <SID>X("goConstants", s:orange, "", "")
call <SID>X("goTodo", s:red, "", "")
call <SID>X("goDeclType", s:blue, "", "")
call <SID>X("goBuiltins", s:wine, "", "")
call <SID>X("goRepeat", s:wine, "", "")
call <SID>X("goLabel", s:wine, "", "")
" Clojure Highlighting
call <SID>X("clojureConstant", s:orange, "", "")
call <SID>X("clojureBoolean", s:orange, "", "")
call <SID>X("clojureCharacter", s:orange, "", "")
call <SID>X("clojureKeyword", s:green, "", "")
call <SID>X("clojureNumber", s:orange, "", "")
call <SID>X("clojureString", s:green, "", "")
call <SID>X("clojureRegexp", s:green, "", "")
call <SID>X("clojureParen", s:wine, "", "")
call <SID>X("clojureVariable", s:yellow, "", "")
call <SID>X("clojureCond", s:blue, "", "")
call <SID>X("clojureDefine", s:wine, "", "")
call <SID>X("clojureException", s:red, "", "")
call <SID>X("clojureFunc", s:blue, "", "")
call <SID>X("clojureMacro", s:blue, "", "")
call <SID>X("clojureRepeat", s:blue, "", "")
call <SID>X("clojureSpecial", s:wine, "", "")
call <SID>X("clojureQuote", s:blue, "", "")
call <SID>X("clojureUnquote", s:blue, "", "")
call <SID>X("clojureMeta", s:blue, "", "")
call <SID>X("clojureDeref", s:blue, "", "")
call <SID>X("clojureAnonArg", s:blue, "", "")
call <SID>X("clojureRepeat", s:blue, "", "")
call <SID>X("clojureDispatch", s:blue, "", "")
" Scala Highlighting
call <SID>X("scalaKeyword", s:wine, "", "")
call <SID>X("scalaKeywordModifier", s:wine, "", "")
call <SID>X("scalaOperator", s:blue, "", "")
call <SID>X("scalaPackage", s:wine, "", "")
call <SID>X("scalaFqn", s:foreground, "", "")
call <SID>X("scalaFqnSet", s:foreground, "", "")
call <SID>X("scalaImport", s:wine, "", "")
call <SID>X("scalaBoolean", s:orange, "", "")
call <SID>X("scalaDef", s:wine, "", "")
call <SID>X("scalaVal", s:wine, "", "")
call <SID>X("scalaVar", s:wine, "", "")
call <SID>X("scalaClass", s:wine, "", "")
call <SID>X("scalaObject", s:wine, "", "")
call <SID>X("scalaTrait", s:wine, "", "")
call <SID>X("scalaDefName", s:blue, "", "")
call <SID>X("scalaValName", s:foreground, "", "")
call <SID>X("scalaVarName", s:foreground, "", "")
call <SID>X("scalaClassName", s:foreground, "", "")
call <SID>X("scalaType", s:yellow, "", "")
call <SID>X("scalaTypeSpecializer", s:yellow, "", "")
call <SID>X("scalaAnnotation", s:orange, "", "")
call <SID>X("scalaNumber", s:orange, "", "")
call <SID>X("scalaDefSpecializer", s:yellow, "", "")
call <SID>X("scalaClassSpecializer", s:yellow, "", "")
call <SID>X("scalaBackTick", s:green, "", "")
call <SID>X("scalaRoot", s:foreground, "", "")
call <SID>X("scalaMethodCall", s:blue, "", "")
call <SID>X("scalaCaseType", s:yellow, "", "")
call <SID>X("scalaLineComment", s:comment, "", "")
call <SID>X("scalaComment", s:comment, "", "")
call <SID>X("scalaDocComment", s:comment, "", "")
call <SID>X("scalaDocTags", s:comment, "", "")
call <SID>X("scalaEmptyString", s:green, "", "")
call <SID>X("scalaMultiLineString", s:green, "", "")
call <SID>X("scalaUnicode", s:orange, "", "")
call <SID>X("scalaString", s:green, "", "")
call <SID>X("scalaStringEscape", s:green, "", "")
call <SID>X("scalaSymbol", s:orange, "", "")
call <SID>X("scalaChar", s:orange, "", "")
call <SID>X("scalaXml", s:green, "", "")
call <SID>X("scalaConstructorSpecializer", s:yellow, "", "")
call <SID>X("scalaBackTick", s:blue, "", "")
" Git
call <SID>X("diffAdded", s:green, "", "")
call <SID>X("diffRemoved", s:red, "", "")
call <SID>X("gitcommitSummary", "", "", "bold")
" Delete Functions
delf <SID>X
delf <SID>rgb
delf <SID>colour
delf <SID>rgb_colour
delf <SID>rgb_level
delf <SID>rgb_number
delf <SID>grey_colour
delf <SID>grey_level
delf <SID>grey_number
endif
@@ -0,0 +1,268 @@
" Initialisation:"{{{
" ----------------------------------------------------------------------------
hi clear
if exists("syntax_on")
syntax reset
endif
let s:style = get(g:, 'ayucolor', 'dark')
let g:colors_name = "ayu"
"}}}
" Palettes:"{{{
" ----------------------------------------------------------------------------
let s:palette = {}
let s:palette.bg = {'dark': "#0F1419", 'light': "#FAFAFA", 'mirage': "#212733"}
let s:palette.comment = {'dark': "#5C6773", 'light': "#ABB0B6", 'mirage': "#5C6773"}
let s:palette.markup = {'dark': "#F07178", 'light': "#F07178", 'mirage': "#F07178"}
let s:palette.constant = {'dark': "#FFEE99", 'light': "#A37ACC", 'mirage': "#D4BFFF"}
let s:palette.operator = {'dark': "#E7C547", 'light': "#E7C547", 'mirage': "#80D4FF"}
let s:palette.tag = {'dark': "#36A3D9", 'light': "#36A3D9", 'mirage': "#5CCFE6"}
let s:palette.regexp = {'dark': "#95E6CB", 'light': "#4CBF99", 'mirage': "#95E6CB"}
let s:palette.string = {'dark': "#B8CC52", 'light': "#86B300", 'mirage': "#BBE67E"}
let s:palette.function = {'dark': "#FFB454", 'light': "#F29718", 'mirage': "#FFD57F"}
let s:palette.special = {'dark': "#E6B673", 'light': "#E6B673", 'mirage': "#FFC44C"}
let s:palette.keyword = {'dark': "#FF7733", 'light': "#FF7733", 'mirage': "#FFAE57"}
let s:palette.error = {'dark': "#FF3333", 'light': "#FF3333", 'mirage': "#FF3333"}
let s:palette.accent = {'dark': "#F29718", 'light': "#FF6A00", 'mirage': "#FFCC66"}
let s:palette.panel = {'dark': "#14191F", 'light': "#FFFFFF", 'mirage': "#272D38"}
let s:palette.guide = {'dark': "#2D3640", 'light': "#D9D8D7", 'mirage': "#3D4751"}
let s:palette.line = {'dark': "#151A1E", 'light': "#F3F3F3", 'mirage': "#242B38"}
let s:palette.selection = {'dark': "#253340", 'light': "#F0EEE4", 'mirage': "#343F4C"}
let s:palette.fg = {'dark': "#E6E1CF", 'light': "#5C6773", 'mirage': "#D9D7CE"}
let s:palette.fg_idle = {'dark': "#3E4B59", 'light': "#828C99", 'mirage': "#607080"}
"}}}
" Highlighting Primitives:"{{{
" ----------------------------------------------------------------------------
function! s:build_prim(hi_elem, field)
let l:vname = "s:" . a:hi_elem . "_" . a:field " s:bg_gray
let l:gui_assign = "gui".a:hi_elem."=".s:palette[a:field][s:style] " guibg=...
exe "let " . l:vname . " = ' " . l:gui_assign . "'"
endfunction
let s:bg_none = ' guibg=NONE ctermbg=NONE'
let s:fg_none = ' guifg=NONE ctermfg=NONE'
for [key_name, d_value] in items(s:palette)
call s:build_prim('bg', key_name)
call s:build_prim('fg', key_name)
endfor
" }}}
" Formatting Options:"{{{
" ----------------------------------------------------------------------------
let s:none = "NONE"
let s:t_none = "NONE"
let s:n = "NONE"
let s:c = ",undercurl"
let s:r = ",reverse"
let s:s = ",standout"
let s:b = ",bold"
let s:u = ",underline"
let s:i = ",italic"
exe "let s:fmt_none = ' gui=NONE". " cterm=NONE". " term=NONE" ."'"
exe "let s:fmt_bold = ' gui=NONE".s:b. " cterm=NONE".s:b. " term=NONE".s:b ."'"
exe "let s:fmt_bldi = ' gui=NONE".s:b. " cterm=NONE".s:b. " term=NONE".s:b ."'"
exe "let s:fmt_undr = ' gui=NONE".s:u. " cterm=NONE".s:u. " term=NONE".s:u ."'"
exe "let s:fmt_undb = ' gui=NONE".s:u.s:b. " cterm=NONE".s:u.s:b. " term=NONE".s:u.s:b."'"
exe "let s:fmt_undi = ' gui=NONE".s:u. " cterm=NONE".s:u. " term=NONE".s:u ."'"
exe "let s:fmt_curl = ' gui=NONE".s:c. " cterm=NONE".s:c. " term=NONE".s:c ."'"
exe "let s:fmt_ital = ' gui=NONE".s:i. " cterm=NONE".s:i. " term=NONE".s:i ."'"
exe "let s:fmt_stnd = ' gui=NONE".s:s. " cterm=NONE".s:s. " term=NONE".s:s ."'"
exe "let s:fmt_revr = ' gui=NONE".s:r. " cterm=NONE".s:r. " term=NONE".s:r ."'"
exe "let s:fmt_revb = ' gui=NONE".s:r.s:b. " cterm=NONE".s:r.s:b. " term=NONE".s:r.s:b."'"
"}}}
" Vim Highlighting: (see :help highlight-groups)"{{{
" ----------------------------------------------------------------------------
exe "hi! Normal" .s:fg_fg .s:bg_bg .s:fmt_none
exe "hi! ColorColumn" .s:fg_none .s:bg_line .s:fmt_none
" Conceal, Cursor, CursorIM
exe "hi! CursorColumn" .s:fg_none .s:bg_line .s:fmt_none
exe "hi! CursorLine" .s:fg_none .s:bg_line .s:fmt_none
exe "hi! CursorLineNr" .s:fg_accent .s:bg_line .s:fmt_none
exe "hi! LineNr" .s:fg_guide .s:bg_none .s:fmt_none
exe "hi! Directory" .s:fg_fg_idle .s:bg_none .s:fmt_none
exe "hi! DiffAdd" .s:fg_string .s:bg_panel .s:fmt_none
exe "hi! DiffChange" .s:fg_tag .s:bg_panel .s:fmt_none
exe "hi! DiffText" .s:fg_fg .s:bg_panel .s:fmt_none
exe "hi! ErrorMsg" .s:fg_fg .s:bg_error .s:fmt_stnd
exe "hi! VertSplit" .s:fg_bg .s:bg_none .s:fmt_none
exe "hi! Folded" .s:fg_fg_idle .s:bg_panel .s:fmt_none
exe "hi! FoldColumn" .s:fg_none .s:bg_panel .s:fmt_none
exe "hi! SignColumn" .s:fg_none .s:bg_panel .s:fmt_none
" Incsearch"
exe "hi! MatchParen" .s:fg_fg .s:bg_bg .s:fmt_undr
exe "hi! ModeMsg" .s:fg_string .s:bg_none .s:fmt_none
exe "hi! MoreMsg" .s:fg_string .s:bg_none .s:fmt_none
exe "hi! NonText" .s:fg_bg .s:bg_none .s:fmt_none
exe "hi! Pmenu" .s:fg_fg .s:bg_selection .s:fmt_none
exe "hi! PmenuSel" .s:fg_fg .s:bg_selection .s:fmt_revr
" PmenuSbar"
" PmenuThumb"
exe "hi! Question" .s:fg_string .s:bg_none .s:fmt_none
exe "hi! Search" .s:fg_bg .s:bg_constant .s:fmt_none
exe "hi! SpecialKey" .s:fg_selection .s:bg_none .s:fmt_none
exe "hi! SpellCap" .s:fg_tag .s:bg_none .s:fmt_undr
exe "hi! SpellLocal" .s:fg_keyword .s:bg_none .s:fmt_undr
exe "hi! SpellBad" .s:fg_error .s:bg_none .s:fmt_undr
exe "hi! SpellRare" .s:fg_regexp .s:bg_none .s:fmt_undr
exe "hi! StatusLine" .s:fg_fg .s:bg_panel .s:fmt_none
exe "hi! StatusLineNC" .s:fg_fg_idle .s:bg_panel .s:fmt_none
exe "hi! WildMenu" .s:fg_bg .s:bg_markup .s:fmt_none
exe "hi! TabLine" .s:fg_fg .s:bg_panel .s:fmt_revr
" TabLineFill"
" TabLineSel"
exe "hi! Title" .s:fg_keyword .s:bg_none .s:fmt_none
exe "hi! Visual" .s:fg_none .s:bg_selection .s:fmt_none
" VisualNos"
exe "hi! WarningMsg" .s:fg_error .s:bg_none .s:fmt_none
" TODO LongLineWarning to use variables instead of hardcoding
hi LongLineWarning guifg=NONE guibg=#371F1C gui=underline ctermfg=NONE ctermbg=NONE cterm=underline
" WildMenu"
"}}}
" Generic Syntax Highlighting: (see :help group-name)"{{{
" ----------------------------------------------------------------------------
exe "hi! Comment" .s:fg_comment .s:bg_none .s:fmt_none
exe "hi! Constant" .s:fg_constant .s:bg_none .s:fmt_none
exe "hi! String" .s:fg_string .s:bg_none .s:fmt_none
" Character"
" Number"
" Boolean"
" Float"
exe "hi! Identifier" .s:fg_tag .s:bg_none .s:fmt_none
exe "hi! Function" .s:fg_function .s:bg_none .s:fmt_none
exe "hi! Statement" .s:fg_keyword .s:bg_none .s:fmt_none
" Conditional"
" Repeat"
" Label"
exe "hi! Operator" .s:fg_operator .s:bg_none .s:fmt_none
" Keyword"
" Exception"
exe "hi! PreProc" .s:fg_special .s:bg_none .s:fmt_none
" Include"
" Define"
" Macro"
" PreCondit"
exe "hi! Type" .s:fg_tag .s:bg_none .s:fmt_none
" StorageClass"
exe "hi! Structure" .s:fg_special .s:bg_none .s:fmt_none
" Typedef"
exe "hi! Special" .s:fg_special .s:bg_none .s:fmt_none
" SpecialChar"
" Tag"
" Delimiter"
" SpecialComment"
" Debug"
"
exe "hi! Underlined" .s:fg_tag .s:bg_none .s:fmt_undr
exe "hi! Ignore" .s:fg_none .s:bg_none .s:fmt_none
exe "hi! Error" .s:fg_fg .s:bg_error .s:fmt_none
exe "hi! Todo" .s:fg_markup .s:bg_none .s:fmt_none
" Quickfix window highlighting
exe "hi! qfLineNr" .s:fg_keyword .s:bg_none .s:fmt_none
" qfFileName"
" qfLineNr"
" qfError"
exe "hi! Conceal" .s:fg_guide .s:bg_none .s:fmt_none
exe "hi! CursorLineConceal" .s:fg_guide .s:bg_line .s:fmt_none
" Terminal in NVIM
" ---------
if has("nvim")
let g:terminal_color_0 = s:palette.bg[s:style]
let g:terminal_color_1 = s:palette.markup[s:style]
let g:terminal_color_2 = s:palette.string[s:style]
let g:terminal_color_3 = s:palette.accent[s:style]
let g:terminal_color_4 = s:palette.tag[s:style]
let g:terminal_color_5 = s:palette.constant[s:style]
let g:terminal_color_6 = s:palette.regexp[s:style]
let g:terminal_color_7 = "#FFFFFF"
let g:terminal_color_8 = s:palette.fg_idle[s:style]
let g:terminal_color_9 = s:palette.error[s:style]
let g:terminal_color_10 = s:palette.string[s:style]
let g:terminal_color_11 = s:palette.accent[s:style]
let g:terminal_color_12 = s:palette.tag[s:style]
let g:terminal_color_13 = s:palette.constant[s:style]
let g:terminal_color_14 = s:palette.regexp[s:style]
let g:terminal_color_15 = s:palette.comment[s:style]
let g:terminal_color_background = g:terminal_color_0
let g:terminal_color_foreground = s:palette.fg[s:style]
endif
" NerdTree
" ---------
exe "hi! NERDTreeOpenable" .s:fg_fg_idle .s:bg_none .s:fmt_none
exe "hi! NERDTreeClosable" .s:fg_accent .s:bg_none .s:fmt_none
" exe "hi! NERDTreeBookmarksHeader" .s:fg_pink .s:bg_none .s:fmt_none
" exe "hi! NERDTreeBookmarksLeader" .s:fg_bg .s:bg_none .s:fmt_none
" exe "hi! NERDTreeBookmarkName" .s:fg_keyword .s:bg_none .s:fmt_none
" exe "hi! NERDTreeCWD" .s:fg_pink .s:bg_none .s:fmt_none
exe "hi! NERDTreeUp" .s:fg_fg_idle .s:bg_none .s:fmt_none
exe "hi! NERDTreeDir" .s:fg_fg_idle .s:bg_none .s:fmt_none
exe "hi! NERDTreeFile" .s:fg_fg_idle .s:bg_none .s:fmt_none
exe "hi! NERDTreeDirSlash" .s:fg_guide .s:bg_none .s:fmt_none
" GitGutter
" ---------
exe "hi! GitGutterAdd" .s:fg_string .s:bg_none .s:fmt_none
exe "hi! GitGutterChange" .s:fg_tag .s:bg_none .s:fmt_none
exe "hi! GitGutterDelete" .s:fg_markup .s:bg_none .s:fmt_none
exe "hi! GitGutterChangeDelete" .s:fg_function .s:bg_none .s:fmt_none
"}}}
" Diff Syntax Highlighting:"{{{
" ----------------------------------------------------------------------------
" Diff
" diffOldFile
" diffNewFile
" diffFile
" diffOnly
" diffIdentical
" diffDiffer
" diffBDiffer
" diffIsA
" diffNoEOL
" diffCommon
hi! link diffRemoved Constant
" diffChanged
hi! link diffAdded String
" diffLine
" diffSubname
" diffComment
"}}}
"
" This is needed for some reason: {{{
let &background = s:style
" }}}
@@ -0,0 +1,276 @@
" Vim color file
"
" Author: Tomas Restrepo <tomas@winterdom.com>
" https://github.com/tomasr/molokai
"
" Note: Based on the Monokai theme for TextMate
" by Wimer Hazenberg and its darker variant
" by Hamish Stuart Macpherson
"
hi clear
if version > 580
" no guarantees for version 5.8 and below, but this makes it stop
" complaining
hi clear
if exists("syntax_on")
syntax reset
endif
endif
let g:colors_name="molokai"
if exists("g:molokai_original")
let s:molokai_original = g:molokai_original
else
let s:molokai_original = 0
endif
hi Boolean guifg=#AE81FF
hi Character guifg=#E6DB74
hi Number guifg=#AE81FF
hi String guifg=#E6DB74
hi Conditional guifg=#F92672 gui=bold
hi Constant guifg=#AE81FF gui=bold
hi Cursor guifg=#000000 guibg=#F8F8F0
hi iCursor guifg=#000000 guibg=#F8F8F0
hi Debug guifg=#BCA3A3 gui=bold
hi Define guifg=#66D9EF
hi Delimiter guifg=#8F8F8F
hi DiffAdd guibg=#13354A
hi DiffChange guifg=#89807D guibg=#4C4745
hi DiffDelete guifg=#960050 guibg=#1E0010
hi DiffText guibg=#4C4745 gui=italic,bold
hi Directory guifg=#A6E22E gui=bold
hi Error guifg=#E6DB74 guibg=#1E0010
hi ErrorMsg guifg=#F92672 guibg=#232526 gui=bold
hi Exception guifg=#A6E22E gui=bold
hi Float guifg=#AE81FF
hi FoldColumn guifg=#465457 guibg=#000000
hi Folded guifg=#465457 guibg=#000000
hi Function guifg=#A6E22E
hi Identifier guifg=#FD971F
hi Ignore guifg=#808080 guibg=bg
hi IncSearch guifg=#C4BE89 guibg=#000000
hi Keyword guifg=#F92672 gui=bold
hi Label guifg=#E6DB74 gui=none
hi Macro guifg=#C4BE89 gui=italic
hi SpecialKey guifg=#66D9EF gui=italic
hi MatchParen guifg=#000000 guibg=#FD971F gui=bold
hi ModeMsg guifg=#E6DB74
hi MoreMsg guifg=#E6DB74
hi Operator guifg=#F92672
" complete menu
hi Pmenu guifg=#66D9EF guibg=#000000
hi PmenuSel guibg=#808080
hi PmenuSbar guibg=#080808
hi PmenuThumb guifg=#66D9EF
hi PreCondit guifg=#A6E22E gui=bold
hi PreProc guifg=#A6E22E
hi Question guifg=#66D9EF
hi Repeat guifg=#F92672 gui=bold
hi Search guifg=#000000 guibg=#FFE792
" marks
hi SignColumn guifg=#A6E22E guibg=#232526
hi SpecialChar guifg=#F92672 gui=bold
hi SpecialComment guifg=#7E8E91 gui=bold
hi Special guifg=#66D9EF guibg=bg gui=italic
if has("spell")
hi SpellBad guisp=#FF0000 gui=undercurl
hi SpellCap guisp=#7070F0 gui=undercurl
hi SpellLocal guisp=#70F0F0 gui=undercurl
hi SpellRare guisp=#FFFFFF gui=undercurl
endif
hi Statement guifg=#F92672 gui=bold
hi StatusLine guifg=#455354 guibg=fg
hi StatusLineNC guifg=#808080 guibg=#080808
hi StorageClass guifg=#FD971F gui=italic
hi Structure guifg=#66D9EF
hi Tag guifg=#F92672 gui=italic
hi Title guifg=#ef5939
hi Todo guifg=#FFFFFF guibg=bg gui=bold
hi Typedef guifg=#66D9EF
hi Type guifg=#66D9EF gui=none
hi Underlined guifg=#808080 gui=underline
hi VertSplit guifg=#808080 guibg=#080808 gui=bold
hi VisualNOS guibg=#403D3D
hi Visual guibg=#403D3D
hi WarningMsg guifg=#FFFFFF guibg=#333333 gui=bold
hi WildMenu guifg=#66D9EF guibg=#000000
hi TabLineFill guifg=#1B1D1E guibg=#1B1D1E
hi TabLine guibg=#1B1D1E guifg=#808080 gui=none
if s:molokai_original == 1
hi Normal guifg=#F8F8F2 guibg=#272822
hi Comment guifg=#75715E
hi CursorLine guibg=#3E3D32
hi CursorLineNr guifg=#FD971F gui=none
hi CursorColumn guibg=#3E3D32
hi ColorColumn guibg=#3B3A32
hi LineNr guifg=#BCBCBC guibg=#3B3A32
hi NonText guifg=#75715E
hi SpecialKey guifg=#75715E
else
hi Normal guifg=#F8F8F2 guibg=#1B1D1E
hi Comment guifg=#7E8E91
hi CursorLine guibg=#293739
hi CursorLineNr guifg=#FD971F gui=none
hi CursorColumn guibg=#293739
hi ColorColumn guibg=#232526
hi LineNr guifg=#465457 guibg=#232526
hi NonText guifg=#465457
hi SpecialKey guifg=#465457
end
"
" Support for 256-color terminal
"
if &t_Co > 255
if s:molokai_original == 1
hi Normal ctermbg=234
hi CursorLine ctermbg=235 cterm=none
hi CursorLineNr ctermfg=208 cterm=none
else
hi Normal ctermfg=252 ctermbg=233
hi CursorLine ctermbg=234 cterm=none
hi CursorLineNr ctermfg=208 cterm=none
endif
hi Boolean ctermfg=135
hi Character ctermfg=144
hi Number ctermfg=135
hi String ctermfg=144
hi Conditional ctermfg=161 cterm=bold
hi Constant ctermfg=135 cterm=bold
hi Cursor ctermfg=16 ctermbg=253
hi Debug ctermfg=225 cterm=bold
hi Define ctermfg=81
hi Delimiter ctermfg=241
hi DiffAdd ctermbg=24
hi DiffChange ctermfg=181 ctermbg=239
hi DiffDelete ctermfg=162 ctermbg=53
hi DiffText ctermbg=102 cterm=bold
hi Directory ctermfg=118 cterm=bold
hi Error ctermfg=219 ctermbg=89
hi ErrorMsg ctermfg=199 ctermbg=16 cterm=bold
hi Exception ctermfg=118 cterm=bold
hi Float ctermfg=135
hi FoldColumn ctermfg=67 ctermbg=16
hi Folded ctermfg=67 ctermbg=16
hi Function ctermfg=118
hi Identifier ctermfg=208 cterm=none
hi Ignore ctermfg=244 ctermbg=232
hi IncSearch ctermfg=193 ctermbg=16
hi keyword ctermfg=161 cterm=bold
hi Label ctermfg=229 cterm=none
hi Macro ctermfg=193
hi SpecialKey ctermfg=81
hi MatchParen ctermfg=233 ctermbg=208 cterm=bold
hi ModeMsg ctermfg=229
hi MoreMsg ctermfg=229
hi Operator ctermfg=161
" complete menu
hi Pmenu ctermfg=81 ctermbg=16
hi PmenuSel ctermfg=255 ctermbg=242
hi PmenuSbar ctermbg=232
hi PmenuThumb ctermfg=81
hi PreCondit ctermfg=118 cterm=bold
hi PreProc ctermfg=118
hi Question ctermfg=81
hi Repeat ctermfg=161 cterm=bold
hi Search ctermfg=0 ctermbg=222 cterm=NONE
" marks column
hi SignColumn ctermfg=118 ctermbg=235
hi SpecialChar ctermfg=161 cterm=bold
hi SpecialComment ctermfg=245 cterm=bold
hi Special ctermfg=81
if has("spell")
hi SpellBad ctermbg=52
hi SpellCap ctermbg=17
hi SpellLocal ctermbg=17
hi SpellRare ctermfg=none ctermbg=none cterm=reverse
endif
hi Statement ctermfg=161 cterm=bold
hi StatusLine ctermfg=238 ctermbg=253
hi StatusLineNC ctermfg=244 ctermbg=232
hi StorageClass ctermfg=208
hi Structure ctermfg=81
hi Tag ctermfg=161
hi Title ctermfg=166
hi Todo ctermfg=231 ctermbg=232 cterm=bold
hi Typedef ctermfg=81
hi Type ctermfg=81 cterm=none
hi Underlined ctermfg=244 cterm=underline
hi VertSplit ctermfg=244 ctermbg=232 cterm=bold
hi VisualNOS ctermbg=238
hi Visual ctermbg=235
hi WarningMsg ctermfg=231 ctermbg=238 cterm=bold
hi WildMenu ctermfg=81 ctermbg=16
hi Comment ctermfg=59
hi CursorColumn ctermbg=236
hi ColorColumn ctermbg=236
hi LineNr ctermfg=250 ctermbg=236
hi NonText ctermfg=59
hi SpecialKey ctermfg=59
if exists("g:rehash256") && g:rehash256 == 1
hi Normal ctermfg=252 ctermbg=234
hi CursorLine ctermbg=236 cterm=none
hi CursorLineNr ctermfg=208 cterm=none
hi Boolean ctermfg=141
hi Character ctermfg=222
hi Number ctermfg=141
hi String ctermfg=222
hi Conditional ctermfg=197 cterm=bold
hi Constant ctermfg=141 cterm=bold
hi DiffDelete ctermfg=125 ctermbg=233
hi Directory ctermfg=154 cterm=bold
hi Error ctermfg=222 ctermbg=233
hi Exception ctermfg=154 cterm=bold
hi Float ctermfg=141
hi Function ctermfg=154
hi Identifier ctermfg=208
hi Keyword ctermfg=197 cterm=bold
hi Operator ctermfg=197
hi PreCondit ctermfg=154 cterm=bold
hi PreProc ctermfg=154
hi Repeat ctermfg=197 cterm=bold
hi Statement ctermfg=197 cterm=bold
hi Tag ctermfg=197
hi Title ctermfg=203
hi Visual ctermbg=238
hi Comment ctermfg=244
hi LineNr ctermfg=239 ctermbg=235
hi NonText ctermfg=239
hi SpecialKey ctermfg=239
endif
end
" Must be at the end, because of ctermbg=234 bug.
" https://groups.google.com/forum/#!msg/vim_dev/afPqwAFNdrU/nqh6tOM87QUJ
set background=dark
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,4 @@
let s:dir = expand('<sfile>:p:h').(!exists("+shellslash") || &shellslash ? '/' : '\')
set background=dark
execute "source" s:dir."solarized8.vim"
unlet s:dir
@@ -0,0 +1,75 @@
# ~/.bashrc: executed by bash(1) for non-login shells.
# don't put duplicate lines in the history. See bash(1) for more options
# don't overwrite GNU Midnight Commander's setting of `ignorespace'.
export HISTCONTROL=$HISTCONTROL${HISTCONTROL+,}ignoredups
# ... or force ignoredups and ignorespace
export HISTCONTROL=ignoreboth
# append to the history file, don't overwrite it
shopt -s histappend
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize
# Note: PS1 and umask are already set in /etc/profile. You should not
# need this unless you want different defaults for root.
# PS1='${debian_chroot:+($debian_chroot)}\h:\w\$ '
# umask 022
#export PS1='\h:\w \$ '
__hostname="$(hostname -f)"
__hostname="${__hostname%.*}"
__hostname="${__hostname%.*}"
export PS1='${__hostname}:\w \$ '
umask 022
# You may uncomment the following lines if you want `ls' to be colorized:
export LS_OPTIONS='--color=auto'
eval "`dircolors`"
alias ls='ls $LS_OPTIONS'
alias ll='ls $LS_OPTIONS -l'
alias la='ls $LS_OPTIONS -al'
alias l='ls $LS_OPTIONS -lA'
#
# Some more alias to avoid making mistakes:
#alias rm='rm -i'
#alias cp='cp -i'
#alias mv='mv -i'
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
alias poweroff='echo -e "\n\tplease use: /sbin/poweroff\n"'
alias reboot='echo -e "\n\tplease use: /sbin/reboot\n"'
# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
. /etc/bash_completion
fi
export EDITOR=vim
export LINES=64
## - set beep more quiet
## -
#xset b 10 500 50
@@ -0,0 +1,25 @@
# ~/.profile: executed by Bourne-compatible login shells.
if [ "$BASH" ]; then
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
fi
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi
if [ -d "$HOME/bin/admin-stuff" ] ; then
PATH="$HOME/bin/admin-stuff:$PATH"
fi
# this is for the midnight-commander
# to become the last directory the midnight commander was in
# as the current directory when leaving the midnight commander
#
if [[ -f /usr/share/mc/bin/mc.sh ]]; then
source /usr/share/mc/bin/mc.sh
fi
mesg n
@@ -0,0 +1,178 @@
" An example for a vimrc file.
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last change: 1999 Sep 09
"
" To use it, copy it to
" for Unix and OS/2: ~/.vimrc
" for Amiga: s:.vimrc
" for MS-DOS and Win32: $VIM\_vimrc
" This line should not be removed as it ensures that various options are
" properly set to work with the Vim-related packages available in Debian.
runtime! debian.vim
set nocompatible " Use Vim defaults (much better!)
set bs=2 " allow backspacing over everything in insert mode
set ai " always set autoindenting on
" set backup " keep a backup file
"set viminfo='20,\"50 " read/write a .viminfo file, don't store more
" than 50 lines of registers
set viminfo='20,\"50,:20,%,n~/.viminfo
set history=50 " keep 50 lines of command line history
set ruler " show the cursor position all the time
set ignorecase " suchen case-insenitiv
set showmatch " zeige passende klammern
set shell=/bin/bash " shell to start with !
set expandtab " tabs --> blanks
set showmode " anzeige INSERT/REPLACE/...
" set smartcase " Do smart case matching
set incsearch " Incremental search
" Start searching when you type the first character of
" the search string. As you type in more characters, the
" search is refined.
set t_Co=256 " To enable 256 colors in vim, put this your .vimrc before setting the colorscheme
" einrueckung
"set noexpandtab
set expandtab
set shiftwidth=3
set tabstop=3
set softtabstop=3
" Round indent to multiple of 'shiftwidth' for > and < commands
set shiftround
"set number
" For Win32 GUI: remove 't' flag from 'guioptions': no tearoff menu entries
" let &guioptions = substitute(&guioptions, "t", "", "g")
" Don't use Ex mode, use Q for formatting
map Q gq
" Make p in isual Visual mode replace the selected text with the "" register.
vnoremap p <Esc>:let current_reg = @"<CR>gvdi<C-R>=current_reg<CR><Esc>
" Switch syntax highlighting on, when the terminal has colors
" Also switch on highlighting the last used search pattern.
if &t_Co > 2 || has("gui_running")
syntax on
set hlsearch
endif
" Only do this part when compiled with support for autocommands.
if has("autocmd")
" In text files, always limit the width of text to 78 characters
autocmd BufRead *.txt set tw=78
augroup cprog
" Remove all cprog autocommands
au!
" When starting to edit a file:
" For C and C++ files set formatting of comments and set C-indenting on.
" For other files switch it off.
" Don't change the order, it's important that the line with * comes first.
autocmd FileType * set formatoptions=tcql nocindent comments&
autocmd FileType c,cpp set formatoptions=croql cindent comments=sr:/*,mb:*,el:*/,://
augroup END
augroup gzip
" Remove all gzip autocommands
au!
" Enable editing of gzipped files
" set binary mode before reading the file
autocmd BufReadPre,FileReadPre *.gz,*.bz2 set bin
autocmd BufReadPost,FileReadPost *.gz call GZIP_read("gunzip")
autocmd BufReadPost,FileReadPost *.bz2 call GZIP_read("bunzip2")
autocmd BufWritePost,FileWritePost *.gz call GZIP_write("gzip")
autocmd BufWritePost,FileWritePost *.bz2 call GZIP_write("bzip2")
autocmd FileAppendPre *.gz call GZIP_appre("gunzip")
autocmd FileAppendPre *.bz2 call GZIP_appre("bunzip2")
autocmd FileAppendPost *.gz call GZIP_write("gzip")
autocmd FileAppendPost *.bz2 call GZIP_write("bzip2")
" After reading compressed file: Uncompress text in buffer with "cmd"
fun! GZIP_read(cmd)
let ch_save = &ch
set ch=2
execute "'[,']!" . a:cmd
set nobin
let &ch = ch_save
execute ":doautocmd BufReadPost " . expand("%:r")
endfun
" After writing compressed file: Compress written file with "cmd"
fun! GZIP_write(cmd)
if rename(expand("<afile>"), expand("<afile>:r")) == 0
execute "!" . a:cmd . " <afile>:r"
endif
endfun
" Before appending to compressed file: Uncompress file with "cmd"
fun! GZIP_appre(cmd)
execute "!" . a:cmd . " <afile>"
call rename(expand("<afile>:r"), expand("<afile>"))
endfun
augroup END
" This is disabled, because it changes the jumplist. Can't use CTRL-O to go
" back to positions in previous files more than once.
if 0
" When editing a file, always jump to the last cursor position.
" This must be after the uncompress commands.
autocmd BufReadPost * if line("'\"") && line("'\"") <= line("$") | exe "normal `\"" | endif
endif
endif " has("autocmd")
" toggle syntax highlighting
map <F12> :if exists("syntax_on") <Bar> syntax off <Bar> else <Bar> syntax on <Bar> endif <CR><ESC>
map <F11> :nohls <CR>
" use <F6> to toggle line numbers
nmap <silent> <F6> :set number!<CR>
" If using a dark background within the editing area and syntax highlighting
" turn on this option as well
set background=dark
" set color for search
hi clear search
hi search term=bold,reverse cterm=bold,reverse gui=bold,reverse
" set color for Comment
hi clear Comment
"highlight Comment term=bold cterm=bold ctermfg=LightBlue guifg=#80a0ff gui=bold
"highlight Comment term=none cterm=none ctermfg=LightBlue guifg=#80a0ff gui=bold
"highlight Comment term=bold cterm=bold ctermfg=grey guifg=#80a0ff gui=bold
highlight Comment term=none cterm=none ctermfg=grey guifg=#80a0ff gui=bold
"highlight Comment term=none cterm=none ctermfg=177 guifg=#80a0ff gui=bold
"highlight Comment term=none cterm=none ctermfg=215 guifg=#80a0ff gui=bold
" Go back to the position the cursor was on the last time this file was edited
au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$")|execute("normal `\"")|endif
" visual shifting (does not exit Visual mode)
vnoremap < <gv
vnoremap > >gv
" Scroll when cursor gets within 3 characters of top/bottom edge
set scrolloff=3
" Show line, column number, and relative position within a file in the status line
" set statusline=%F%m%r%h%w\ [FORMAT=%{&ff}]\ [TYPE=%Y]\ [ASCII=\%03.3b]\ [HEX=\%02.2B]\ [POS=%04l,%04v][%p%%]\ [LEN=%L]
"set statusline=\ %F\ %(\|\ flags:\ %R%M%H%W\ %)%(\|\ type:\ %Y\ %)%(\|\ format:\ %{&ff}\ %)%(\|\ syntax:\ %{synIDattr(synID(line('.'),col('.'),0),'name')}%)\ \ %=line:\ %l/%L\ \|\ column:\ %c%V\ \|\ relative\:\ %p%%\
set statusline=\ %F\ %(\|\ flags:\ %R%M%H%W\ %)%(\|\ type:\ %Y\ %)%(\|\ format:\ %{&ff}\ %)\ \ %=line:\ %l/%L\ \|\ col:\ %c%V\ \|\ %p%%
" Always show status line, even for one window
set laststatus=2
highlight StatusLine cterm=none ctermfg=white ctermbg=blue
colorscheme PaperColor
@@ -0,0 +1,11 @@
let g:netrw_dirhistmax =10
let g:netrw_dirhist_cnt =9
let g:netrw_dirhist_1='/home/chris/devel/git/git.oopen.de/script/bash/snippets'
let g:netrw_dirhist_2='/home/chris/O.OPEN/Kunden/Anwaltsbuero-Kottbusser_Damm/carsten/ThinkPad_L380'
let g:netrw_dirhist_3='/home/chris/devel/git/git.oopen.de/ansible/mbr-bln/group_vars/all'
let g:netrw_dirhist_4='/home/chris/O.OPEN/Kunden/Gemeinschaft Altenschlirf/Intranet/VPN/VPN-GA-NH-chris'
let g:netrw_dirhist_5='/home/chris/devel/git/git.oopen.de/firewall/ipt-server'
let g:netrw_dirhist_6='/home/chris/devel/git/git.oopen.de/firewall/ipt-server/conf'
let g:netrw_dirhist_7='/home/chris/devel/git/git.oopen.de/ansible/oopen-server/group_vars'
let g:netrw_dirhist_8='/home/chris/devel/git/git.oopen.de/ansible/oopen-server/roles/ansible_dependencies'
let g:netrw_dirhist_9='/home/chris/devel/git/git.oopen.de/ansible/oopen-server/roles/ansible_dependencies/tasks'
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,547 @@
" File: afterglow.vim
" Author: Danilo Augusto <daniloaugusto.ita16@gmail.com>
" Date: 2017-02-27
" Vim color file - Afterglow (monokai version)
"
" Hex color conversion functions borrowed from the theme 'Desert256'
set background=dark
if version > 580
hi clear
if exists("syntax_on")
syntax reset
endif
endif
let g:colors_name = "afterglow"
" Default GUI Colours
let s:foreground = "d6d6d6"
let s:background = "1a1a1a"
let s:selection = "5a647e"
let s:line = "393939"
let s:comment = "797979"
let s:red = "ac4142"
let s:orange = "e87d3e"
let s:yellow = "e5b567"
let s:green = "b4c973"
let s:blue = "6c99bb"
let s:wine = "b05279"
let s:purple = "9e86c8"
let s:window = "4d5057"
if has("gui_running") || &t_Co == 88 || &t_Co == 256
" Returns an approximate grey index for the given grey level
fun <SID>grey_number(x)
if &t_Co == 88
if a:x < 23
return 0
elseif a:x < 69
return 1
elseif a:x < 103
return 2
elseif a:x < 127
return 3
elseif a:x < 150
return 4
elseif a:x < 173
return 5
elseif a:x < 196
return 6
elseif a:x < 219
return 7
elseif a:x < 243
return 8
else
return 9
endif
else
if a:x < 14
return 0
else
let l:n = (a:x - 8) / 10
let l:m = (a:x - 8) % 10
if l:m < 5
return l:n
else
return l:n + 1
endif
endif
endif
endfun
" Returns the actual grey level represented by the grey index
fun <SID>grey_level(n)
if &t_Co == 88
if a:n == 0
return 0
elseif a:n == 1
return 46
elseif a:n == 2
return 92
elseif a:n == 3
return 115
elseif a:n == 4
return 139
elseif a:n == 5
return 162
elseif a:n == 6
return 185
elseif a:n == 7
return 208
elseif a:n == 8
return 231
else
return 255
endif
else
if a:n == 0
return 0
else
return 8 + (a:n * 10)
endif
endif
endfun
" Returns the palette index for the given grey index
fun <SID>grey_colour(n)
if &t_Co == 88
if a:n == 0
return 16
elseif a:n == 9
return 79
else
return 79 + a:n
endif
else
if a:n == 0
return 16
elseif a:n == 25
return 231
else
return 231 + a:n
endif
endif
endfun
" Returns an approximate colour index for the given colour level
fun <SID>rgb_number(x)
if &t_Co == 88
if a:x < 69
return 0
elseif a:x < 172
return 1
elseif a:x < 230
return 2
else
return 3
endif
else
if a:x < 75
return 0
else
let l:n = (a:x - 55) / 40
let l:m = (a:x - 55) % 40
if l:m < 20
return l:n
else
return l:n + 1
endif
endif
endif
endfun
" Returns the actual colour level for the given colour index
fun <SID>rgb_level(n)
if &t_Co == 88
if a:n == 0
return 0
elseif a:n == 1
return 139
elseif a:n == 2
return 205
else
return 255
endif
else
if a:n == 0
return 0
else
return 55 + (a:n * 40)
endif
endif
endfun
" Returns the palette index for the given R/G/B colour indices
fun <SID>rgb_colour(x, y, z)
if &t_Co == 88
return 16 + (a:x * 16) + (a:y * 4) + a:z
else
return 16 + (a:x * 36) + (a:y * 6) + a:z
endif
endfun
" Returns the palette index to approximate the given R/G/B colour levels
fun <SID>colour(r, g, b)
" Get the closest grey
let l:gx = <SID>grey_number(a:r)
let l:gy = <SID>grey_number(a:g)
let l:gz = <SID>grey_number(a:b)
" Get the closest colour
let l:x = <SID>rgb_number(a:r)
let l:y = <SID>rgb_number(a:g)
let l:z = <SID>rgb_number(a:b)
if l:gx == l:gy && l:gy == l:gz
" There are two possibilities
let l:dgr = <SID>grey_level(l:gx) - a:r
let l:dgg = <SID>grey_level(l:gy) - a:g
let l:dgb = <SID>grey_level(l:gz) - a:b
let l:dgrey = (l:dgr * l:dgr) + (l:dgg * l:dgg) + (l:dgb * l:dgb)
let l:dr = <SID>rgb_level(l:gx) - a:r
let l:dg = <SID>rgb_level(l:gy) - a:g
let l:db = <SID>rgb_level(l:gz) - a:b
let l:drgb = (l:dr * l:dr) + (l:dg * l:dg) + (l:db * l:db)
if l:dgrey < l:drgb
" Use the grey
return <SID>grey_colour(l:gx)
else
" Use the colour
return <SID>rgb_colour(l:x, l:y, l:z)
endif
else
" Only one possibility
return <SID>rgb_colour(l:x, l:y, l:z)
endif
endfun
" Returns the palette index to approximate the 'rrggbb' hex string
fun <SID>rgb(rgb)
let l:r = ("0x" . strpart(a:rgb, 0, 2)) + 0
let l:g = ("0x" . strpart(a:rgb, 2, 2)) + 0
let l:b = ("0x" . strpart(a:rgb, 4, 2)) + 0
return <SID>colour(l:r, l:g, l:b)
endfun
" Sets the highlighting for the given group
fun <SID>X(group, fg, bg, attr)
if a:fg != ""
exec "hi " . a:group . " guifg=#" . a:fg . " ctermfg=" . <SID>rgb(a:fg)
endif
if a:bg != ""
exec "hi " . a:group . " guibg=#" . a:bg . " ctermbg=" . <SID>rgb(a:bg)
endif
if a:attr != ""
exec "hi " . a:group . " gui=" . a:attr . " cterm=" . a:attr
endif
endfun
" Vim Highlighting
call <SID>X("Normal", s:foreground, s:background, "")
call <SID>X("LineNr", s:comment, "", "")
call <SID>X("NonText", s:selection, "", "")
call <SID>X("SpecialKey", s:selection, "", "")
call <SID>X("Search", s:background, s:yellow, "")
call <SID>X("TabLine", s:window, s:foreground, "reverse")
call <SID>X("TabLineFill", s:window, s:foreground, "reverse")
call <SID>X("StatusLine", s:window, s:yellow, "reverse")
call <SID>X("StatusLineNC", s:window, s:foreground, "reverse")
call <SID>X("VertSplit", s:window, s:window, "none")
call <SID>X("Visual", "", s:selection, "")
call <SID>X("Directory", s:blue, "", "")
call <SID>X("ModeMsg", s:green, "", "")
call <SID>X("MoreMsg", s:green, "", "")
call <SID>X("Question", s:green, "", "")
call <SID>X("WarningMsg", s:orange, "", "bold")
call <SID>X("MatchParen", "", s:selection, "")
call <SID>X("Folded", s:comment, s:background, "")
call <SID>X("FoldColumn", "", s:background, "")
if version >= 700
call <SID>X("CursorLine", "", s:line, "none")
call <SID>X("CursorLineNR", s:orange, "", "none")
call <SID>X("CursorColumn", "", s:line, "none")
call <SID>X("PMenu", s:foreground, s:selection, "none")
call <SID>X("PMenuSel", s:foreground, s:selection, "reverse")
call <SID>X("SignColumn", "", s:background, "none")
end
if version >= 703
call <SID>X("ColorColumn", "", s:line, "none")
end
" Standard Highlighting
call <SID>X("Comment", s:comment, "", "")
call <SID>X("Todo", s:red, s:background, "bold")
call <SID>X("Title", s:comment, "", "bold")
call <SID>X("Identifier", s:orange, "", "")
call <SID>X("Statement", s:wine, "", "")
call <SID>X("Conditional", s:wine, "", "")
call <SID>X("Repeat", s:wine, "", "")
call <SID>X("Structure", s:wine, "", "")
call <SID>X("Function", s:orange, "", "")
call <SID>X("Constant", s:purple, "", "")
call <SID>X("Keyword", s:orange, "", "")
call <SID>X("String", s:yellow, "", "")
call <SID>X("Special", s:blue, "", "")
call <SID>X("PreProc", s:green, "", "")
call <SID>X("Operator", s:purple, "", "")
call <SID>X("Type", s:blue, "", "")
call <SID>X("Define", s:wine, "", "")
call <SID>X("Include", s:wine, "", "")
call <SID>X("Tag", s:orange, "", "bold")
call <SID>X("Underlined", s:orange, "", "underline")
syntax match commonOperator "\(+\|=\|-\|*\|\^\|\/\||\)"
hi link commonOperator Operator
" Vim Highlighting
call <SID>X("vimCommand", s:wine, "", "none")
" C Highlighting
call <SID>X("cType", s:wine, "", "")
call <SID>X("cStorageClass", s:orange, "", "")
call <SID>X("cConditional", s:wine, "", "")
call <SID>X("cRepeat", s:wine, "", "")
" PHP Highlighting
call <SID>X("phpVarSelector", s:wine, "", "")
call <SID>X("phpKeyword", s:wine, "", "")
call <SID>X("phpRepeat", s:wine, "", "")
call <SID>X("phpConditional", s:wine, "", "")
call <SID>X("phpStatement", s:wine, "", "")
call <SID>X("phpMemberSelector", s:foreground, "", "")
" Ruby Highlighting
call <SID>X("rubySymbol", s:blue, "", "")
call <SID>X("rubyConstant", s:green, "", "")
call <SID>X("rubyAccess", s:yellow, "", "")
call <SID>X("rubyAttribute", s:blue, "", "")
call <SID>X("rubyInclude", s:blue, "", "")
call <SID>X("rubyLocalVariableOrMethod", s:orange, "", "")
call <SID>X("rubyCurlyBlock", s:orange, "", "")
call <SID>X("rubyStringDelimiter", s:yellow, "", "")
call <SID>X("rubyInterpolationDelimiter", s:orange, "", "")
call <SID>X("rubyConditional", s:wine, "", "")
call <SID>X("rubyRepeat", s:wine, "", "")
call <SID>X("rubyControl", s:wine, "", "")
call <SID>X("rubyException", s:wine, "", "")
" Crystal Highlighting
call <SID>X("crystalSymbol", s:green, "", "")
call <SID>X("crystalConstant", s:yellow, "", "")
call <SID>X("crystalAccess", s:yellow, "", "")
call <SID>X("crystalAttribute", s:blue, "", "")
call <SID>X("crystalInclude", s:blue, "", "")
call <SID>X("crystalLocalVariableOrMethod", s:orange, "", "")
call <SID>X("crystalCurlyBlock", s:orange, "", "")
call <SID>X("crystalStringDelimiter", s:green, "", "")
call <SID>X("crystalInterpolationDelimiter", s:orange, "", "")
call <SID>X("crystalConditional", s:wine, "", "")
call <SID>X("crystalRepeat", s:wine, "", "")
call <SID>X("crystalControl", s:wine, "", "")
call <SID>X("crystalException", s:wine, "", "")
" Python Highlighting
call <SID>X("pythonInclude", s:green, "", "italic")
call <SID>X("pythonStatement", s:blue, "", "")
call <SID>X("pythonConditional", s:wine, "", "")
call <SID>X("pythonRepeat", s:wine, "", "")
call <SID>X("pythonException", s:wine, "", "")
call <SID>X("pythonFunction", s:green, "", "italic")
call <SID>X("pythonPreCondit", s:wine, "", "")
call <SID>X("pythonExClass", s:orange, "", "")
call <SID>X("pythonBuiltin", s:blue, "", "")
call <SID>X("pythonOperator", s:wine, "", "")
call <SID>X("pythonNumber", s:purple, "", "")
call <SID>X("pythonString", s:yellow, "", "")
call <SID>X("pythonRawString", s:yellow, "", "")
call <SID>X("pythonDecorator", s:wine, "", "")
call <SID>X("pythonDoctest", s:yellow, "", "")
call <SID>X("pythonImportFunction", s:orange, "", "")
call <SID>X("pythonImportModule", s:orange, "", "")
call <SID>X("pythonImportObject", s:orange, "", "")
call <SID>X("pythonImportedClassDef", s:orange, "", "")
call <SID>X("pythonImportedFuncDef", s:orange, "", "")
call <SID>X("pythonImportedModule", s:orange, "", "")
call <SID>X("pythonImportedObject", s:orange, "", "")
" JavaScript Highlighting
call <SID>X("javaScriptEndColons", s:foreground, "", "")
call <SID>X("javaScriptOpSymbols", s:foreground, "", "")
call <SID>X("javaScriptLogicSymbols", s:foreground, "", "")
call <SID>X("javaScriptBraces", s:foreground, "", "")
call <SID>X("javaScriptParens", s:foreground, "", "")
call <SID>X("javaScriptFunction", s:green, "", "")
call <SID>X("javaScriptComment", s:comment, "", "")
call <SID>X("javaScriptLineComment", s:comment, "", "")
call <SID>X("javaScriptDocComment", s:comment, "", "")
call <SID>X("javaScriptCommentTodo", s:red, "", "")
call <SID>X("javaScriptString", s:yellow, "", "")
call <SID>X("javaScriptRegexpString", s:yellow, "", "")
call <SID>X("javaScriptTemplateString", s:yellow, "", "")
call <SID>X("javaScriptNumber", s:purple, "", "")
call <SID>X("javaScriptFloat", s:purple, "", "")
call <SID>X("javaScriptGlobal", s:purple, "", "")
call <SID>X("javaScriptCharacter", s:blue, "", "")
call <SID>X("javaScriptPrototype", s:blue, "", "")
call <SID>X("javaScriptConditional", s:blue, "", "")
call <SID>X("javaScriptBranch", s:blue, "", "")
call <SID>X("javaScriptIdentifier", s:orange, "", "")
call <SID>X("javaScriptRepeat", s:blue, "", "")
call <SID>X("javaScriptStatement", s:blue, "", "")
call <SID>X("javaScriptMessage", s:blue, "", "")
call <SID>X("javaScriptReserved", s:blue, "", "")
call <SID>X("javaScriptOperator", s:blue, "", "")
call <SID>X("javaScriptNull", s:purple, "", "")
call <SID>X("javaScriptBoolean", s:purple, "", "")
call <SID>X("javaScriptLabel", s:blue, "", "")
call <SID>X("javaScriptSpecial", s:blue, "", "")
call <SID>X("javaScriptExceptions", s:red, "", "")
call <SID>X("javaScriptDeprecated", s:red, "", "")
call <SID>X("javaScriptError", s:red, "", "")
" LaTeX
call <SID>X("texStatement",s:blue, "", "")
call <SID>X("texMath", s:wine, "", "none")
call <SID>X("texMathMacher", s:yellow, "", "none")
call <SID>X("texRefLabel", s:wine, "", "none")
call <SID>X("texRefZone", s:blue, "", "none")
call <SID>X("texComment", s:comment, "", "none")
call <SID>X("texDelimiter", s:purple, "", "none")
call <SID>X("texMathZoneX", s:purple, "", "none")
" CoffeeScript Highlighting
call <SID>X("coffeeRepeat", s:wine, "", "")
call <SID>X("coffeeConditional", s:wine, "", "")
call <SID>X("coffeeKeyword", s:wine, "", "")
call <SID>X("coffeeObject", s:yellow, "", "")
" HTML Highlighting
call <SID>X("htmlTag", s:blue, "", "")
call <SID>X("htmlEndTag", s:blue, "", "")
call <SID>X("htmlTagName", s:wine, "", "bold")
call <SID>X("htmlArg", s:green, "", "italic")
call <SID>X("htmlScriptTag", s:wine, "", "")
" Diff Highlighting
call <SID>X("diffAdd", "", "4c4e39", "")
call <SID>X("diffDelete", s:background, s:red, "")
call <SID>X("diffChange", "", "2B5B77", "")
call <SID>X("diffText", s:line, s:blue, "")
" ShowMarks Highlighting
call <SID>X("ShowMarksHLl", s:orange, s:background, "none")
call <SID>X("ShowMarksHLo", s:wine, s:background, "none")
call <SID>X("ShowMarksHLu", s:yellow, s:background, "none")
call <SID>X("ShowMarksHLm", s:wine, s:background, "none")
" Lua Highlighting
call <SID>X("luaStatement", s:wine, "", "")
call <SID>X("luaRepeat", s:wine, "", "")
call <SID>X("luaCondStart", s:wine, "", "")
call <SID>X("luaCondElseif", s:wine, "", "")
call <SID>X("luaCond", s:wine, "", "")
call <SID>X("luaCondEnd", s:wine, "", "")
" Cucumber Highlighting
call <SID>X("cucumberGiven", s:blue, "", "")
call <SID>X("cucumberGivenAnd", s:blue, "", "")
" Go Highlighting
call <SID>X("goDirective", s:wine, "", "")
call <SID>X("goDeclaration", s:wine, "", "")
call <SID>X("goStatement", s:wine, "", "")
call <SID>X("goConditional", s:wine, "", "")
call <SID>X("goConstants", s:orange, "", "")
call <SID>X("goTodo", s:red, "", "")
call <SID>X("goDeclType", s:blue, "", "")
call <SID>X("goBuiltins", s:wine, "", "")
call <SID>X("goRepeat", s:wine, "", "")
call <SID>X("goLabel", s:wine, "", "")
" Clojure Highlighting
call <SID>X("clojureConstant", s:orange, "", "")
call <SID>X("clojureBoolean", s:orange, "", "")
call <SID>X("clojureCharacter", s:orange, "", "")
call <SID>X("clojureKeyword", s:green, "", "")
call <SID>X("clojureNumber", s:orange, "", "")
call <SID>X("clojureString", s:green, "", "")
call <SID>X("clojureRegexp", s:green, "", "")
call <SID>X("clojureParen", s:wine, "", "")
call <SID>X("clojureVariable", s:yellow, "", "")
call <SID>X("clojureCond", s:blue, "", "")
call <SID>X("clojureDefine", s:wine, "", "")
call <SID>X("clojureException", s:red, "", "")
call <SID>X("clojureFunc", s:blue, "", "")
call <SID>X("clojureMacro", s:blue, "", "")
call <SID>X("clojureRepeat", s:blue, "", "")
call <SID>X("clojureSpecial", s:wine, "", "")
call <SID>X("clojureQuote", s:blue, "", "")
call <SID>X("clojureUnquote", s:blue, "", "")
call <SID>X("clojureMeta", s:blue, "", "")
call <SID>X("clojureDeref", s:blue, "", "")
call <SID>X("clojureAnonArg", s:blue, "", "")
call <SID>X("clojureRepeat", s:blue, "", "")
call <SID>X("clojureDispatch", s:blue, "", "")
" Scala Highlighting
call <SID>X("scalaKeyword", s:wine, "", "")
call <SID>X("scalaKeywordModifier", s:wine, "", "")
call <SID>X("scalaOperator", s:blue, "", "")
call <SID>X("scalaPackage", s:wine, "", "")
call <SID>X("scalaFqn", s:foreground, "", "")
call <SID>X("scalaFqnSet", s:foreground, "", "")
call <SID>X("scalaImport", s:wine, "", "")
call <SID>X("scalaBoolean", s:orange, "", "")
call <SID>X("scalaDef", s:wine, "", "")
call <SID>X("scalaVal", s:wine, "", "")
call <SID>X("scalaVar", s:wine, "", "")
call <SID>X("scalaClass", s:wine, "", "")
call <SID>X("scalaObject", s:wine, "", "")
call <SID>X("scalaTrait", s:wine, "", "")
call <SID>X("scalaDefName", s:blue, "", "")
call <SID>X("scalaValName", s:foreground, "", "")
call <SID>X("scalaVarName", s:foreground, "", "")
call <SID>X("scalaClassName", s:foreground, "", "")
call <SID>X("scalaType", s:yellow, "", "")
call <SID>X("scalaTypeSpecializer", s:yellow, "", "")
call <SID>X("scalaAnnotation", s:orange, "", "")
call <SID>X("scalaNumber", s:orange, "", "")
call <SID>X("scalaDefSpecializer", s:yellow, "", "")
call <SID>X("scalaClassSpecializer", s:yellow, "", "")
call <SID>X("scalaBackTick", s:green, "", "")
call <SID>X("scalaRoot", s:foreground, "", "")
call <SID>X("scalaMethodCall", s:blue, "", "")
call <SID>X("scalaCaseType", s:yellow, "", "")
call <SID>X("scalaLineComment", s:comment, "", "")
call <SID>X("scalaComment", s:comment, "", "")
call <SID>X("scalaDocComment", s:comment, "", "")
call <SID>X("scalaDocTags", s:comment, "", "")
call <SID>X("scalaEmptyString", s:green, "", "")
call <SID>X("scalaMultiLineString", s:green, "", "")
call <SID>X("scalaUnicode", s:orange, "", "")
call <SID>X("scalaString", s:green, "", "")
call <SID>X("scalaStringEscape", s:green, "", "")
call <SID>X("scalaSymbol", s:orange, "", "")
call <SID>X("scalaChar", s:orange, "", "")
call <SID>X("scalaXml", s:green, "", "")
call <SID>X("scalaConstructorSpecializer", s:yellow, "", "")
call <SID>X("scalaBackTick", s:blue, "", "")
" Git
call <SID>X("diffAdded", s:green, "", "")
call <SID>X("diffRemoved", s:red, "", "")
call <SID>X("gitcommitSummary", "", "", "bold")
" Delete Functions
delf <SID>X
delf <SID>rgb
delf <SID>colour
delf <SID>rgb_colour
delf <SID>rgb_level
delf <SID>rgb_number
delf <SID>grey_colour
delf <SID>grey_level
delf <SID>grey_number
endif
@@ -0,0 +1,268 @@
" Initialisation:"{{{
" ----------------------------------------------------------------------------
hi clear
if exists("syntax_on")
syntax reset
endif
let s:style = get(g:, 'ayucolor', 'dark')
let g:colors_name = "ayu"
"}}}
" Palettes:"{{{
" ----------------------------------------------------------------------------
let s:palette = {}
let s:palette.bg = {'dark': "#0F1419", 'light': "#FAFAFA", 'mirage': "#212733"}
let s:palette.comment = {'dark': "#5C6773", 'light': "#ABB0B6", 'mirage': "#5C6773"}
let s:palette.markup = {'dark': "#F07178", 'light': "#F07178", 'mirage': "#F07178"}
let s:palette.constant = {'dark': "#FFEE99", 'light': "#A37ACC", 'mirage': "#D4BFFF"}
let s:palette.operator = {'dark': "#E7C547", 'light': "#E7C547", 'mirage': "#80D4FF"}
let s:palette.tag = {'dark': "#36A3D9", 'light': "#36A3D9", 'mirage': "#5CCFE6"}
let s:palette.regexp = {'dark': "#95E6CB", 'light': "#4CBF99", 'mirage': "#95E6CB"}
let s:palette.string = {'dark': "#B8CC52", 'light': "#86B300", 'mirage': "#BBE67E"}
let s:palette.function = {'dark': "#FFB454", 'light': "#F29718", 'mirage': "#FFD57F"}
let s:palette.special = {'dark': "#E6B673", 'light': "#E6B673", 'mirage': "#FFC44C"}
let s:palette.keyword = {'dark': "#FF7733", 'light': "#FF7733", 'mirage': "#FFAE57"}
let s:palette.error = {'dark': "#FF3333", 'light': "#FF3333", 'mirage': "#FF3333"}
let s:palette.accent = {'dark': "#F29718", 'light': "#FF6A00", 'mirage': "#FFCC66"}
let s:palette.panel = {'dark': "#14191F", 'light': "#FFFFFF", 'mirage': "#272D38"}
let s:palette.guide = {'dark': "#2D3640", 'light': "#D9D8D7", 'mirage': "#3D4751"}
let s:palette.line = {'dark': "#151A1E", 'light': "#F3F3F3", 'mirage': "#242B38"}
let s:palette.selection = {'dark': "#253340", 'light': "#F0EEE4", 'mirage': "#343F4C"}
let s:palette.fg = {'dark': "#E6E1CF", 'light': "#5C6773", 'mirage': "#D9D7CE"}
let s:palette.fg_idle = {'dark': "#3E4B59", 'light': "#828C99", 'mirage': "#607080"}
"}}}
" Highlighting Primitives:"{{{
" ----------------------------------------------------------------------------
function! s:build_prim(hi_elem, field)
let l:vname = "s:" . a:hi_elem . "_" . a:field " s:bg_gray
let l:gui_assign = "gui".a:hi_elem."=".s:palette[a:field][s:style] " guibg=...
exe "let " . l:vname . " = ' " . l:gui_assign . "'"
endfunction
let s:bg_none = ' guibg=NONE ctermbg=NONE'
let s:fg_none = ' guifg=NONE ctermfg=NONE'
for [key_name, d_value] in items(s:palette)
call s:build_prim('bg', key_name)
call s:build_prim('fg', key_name)
endfor
" }}}
" Formatting Options:"{{{
" ----------------------------------------------------------------------------
let s:none = "NONE"
let s:t_none = "NONE"
let s:n = "NONE"
let s:c = ",undercurl"
let s:r = ",reverse"
let s:s = ",standout"
let s:b = ",bold"
let s:u = ",underline"
let s:i = ",italic"
exe "let s:fmt_none = ' gui=NONE". " cterm=NONE". " term=NONE" ."'"
exe "let s:fmt_bold = ' gui=NONE".s:b. " cterm=NONE".s:b. " term=NONE".s:b ."'"
exe "let s:fmt_bldi = ' gui=NONE".s:b. " cterm=NONE".s:b. " term=NONE".s:b ."'"
exe "let s:fmt_undr = ' gui=NONE".s:u. " cterm=NONE".s:u. " term=NONE".s:u ."'"
exe "let s:fmt_undb = ' gui=NONE".s:u.s:b. " cterm=NONE".s:u.s:b. " term=NONE".s:u.s:b."'"
exe "let s:fmt_undi = ' gui=NONE".s:u. " cterm=NONE".s:u. " term=NONE".s:u ."'"
exe "let s:fmt_curl = ' gui=NONE".s:c. " cterm=NONE".s:c. " term=NONE".s:c ."'"
exe "let s:fmt_ital = ' gui=NONE".s:i. " cterm=NONE".s:i. " term=NONE".s:i ."'"
exe "let s:fmt_stnd = ' gui=NONE".s:s. " cterm=NONE".s:s. " term=NONE".s:s ."'"
exe "let s:fmt_revr = ' gui=NONE".s:r. " cterm=NONE".s:r. " term=NONE".s:r ."'"
exe "let s:fmt_revb = ' gui=NONE".s:r.s:b. " cterm=NONE".s:r.s:b. " term=NONE".s:r.s:b."'"
"}}}
" Vim Highlighting: (see :help highlight-groups)"{{{
" ----------------------------------------------------------------------------
exe "hi! Normal" .s:fg_fg .s:bg_bg .s:fmt_none
exe "hi! ColorColumn" .s:fg_none .s:bg_line .s:fmt_none
" Conceal, Cursor, CursorIM
exe "hi! CursorColumn" .s:fg_none .s:bg_line .s:fmt_none
exe "hi! CursorLine" .s:fg_none .s:bg_line .s:fmt_none
exe "hi! CursorLineNr" .s:fg_accent .s:bg_line .s:fmt_none
exe "hi! LineNr" .s:fg_guide .s:bg_none .s:fmt_none
exe "hi! Directory" .s:fg_fg_idle .s:bg_none .s:fmt_none
exe "hi! DiffAdd" .s:fg_string .s:bg_panel .s:fmt_none
exe "hi! DiffChange" .s:fg_tag .s:bg_panel .s:fmt_none
exe "hi! DiffText" .s:fg_fg .s:bg_panel .s:fmt_none
exe "hi! ErrorMsg" .s:fg_fg .s:bg_error .s:fmt_stnd
exe "hi! VertSplit" .s:fg_bg .s:bg_none .s:fmt_none
exe "hi! Folded" .s:fg_fg_idle .s:bg_panel .s:fmt_none
exe "hi! FoldColumn" .s:fg_none .s:bg_panel .s:fmt_none
exe "hi! SignColumn" .s:fg_none .s:bg_panel .s:fmt_none
" Incsearch"
exe "hi! MatchParen" .s:fg_fg .s:bg_bg .s:fmt_undr
exe "hi! ModeMsg" .s:fg_string .s:bg_none .s:fmt_none
exe "hi! MoreMsg" .s:fg_string .s:bg_none .s:fmt_none
exe "hi! NonText" .s:fg_bg .s:bg_none .s:fmt_none
exe "hi! Pmenu" .s:fg_fg .s:bg_selection .s:fmt_none
exe "hi! PmenuSel" .s:fg_fg .s:bg_selection .s:fmt_revr
" PmenuSbar"
" PmenuThumb"
exe "hi! Question" .s:fg_string .s:bg_none .s:fmt_none
exe "hi! Search" .s:fg_bg .s:bg_constant .s:fmt_none
exe "hi! SpecialKey" .s:fg_selection .s:bg_none .s:fmt_none
exe "hi! SpellCap" .s:fg_tag .s:bg_none .s:fmt_undr
exe "hi! SpellLocal" .s:fg_keyword .s:bg_none .s:fmt_undr
exe "hi! SpellBad" .s:fg_error .s:bg_none .s:fmt_undr
exe "hi! SpellRare" .s:fg_regexp .s:bg_none .s:fmt_undr
exe "hi! StatusLine" .s:fg_fg .s:bg_panel .s:fmt_none
exe "hi! StatusLineNC" .s:fg_fg_idle .s:bg_panel .s:fmt_none
exe "hi! WildMenu" .s:fg_bg .s:bg_markup .s:fmt_none
exe "hi! TabLine" .s:fg_fg .s:bg_panel .s:fmt_revr
" TabLineFill"
" TabLineSel"
exe "hi! Title" .s:fg_keyword .s:bg_none .s:fmt_none
exe "hi! Visual" .s:fg_none .s:bg_selection .s:fmt_none
" VisualNos"
exe "hi! WarningMsg" .s:fg_error .s:bg_none .s:fmt_none
" TODO LongLineWarning to use variables instead of hardcoding
hi LongLineWarning guifg=NONE guibg=#371F1C gui=underline ctermfg=NONE ctermbg=NONE cterm=underline
" WildMenu"
"}}}
" Generic Syntax Highlighting: (see :help group-name)"{{{
" ----------------------------------------------------------------------------
exe "hi! Comment" .s:fg_comment .s:bg_none .s:fmt_none
exe "hi! Constant" .s:fg_constant .s:bg_none .s:fmt_none
exe "hi! String" .s:fg_string .s:bg_none .s:fmt_none
" Character"
" Number"
" Boolean"
" Float"
exe "hi! Identifier" .s:fg_tag .s:bg_none .s:fmt_none
exe "hi! Function" .s:fg_function .s:bg_none .s:fmt_none
exe "hi! Statement" .s:fg_keyword .s:bg_none .s:fmt_none
" Conditional"
" Repeat"
" Label"
exe "hi! Operator" .s:fg_operator .s:bg_none .s:fmt_none
" Keyword"
" Exception"
exe "hi! PreProc" .s:fg_special .s:bg_none .s:fmt_none
" Include"
" Define"
" Macro"
" PreCondit"
exe "hi! Type" .s:fg_tag .s:bg_none .s:fmt_none
" StorageClass"
exe "hi! Structure" .s:fg_special .s:bg_none .s:fmt_none
" Typedef"
exe "hi! Special" .s:fg_special .s:bg_none .s:fmt_none
" SpecialChar"
" Tag"
" Delimiter"
" SpecialComment"
" Debug"
"
exe "hi! Underlined" .s:fg_tag .s:bg_none .s:fmt_undr
exe "hi! Ignore" .s:fg_none .s:bg_none .s:fmt_none
exe "hi! Error" .s:fg_fg .s:bg_error .s:fmt_none
exe "hi! Todo" .s:fg_markup .s:bg_none .s:fmt_none
" Quickfix window highlighting
exe "hi! qfLineNr" .s:fg_keyword .s:bg_none .s:fmt_none
" qfFileName"
" qfLineNr"
" qfError"
exe "hi! Conceal" .s:fg_guide .s:bg_none .s:fmt_none
exe "hi! CursorLineConceal" .s:fg_guide .s:bg_line .s:fmt_none
" Terminal in NVIM
" ---------
if has("nvim")
let g:terminal_color_0 = s:palette.bg[s:style]
let g:terminal_color_1 = s:palette.markup[s:style]
let g:terminal_color_2 = s:palette.string[s:style]
let g:terminal_color_3 = s:palette.accent[s:style]
let g:terminal_color_4 = s:palette.tag[s:style]
let g:terminal_color_5 = s:palette.constant[s:style]
let g:terminal_color_6 = s:palette.regexp[s:style]
let g:terminal_color_7 = "#FFFFFF"
let g:terminal_color_8 = s:palette.fg_idle[s:style]
let g:terminal_color_9 = s:palette.error[s:style]
let g:terminal_color_10 = s:palette.string[s:style]
let g:terminal_color_11 = s:palette.accent[s:style]
let g:terminal_color_12 = s:palette.tag[s:style]
let g:terminal_color_13 = s:palette.constant[s:style]
let g:terminal_color_14 = s:palette.regexp[s:style]
let g:terminal_color_15 = s:palette.comment[s:style]
let g:terminal_color_background = g:terminal_color_0
let g:terminal_color_foreground = s:palette.fg[s:style]
endif
" NerdTree
" ---------
exe "hi! NERDTreeOpenable" .s:fg_fg_idle .s:bg_none .s:fmt_none
exe "hi! NERDTreeClosable" .s:fg_accent .s:bg_none .s:fmt_none
" exe "hi! NERDTreeBookmarksHeader" .s:fg_pink .s:bg_none .s:fmt_none
" exe "hi! NERDTreeBookmarksLeader" .s:fg_bg .s:bg_none .s:fmt_none
" exe "hi! NERDTreeBookmarkName" .s:fg_keyword .s:bg_none .s:fmt_none
" exe "hi! NERDTreeCWD" .s:fg_pink .s:bg_none .s:fmt_none
exe "hi! NERDTreeUp" .s:fg_fg_idle .s:bg_none .s:fmt_none
exe "hi! NERDTreeDir" .s:fg_fg_idle .s:bg_none .s:fmt_none
exe "hi! NERDTreeFile" .s:fg_fg_idle .s:bg_none .s:fmt_none
exe "hi! NERDTreeDirSlash" .s:fg_guide .s:bg_none .s:fmt_none
" GitGutter
" ---------
exe "hi! GitGutterAdd" .s:fg_string .s:bg_none .s:fmt_none
exe "hi! GitGutterChange" .s:fg_tag .s:bg_none .s:fmt_none
exe "hi! GitGutterDelete" .s:fg_markup .s:bg_none .s:fmt_none
exe "hi! GitGutterChangeDelete" .s:fg_function .s:bg_none .s:fmt_none
"}}}
" Diff Syntax Highlighting:"{{{
" ----------------------------------------------------------------------------
" Diff
" diffOldFile
" diffNewFile
" diffFile
" diffOnly
" diffIdentical
" diffDiffer
" diffBDiffer
" diffIsA
" diffNoEOL
" diffCommon
hi! link diffRemoved Constant
" diffChanged
hi! link diffAdded String
" diffLine
" diffSubname
" diffComment
"}}}
"
" This is needed for some reason: {{{
let &background = s:style
" }}}
@@ -0,0 +1,276 @@
" Vim color file
"
" Author: Tomas Restrepo <tomas@winterdom.com>
" https://github.com/tomasr/molokai
"
" Note: Based on the Monokai theme for TextMate
" by Wimer Hazenberg and its darker variant
" by Hamish Stuart Macpherson
"
hi clear
if version > 580
" no guarantees for version 5.8 and below, but this makes it stop
" complaining
hi clear
if exists("syntax_on")
syntax reset
endif
endif
let g:colors_name="molokai"
if exists("g:molokai_original")
let s:molokai_original = g:molokai_original
else
let s:molokai_original = 0
endif
hi Boolean guifg=#AE81FF
hi Character guifg=#E6DB74
hi Number guifg=#AE81FF
hi String guifg=#E6DB74
hi Conditional guifg=#F92672 gui=bold
hi Constant guifg=#AE81FF gui=bold
hi Cursor guifg=#000000 guibg=#F8F8F0
hi iCursor guifg=#000000 guibg=#F8F8F0
hi Debug guifg=#BCA3A3 gui=bold
hi Define guifg=#66D9EF
hi Delimiter guifg=#8F8F8F
hi DiffAdd guibg=#13354A
hi DiffChange guifg=#89807D guibg=#4C4745
hi DiffDelete guifg=#960050 guibg=#1E0010
hi DiffText guibg=#4C4745 gui=italic,bold
hi Directory guifg=#A6E22E gui=bold
hi Error guifg=#E6DB74 guibg=#1E0010
hi ErrorMsg guifg=#F92672 guibg=#232526 gui=bold
hi Exception guifg=#A6E22E gui=bold
hi Float guifg=#AE81FF
hi FoldColumn guifg=#465457 guibg=#000000
hi Folded guifg=#465457 guibg=#000000
hi Function guifg=#A6E22E
hi Identifier guifg=#FD971F
hi Ignore guifg=#808080 guibg=bg
hi IncSearch guifg=#C4BE89 guibg=#000000
hi Keyword guifg=#F92672 gui=bold
hi Label guifg=#E6DB74 gui=none
hi Macro guifg=#C4BE89 gui=italic
hi SpecialKey guifg=#66D9EF gui=italic
hi MatchParen guifg=#000000 guibg=#FD971F gui=bold
hi ModeMsg guifg=#E6DB74
hi MoreMsg guifg=#E6DB74
hi Operator guifg=#F92672
" complete menu
hi Pmenu guifg=#66D9EF guibg=#000000
hi PmenuSel guibg=#808080
hi PmenuSbar guibg=#080808
hi PmenuThumb guifg=#66D9EF
hi PreCondit guifg=#A6E22E gui=bold
hi PreProc guifg=#A6E22E
hi Question guifg=#66D9EF
hi Repeat guifg=#F92672 gui=bold
hi Search guifg=#000000 guibg=#FFE792
" marks
hi SignColumn guifg=#A6E22E guibg=#232526
hi SpecialChar guifg=#F92672 gui=bold
hi SpecialComment guifg=#7E8E91 gui=bold
hi Special guifg=#66D9EF guibg=bg gui=italic
if has("spell")
hi SpellBad guisp=#FF0000 gui=undercurl
hi SpellCap guisp=#7070F0 gui=undercurl
hi SpellLocal guisp=#70F0F0 gui=undercurl
hi SpellRare guisp=#FFFFFF gui=undercurl
endif
hi Statement guifg=#F92672 gui=bold
hi StatusLine guifg=#455354 guibg=fg
hi StatusLineNC guifg=#808080 guibg=#080808
hi StorageClass guifg=#FD971F gui=italic
hi Structure guifg=#66D9EF
hi Tag guifg=#F92672 gui=italic
hi Title guifg=#ef5939
hi Todo guifg=#FFFFFF guibg=bg gui=bold
hi Typedef guifg=#66D9EF
hi Type guifg=#66D9EF gui=none
hi Underlined guifg=#808080 gui=underline
hi VertSplit guifg=#808080 guibg=#080808 gui=bold
hi VisualNOS guibg=#403D3D
hi Visual guibg=#403D3D
hi WarningMsg guifg=#FFFFFF guibg=#333333 gui=bold
hi WildMenu guifg=#66D9EF guibg=#000000
hi TabLineFill guifg=#1B1D1E guibg=#1B1D1E
hi TabLine guibg=#1B1D1E guifg=#808080 gui=none
if s:molokai_original == 1
hi Normal guifg=#F8F8F2 guibg=#272822
hi Comment guifg=#75715E
hi CursorLine guibg=#3E3D32
hi CursorLineNr guifg=#FD971F gui=none
hi CursorColumn guibg=#3E3D32
hi ColorColumn guibg=#3B3A32
hi LineNr guifg=#BCBCBC guibg=#3B3A32
hi NonText guifg=#75715E
hi SpecialKey guifg=#75715E
else
hi Normal guifg=#F8F8F2 guibg=#1B1D1E
hi Comment guifg=#7E8E91
hi CursorLine guibg=#293739
hi CursorLineNr guifg=#FD971F gui=none
hi CursorColumn guibg=#293739
hi ColorColumn guibg=#232526
hi LineNr guifg=#465457 guibg=#232526
hi NonText guifg=#465457
hi SpecialKey guifg=#465457
end
"
" Support for 256-color terminal
"
if &t_Co > 255
if s:molokai_original == 1
hi Normal ctermbg=234
hi CursorLine ctermbg=235 cterm=none
hi CursorLineNr ctermfg=208 cterm=none
else
hi Normal ctermfg=252 ctermbg=233
hi CursorLine ctermbg=234 cterm=none
hi CursorLineNr ctermfg=208 cterm=none
endif
hi Boolean ctermfg=135
hi Character ctermfg=144
hi Number ctermfg=135
hi String ctermfg=144
hi Conditional ctermfg=161 cterm=bold
hi Constant ctermfg=135 cterm=bold
hi Cursor ctermfg=16 ctermbg=253
hi Debug ctermfg=225 cterm=bold
hi Define ctermfg=81
hi Delimiter ctermfg=241
hi DiffAdd ctermbg=24
hi DiffChange ctermfg=181 ctermbg=239
hi DiffDelete ctermfg=162 ctermbg=53
hi DiffText ctermbg=102 cterm=bold
hi Directory ctermfg=118 cterm=bold
hi Error ctermfg=219 ctermbg=89
hi ErrorMsg ctermfg=199 ctermbg=16 cterm=bold
hi Exception ctermfg=118 cterm=bold
hi Float ctermfg=135
hi FoldColumn ctermfg=67 ctermbg=16
hi Folded ctermfg=67 ctermbg=16
hi Function ctermfg=118
hi Identifier ctermfg=208 cterm=none
hi Ignore ctermfg=244 ctermbg=232
hi IncSearch ctermfg=193 ctermbg=16
hi keyword ctermfg=161 cterm=bold
hi Label ctermfg=229 cterm=none
hi Macro ctermfg=193
hi SpecialKey ctermfg=81
hi MatchParen ctermfg=233 ctermbg=208 cterm=bold
hi ModeMsg ctermfg=229
hi MoreMsg ctermfg=229
hi Operator ctermfg=161
" complete menu
hi Pmenu ctermfg=81 ctermbg=16
hi PmenuSel ctermfg=255 ctermbg=242
hi PmenuSbar ctermbg=232
hi PmenuThumb ctermfg=81
hi PreCondit ctermfg=118 cterm=bold
hi PreProc ctermfg=118
hi Question ctermfg=81
hi Repeat ctermfg=161 cterm=bold
hi Search ctermfg=0 ctermbg=222 cterm=NONE
" marks column
hi SignColumn ctermfg=118 ctermbg=235
hi SpecialChar ctermfg=161 cterm=bold
hi SpecialComment ctermfg=245 cterm=bold
hi Special ctermfg=81
if has("spell")
hi SpellBad ctermbg=52
hi SpellCap ctermbg=17
hi SpellLocal ctermbg=17
hi SpellRare ctermfg=none ctermbg=none cterm=reverse
endif
hi Statement ctermfg=161 cterm=bold
hi StatusLine ctermfg=238 ctermbg=253
hi StatusLineNC ctermfg=244 ctermbg=232
hi StorageClass ctermfg=208
hi Structure ctermfg=81
hi Tag ctermfg=161
hi Title ctermfg=166
hi Todo ctermfg=231 ctermbg=232 cterm=bold
hi Typedef ctermfg=81
hi Type ctermfg=81 cterm=none
hi Underlined ctermfg=244 cterm=underline
hi VertSplit ctermfg=244 ctermbg=232 cterm=bold
hi VisualNOS ctermbg=238
hi Visual ctermbg=235
hi WarningMsg ctermfg=231 ctermbg=238 cterm=bold
hi WildMenu ctermfg=81 ctermbg=16
hi Comment ctermfg=59
hi CursorColumn ctermbg=236
hi ColorColumn ctermbg=236
hi LineNr ctermfg=250 ctermbg=236
hi NonText ctermfg=59
hi SpecialKey ctermfg=59
if exists("g:rehash256") && g:rehash256 == 1
hi Normal ctermfg=252 ctermbg=234
hi CursorLine ctermbg=236 cterm=none
hi CursorLineNr ctermfg=208 cterm=none
hi Boolean ctermfg=141
hi Character ctermfg=222
hi Number ctermfg=141
hi String ctermfg=222
hi Conditional ctermfg=197 cterm=bold
hi Constant ctermfg=141 cterm=bold
hi DiffDelete ctermfg=125 ctermbg=233
hi Directory ctermfg=154 cterm=bold
hi Error ctermfg=222 ctermbg=233
hi Exception ctermfg=154 cterm=bold
hi Float ctermfg=141
hi Function ctermfg=154
hi Identifier ctermfg=208
hi Keyword ctermfg=197 cterm=bold
hi Operator ctermfg=197
hi PreCondit ctermfg=154 cterm=bold
hi PreProc ctermfg=154
hi Repeat ctermfg=197 cterm=bold
hi Statement ctermfg=197 cterm=bold
hi Tag ctermfg=197
hi Title ctermfg=203
hi Visual ctermbg=238
hi Comment ctermfg=244
hi LineNr ctermfg=239 ctermbg=235
hi NonText ctermfg=239
hi SpecialKey ctermfg=239
endif
end
" Must be at the end, because of ctermbg=234 bug.
" https://groups.google.com/forum/#!msg/vim_dev/afPqwAFNdrU/nqh6tOM87QUJ
set background=dark
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,4 @@
let s:dir = expand('<sfile>:p:h').(!exists("+shellslash") || &shellslash ? '/' : '\')
set background=dark
execute "source" s:dir."solarized8.vim"
unlet s:dir
@@ -0,0 +1,75 @@
# ~/.bashrc: executed by bash(1) for non-login shells.
# don't put duplicate lines in the history. See bash(1) for more options
# don't overwrite GNU Midnight Commander's setting of `ignorespace'.
export HISTCONTROL=$HISTCONTROL${HISTCONTROL+,}ignoredups
# ... or force ignoredups and ignorespace
export HISTCONTROL=ignoreboth
# append to the history file, don't overwrite it
shopt -s histappend
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize
# Note: PS1 and umask are already set in /etc/profile. You should not
# need this unless you want different defaults for root.
# PS1='${debian_chroot:+($debian_chroot)}\h:\w\$ '
# umask 022
#export PS1='\h:\w \$ '
__hostname="$(hostname -f)"
__hostname="${__hostname%.*}"
__hostname="${__hostname%.*}"
export PS1='${__hostname%.*}:\w \$ '
umask 022
# You may uncomment the following lines if you want `ls' to be colorized:
export LS_OPTIONS='--color=auto'
eval "`dircolors`"
alias ls='ls $LS_OPTIONS'
alias ll='ls $LS_OPTIONS -l'
alias la='ls $LS_OPTIONS -al'
alias l='ls $LS_OPTIONS -lA'
#
# Some more alias to avoid making mistakes:
#alias rm='rm -i'
#alias cp='cp -i'
#alias mv='mv -i'
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
alias poweroff='echo -e "\n\tplease use: /sbin/poweroff\n"'
alias reboot='echo -e "\n\tplease use: /sbin/reboot\n"'
# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
. /etc/bash_completion
fi
export EDITOR=vim
export LINES=64
## - set beep more quiet
## -
#xset b 10 500 50
@@ -0,0 +1,25 @@
# ~/.profile: executed by Bourne-compatible login shells.
if [ "$BASH" ]; then
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
fi
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi
if [ -d "$HOME/bin/admin-stuff" ] ; then
PATH="$HOME/bin/admin-stuff:$PATH"
fi
# this is for the midnight-commander
# to become the last directory the midnight commander was in
# as the current directory when leaving the midnight commander
#
if [[ -f /usr/share/mc/bin/mc.sh ]]; then
source /usr/share/mc/bin/mc.sh
fi
mesg n
@@ -0,0 +1,178 @@
" An example for a vimrc file.
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last change: 1999 Sep 09
"
" To use it, copy it to
" for Unix and OS/2: ~/.vimrc
" for Amiga: s:.vimrc
" for MS-DOS and Win32: $VIM\_vimrc
" This line should not be removed as it ensures that various options are
" properly set to work with the Vim-related packages available in Debian.
runtime! debian.vim
set nocompatible " Use Vim defaults (much better!)
set bs=2 " allow backspacing over everything in insert mode
set ai " always set autoindenting on
" set backup " keep a backup file
"set viminfo='20,\"50 " read/write a .viminfo file, don't store more
" than 50 lines of registers
set viminfo='20,\"50,:20,%,n~/.viminfo
set history=50 " keep 50 lines of command line history
set ruler " show the cursor position all the time
set ignorecase " suchen case-insenitiv
set showmatch " zeige passende klammern
set shell=/bin/bash " shell to start with !
set expandtab " tabs --> blanks
set showmode " anzeige INSERT/REPLACE/...
" set smartcase " Do smart case matching
set incsearch " Incremental search
" Start searching when you type the first character of
" the search string. As you type in more characters, the
" search is refined.
set t_Co=256 " To enable 256 colors in vim, put this your .vimrc before setting the colorscheme
" einrueckung
"set noexpandtab
set expandtab
set shiftwidth=3
set tabstop=3
set softtabstop=3
" Round indent to multiple of 'shiftwidth' for > and < commands
set shiftround
"set number
" For Win32 GUI: remove 't' flag from 'guioptions': no tearoff menu entries
" let &guioptions = substitute(&guioptions, "t", "", "g")
" Don't use Ex mode, use Q for formatting
map Q gq
" Make p in isual Visual mode replace the selected text with the "" register.
vnoremap p <Esc>:let current_reg = @"<CR>gvdi<C-R>=current_reg<CR><Esc>
" Switch syntax highlighting on, when the terminal has colors
" Also switch on highlighting the last used search pattern.
if &t_Co > 2 || has("gui_running")
syntax on
set hlsearch
endif
" Only do this part when compiled with support for autocommands.
if has("autocmd")
" In text files, always limit the width of text to 78 characters
autocmd BufRead *.txt set tw=78
augroup cprog
" Remove all cprog autocommands
au!
" When starting to edit a file:
" For C and C++ files set formatting of comments and set C-indenting on.
" For other files switch it off.
" Don't change the order, it's important that the line with * comes first.
autocmd FileType * set formatoptions=tcql nocindent comments&
autocmd FileType c,cpp set formatoptions=croql cindent comments=sr:/*,mb:*,el:*/,://
augroup END
augroup gzip
" Remove all gzip autocommands
au!
" Enable editing of gzipped files
" set binary mode before reading the file
autocmd BufReadPre,FileReadPre *.gz,*.bz2 set bin
autocmd BufReadPost,FileReadPost *.gz call GZIP_read("gunzip")
autocmd BufReadPost,FileReadPost *.bz2 call GZIP_read("bunzip2")
autocmd BufWritePost,FileWritePost *.gz call GZIP_write("gzip")
autocmd BufWritePost,FileWritePost *.bz2 call GZIP_write("bzip2")
autocmd FileAppendPre *.gz call GZIP_appre("gunzip")
autocmd FileAppendPre *.bz2 call GZIP_appre("bunzip2")
autocmd FileAppendPost *.gz call GZIP_write("gzip")
autocmd FileAppendPost *.bz2 call GZIP_write("bzip2")
" After reading compressed file: Uncompress text in buffer with "cmd"
fun! GZIP_read(cmd)
let ch_save = &ch
set ch=2
execute "'[,']!" . a:cmd
set nobin
let &ch = ch_save
execute ":doautocmd BufReadPost " . expand("%:r")
endfun
" After writing compressed file: Compress written file with "cmd"
fun! GZIP_write(cmd)
if rename(expand("<afile>"), expand("<afile>:r")) == 0
execute "!" . a:cmd . " <afile>:r"
endif
endfun
" Before appending to compressed file: Uncompress file with "cmd"
fun! GZIP_appre(cmd)
execute "!" . a:cmd . " <afile>"
call rename(expand("<afile>:r"), expand("<afile>"))
endfun
augroup END
" This is disabled, because it changes the jumplist. Can't use CTRL-O to go
" back to positions in previous files more than once.
if 0
" When editing a file, always jump to the last cursor position.
" This must be after the uncompress commands.
autocmd BufReadPost * if line("'\"") && line("'\"") <= line("$") | exe "normal `\"" | endif
endif
endif " has("autocmd")
" toggle syntax highlighting
map <F12> :if exists("syntax_on") <Bar> syntax off <Bar> else <Bar> syntax on <Bar> endif <CR><ESC>
map <F11> :nohls <CR>
" use <F6> to toggle line numbers
nmap <silent> <F6> :set number!<CR>
" If using a dark background within the editing area and syntax highlighting
" turn on this option as well
set background=dark
" set color for search
hi clear search
hi search term=bold,reverse cterm=bold,reverse gui=bold,reverse
" set color for Comment
hi clear Comment
"highlight Comment term=bold cterm=bold ctermfg=LightBlue guifg=#80a0ff gui=bold
"highlight Comment term=none cterm=none ctermfg=LightBlue guifg=#80a0ff gui=bold
"highlight Comment term=bold cterm=bold ctermfg=grey guifg=#80a0ff gui=bold
highlight Comment term=none cterm=none ctermfg=grey guifg=#80a0ff gui=bold
"highlight Comment term=none cterm=none ctermfg=177 guifg=#80a0ff gui=bold
"highlight Comment term=none cterm=none ctermfg=215 guifg=#80a0ff gui=bold
" Go back to the position the cursor was on the last time this file was edited
au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$")|execute("normal `\"")|endif
" visual shifting (does not exit Visual mode)
vnoremap < <gv
vnoremap > >gv
" Scroll when cursor gets within 3 characters of top/bottom edge
set scrolloff=3
" Show line, column number, and relative position within a file in the status line
" set statusline=%F%m%r%h%w\ [FORMAT=%{&ff}]\ [TYPE=%Y]\ [ASCII=\%03.3b]\ [HEX=\%02.2B]\ [POS=%04l,%04v][%p%%]\ [LEN=%L]
"set statusline=\ %F\ %(\|\ flags:\ %R%M%H%W\ %)%(\|\ type:\ %Y\ %)%(\|\ format:\ %{&ff}\ %)%(\|\ syntax:\ %{synIDattr(synID(line('.'),col('.'),0),'name')}%)\ \ %=line:\ %l/%L\ \|\ column:\ %c%V\ \|\ relative\:\ %p%%\
set statusline=\ %F\ %(\|\ flags:\ %R%M%H%W\ %)%(\|\ type:\ %Y\ %)%(\|\ format:\ %{&ff}\ %)\ \ %=line:\ %l/%L\ \|\ col:\ %c%V\ \|\ %p%%
" Always show status line, even for one window
set laststatus=2
highlight StatusLine cterm=none ctermfg=white ctermbg=blue
colorscheme PaperColor
+173 -1222
View File
File diff suppressed because it is too large. Load diff
+565
View File
@@ -0,0 +1,565 @@
---
# ==========
# vars used by roles/common/tasks/basic.yml
# ==========
sshd_permit_root_login: !!str "yes"
# ==========
# vars used by roles/common/tasks/apt.yml
# ==========
# ==========
# vars used by roles/common/tasks/git.yml
# ==========
# ==========
# vars used by roles/common/tasks/ntp.yml
# ==========
# name or ip-adress from the (local) ntp server, mostly the gateway
#
ntp_server: gw-spr.sprachenatelier.netz
# ==========
# vars used by roles/common/tasks/nfs.yml
# ==========
nfs_server: 192.168.92.10
# Set 'fs_encrypted' to true if filesystem lives on an encrypted
# partition.
#
nfs_exports:
- src: 192.168.92.10:/data/home
path: /data/home
mount_opts: users,rsize=8192,wsize=8192,hard,intr
export_opt: rw,root_squash,sync,subtree_check
export_networks:
- 192.168.92.0/24
- 10.0.92.0/24
- 10.1.92.0/24
- 192.168.63.0/24
fs_encrypted: false
- src: 192.168.92.10:/data/samba
path: /data/samba
mount_opts: users,rsize=8192,wsize=8192,hard,intr
export_opt: rw,root_squash,sync,subtree_check
export_networks:
- 192.168.92.0/24
- 10.0.92.0/24
- 10.1.92.0/24
- 192.168.63.0/24
fs_encrypted: false
# ==========
# vars used by roles/common/tasks/system-user.yml
# ==========
# ! Notice !
#
# On NIS supported Server put your users and groups in the
# appropriate section for playbook 'nis-user.yml'
#
# ! Notice !
remove_system_users: []
system_users: []
#system_users:
# - name: sysadm
# password: '9xFXkdPR_2'
system_groups: []
base_home: /home
# ==========
# vars used by roles/common/tasks/nis-install-server.yml
# vars used by roles/common/tasks/nis-user.yml
# vars used by roles/common/tasks/nis-install-client.yml
# ==========
# used by templates
# - yp.conf.j2
# - defaultdomain.j2
nis_domain: sprachenatelier.netz
nis_server_address: 192.168.92.10
nis_server_name: file-spr.sprachenatelier.netz
nis_common_packages:
- nis
- nscd
nis_base_home: /data/home
nis_groups:
- name: intern
group_id: 1100
- name: buero
group_id: 1110
- name: no-backup
group_id: 1120
remove_nis_users: []
#remove_nis_users:
# - name: virginia
# - name: marei
# - name: alina
# - name: hannah
# - name: kristin
# - name: elke
# - name: thea
# - name: katrine
nis_user:
- name: chris
groups:
- intern
- buero
- no-backup
is_samba_user: true
password: !vault |
$ANSIBLE_VAULT;1.1;AES256
35653838343532663632326462656437363665316337316336316335383263633630616638313736
3937666561356232666136646435613361336437303637360a353561316633373265323931623565
32643966373962313334343565643130373535353238316161623837333130353231343332663930
3638386337333636390a393738373935646638383237373663376434366361363938346335663438
6637
- name: anahit
groups:
- intern
- buero
is_samba_user: true
password: '150290'
- name: andrea
groups:
- intern
- buero
- lpadmin
is_samba_user: true
password: 'kurse2010'
- name: bueropraktikum
groups:
- intern
- buero
is_samba_user: true
password: 's2016bp'
- name: chema
groups:
- intern
- buero
is_samba_user: true
password: 'spa2014'
- name: daniel
groups:
- intern
- buero
is_samba_user: true
password: '210984'
- name: eva
groups:
- intern
- buero
is_samba_user: true
password: '250791'
- name: isadora
groups:
- intern
- buero
is_samba_user: true
password: '270988'
- name: konstantin
groups:
- intern
- buero
is_samba_user: true
password: '100978'
- name: lara
groups:
- intern
- buero
- lpadmin
is_samba_user: true
password: 'sommer13'
- name: lea
groups:
- intern
- buero
- lpadmin
is_samba_user: true
password: '091190'
- name: linda
groups:
- intern
- buero
is_samba_user: true
password: '050381'
- name: margit
groups:
- intern
- buero
- no-backup
- lpadmin
is_samba_user: true
password: 'beelen10'
- name: mariam
groups:
- intern
- buero
is_samba_user: true
password: '240991'
- name: matija
groups:
- intern
- buero
is_samba_user: true
password: '010985'
- name: musa
groups:
- intern
- buero
- no-backup
- lpadmin
is_samba_user: true
password: 'bermu18'
- name: praktikant1
groups:
- buero
is_samba_user: true
password: 'praktikant1'
- name: praktikant2
groups:
- buero
is_samba_user: true
password: 'praktikant2'
- name: praktikant3
groups:
- buero
is_samba_user: true
password: 'praktikant3'
- name: praktikant4
groups:
- buero
is_samba_user: true
password: 'praktikant4'
- name: praktikant5
groups:
- buero
is_samba_user: true
password: 'praktikant5'
- name: praktikant6
groups:
- buero
is_samba_user: true
password: 'praktikant6'
- name: s1
groups: []
is_samba_user: false
password: 's1'
- name: s2
groups: []
is_samba_user: false
password: 's2'
- name: s3
groups: []
is_samba_user: false
password: 's3'
- name: s4
groups: []
is_samba_user: false
password: 's4'
- name: s5
groups: []
is_samba_user: false
password: 's5'
- name: s6
groups: []
is_samba_user: false
password: 's6'
- name: saravic
groups:
- intern
- buero
is_samba_user: true
password: '2408'
- name: simone
groups:
- intern
- buero
is_samba_user: true
password: '031189'
- name: tali
groups:
- intern
- buero
is_samba_user: true
password: '220686'
- name: yang
groups:
- intern
- buero
is_samba_user: true
password: '300195'
# deleted users
#
# - name: marei
# groups:
# - intern
# - buero
# is_samba_user: true
# password: '220792'
#
# - name: virginia
# groups:
# - intern
# - buero
# is_samba_user: true
# password: '160292'
#
# - name: alina
# groups:
# - intern
# - buero
# is_samba_user: true
# password: '140686'
#
# - name: hannah
# groups:
# - intern
# - buero
# is_samba_user: true
# password: '28031973'
#
# - name: kristin
# groups:
# - intern
# - buero
# is_samba_user: true
# password: '49371'
#
# - name: thea
# groups:
# - intern
# - buero
# is_samba_user: true
# password: '060995'
#
# - name: katrine
# groups:
# - intern
# - buero
# is_samba_user: true
# password: '200290'
# ==========
# vars used by roles/common/tasks/samba-install.yml
# ==========
samba_server: file-spr.sprachenatelier.netz
# ==========
# vars used by roles/common/tasks/samba-user.yml
# ==========
# ! Notice !
#
# variables used from other previos sections:
#
# - remove_system_users: roles/common/tasks/system-user.yml
# - remove_nis_users: roles/common/tasks/nis-install-server.yml
# - nis_user: roles/common/tasks/nis-install-server.yml
# ==========
# vars used by roles/common/tasks/mount_samba_shares.yml
# ==========
# ! Notice !
#
# variables used from other previos sections:
#
# - nis_user: roles/common/tasks/nis-install-server.yml
#samba_workgroup: SPR
samba_workgroup: SPR
#samba_netbios_name: FILE-SPR
samba_netbios_name: FILE-SPR
samba_shares:
- name: Transfer
path: /data/samba/transfer
group_valid_users: buero
group_write_list: buero
file_create_mask: '0660'
dir_create_mask: '2770'
vfs_object_recycle: true
recycle_path: '@Recycle.Bin'
user:
- anahit
- andrea
- bueropraktikum
- chema
- chris
- daniel
- eva
- isadora
- konstantin
- lara
- lea
- linda
- margit
- mariam
- matija
- musa
- praktikant1
- praktikant2
- praktikant3
- praktikant4
- praktikant5
- praktikant6
- saravic
- sysadm
- simone
- tali
- yang
- name: Verwaltung
path: /data/samba/verwaltung
group_valid_users: intern
group_write_list: intern
file_create_mask: '0660'
dir_create_mask: '2770'
vfs_object_recycle: true
recycle_path: '@Recycle.Bin'
user:
- anahit
- andrea
- bueropraktikum
- chema
- chris
- daniel
- eva
- isadora
- konstantin
- lara
- lea
- linda
- margit
- mariam
- matija
- musa
- saravic
- sysadm
- simone
- tali
- yang
- name: Multimedia
path: /data/samba/no-backup-share/multimedia
group_valid_users: no-backup
group_write_list: no-backup
file_create_mask: '0660'
dir_create_mask: '2770'
vfs_object_recycle: true
recycle_path: '@Recycle.Bin'
user:
- chris
- margit
- musa
# ==========
# vars used by roles/common/tasks/system-user-systemfiles.yml
# ==========
# ! Notice !
#
# variables used from other previos sections:
#
# - system_users: roles/common/tasks/system-user.yml
# ==========
# vars used by roles/common/tasks/nis-user-systemfiles.yml
# ==========
# ! Notice !
#
# variables used from other previos sections:
#
# - nis_user: roles/common/tasks/nis-install-server.yml
# ==========
# vars used by roles/common/tasks/sudoers-pc.yml
# ==========
sudo_pc_users:
- local
- chris
- sysadm
- localadmin
# ==========
# vars used by roles/common/tasks/sudoers-server.yml
# ==========
# ==========
# vars used by roles/common/tasks/ubuntu-x11vnc-1604-amd64.yml
# vars used by roles/common/tasks/ubuntu-x11vnc-1804-amd64.yml
# ==========
# ==========
# vars used by roles/common/tasks/luks.yml
# ==========
+1 -4
View File
@@ -1,7 +1,5 @@
---
ansible_python_interpreter: /usr/bin/python3
# ---
# vars used by roles/common/tasks/basic.yml
@@ -20,6 +18,5 @@ sshd_permit_root_login: !!str "yes"
sshd_password_authentication: !!str "yes"
sshd_use_pam: !!str "no"
sshd_print_motd: !!str "yes"
#
+101
View File
@@ -0,0 +1,101 @@
---
# ---
# vars used by roles/network_interfaces
# ---
# If true, all additional files in /etc/network/interfaces/interfaces.d/ are deleted
network_manage_devices: True
# Should the interfaces be reloaded after config change?
network_interface_reload: False
network_interface_path: /etc/network/interfaces.d
network_interface_required_packages:
- vlan
- bridge-utils
- ifmetric
- ifupdown
- ifenslave
- resolvconf
network_interfaces:
- device: eno1
# use only once per device (for the first device entry)
headline: eno1 - The primary network interface
# auto & allow are only used for the first device entry
allow: [] # array of allow-[stanzas] eg. allow-hotplug
auto: true
family: inet
method: static
description:
address: 192.168.92.10
netmask: 24
gateway: 192.168.92.254
# optional dns settings nameservers: []
#
# nameservers:
# - 194.150.168.168 # dns.as250.net
# - 91.239.100.100 # anycast.censurfridns.dk
# search: warenform.de
#
nameservers:
- 192.168.92.1
search: sprachenatelier.netz
# ---
# vars used by roles/common/tasks/basic.yml
# ---
set_default_limit_nofile: true
# ---
# vars used by roles/common/tasks/sshd.yml
# ---
sshd_max_auth_tries: 6
sshd_permit_root_login: !!str "yes"
sshd_password_authentication: !!str "yes"
#sshd_use_pam: !!str "no"
# ---
# vars used by roles/common/tasks/cron.yml
# ---
cron_user_entries:
- name: "Daily Backup "
minute: "03"
hour: "00"
job: /root/crontab/backup-rcopy/rcopy.sh
- name: "Check if Postfix Mailservice is up and running. Restart service if needed."
minute: "*/15"
job: /root/bin/monitoring/check_postfix.sh
- name: "Check if CUPS main daemon is up and running. Restart service if needed."
minute: "*/30"
job: /root/bin/monitoring/check_cups.sh
- name: "Check if CUPS Browse daemon is up and running. Restart service if needed."
minute: "*/30"
job: /root/bin/monitoring/check_cups-browsed.sh
cron_user_special_time_entries:
- name: "Restart DNS Cache service 'systemd-resolved'"
special_time: reboot
job: "sleep 10 ; /bin/systemctl restart systemd-resolved"
insertafter: PATH
+90 -111
View File
@@ -1,132 +1,111 @@
# -----
# Sprachenatelier
# -----
[initial_setup]
[sprachenatelier:children]
sprachenatelier_client
sprachenatelier_server
[sprachenatelier_client]
cl101.sprachenatelier.netz
cl102.sprachenatelier.netz
cl103.sprachenatelier.netz
cl104.sprachenatelier.netz
cl105.sprachenatelier.netz
cl106.sprachenatelier.netz
cl107.sprachenatelier.netz
cl108.sprachenatelier.netz
cl109.sprachenatelier.netz
[sprachenatelier_server]
file-spr.sprachenatelier.netz
# -----
# Sprachenatelier
# -----
[mbr:children]
mbr_client
mbr_server
[mbr_client]
pc101.mbr-bln.netz
pc102.mbr-bln.netz
pc103.mbr-bln.netz
pc104.mbr-bln.netz
pc105.mbr-bln.netz
pc107.mbr-bln.netz
pc108.mbr-bln.netz
pc109.mbr-bln.netz
pc110.mbr-bln.netz
pc111.mbr-bln.netz
pc112.mbr-bln.netz
pc113.mbr-bln.netz
pc114.mbr-bln.netz
pc115.mbr-bln.netz
pc116.mbr-bln.netz
pc117.mbr-bln.netz
pc118.mbr-bln.netz
pc121.mbr-bln.netz
pc123.mbr-bln.netz
pc124.mbr-bln.netz
pc125.mbr-bln.netz
pc126.mbr-bln.netz
pc127.mbr-bln.netz
pc128.mbr-bln.netz
pc131.mbr-bln.netz
pc132.mbr-bln.netz
pc133.mbr-bln.netz
pc134.mbr-bln.netz
pc135.mbr-bln.netz
[mbr_server]
file-mbr.mbr-bln.netz ansible_user=root
file-kb.anw-kb.netz ansible_user=root
pc101.mbr-bln.netz
pc102.mbr-bln.netz
pc103.mbr-bln.netz
pc104.mbr-bln.netz
pc105.mbr-bln.netz
pc107.mbr-bln.netz
pc108.mbr-bln.netz
pc109.mbr-bln.netz
pc110.mbr-bln.netz
pc111.mbr-bln.netz
pc112.mbr-bln.netz
pc113.mbr-bln.netz
pc114.mbr-bln.netz
pc115.mbr-bln.netz
pc116.mbr-bln.netz
pc117.mbr-bln.netz
pc118.mbr-bln.netz
pc121.mbr-bln.netz
pc123.mbr-bln.netz
pc124.mbr-bln.netz
pc125.mbr-bln.netz
pc126.mbr-bln.netz
pc127.mbr-bln.netz
pc128.mbr-bln.netz
pc131.mbr-bln.netz
pc135.mbr-bln.netz
[client_pc]
pc101.mbr-bln.netz
pc102.mbr-bln.netz
pc103.mbr-bln.netz
pc104.mbr-bln.netz
pc105.mbr-bln.netz
pc107.mbr-bln.netz
pc108.mbr-bln.netz
pc109.mbr-bln.netz
pc110.mbr-bln.netz
pc111.mbr-bln.netz
pc112.mbr-bln.netz
pc113.mbr-bln.netz
pc114.mbr-bln.netz
pc115.mbr-bln.netz
pc116.mbr-bln.netz
pc117.mbr-bln.netz
pc118.mbr-bln.netz
pc121.mbr-bln.netz
pc123.mbr-bln.netz
pc124.mbr-bln.netz
pc125.mbr-bln.netz
pc126.mbr-bln.netz
pc127.mbr-bln.netz
pc128.mbr-bln.netz
pc131.mbr-bln.netz
pc135.mbr-bln.netz
[nfs_client]
pc101.mbr-bln.netz
pc102.mbr-bln.netz
pc103.mbr-bln.netz
pc104.mbr-bln.netz
pc105.mbr-bln.netz
pc107.mbr-bln.netz
pc108.mbr-bln.netz
pc109.mbr-bln.netz
pc110.mbr-bln.netz
pc111.mbr-bln.netz
pc112.mbr-bln.netz
pc113.mbr-bln.netz
pc114.mbr-bln.netz
pc115.mbr-bln.netz
pc116.mbr-bln.netz
pc117.mbr-bln.netz
pc118.mbr-bln.netz
pc121.mbr-bln.netz
pc123.mbr-bln.netz
pc124.mbr-bln.netz
pc125.mbr-bln.netz
pc126.mbr-bln.netz
pc127.mbr-bln.netz
pc131.mbr-bln.netz
pc135.mbr-bln.netz
[nis_client]
pc101.mbr-bln.netz
pc102.mbr-bln.netz
pc103.mbr-bln.netz
pc104.mbr-bln.netz
pc105.mbr-bln.netz
pc107.mbr-bln.netz
pc108.mbr-bln.netz
pc109.mbr-bln.netz
pc110.mbr-bln.netz
pc111.mbr-bln.netz
pc112.mbr-bln.netz
pc113.mbr-bln.netz
pc114.mbr-bln.netz
pc115.mbr-bln.netz
pc116.mbr-bln.netz
pc117.mbr-bln.netz
pc118.mbr-bln.netz
pc121.mbr-bln.netz
pc123.mbr-bln.netz
pc124.mbr-bln.netz
pc125.mbr-bln.netz
pc126.mbr-bln.netz
pc127.mbr-bln.netz
pc128.mbr-bln.netz
pc131.mbr-bln.netz
pc135.mbr-bln.netz
[initial_setup:children]
sprachenatelier_client
sprachenatelier_server
mbr_client
mbr_server
[client_pc:children]
sprachenatelier_client
mbr_client
[nfs_client:children]
sprachenatelier_client
mbr_client
[nis_client:children]
sprachenatelier_client
mbr_client
[file_server]
file-spr.sprachenatelier.netz
file-mbr.mbr-bln.netz ansible_user=root
file-kb.anw-kb.netz ansible_user=root
[nfs_server]
file-mbr.mbr-bln.netz ansible_user=root
file-kb.anw-kb.netz ansible_user=root
file-spr.sprachenatelier.netz
[nis_server]
file-mbr.mbr-bln.netz ansible_user=root
file-spr.sprachenatelier.netz
[samba_server]
file-mbr.mbr-bln.netz ansible_user=root
file-kb.anw-kb.netz ansible_user=root
file-spr.sprachenatelier.netz
[ftp_server]
[gateway_server]
+6
View File
@@ -0,0 +1,6 @@
---
- hosts: initial_setup
roles:
- network_interfaces
+78
View File
@@ -0,0 +1,78 @@
#!/usr/bin/env bash
# *** [ Ansible managed: DO NOT EDIT DIRECTLY ] ***
declare -i pc_nr=101
pc_nr_max=135
brcast_ip="192.168.112.255"
pc101="80:ee:73:ea:3a:9d 80:ee:73:ea:3a:9e"
pc102="80:ee:73:ea:3a:e7 80:ee:73:ea:3a:e8"
pc103="80:ee:73:ea:3a:0b 80:ee:73:ea:3a:0c"
pc104="80:ee:73:ea:3b:73 80:ee:73:ea:3b:74"
pc105="80:ee:73:c5:e7:4f 80:ee:73:c5:e7:50"
pc106="20:25:64:0c:55:ca"
pc107="10:e7:c6:37:f7:35"
pc108="74:d4:35:8d:0d:8c"
pc109="80:ee:73:e2:20:8b 80:ee:73:e2:20:8c"
pc110="80:ee:73:c5:e6:5f 80:ee:73:c5:e6:60"
pc111="80:ee:73:b5:e4:50 80:ee:73:b5:e4:51"
pc112="f8:b4:6a:be:48:75"
pc113="20:25:64:0c:55:6b"
pc114="00:22:4d:88:4b:d0"
pc115="00:22:4d:88:4b:be"
pc116="80:ee:73:c9:91:d7 80:ee:73:c9:91:d8"
pc117="74:d4:35:be:a4:5a"
pc118="b0:0c:d1:54:ed:12"
pc121="80:ee:73:bd:ad:56 80:ee:73:bd:ad:57"
pc123="00:22:4d:88:4b:33"
pc124="80:ee:73:c0:7f:fb 80:ee:73:c0:7f:fc"
pc125="80:ee:73:b9:8e:9b 80:ee:73:b9:8e:9c"
pc126="80:ee:73:c5:e8:39 80:ee:73:c5:e8:3a"
pc127="a8:a1:59:0c:d5:eb"
pc128="a8:a1:59:0d:01:b9"
#pc129="a8:a1:59:0a:28:22"
pc129="a8:a1:59:06:12:b8"
pc135="1c:69:7a:a3:e1:b3"
#pc119="00:22:4d:88:4b:b2"
pc120="00:22:4d:88:48:c7"
pc122="00:22:4d:88:4b:dc"
#pc127="08:9e:01:35:10:55"
#pc128="80:ee:73:b5:e2:95"
pc131="80:ee:73:d9:de:32"
if [ $# = "1" ]; then
echo ""
echo -e " \033[32mWake up PC '$1'\033[m.."
_nic=`eval eval echo '$'$1`
if [[ -n "$_nic" ]]; then
for _mac in $_nic ; do
echo -n " "
wakeonlan -i $brcast_ip $_mac
sleep 1
done
else
echo -e " \033[1;31mPC '$1' NOT found!\033[m"
fi
echo ""
else
while [[ $pc_nr -le $pc_nr_max ]]; do
[[ -z "$pc_nr" ]] && continue
_nic=$(eval eval echo '$pc'$pc_nr)
if [[ -n "$_nic" ]]; then
echo ""
echo -e " \033[32mWake up PC 'pc$pc_nr'\033[m.."
for _mac in $_nic ; do
echo -n " "
/usr/bin/wakeonlan -i $brcast_ip $_mac
sleep 1
done
fi
(( pc_nr++ ))
done
echo ""
fi
@@ -0,0 +1,62 @@
#!/usr/bin/env bash
# *** [ Ansible managed: DO NOT EDIT DIRECTLY ] ***
cl101="80:ee:73:c5:e9:b9"
cl101_alt="70:71:bc:72:25:98"
cl102="80:ee:73:c5:d3:87"
cl103="80:ee:73:bb:da:93"
cl103_alt="70:71:bc:72:24:cc"
cl104="74:d4:35:ac:78:19"
cl105_alt="70:71:bc:72:25:93"
cl105="80:ee:73:c5:2c:97"
cl106_alt="70:71:bc:72:26:e4"
cl106="80:ee:73:c5:2d:8d"
cl107_alt="e0:69:95:45:71:4b"
cl107="80:ee:73:c5:2e:83"
cl108_alt="70:71:bc:72:25:85"
cl108="80:ee:73:d0:a3:30"
cl109="38:60:77:39:f2:49"
cl110="38:60:77:4e:34:fe"
if [ $# = "1" ]; then
_nic=`eval eval echo '$'$1`
wakeonlan $_nic
else
wakeonlan $cl101
sleep 2
wakeonlan $cl101_alt
sleep 2
wakeonlan $cl102
sleep 2
wakeonlan $cl103
sleep 2
wakeonlan $cl103_alt
sleep 2
wakeonlan $cl104
sleep 2
wakeonlan $cl105
sleep 2
wakeonlan $cl105_alt
sleep 2
wakeonlan $cl106
sleep 2
wakeonlan $cl106_alt
sleep 2
wakeonlan $cl107
sleep 2
wakeonlan $cl107_alt
sleep 2
wakeonlan $cl108
sleep 2
wakeonlan $cl108_alt
sleep 2
wakeonlan $cl109
sleep 2
wakeonlan $cl110
sleep 2
fi
exit 0
+48
View File
@@ -0,0 +1,48 @@
---
- name: (cron.yml) Set env entries in user crontabs
cron:
name: '{{ item.name }}'
env: 'yes'
user: '{{ item.user | default("root", true) }}'
job: '{{ item.job }}'
insertafter: '{{ item.insertafter | default(omit) }}'
loop: "{{ cron_env_entries }}"
loop_control:
label: '{{ item.name }}'
when: item.job is defined
tags:
- user_crontab
- name: (cron.yml) Set special time entries in user crontabs
cron:
name: '{{ item.name }}'
special_time: '{{ item.special_time }}'
user: '{{ item.user | default("root", true) }}'
job: '{{ item.job }}'
state: present
loop: "{{ cron_user_special_time_entries }}"
loop_control:
label: '{{ item.name }}'
when: item.job is defined
tags:
- user_crontab
- name: (cron.yml) Set normal entries in user crontabs
cron:
name: '{{ item.name }}'
minute: '{{ item.minute | default(omit) }}'
hour: '{{ item.hour | default(omit) }}'
day: '{{ day | default(omit) }}'
weekday: '{{ item.weekday | default(omit) }}'
month: '{{ item.month | default(omit) }}'
user: '{{ item.user | default("root", true) }}'
job: '{{ item.job }}'
loop: "{{ cron_user_entries }}"
loop_control:
label: '{{ item.name }}'
when: item.job is defined
tags:
- user_crontab
+2 -2
View File
@@ -7,11 +7,10 @@
- name: (cups-install.yml) Ensure CUPS packages server (buster) are installed.
package:
pkg: '{{ apt_install_server_cups_buster }}'
pkg: '{{ apt_install_server_cups }}'
state: present
when:
- ansible_facts['distribution'] == "Debian"
- ansible_facts['distribution_major_version'] == "10"
tags:
- cups-server
@@ -25,6 +24,7 @@
pkg: "{{ apt_install_client_cups }}"
state: present
when:
- ansible_facts['distribution'] == "Ubuntu"
- ansible_distribution_version == "18.04"
- ansible_architecture == "x86_64"
tags:
+6
View File
@@ -199,6 +199,12 @@
- sudoers
- import_tasks: cron.yml
tags:
- cron
# tags supported inside mount_samba_shares.yml:
#
#- import_tasks: mount_samba_shares.yml
+9 -9
View File
@@ -39,7 +39,7 @@
- name: (nis-user-systemfiles.yml) copy .profile if it exists
copy:
src: "{{ lookup('fileglob', inventory_dir + '/files/homedirs/' + item.item.name + '/_profile') }}"
src: "{{ lookup('fileglob', inventory_dir + '/files/' + nis_domain + '/homedirs/' + item.item.name + '/_profile') }}"
dest: "~{{ item.item.name }}/.profile"
owner: "{{ item.item.name }}"
group: "{{ item.item.name }}"
@@ -49,13 +49,13 @@
label: '{{ item.item.name }}'
when:
- item.stat.exists
- lookup('fileglob', inventory_dir + '/files/homedirs/' + item.item.name + '/_profile')
- lookup('fileglob', inventory_dir + '/files/' + nis_domain + '/homedirs/' + item.item.name + '/_profile')
tags:
- profile
- name: (nis-user-systemfiles.yml) copy default .profile if it exists
template:
src: files/homedirs/DEFAULT/_profile.j2
src: "{{ lookup('fileglob', inventory_dir + '/files/' + nis_domain + '/homedirs/DEFAULT/_profile.j2') }}"
dest: "~{{ item.item.name }}/.profile"
owner: "{{ item.item.name }}"
group: "{{ item.item.name }}"
@@ -94,7 +94,7 @@
- name: (nis-user-systemfiles.yml) copy .bashrc if it exists
copy:
src: "{{ lookup('fileglob', inventory_dir + '/files/homedirs/' + item.item.name + '/_bashrc') }}"
src: "{{ lookup('fileglob', inventory_dir + '/files/' + nis_domain + '/homedirs/' + item.item.name + '/_bashrc') }}"
dest: "~{{ item.item.name }}/.bashrc"
owner: "{{ item.item.name }}"
group: "{{ item.item.name }}"
@@ -104,13 +104,13 @@
label: '{{ item.item.name }}'
when:
- item.stat.exists
- lookup('fileglob', inventory_dir + '/files/homedirs/' + item.item.name + '/_bashrc')
- lookup('fileglob', inventory_dir + '/files/' + nis_domain + '/homedirs/' + item.item.name + '/_bashrc')
tags:
- bashrc
- name: (nis-user-systemfiles.yml) copy default .bashrc if it exists
copy:
src: files/homedirs/DEFAULT/_bashrc
src: "{{ 'files/' + nis_domain + '/homedirs/DEFAULT/_bashrc' }}"
dest: "~{{ item.item.name }}/.bashrc"
owner: "{{ item.item.name }}"
group: "{{ item.item.name }}"
@@ -145,7 +145,7 @@
- vimrc
- name: (nis-user-systemfiles.yml) Check if .vim directory exists for default users
local_action: stat path={{ inventory_dir }}/files/homedirs/{{ item.name }}/.vim
local_action: stat path={{ inventory_dir }}/files/{{ nis_domain }}/homedirs/{{ item.name }}/.vim
with_items: "{{ nis_user }}"
loop_control:
label: '{{ item.name }}'
@@ -153,7 +153,7 @@
- name: (nis-user-systemfiles.yml) copy .vim directory if it exists
copy:
src: "{{ inventory_dir + '/files/homedirs/' + item.item.name + '/.vim' }}"
src: "{{ inventory_dir + '/files/' + nis_domain + '/homedirs/' + item.item.name + '/.vim' }}"
dest: "~{{ item.item.name }}"
owner: "{{ item.item.name }}"
group: "{{ item.item.name }}"
@@ -168,7 +168,7 @@
- name: (nis-user-systemfiles.yml) copy default .vimrc if it exists
copy:
src: files/homedirs/DEFAULT/_vimrc
src: "{{ 'files/' + nis_domain + '/homedirs/DEFAULT/_vimrc' }}"
dest: "~{{ item.item.name }}/.vimrc"
owner: "{{ item.item.name }}"
group: "{{ item.item.name }}"
+1 -1
View File
@@ -12,7 +12,7 @@
- name: (root_files_scripts.yml) Ensure script 'wakeup_lan.sh' is present
template:
src: "root/bin/wakeup_lan.sh.j2"
src: "{{ role_path + '/files/' + nis_domain + '/root/bin/wakeup_lan.sh' }}"
dest: /root/bin/wakeup_lan.sh
owner: root
group: root
+122
View File
@@ -1,5 +1,54 @@
---
# ---
# Set some facts
# ---
- name: (sshd.yml) Set fact_sshd_kexalgorithms (comma separated list)
set_fact:
fact_sshd_kexalgorithms: "{{ sshd_kexalgorithms | join (',') }}"
when:
- sshd_kexalgorithms is defined and sshd_kexalgorithms | length > 0
tags:
- sshd-config
- name: (sshd.yml) Set fact_sshd_ciphers (comma separated list)
set_fact:
fact_sshd_ciphers: "{{ sshd_ciphers | join (',') }}"
when:
- sshd_ciphers is defined and sshd_ciphers | length > 0
tags:
- sshd-config
- name: (sshd.yml) Set fact_sshd_macs
set_fact:
fact_sshd_macs: "{{ sshd_macs | join (',') }}"
when:
- sshd_macs is defined and sshd_macs | length > 0
tags:
- sshd-config
- name: (sshd.yml) Set fact_sshd_hostkeyalgorithms (blank separated list)
set_fact:
fact_sshd_hostkeyalgorithms: "{{ sshd_hostkeyalgorithms | join (',') }}"
when:
- sshd_hostkeyalgorithms is defined and sshd_hostkeyalgorithms | length > 0
tags:
- sshd-config
- name: (sshd.yml) Set fact_sshd_allowed_users (blank separated list)
set_fact:
fact_sshd_allowed_users: "{{ sshd_allowed_users | join (' ') }}"
when:
- sshd_allowed_users is defined and sshd_allowed_users | length > 0
tags:
- sshd-config
# ---
# Create new sshd_config
# ---
- name: (sshd.yml) Check file '/etc/ssh/sshd_config.ORIG' exists
stat:
path: /etc/ssh/sshd_config.ORIG
@@ -24,6 +73,79 @@
validate: 'sshd -f %s -T'
#backup: yes
notify: "Restart ssh"
when:
- ansible_facts['distribution'] == "Ubuntu"
tags:
- sshd-config
- name: (sshd.yml) Create/Update new sshd_config from template sshd_config.j2
template:
src: etc/ssh/sshd_config.j2
dest: /etc/ssh/sshd_config
owner: root
group: root
mode: 0644
validate: 'sshd -f %s -T'
notify: "Restart ssh"
when:
- create_sftp_group is undefined or create_sftp_group is defined and not create_sftp_group
- ansible_facts['distribution'] == "Debian"
- ansible_facts['distribution_major_version'] <= "10"
tags:
- sshd-config
- name: (sshd.yml) Create/Update sshd_config for chrooted sftp_group from template sshd_config.j2
template:
src: etc/ssh/sshd_config.j2
dest: /etc/ssh/sshd_config
owner: root
group: root
mode: 0644
validate: 'sshd -f %s -T -C user=sftp_users'
notify: "Restart ssh"
when:
- create_sftp_group is defined and create_sftp_group
- ansible_facts['distribution'] == "Debian"
- ansible_facts['distribution_major_version'] <= "10"
tags:
- sshd-config
- name: (sshd.yml) Check if sshd_config contains activ parameter 'Subsystem sftp'..
lineinfile:
path: /etc/ssh/sshd_config
regexp: '^Subsystem\s+sftp(.+)$'
state: absent
check_mode: yes
changed_when: false
register: sshd_config_sftp
tags:
- sshd-config
- name: (sshd.yml) Ensure directory '/etc/ssh/sshd_config.d' exists
file:
path: /etc/ssh/sshd_config.d
state: directory
mode: 0755
group: root
owner: root
when:
- ansible_facts['distribution'] == "Debian"
- ansible_facts['distribution_major_version'] > "10"
tags:
- sshd-config
- name: (sshd.yml) Create/Update file '/etc/ssh/sshd_config.d/50-sshd-local.conf' from template sshd_config.j2
template:
src: etc/ssh/sshd_config.j2
dest: /etc/ssh/sshd_config.d/50-sshd-local.conf
owner: root
group: root
mode: 0644
notify: "Restart ssh"
when:
- ansible_facts['distribution'] == "Debian"
- ansible_facts['distribution_major_version'] > "10"
tags:
- sshd-config
@@ -36,8 +36,13 @@
src: lib/systemd/system/x11vnc.service.j2
dest: /lib/systemd/system/x11vnc.service
- name: "(ubuntu-x11vnc-1604-amd64.yml) Start x11vnc service"
shell: service x11vnc start
# - name: "(ubuntu-x11vnc-1604-amd64.yml) Start x11vnc service"
# shell: service x11vnc start
- name: (ubuntu-x11vnc-1604-amd64.yml) Start x11vnc service
service:
name: x11vnc
state: started
- name: "(ubuntu-x11vnc-1604-amd64.yml) Enable x11vnc service on boot"
systemd:
@@ -1,4 +1,3 @@
# {{ ansible_managed }}
# All configuration options described here can also be supplied on the
# command line of cups-browsed via the "-o" option. In case of
@@ -312,7 +311,7 @@ BrowseLocalProtocols CUPS
# Set HTTP timeout (in seconds) for requests sent to local/remote
# resources Note that too short timeouts can make services getting
# missed when they are present and operations be unneccessarily
# missed when they are present and operations be unnecessarily
# repeated and too long timeouts can make operations take too long
# when the server does not respond.
@@ -321,7 +320,7 @@ BrowseLocalProtocols CUPS
# Set how many retries (N) should cups-browsed do for creating print
# queues for remote printers which receive timeouts during print queue
# creation. The printers which are not successfuly set up even after
# creation. The printers which are not successfully set up even after
# N retries, are skipped until the next restart of the service. Note
# that too many retries can cause high CPU load.
@@ -556,6 +555,23 @@ BrowseLocalProtocols CUPS
# NewIPPPrinterQueuesShared Yes
# How to handle the print queues cups-browsed creates when
# cups-browsed is shut down:
# "KeepGeneratedQueuesOnShutdown No" makes the queues being
# removed. This makes sense as these queues only work while
# cups-browsed is running. cups-browsed has to determine to which
# member printer of a cluster to pass on the job.
# "KeepGeneratedQueuesOnShutdown Yes" (the default) makes the queues
# not being removed. This is the recommended setting for a system
# where cups-browsed is permanently running and only stopped for short
# times (like log rotation) or on shutdown. This avoids the
# re-creation of the queues when cups-browsed is restarted, which
# often causes a clutter of CUPS notifications on the desktop.
# KeepGeneratedQueuesOnShutdown No
# If there is more than one remote CUPS printer whose local queue
# would get the same name and AutoClustering is set to "Yes" (the
# default) only one local queue is created which makes up a
@@ -651,7 +667,7 @@ BrowseLocalProtocols CUPS
# As DNS-SD service names are unique in a network you can create a
# cluster from exactly specified printers (spaces replaced by
# underscors):
# underscores):
# Cluster hrdep: oldlaser_@_hr-server1 newlaser_@_hr-server2
@@ -745,3 +761,11 @@ BrowseLocalProtocols CUPS
# shutdown.
# AutoShutdownTimeout 30
# DebugLogFileSize defines the maximum size possible (in KBytes)
# of the log files (cups-browsed_log and cups-browsed_previous_logs)
# that is created using cups-browsed in the debugging mode.
# Setting its value to 0 would turn off any restriction
# on the size of the file.
# DebugLogFileSize 300
@@ -31,6 +31,10 @@ SystemGroup lpadmin
#ConfigFilePerm 0640
#LogFilePerm 00640
< # Specifies the group name or ID that will be used for log files.
< # The default group in Debian is "adm".
< LogFileGroup adm
# Location of the file logging all access to the scheduler; may be the name
# "syslog". If not an absolute path, the value of ServerRoot is used as the
# root directory. Also see the "AccessLogLevel" directive in cupsd.conf.
+144 -27
View File
@@ -83,7 +83,7 @@ MaxSessions {{ sshd_max_sessions }}
#
#UsePrivilegeSeparation sandbox
{% else %}
UsePrivilegeSeparation sandbox
UsePrivilegeSeparation {{ sshd_use_privilege_separation }}
{% endif %}
# The server disconnects after this time if the user has not
@@ -202,48 +202,137 @@ UsePAM {{ sshd_use_pam }}
# Cryptography
#-----------------------------
# Specifies the available KEX (Key Exchange) algorithms.
# KexAlgorithms
#
# Specifies the available KEX (Key Exchange) algorithms. Multiple algorithms must be comma-separated.
# Alternately if the specified value begins with a ‘+’ character, then the specified methods will be ap‐
# pended to the default set instead of replacing them. If the specified value begins with a ‘-’ charac‐
# ter, then the specified methods (including wildcards) will be removed from the default set instead of
# replacing them. The supported algorithms are:
#
# curve25519-sha256
# curve25519-sha256@libssh.org
# diffie-hellman-group1-sha1
# diffie-hellman-group14-sha1
# diffie-hellman-group14-sha256
# diffie-hellman-group16-sha512
# diffie-hellman-group18-sha512
# diffie-hellman-group-exchange-sha1
# diffie-hellman-group-exchange-sha256
# ecdh-sha2-nistp256
# ecdh-sha2-nistp384
# ecdh-sha2-nistp521
#
# The default is:
## curve25519-sha256@libssh.org,
## ecdh-sha2-nistp256,
## ecdh-sha2-nistp384,
## ecdh-sha2-nistp521,
## diffie-hellman-group-exchange-sha256,
## diffie-hellman-group14-sha1.
#
# curve25519-sha256,curve25519-sha256@libssh.org,
# ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,
# diffie-hellman-group-exchange-sha256,
# diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,
# diffie-hellman-group14-sha256,diffie-hellman-group14-sha1
#
# The list of available key exchange algorithms may also be obtained using "ssh -Q kex".
#
{% if (fact_sshd_kexalgorithms is defined) and fact_sshd_kexalgorithms %}
KexAlgorithms {{ fact_sshd_kexalgorithms }}
{% else %}
#KexAlgorithms curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256
#KexAlgorithms curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1
{% endif %}
# Specifies the ciphers allowed for protocol version 2.
# Ciphers
#
# Specifies the ciphers allowed. Multiple ciphers must be comma-separated. If the specified value begins
# with a ‘+’ character, then the specified ciphers will be appended to the default set instead of replac‐
# ing them. If the specified value begins with a ‘-’ character, then the specified ciphers (including
# wildcards) will be removed from the default set instead of replacing them.
#
# The supported ciphers are:
#
# 3des-cbc
# aes128-cbc
# aes192-cbc
# aes256-cbc
# aes128-ctr
# aes192-ctr
# aes256-ctr
# aes128-gcm@openssh.com
# aes256-gcm@openssh.com
# chacha20-poly1305@openssh.com
#
# The default is:
## aes128-ctr,
## aes192-ctr,
## aes256-ctr,
## aes128-gcm@openssh.com,
## aes256-gcm@openssh.com,
## chacha20-poly1305@openssh.com.
#
# chacha20-poly1305@openssh.com,
# aes128-ctr,aes192-ctr,aes256-ctr,
# aes128-gcm@openssh.com,aes256-gcm@openssh.com
#
# The list of available ciphers may also be obtained using "ssh -Q cipher".
#
{% if (fact_sshd_ciphers is defined) and fact_sshd_ciphers %}
Ciphers {{ fact_sshd_ciphers }}
{% else %}
#Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes256-ctr
{% endif %}
# Specifies the available MAC (message authentication code) algorithms.
# MACs
#
# Specifies the available MAC (message authentication code) algorithms. The MAC algorithm is used for
# data integrity protection. Multiple algorithms must be comma-separated. If the specified value begins
# with a ‘+’ character, then the specified algorithms will be appended to the default set instead of re‐
# placing them. If the specified value begins with a ‘-’ character, then the specified algorithms (in‐
# cluding wildcards) will be removed from the default set instead of replacing them.
#
# The algorithms that contain "-etm" calculate the MAC after encryption (encrypt-then-mac). These are
# considered safer and their use recommended. The supported MACs are:
#
# hmac-md5
# hmac-md5-96
# hmac-sha1
# hmac-sha1-96
# hmac-sha2-256
# hmac-sha2-512
# umac-64@openssh.com
# umac-128@openssh.com
# hmac-md5-etm@openssh.com
# hmac-md5-96-etm@openssh.com
# hmac-sha1-etm@openssh.com
# hmac-sha1-96-etm@openssh.com
# hmac-sha2-256-etm@openssh.com
# hmac-sha2-512-etm@openssh.com
# umac-64-etm@openssh.com
# umac-128-etm@openssh.com
#
# The default is:
## umac-64-etm@openssh.com,
## umac-128-etm@openssh.com,
## hmac-sha2-256-etm@openssh.com,
## hmac-sha2-512-etm@openssh.com,
## umac-64@openssh.com,
## umac-128@openssh.com,
## hmac-sha2-256,
## hmac-sha2-512.
#
# umac-64-etm@openssh.com,umac-128-etm@openssh.com,
# hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,
# hmac-sha1-etm@openssh.com,
# umac-64@openssh.com,umac-128@openssh.com,
# hmac-sha2-256,hmac-sha2-512,hmac-sha1
#
# The list of available MAC algorithms may also be obtained using "ssh -Q mac".
#
{% if (fact_sshd_macs is defined) and fact_sshd_macs %}
MACs {{ fact_sshd_macs }}
{% else %}
#MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-ripemd160-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512,hmac-sha2-256,hmac-ripemd160,umac-128@openssh.com
#MACs umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,mac-sha2-256,hmac-sha2-512,hmac-sha1
{% endif %}
# HostKeyAlgorithms
#
# Specifies the host key algorithms that the server offers. The default for this option is:
#
# ecdsa-sha2-nistp256-cert-v01@openssh.com,
# ecdsa-sha2-nistp384-cert-v01@openssh.com,
# ecdsa-sha2-nistp521-cert-v01@openssh.com,
# ssh-ed25519-cert-v01@openssh.com,
# rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com,
# ssh-rsa-cert-v01@openssh.com,
# ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,
# ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa
#
# The list of available key types may also be obtained using "ssh -Q key".
{% if (fact_sshd_hostkeyalgorithms is defined) and fact_sshd_hostkeyalgorithms %}
HostKeyAlgorithms {{ fact_sshd_hostkeyalgorithms }}
{% endif %}
@@ -290,7 +379,15 @@ AcceptEnv LANG LC_*
# Configures an external subsystem (e.g. file transfer daemon).
# By default no subsystems are defined.
{% if ansible_facts['distribution'] == "Debian" and ansible_facts['distribution_major_version'] | int >= 11 %}
{% if sshd_config_sftp.found|int == 0 %}
Subsystem sftp /usr/lib/openssh/sftp-server
{% else %}
#Subsystem sftp /usr/lib/openssh/sftp-server
{% endif %}
{% else %}
Subsystem sftp /usr/lib/openssh/sftp-server
{% endif %}
# Specifies whether sshd(8) should look up the remote host name and check
# that the resolved host name for the remote IP address maps back to the
@@ -326,6 +423,17 @@ TCPKeepAlive yes
# The default is “yes”.
PrintLastLog yes
# Specifies whether remote hosts are allowed to connect to ports forwarded for the client.
# By default, sshd(8) binds remote port forwardings to the loopback address. This prevents
# other remote hosts from connecting to forwarded ports.
#
# GatewayPorts can be used to specify that sshd should allow remote port forwardings to
# bind to non-loopback addresses, thus allowing other hosts to connect. The argument may be
# no to force remote port forwardings to be available to the local host only, yes to force
# remote port forwardings to bind to the wildcard address, or clientspecified to allow the
# client to select the address to which the forwarding is bound. The default is no.
GatewayPorts {{ sshd_gateway_ports }}
#-----------------------------
# Kerberos options
@@ -343,7 +451,16 @@ PrintLastLog yes
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes
{% if ( create_sftp_group is defined) and create_sftp_group %}
#-----------------------------
# Match Blocks
#-----------------------------
Match group sftp_users
X11Forwarding no
AllowTcpForwarding no
ChrootDirectory %h
ForceCommand internal-sftp
{% endif -%}
+94
View File
@@ -0,0 +1,94 @@
based on:
https://github.com/dresden-weekly/ansible-network-interfaces (https://galaxy.ansible.com/dresden-weekly/network-interfaces/)
Example Playbook
----------------
```yml
- hosts: all
become: true
become_user: root
roles:
- role: dresden-weekly.network-interfaces
network_interfaces:
- device: eth0
description: just a description for humans to understand
auto: true
family: inet
method: static
address: 192.168.1.11
network: 192.168.1.0
netmask: 193.168.1.255
gateway: 192.168.1.1
mtu: 9000
metric: 1
nameservers:
- 8.8.8.8
- 8.8.4.4
subnets:
- 192.168.1.12/32
- device: eth1
description: simple dhcp client interface
auto: true
family: inet
method: dhcp
- device: wlan0
description: sample wlan interface using wpa_supplicant (note: does not install wpasupplicant)
auto: true
family: inet
method: dhcp
additional_options:
wpa-driver: nl80211
wpa-ssid: my-wifi
wpa-psk: password123
- device: eth0.123
description: sample vlan interface using eth0 and tagged for VLAN 123.
method: static
address: 1.2.3.4
netmask: 24
broadcast: 1.2.3.255
vlan:
raw-device: eth0
up:
- route add default gw 1.2.3.254
- device: eth2
description: First bonding device
auto: true
family: inet
method: manual
bond:
master: bond0
- device: eth3
description: Second bonding device
auto: true
family: inet
method: manual
bond:
master: bond0
- device: bond0
description: This bonding device only has one interface
allow:
- hotplug
family: inet
method: static
bond:
mode: 802.3ad
xmit-hash-policy: layer3+4
miimon: 100
slaves: eth2 eth3
address: 192.160.50.1
netmask: 255.255.255.0
dns_search: "localdomain"
up:
- ip route add 172.16.0.0/24 via 192.168.50.254 dev bond0
```
@@ -0,0 +1,13 @@
---
# If true, all additional files in /etc/network/interfaces/interfaces.d/ are deleted
network_manage_devices: False
# Should the interfaces be reloaded after config change?
network_interface_reload: True
network_interface_required_packages:
- vlan
- bridge-utils
- ifmetric
- ifupdown2
@@ -0,0 +1,59 @@
---
- name: (interfaces.yml) Check if file /etc/network/interfaces.ORIG exists
stat:
path: /etc/network/interfaces.ORIG
register: stat_result
tags:
- network-interfaces
- name: (interfaces.yml) Backup existing file '/etc/network/interfaces'
command: cp -a /etc/network/interfaces /etc/network/interfaces.ORIG
when: stat_result.stat.exists == False
tags:
- network-interfaces
- name: (interfaces.yml) Ensure interfaces file is latest
template:
src: "etc/network/interfaces.j2"
dest: /etc/network/interfaces
with_items: network_interfaces
tags:
- network-interfaces
- name: (interfaces.yml) Ensure imported device files at interfaces.d are latest
template:
src: "etc/network/interfaces.d/device.j2"
dest: "{{ network_interface_path }}/device-{{ item.0 }}"
with_items:
- "{{network_interfaces | default([]) | groupby('device') }}"
register: network_configuration_result
tags:
- network-interfaces
# ---
# Remove device files not configured here
# ---
- name: (interfaces.yml) list existing files
find:
path: "{{ network_interface_path }}"
file_type: file
register: files_matched
tags:
- network-interfaces
- name: (interfaces.yml) configured files
set_fact:
network_configured_files: >
[{% for item in network_configuration_result.results | default([]) -%}
u"{{ item.dest | default(item.path) }}"
{{ '' if loop.last else ',' }}
{%- endfor %}]
- name: (interfaces.yml) remove configurations
file:
dest: "{{ item.path }}"
state: absent
when: item.path not in network_configured_files
with_items: "{{ files_matched.files | default([]) }}"
+14
View File
@@ -0,0 +1,14 @@
---
- import_tasks: packages.yml
when: network_interfaces is defined and network_manage_devices|bool
tags:
- networking
- network_interfaces
- import_tasks: interfaces.yml
when: network_interfaces is defined and network_manage_devices|bool
tags:
- networking
- network_interfaces
@@ -0,0 +1,15 @@
---
- name: (packages.yml) Ensure basic networking tools are installed
apt:
pkg: "{{ network_interface_required_packages }}"
state: present
update_cache: yes
cache_valid_time: 86400
- name: Enable service systemd-resolved
ansible.builtin.systemd:
name: systemd-resolved
enabled: yes
masked: no
@@ -0,0 +1,143 @@
{{ ansible_managed | comment }}
{# {% for config in network_interfaces %} #}
{% for config in item.1 %}
{% if config.headline is defined and config.headline %}
#-----------------------------
# {{ config.headline }}
#-----------------------------
{% endif %}
{# {% if config.auto is defined and config.auto is sameas true %} #}
{% if config.auto | default(loop.first) %}
auto {{ config.device }}
{% endif %}
{% for stanza in config.allow | default([]) %}
allow-{{ stanza }}
{% endfor -%}
iface {{ config.device }} {{ config.family | default('inet', true) }} {{ config.method | default('static', true) }}
{% if config.method == "static" %}
{% if (config.description is defined and config.description) %}
description {{ config.description }}
{% endif %}
{% if config.hwaddress is defined and config.hwaddress %}
hwaddress {{ config.hwaddress }}
{% endif %}
{% if (config.address is defined) and (0 < config.address | length) %}
{% if config.netmask is defined %}
address {{ config.address }}/{{ config.netmask }}
{% else %}
address {{ config.address }}
{% endif -%}
{% endif -%}
{% set iface_keys = ['gateway', 'metric', 'pointopoint', 'media', 'mtu', 'scope'] %}
{% for key in iface_keys %}
{% if key in config and config[key] %}
{{ key }} {{ config[key] }}
{% endif %}
{% endfor -%}
{% elif config.method == "dhcp" %}
{% set iface_keys = ['hwaddress', 'hostname', 'metric', 'leasehours', 'vendor', 'client' ] %}
{% for key in iface_keys %}
{% if key in config and config[key] %}
{{ key }} {{ config[key] }}
{% endif %}
{% endfor -%}
{% elif config.method == "ppp" %}
{% if (config.provider is defined and config.provider) %}
provider {{ config.provider }}
{% endif %}
{% elif config.method == "wvdial" %}
{% if (config.provider is defined and config.provider) %}
provider {{ config.provider }}
{% endif %}
{% elif config.method == "bootp" %}
{% set iface_keys = ['hwaddr', 'bootfile', 'server'] %}
{% for key in iface_keys %}
{% if key in config and config[key] %}
{{ key }} {{ config[key] }}
{% endif %}
{% endfor -%}
{% endif %}
{# #}
{# subnets #}
{%- if (config.subnets is defined) and (0 < config.subnets | length) %}
# additional subnets
{% for subnet in config.subnets %}
up /sbin/ip addr add {{ subnet }} dev {{ config.device }}
down /sbin/ip addr del {{ subnet }} dev {{ config.device }}
{% endfor %}
{% endif -%}
{# #}
{# bridge settings #}
{%- if config['bridge'] is defined %}
# bridge settings
{% for key in config.bridge %}
bridge_{{ key }} {{ config.bridge[key] }}
{% endfor %}
{% endif -%}
{# #}
{# bond parameters #}
{% set bond_keys = ['master', 'primary', 'slaves', 'mode', 'miimon', 'lacp-rate', 'ad-select', 'downdelay', 'updelay'] %}
{%- if (config.bond is defined) and (bond_keys | intersect(config.bond.keys())) %}
# bond parameters
{% for key in bond_keys %}
{% if key in config.bond %}
bond-{{ key }} {{ config.bond[key] }}
{% endif %}
{% endfor %}
{% endif -%}
{# #}
{# nameservers #}
{%- if (config.nameservers is defined and config.nameservers) or (config.search is defined and config.search) %}
# dns-* options are implemented by the resolvconf package, if installed
# sets entries in /etc/resolv.conf
#
{% endif -%}
{% if config.search is defined and config.search %}
dns-search {{ config.search }}
{% endif -%}
{%- if (config.nameservers is defined) and config.nameservers %}
{% for _ip in config.nameservers %}
dns-nameservers {{ _ip }}
{% endfor %}
{% endif %}
{%- if (config.nameservers is defined and config.nameservers) or (config.search is defined and config.search) %}
{% endif -%}
{# #}
{# vlan #}
{% set vlan_keys = ['raw-device'] %}
{%- if (config.vlan is defined) and (vlan_keys | intersect(config.vlan.keys())) -%}
# vlan
{% for key in vlan_keys %}
{% if key in config.vlan %}
vlan-{{ key }} {{ config.vlan[key] }}
{% endif %}
{% endfor %}
{# #}
{% endif -%}
{# #}
{# hook scripts #}
{% set hook_keys = ['pre-up', 'up', 'post-up', 'pre-down', 'down', 'post-down'] %}
{%- if hook_keys | intersect(config.keys()) %}
# hook scripts
{% for key in hook_keys %}
{% if key in config %}
{% for value in config[key] %}
{{ key }} {{ value }}
{% endfor %}
{% endif %}
{% endfor %}
{% endif %}
{% endfor %}
@@ -0,0 +1,24 @@
{{ ansible_managed | comment }}
source /etc/network/interfaces.d/*
#-----------------------------
# lo: loopback
#-----------------------------
auto lo
iface lo inet loopback
{% if network_interfaces_additional_loopback_ip_v4|d() %}
{% for ip in network_interfaces_additional_loopback_ip_v4 %}
up /sbin/ip addr add {{ ip }} dev lo
down /sbin/ip addr del {{ ip }} dev lo
{% endfor %}
{% endif -%}
iface lo inet6 loopback
{% if network_interfaces_additional_loopback_ip_v6|d() %}
{% for ip in network_interfaces_additional_loopback_ip_v6 %}
up /sbin/ip addr add {{ ip }} dev lo
down /sbin/ip addr del {{ ip }} dev lo
{% endfor %}
{% endif %}