Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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