Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Small changes here and there and the beginning of a syntax file for C…

…icode in VIM.
  • Loading branch information...
commit 43c13bec139dbf15edb5864b51762a410ca3121c 1 parent 116251a
gr3y authored
12 _bashrc
@@ -41,12 +41,12 @@ shopt -s extglob
41 41 shopt -s checkwinsize
42 42
43 43 # Control history (luckily the winner of the war writes it).
44   -shopt -s histappend # append the history to the histfile instead of overwriting it.
45   -shopt -s cmdhist # multi-line commands are stored in the history
46   -export HISTFILESIZE=1000 # bash history file length
47   -export HISTCONTROL=ignoreboth # no duplicates and empty lines
48   -export HISTIGNORE="&:ls:[bf]g:exit:sudo*:rm*" # do not store these lines
49   -#export PROMPT_COMMAND="history -n; history -a" # update & re-read histfile after every cmd so terminals will share
  44 +shopt -s histappend # append the history to the histfile instead of overwriting it.
  45 +shopt -s cmdhist # multi-line commands are stored in the history
  46 +export HISTFILESIZE=1000 # bash history file length
  47 +export HISTCONTROL=ignoreboth # no duplicates and empty lines
  48 +export HISTIGNORE="&:ls:[bf]g:exit:sudo*:rm*:halt" # do not store these lines
  49 +#export PROMPT_COMMAND="history -n; history -a" # update & re-read histfile after every cmd so terminals will share
50 50
51 51
52 52 # make less more friendly for non-text input files, see lesspipe(1)
13 _bin/check_kernel_version.sh
... ... @@ -0,0 +1,13 @@
  1 +#!/bin/bash
  2 +
  3 +RUNNING=$(/usr/bin/pacman -Qi linux | grep Version | cut -f10 -d' ')
  4 +
  5 +if [ -e "$HOME/.local/tmp/saved_kernel_version" ]; then
  6 + SAVED=$(cat "$HOME/.local/tmp/saved_kernel_version")
  7 + if [ "$RUNNING" != "$SAVED" ]; then
  8 + /usr/bin/notify-send -u normal -t 15000 -i /usr/share/icons/Human/48x48/status/stock_dialog-warning.png "Kernel version changed from $SAVED to $RUNNING." "Re-compile vmware modules."
  9 + echo "$RUNNING" > "$HOME/.local/tmp/saved_kernel_version"
  10 + fi
  11 +else
  12 + echo "$RUNNING" > "$HOME/.local/tmp/saved_kernel_version"
  13 +fi
13 _config/awesome/rc.lua
@@ -397,7 +397,7 @@ awful.rules.rules = {
397 397 tag = tags[1][5] } },
398 398 { rule = { class = "Vmplayer" },
399 399 properties = { floating = true,
400   - tag = tags[1][5],
  400 + tag = tags[1][6],
401 401 callback = function(c) c:geometry({x=237, y=152}) end} },
402 402 { rule = { class = "WeeUXTERM" },
403 403 properties = { tag = tags[1][9] } },
@@ -445,8 +445,14 @@ client.add_signal("manage", function (c, startup)
445 445 end
446 446 end)
447 447
448   -client.add_signal("focus", function(c) c.border_color = beautiful.border_focus end)
449   -client.add_signal("unfocus", function(c) c.border_color = beautiful.border_normal end)
  448 +client.add_signal("focus", function(c)
  449 + c.border_color = beautiful.border_focus
  450 + c.opacity = 1
  451 + end)
  452 +client.add_signal("unfocus", function(c)
  453 + c.border_color = beautiful.border_normal
  454 + c.opacity = 0.65
  455 + end)
450 456
451 457
452 458 -- No border if maximized or the only window showing.
@@ -485,4 +491,5 @@ r.run("/usr/bin/xscreensaver &")
485 491 r.run("/usr/bin/dropboxd &")
486 492 -- r.run("/usr/bin/xcompmgr -cCfF -t-5 -l-5 -r4.2 -o.55 -D6 > /dev/null 2>&1 &")
487 493 r.run("/usr/bin/udisks --monitor > ~/.udisks.log 2>&1 &")
  494 +r.run("sleep 5 && /home/andreasp/.bin/check_kernel_version.sh")
