summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--base/bashrc13
-rw-r--r--base/conkyrc21
-rw-r--r--base/muttrc2
-rw-r--r--base/offlineimap/.nolink (renamed from host-overrides/jesterpm.net/offlineimap/.nolink)0
-rw-r--r--base/offlineimap/helper.py26
-rw-r--r--base/offlineimaprc (renamed from host-overrides/jesterpm.net/offlineimaprc)10
-rw-r--r--base/vim/ftdetect/markdown.vim6
-rw-r--r--base/vim/ftplugin/markdown.vim21
-rw-r--r--base/vim/syntax/markdown.vim130
-rw-r--r--base/weatherrc6
-rw-r--r--host-overrides/jesterpm.net/offlineimap/helper.py45
11 files changed, 230 insertions, 50 deletions
diff --git a/base/bashrc b/base/bashrc
index 204fcf0..b7f87f1 100644
--- a/base/bashrc
+++ b/base/bashrc
@@ -103,12 +103,25 @@ if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
fi
# Personal Settings
+export TERMINAL=gnome-terminal
export EDITOR=vim
+export MAILDIR=$HOME/.maildir/INBOX
if [ -f ~/.shell_pathes ]; then
source ~/.shell_pathes
fi
+# GPG
+if [ -f "${HOME}/.gpg-agent-info" ]; then
+ . "${HOME}/.gpg-agent-info"
+ export GPG_AGENT_INFO
+ export SSH_AUTH_SOCK
+fi
+
+GPG_TTY=$(tty)
+export GPG_TTY
+
+
# Host Specific Settings
if [ -f ~/.host-specific/bashrc ]; then
source ~/.host-specific/bashrc
diff --git a/base/conkyrc b/base/conkyrc
new file mode 100644
index 0000000..f085e8c
--- /dev/null
+++ b/base/conkyrc
@@ -0,0 +1,21 @@
+out_to_x no
+own_window no
+out_to_console yes
+background no
+max_text_width 0
+use_spacer left
+
+update_interval 1.0
+cpu_avg_samples 2
+net_avg_samples 2
+
+TEXT
+${if_xmms2_connected}${xmms2_title} - ${xmms2_artist} | ${endif}\
+✉ ${new_mails $HOME/.maildir/INBOX/}/${mails $HOME/.maildir/INBOX} | \
+/home ${fs_free /home} | \
+RAM ${memperc}% | \
+BATT ${battery BAT0} | \
+${execi 300 weatherbar.sh} | \
+${loadavg 1} | \
+♪ ${exec pactl list sinks | awk '/Volume: 0:/ {print substr($3, 1, index($3, "%") - 1)}'}% | \
+${time %a %d %b %Y} ${time %H:%M:%S}
diff --git a/base/muttrc b/base/muttrc
index caebefa..b4cb08f 100644
--- a/base/muttrc
+++ b/base/muttrc
@@ -12,6 +12,8 @@ set delete=yes
unset confirmappend
set sort=threads
set pager_stop=yes
+set mark_old = no
+unset markers
# Headers
ignore *
diff --git a/host-overrides/jesterpm.net/offlineimap/.nolink b/base/offlineimap/.nolink
index e69de29..e69de29 100644
--- a/host-overrides/jesterpm.net/offlineimap/.nolink
+++ b/base/offlineimap/.nolink
diff --git a/base/offlineimap/helper.py b/base/offlineimap/helper.py
new file mode 100644
index 0000000..9cb94d8
--- /dev/null
+++ b/base/offlineimap/helper.py
@@ -0,0 +1,26 @@
+#!/usr/bin/python
+
+import os, subprocess,sys
+
+
+def mailpasswd(file):
+ path = os.getenv("HOME") + "/.offlineimap/" + file + ".gpg"
+ args = ["gpg", "--use-agent", "--quiet", "--batch", "-d", path]
+ try:
+ return subprocess.check_output(args).strip()
+ except subprocess.CalledProcessError:
+ return ""
+
+def prime_gpg_agent():
+ ret = False
+ i = 1
+ while not ret:
+ ret = (mailpasswd("prime") == "prime")
+ if i > 2:
+ from offlineimap.ui import getglobalui
+ sys.stderr.write("Error reading in passwords. Terminating.\n")
+ getglobalui().terminate()
+ i += 1
+ return ret
+
+prime_gpg_agent()
diff --git a/host-overrides/jesterpm.net/offlineimaprc b/base/offlineimaprc
index a5cc3d8..ce7106e 100644
--- a/host-overrides/jesterpm.net/offlineimaprc
+++ b/base/offlineimaprc
@@ -5,7 +5,7 @@ pythonfile = ~/.offlineimap/helper.py
[Account Jesterpm.net]
localrepository = Local
remoterepository = Remote
-autorefresh = 5
+#autorefresh = 5
status_backend = sqlite
[Repository Local]
@@ -15,10 +15,10 @@ localfolders = ~/.maildir
[Repository Remote]
type = IMAP
remotehost = californium.jesterpm.net
-remoteusereval = get_username("californium.jesterpm.net")
-remotepasseval = get_password("californium.jesterpm.net")
+remoteusereval = "jesse"
+remotepasseval = mailpasswd("password")
folderfilter = lambda folder: folder not in ['sent', 'search']
ssl = yes
maxconnections = 2
-holdconnectionopen = true
-idlefolders = ['INBOX', 'dc206']
+#holdconnectionopen = false
+#idlefolders = ['INBOX', 'dc206']
diff --git a/base/vim/ftdetect/markdown.vim b/base/vim/ftdetect/markdown.vim
new file mode 100644
index 0000000..1c5a36a
--- /dev/null
+++ b/base/vim/ftdetect/markdown.vim
@@ -0,0 +1,6 @@
+autocmd BufNewFile,BufRead *.markdown,*.md,*.mdown,*.mkd,*.mkdn
+ \ if &ft =~# '^\%(conf\|modula2\)$' |
+ \ set ft=markdown |
+ \ else |
+ \ setf markdown |
+ \ endif
diff --git a/base/vim/ftplugin/markdown.vim b/base/vim/ftplugin/markdown.vim
new file mode 100644
index 0000000..022da06
--- /dev/null
+++ b/base/vim/ftplugin/markdown.vim
@@ -0,0 +1,21 @@
+" Vim filetype plugin
+" Language: Markdown
+" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
+
+if exists("b:did_ftplugin")
+ finish
+endif
+
+runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim
+
+setlocal comments=fb:*,fb:-,fb:+,n:> commentstring=>\ %s
+setlocal formatoptions+=tcqln formatoptions-=r formatoptions-=o
+setlocal formatlistpat=^\\s*\\d\\+\\.\\s\\+\\\|^[-*+]\\s\\+
+
+if exists('b:undo_ftplugin')
+ let b:undo_ftplugin .= "|setl cms< com< fo< flp<"
+else
+ let b:undo_ftplugin = "setl cms< com< fo< flp<"
+endif
+
+" vim:set sw=2:
diff --git a/base/vim/syntax/markdown.vim b/base/vim/syntax/markdown.vim
new file mode 100644
index 0000000..5700d4b
--- /dev/null
+++ b/base/vim/syntax/markdown.vim
@@ -0,0 +1,130 @@
+" Vim syntax file
+" Language: Markdown
+" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
+" Filenames: *.markdown
+
+if exists("b:current_syntax")
+ finish
+endif
+
+if !exists('main_syntax')
+ let main_syntax = 'markdown'
+endif
+
+runtime! syntax/html.vim
+unlet! b:current_syntax
+
+if !exists('g:markdown_fenced_languages')
+ let g:markdown_fenced_languages = []
+endif
+for s:type in map(copy(g:markdown_fenced_languages),'matchstr(v:val,"[^=]*$")')
+ if s:type =~ '\.'
+ let b:{matchstr(s:type,'[^.]*')}_subtype = matchstr(s:type,'\.\zs.*')
+ endif
+ exe 'syn include @markdownHighlight'.substitute(s:type,'\.','','g').' syntax/'.matchstr(s:type,'[^.]*').'.vim'
+ unlet! b:current_syntax
+endfor
+unlet! s:type
+
+syn sync minlines=10
+syn case ignore
+
+syn match markdownValid '[<>]\c[a-z/$!]\@!'
+syn match markdownValid '&\%(#\=\w*;\)\@!'
+
+syn match markdownLineStart "^[<@]\@!" nextgroup=@markdownBlock
+
+syn cluster markdownBlock contains=markdownH1,markdownH2,markdownH3,markdownH4,markdownH5,markdownH6,markdownBlockquote,markdownListMarker,markdownOrderedListMarker,markdownCodeBlock,markdownRule
+syn cluster markdownInline contains=markdownLineBreak,markdownLinkText,markdownItalic,markdownBold,markdownCode,markdownEscape,@htmlTop,markdownError
+
+syn match markdownH1 "^.\+\n=\+$" contained contains=@markdownInline,markdownHeadingRule
+syn match markdownH2 "^.\+\n-\+$" contained contains=@markdownInline,markdownHeadingRule
+
+syn match markdownHeadingRule "^[=-]\+$" contained
+
+syn region markdownH1 matchgroup=markdownHeadingDelimiter start="##\@!" end="#*\s*$" keepend oneline contains=@markdownInline contained
+syn region markdownH2 matchgroup=markdownHeadingDelimiter start="###\@!" end="#*\s*$" keepend oneline contains=@markdownInline contained
+syn region markdownH3 matchgroup=markdownHeadingDelimiter start="####\@!" end="#*\s*$" keepend oneline contains=@markdownInline contained
+syn region markdownH4 matchgroup=markdownHeadingDelimiter start="#####\@!" end="#*\s*$" keepend oneline contains=@markdownInline contained
+syn region markdownH5 matchgroup=markdownHeadingDelimiter start="######\@!" end="#*\s*$" keepend oneline contains=@markdownInline contained
+syn region markdownH6 matchgroup=markdownHeadingDelimiter start="#######\@!" end="#*\s*$" keepend oneline contains=@markdownInline contained
+
+syn match markdownBlockquote ">\s" contained nextgroup=@markdownBlock
+
+syn region markdownCodeBlock start=" \|\t" end="$" contained
+
+" TODO: real nesting
+syn match markdownListMarker "\%(\t\| \{0,4\}\)[-*+]\%(\s\+\S\)\@=" contained
+syn match markdownOrderedListMarker "\%(\t\| \{0,4}\)\<\d\+\.\%(\s*\S\)\@=" contained
+
+syn match markdownRule "\* *\* *\*[ *]*$" contained
+syn match markdownRule "- *- *-[ -]*$" contained
+
+syn match markdownLineBreak " \{2,\}$"
+
+syn region markdownIdDeclaration matchgroup=markdownLinkDelimiter start="^ \{0,3\}!\=\[" end="\]:" oneline keepend nextgroup=markdownUrl skipwhite
+syn match markdownUrl "\S\+" nextgroup=markdownUrlTitle skipwhite contained
+syn region markdownUrl matchgroup=markdownUrlDelimiter start="<" end=">" oneline keepend nextgroup=markdownUrlTitle skipwhite contained
+syn region markdownUrlTitle matchgroup=markdownUrlTitleDelimiter start=+"+ end=+"+ keepend contained
+syn region markdownUrlTitle matchgroup=markdownUrlTitleDelimiter start=+'+ end=+'+ keepend contained
+syn region markdownUrlTitle matchgroup=markdownUrlTitleDelimiter start=+(+ end=+)+ keepend contained
+
+syn region markdownLinkText matchgroup=markdownLinkTextDelimiter start="!\=\[\%(\_[^]]*]\%( \=[[(]\)\)\@=" end="\]\%( \=[[(]\)\@=" keepend nextgroup=markdownLink,markdownId skipwhite contains=@markdownInline,markdownLineStart
+syn region markdownLink matchgroup=markdownLinkDelimiter start="(" end=")" contains=markdownUrl keepend contained
+syn region markdownId matchgroup=markdownIdDelimiter start="\[" end="\]" keepend contained
+syn region markdownAutomaticLink matchgroup=markdownUrlDelimiter start="<\%(\w\+:\|[[:alnum:]_+-]\+@\)\@=" end=">" keepend oneline
+
+syn region markdownItalic start="\S\@<=\*\|\*\S\@=" end="\S\@<=\*\|\*\S\@=" keepend contains=markdownLineStart
+syn region markdownItalic start="\S\@<=_\|_\S\@=" end="\S\@<=_\|_\S\@=" keepend contains=markdownLineStart
+syn region markdownBold start="\S\@<=\*\*\|\*\*\S\@=" end="\S\@<=\*\*\|\*\*\S\@=" keepend contains=markdownLineStart
+syn region markdownBold start="\S\@<=__\|__\S\@=" end="\S\@<=__\|__\S\@=" keepend contains=markdownLineStart
+syn region markdownBoldItalic start="\S\@<=\*\*\*\|\*\*\*\S\@=" end="\S\@<=\*\*\*\|\*\*\*\S\@=" keepend contains=markdownLineStart
+syn region markdownBoldItalic start="\S\@<=___\|___\S\@=" end="\S\@<=___\|___\S\@=" keepend contains=markdownLineStart
+syn region markdownCode matchgroup=markdownCodeDelimiter start="`" end="`" keepend contains=markdownLineStart
+syn region markdownCode matchgroup=markdownCodeDelimiter start="`` \=" end=" \=``" keepend contains=markdownLineStart
+syn region markdownCode matchgroup=markdownCodeDelimiter start="^\s*\zs```.*$" end="^```\ze\s*$" keepend
+
+if main_syntax ==# 'markdown'
+ for s:type in g:markdown_fenced_languages
+ exe 'syn region markdownHighlight'.substitute(matchstr(s:type,'[^=]*$'),'\..*','','').' matchgroup=markdownCodeDelimiter start="^\s*\zs```'.matchstr(s:type,'[^=]*').'\>.*$" end="^```\ze\s*$" keepend contains=@markdownHighlight'.substitute(matchstr(s:type,'[^=]*$'),'\.','','g')
+ endfor
+ unlet! s:type
+endif
+
+syn match markdownEscape "\\[][\\`*_{}()#+.!-]"
+syn match markdownError "\w\@<=_\w\@="
+
+hi def link markdownH1 htmlH1
+hi def link markdownH2 htmlH2
+hi def link markdownH3 htmlH3
+hi def link markdownH4 htmlH4
+hi def link markdownH5 htmlH5
+hi def link markdownH6 htmlH6
+hi def link markdownHeadingRule markdownRule
+hi def link markdownHeadingDelimiter Delimiter
+hi def link markdownOrderedListMarker markdownListMarker
+hi def link markdownListMarker htmlTagName
+hi def link markdownBlockquote Comment
+hi def link markdownRule PreProc
+
+hi def link markdownLinkText htmlLink
+hi def link markdownIdDeclaration Typedef
+hi def link markdownId Type
+hi def link markdownAutomaticLink markdownUrl
+hi def link markdownUrl Float
+hi def link markdownUrlTitle String
+hi def link markdownIdDelimiter markdownLinkDelimiter
+hi def link markdownUrlDelimiter htmlTag
+hi def link markdownUrlTitleDelimiter Delimiter
+
+hi def link markdownItalic htmlItalic
+hi def link markdownBold htmlBold
+hi def link markdownBoldItalic htmlBoldItalic
+hi def link markdownCodeDelimiter Delimiter
+
+hi def link markdownEscape Special
+hi def link markdownError Error
+
+let b:current_syntax = "markdown"
+
+" vim:set sw=2:
diff --git a/base/weatherrc b/base/weatherrc
new file mode 100644
index 0000000..d14c702
--- /dev/null
+++ b/base/weatherrc
@@ -0,0 +1,6 @@
+[default]
+alert = False
+city = Seattle
+id = KSEA
+metric = True
+zones = WAZ508,WAZ505,WAZ509
diff --git a/host-overrides/jesterpm.net/offlineimap/helper.py b/host-overrides/jesterpm.net/offlineimap/helper.py
deleted file mode 100644
index 4ec587a..0000000
--- a/host-overrides/jesterpm.net/offlineimap/helper.py
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/usr/bin/python
-
-import re
-import sys
-import gtk
-import gnomekeyring as gkey
-
-class Keyring(object):
- def __init__(self, name, server, protocol):
- self._name = name
- self._server = server
- self._protocol = protocol
- self._keyring = gkey.get_default_keyring_sync()
-
- def has_credentials(self):
- try:
- attrs = {"server": self._server, "protocol": self._protocol}
- items = gkey.find_items_sync(gkey.ITEM_NETWORK_PASSWORD, attrs)
- return len(items) > 0
- except gkey.DeniedError:
- return False
-
- def get_credentials(self):
- attrs = {"server": self._server, "protocol": self._protocol}
- items = gkey.find_items_sync(gkey.ITEM_NETWORK_PASSWORD, attrs)
- return (items[0].attributes["user"], items[0].secret)
-
- def set_credentials(self, (user, pw)):
- attrs = {
- "user": user,
- "server": self._server,
- "protocol": self._protocol,
- }
- gkey.item_create_sync(gkey.get_default_keyring_sync(),
- gkey.ITEM_NETWORK_PASSWORD, self._name, attrs, pw, True)
-
-def get_username(server):
- keyring = Keyring("offlineimap", server, "imap")
- (username, password) = keyring.get_credentials()
- return username
-
-def get_password(server):
- keyring = Keyring("offlineimap", server, "imap")
- (username, password) = keyring.get_credentials()
- return password