488 495 -- }}}
140 _vim/syntax/cicode.vim
... ... @@ -0,0 +1,140 @@
  1 +"
  2 +" @@@@@@@@ @@@@@@@ @@@@@@@@ @@@ @@@ @@@@@@ @@@@@@@ @@@@@@ @@@ @@@@@@@@
  3 +" @@@@@@@@@ @@@@@@@@ @@@@@@@@ @@@ @@@ @@@@@@@ @@@@@@@@ @@@@@@@@ @@@ @@@@@@@@
  4 +" !@@ @@! @@@ @@! @@! !@@ !@@ !@@ @@! @@@ @@! @@!
  5 +" !@! !@! @!@ !@! !@! @!! !@! !@! !@! @!@ !@! !@!
  6 +" !@! @!@!@ @!@!!@! @!!!:! !@!@! !!@@!! !@! @!@!@!@! @!! @!!!:!
  7 +" !!! !!@!! !!@!@! !!!!!: @!!! !!@!!! !!! !!!@!!!! !!! !!!!!:
  8 +" :!! !!: !!: :!! !!: !!: !:! :!! !!: !!! !!: !!:
  9 +" :!: !:: :!: !:! :!: :!: !:! :!: :!: !:! :!: :!:
  10 +" ::: :::: :: ::: :: :::: :: :::: :: ::: ::: :: ::: :: :::: :: ::::
  11 +" :: :: : : : : : :: :: : :: : : :: :: : : : : : :: : : : :: ::
  12 +"
  13 +" .: FILE: cicode.vim
  14 +" .: CREATED: 2012-02-01 19:11
  15 +" .: AUTHOR: Andreas Persson (greyscale, grey)
  16 +" .: MAIL: <andreas(at)greyscale(dot)se>
  17 +" .: VERSION: 1.0
  18 +" .: DESCRIPTION: Syntax file for CiCode use in CitectSCADA by Schneider Electric.
  19 +"
  20 +" __________________________________________________________________________________________
  21 +" This file is distributed "as it is", like it? Then use it in whole or parts of it but be
  22 +" minded that it comes with absolutely no warranty. But then again you got it for free..
  23 +" __________________________________________________________________________________________
  24 +"
  25 +"
  26 +if version < 600
  27 + syntax clear
  28 +elseif exists("b:current_syntax")
  29 + finish
  30 +endif
  31 +
  32 +syn case ignore
  33 +
  34 +syn keyword cicodeStatement abstract assert break catch class const continue
  35 +syn keyword cicodeStatement double extends end false final finally function goto
  36 +syn keyword cicodeStatement global implements import instanceof interface native new null package
  37 +syn keyword cicodeStatement private protected public return static strictfp super synchronized
  38 +syn keyword cicodeStatement this threadsafe throw throws transient true try void volatile
  39 +
  40 +syn keyword cicodeLabel case default
  41 +syn keyword cicodeConditional if else switch
  42 +syn keyword cicodeRepeat do for while
  43 +syn keyword cicodeType int real string object
  44 +
  45 +
  46 +syn keyword cicodeFunction Abs AlarmAck AlarmAckRec AlarmActive AlarmClear AlarmComment AlarmDelete AlarmDisable
  47 +syn keyword cicodeFunction AlarmDisableRec AlarmDsp AlarmDspLast AlarmDspNext AlarmDspPrev AlarmEnable AlarmEnableRec
  48 +syn keyword cicodeFunction AlarmFirstCatRec AlarmFirstTagRec AlarmGetDsp AlarmGetFieldRec AlarmGetInfo AlarmHelp
  49 +syn keyword cicodeFunction AlarmNextCatRec AlarmNextTagRec AlarmSaveType AlarmSetInfo AlarmSetPriority AlarmSetPriorityRec
  50 +syn keyword cicodeFunction AlarmSetThreshold AlarmSetThresholdRec AlarmSplit AlarmSumAppend AlarmSumDelete AlarmSumFirst
  51 +syn keyword cicodeFunction AlarmSumGet AlarmSumLast AlarmSumNext AlarmSumPrev AlarmSumSet AlarmSumSplit ArcCos ArcSin ArcTan
  52 +syn keyword cicodeFunction Beep CallEvent ChainEvent CharToStr CitectInfo ClipCopy ClipPaste ClipReadLn ClipWriteLn CodeSetMode
  53 +syn keyword cicodeFunction ComClose ComOpen ComRead ComReset ComWrite Cos DateAdd DateDay DateMonth DateSub DateWeekDay DateYear
  54 +syn keyword cicodeFunction DDEExec DDEPost DDERead DDEWrite Debug DegToRad DevAppend DevClose DevControl DevCurr DevDelete
  55 +syn keyword cicodeFunction DevDisable DevEOF DevFind DevFlush DevGetField DevHistory DevInfo DevNext DevOpen DevPrev DevPrint
  56 +syn keyword cicodeFunction DevRead DevReadLn DevRecNo DevSeek DevSetField DevSize DevWrite DevWriteLn DevZap DLLCall DLLClose
  57 +syn keyword cicodeFunction DLLOpen DspAnGetPos DspAnInfo DspAnInRgn DspAnMove DspAnMoveRel DspAnNew DspAnNewRel DspAnWrite DspBar
  58 +syn keyword cicodeFunction DspBarLoad DspButton DspButtonFn DspChart DspCol DspDel DspDirty DspError DspFile DspFileGetInfo DspFileGetName
  59 +syn keyword cicodeFunction DspFileScroll DspFileSetName DspFlushObj DspFont DspFontHnd DspFullScreen DspGetAnCur DspGetMouse
  60 +syn keyword cicodeFunction DspGetNearestAn DspInfo DspInfoDestroy DspInfoField DspInfoNew DspInfoValid DspKernel DspMarkerMove
  61 +syn keyword cicodeFunction DspMarkerNew DspMCI DspPage DspPlaySound DspStr DspSym DspSymAnm DspSymLoad DspText DspTrend
  62 +syn keyword cicodeFunction DspTrendInfo DspTrnLoad DspVerbose EngToGeneric ErrCom ErrGetHw ErrInfo ErrLog ErrMsg ErrSet ErrSetHw
  63 +syn keyword cicodeFunction ErrSetLevel ErrTrap Exec Exp Fact FileClose FileCopy FileDelete FileEOF FileExist FileFind FileGetTime
  64 +syn keyword cicodeFunction FileMakePath FileOpen FileRead FileReadBlockDODGY FileReadLn FileReName FileSeek FileSelect FileSetTime
  65 +syn keyword cicodeFunction FileSize FileSplitPath FileWrite FileWriteBlockDODGY FileWriteLn FmtClose FmtFieldHnd FmtGetField
  66 +syn keyword cicodeFunction FmtGetFieldHnd FmtOpen FmtSetField FmtSetFieldHnd FmtToSTr FormActive FormAddList FormButton FormCheckBox
  67 +syn keyword cicodeFunction FormComboBox FormCurr FormDestroy FormEdit FormField FormGetCurrInst FormGetData FormGetInst FormGetText
  68 +syn keyword cicodeFunction FormGoto FormGroupBox FormInput FormListBox FormNew FormPassword FormPosition FormPrompt FormRadioButton
  69 +syn keyword cicodeFunction FormRead FormSetData FormSetInst FormSetText FormWndHnd FullName GetArea GetEnv GetEvent GetGlbBool
  70 +syn keyword cicodeFunction GetGlbFlt GetGlbInt GetGlbStr GetPriv GetVar GraphBox GraphClose GraphGetInfo GraphGrid GraphLine
  71 +syn keyword cicodeFunction GraphMarker GraphOpen GraphScaleMarker GraphText GrpClose GrpDelete GrpFirst GrpIn GrpInsert GrpMath
  72 +syn keyword cicodeFunction GrpName GrpNext GrpOpen GrpToStr Halt HexToStr HighByte HighWord Input IntToStr IsError
  73 +syn keyword cicodeFunction KerCmd KeyAllowCursor KeyBS KeyDown KeyGet KeyGetCursor KeyLeft KeyMove KeyPeek KeyPut KeyPutStr
  74 +syn keyword cicodeFunction KeyReplay KeyReplayAll KeyRight KeySetCursor KeySetSeq KeySetType KeyUp Ln Log Login Logout LowByte LowWord
  75 +syn keyword cicodeFunction MailError MailLogoff MailLogon MailRead MailSend Max Message Min MsgBrdcst MsgClose MsgGetCurr MsgOpen
  76 +syn keyword cicodeFunction MsgRead MsgRPC MsgWrite Name OnEvent PageDisplay PageGetInt PageGoto PageInfo PageLast PageNext
  77 +syn keyword cicodeFunction PagePeekLast PagePopLast PagePrev PagePushLast PageSetInt ParameterGet ParameterPut PathToStr Pi
  78 +syn keyword cicodeFunction PointData PointFree PointNew PointRead PointStatus PointWrite Pow Print PrintLn Prompt
  79 +syn keyword cicodeFunction QueClose QueLength QueOpen QuePeek QueRead QueWrite RadToDeg Rand RdbClose RdbEOF RdbFind RdbFirstRec RdbGet
  80 +syn keyword cicodeFunction rdbGetPath RdbLastRec RdbNextRec RdbNoRec RdbOpen RdbOpenPage RdbOpenSub RdbPosRec RdbPrevRec RdbSet
  81 +syn keyword cicodeFunction rdbSetPath RealToStr RepGetControl Report RepSetControl ReRead Round SemClose SemOpen SemSignal SemWait
  82 +syn keyword cicodeFunction ServerControl ServerInfo SetArea SetEvent SetGlbBool SetGlbFlt SetGlbInt SetGlbStr Shutdown Sign Sin Sleep
  83 +syn keyword cicodeFunction SPCSetLimit SQLAppend SQLBeginTran SQLCommit SQLConnect SQLDisconnect SQLEnd SQLErrMsg SQLExec SQLFieldInfo
  84 +syn keyword cicodeFunction SQLGetField SQLInfo SQLNext SQLNoFields SQLNumChange SQLRollBack SQLSet SQLTraceOff SQLTraceOn Sqrt StrClean
  85 +syn keyword cicodeFunction StrFill StrFormat StrGetChar StrLeft StrLength StrLower StrMid StrPad StrRight StrSearch StrSetChar
  86 +syn keyword cicodeFunction StrToChar StrToDate StrToFmt StrToGrp StrToHex StrToInt StrToPeriod StrToReal StrToTime StrToValue
  87 +syn keyword cicodeFunction StrTrim StrUpper StrWord SysTime SysTimeDelta TableLookUp TableMath TableShift Tan TaskHnd TaskKill
  88 +syn keyword cicodeFunction TaskNew TaskResume TaskSuspend TestRandomWave TestSawWave TestSinWave TestSquareWave TestTriangWave
  89 +syn keyword cicodeFunction TimeCurrent TimeHour TimeMidNight TimeMin TimeSec TimeSecond TimeSet TimeToStr TimeToStrFmt TimeYearDay
  90 +syn keyword cicodeFunction TraceMsg TrnAddHistory TrnDelete TrnDelHistory TrnEcho TrnFlush TrnGetBufTime TrnGetBufValue TrnGetCursorPos
  91 +syn keyword cicodeFunction TrnGetCursorTime TrnGetCursorValue TrnGetCursorValueStr TrnGetDefScale TrnGetFormat TrnGetMode TrnGetPen
  92 +syn keyword cicodeFunction TrnGetPenFocus TrnGetPenNo TrnGetPeriod TrnGetScale TrnGetScaleStr TrnGetTable TrnGetTime TrnGetUnits
  93 +syn keyword cicodeFunction TrnNew TrnScroll TrnSetCursor TrnSetCursorPos TrnSetPen TrnSetPenFocus TrnSetPeriod TrnSetScale TrnSetTable
  94 +syn keyword cicodeFunction TrnSetTime UnitControl UnitInfo UserInfo Version WhoAmI WinCopy WinFile WinFree WinGetFocus WinGetWndHnd
  95 +syn keyword cicodeFunction WinGoto WinMode WinMove WinNew WinNewAt WinNext WinNumber WinPos WinPrev WinPrint WinPrintFile WinSelect
  96 +syn keyword cicodeFunction WinSize WinTitle WndFind WndGetFileProfile WndGetProfile WndHelp WndInfo WndPutFileProfile WndPutProfile WndShow
  97 +syn keyword cicodeFunction _AlarmDsp _DevClose _DevOpen _DspButton _DspExec _DspSym _DspSymAnm _DspTrendInfo _Exec _KeyReplay _TimeSub
  98 +syn keyword cicodeFunction _TrnNew _Wave _WinPrint _WinPrintFile
  99 +
  100 +syn match cicodeSpecial display contained "\\\(x\x\+\|\o\{1,3}\|.\|$\)"
  101 +
  102 +syn match cicodeCharacter "L\='[^\\]'"
  103 +syn match cicodeCharacter "L'[^']*'" contains=cicodeSpecial
  104 +
  105 +syn region cicodeString matchgroup=cicodeString start=+'+ end=+'+
  106 +syn region cicodeString matchgroup=cicodeString start=+"+ end=+"+
  107 +
  108 +syn match cicodeNumber "-\=\<\d\+\>"
  109 +
  110 +syn match cicodeOperator "[+\-/*=]"
  111 +syn match cicodeOperator "[<>]=\="
  112 +syn match cicodeOperator "<>"
  113 +syn match cicodeOperator "="
  114 +syn match cicodeOperator "[()]"
  115 +syn match cicodeOperator "\.\."
  116 +syn match cicodeOperator "[\^.]"
  117 +syn match cicodelMatrixDelimiter "[][]"
  118 +
  119 +syn match cicodeCommentL "^\s*\zs\/\/.*$"
  120 +syn match cicodeCommentL "\s*\zs\/\/.*$"
  121 +syn match cicodeCommentL "\/\/.*$"
  122 +
  123 +
  124 +hi def link cicodeStatement Statement
  125 +hi def link cicodeType Type
  126 +hi def link cicodeFunction Function
  127 +hi def link cicodeLabel Label
  128 +hi def link cicodeConditional Conditional
  129 +hi def link cicodeRepeat Repeat
  130 +hi def link cicodeCharacter Character
  131 +hi def link cicodeSpecial SpecialChar
  132 +hi def link cicodeString String
  133 +hi def link cicodeNumber Number
  134 +hi def link cicodeOperator Operator
  135 +hi def link cicodelMatrixDelimiter Identifier
  136 +hi def link cicodeCommentL Comment
  137 +
  138 +
  139 +
  140 +let b:current_syntax = "cicode"
32 _vim/syntax/plc-il.vim
... ... @@ -1,32 +0,0 @@
1   -"
2   -" @@@@@@@@ @@@@@@@ @@@@@@@@ @@@ @@@ @@@@@@ @@@@@@@ @@@@@@ @@@ @@@@@@@@
3   -" @@@@@@@@@ @@@@@@@@ @@@@@@@@ @@@ @@@ @@@@@@@ @@@@@@@@ @@@@@@@@ @@@ @@@@@@@@
4   -" !@@ @@! @@@ @@! @@! !@@ !@@ !@@ @@! @@@ @@! @@!
5   -" !@! !@! @!@ !@! !@! @!! !@! !@! !@! @!@ !@! !@!
6   -" !@! @!@!@ @!@!!@! @!!!:! !@!@! !!@@!! !@! @!@!@!@! @!! @!!!:!
7   -" !!! !!@!! !!@!@! !!!!!: @!!! !!@!!! !!! !!!@!!!! !!! !!!!!:
8   -" :!! !!: !!: :!! !!: !!: !:! :!! !!: !!! !!: !!:
9   -" :!: !:: :!: !:! :!: :!: !:! :!: :!: !:! :!: :!:
10   -" ::: :::: :: ::: :: :::: :: :::: :: ::: ::: :: ::: :: :::: :: ::::
11   -" :: :: : : : : : :: :: : :: : : :: :: : : : : : :: : : : :: ::
12   -"
13   -" .: FILE: plc-il.vim
14   -" .: CREATED: 2011-04-29 22:23
15   -" .: AUTHOR: Andreas Persson (greyscale, grey)
16   -" .: MAIL: <andreas(at)greyscale(dot)se>
17   -" .: VERSION: 1.0
18   -" .: DESCRIPTION: Syntax file for the Instruction List, a assembler like
19   -" programming language for plc's (IEC 61131-3),
20   -"
21   -" __________________________________________________________________________________________
22   -" This file is distributed "as it is", like it? Then use it in whole or parts of it but be
23   -" minded that it comes with absolutely no warranty. But then again you got it for free..
24   -" __________________________________________________________________________________________
25   -"
26   -
27   -if exists("b:current_syntax")
28   - finish
29   -endif
30   -
31   -" Keywords
32   -syn keyword LD LDN LDI LD+ LD- LD>
1  _vimrc
@@ -169,6 +169,7 @@ let g:tex_flavor = "latex"
169 169 "hi link localWhitespaceError Error
170 170 "au Syntax * syn match localWhitespaceError /\(\zs\%#\|\s\)\+$/ display
171 171 "au Syntax * syn match localWhitespaceError / \+\ze\t/ display
  172 +au BufRead,BufNewFile *.ci setfiletype cicode
172 173
173 174 " Change indentation from spaces to tabs or the other way around
174 175 ":command! -range=% -nargs=0 Tab2Space execute "<line1>,<line2>s/^\\t\\+/\\=substitute(submatch(0), '\\t', repeat(' ', ".&ts."), 'g')"

0 comments on commit 43c13be

Please sign in to comment.
Something went wrong with that request. Please try again.