--- /dev/null
+add mod3 = Scroll_Lock
--- /dev/null
+! generic settings
+*font: xft:Dina:size=8
+
+! Solarized colors, http://ethanschoonover.com/solarized
+!#define S_base03 #002b36
+#define S_base03 #000a0d
+#define S_base02 #073642
+#define S_base01 #586e75
+#define S_base00 #657b83
+#define S_base0 #839496
+#define S_base1 #93a1a1
+#define S_base2 #eee8d5
+#define S_base3 #fdf6e3
+*background: S_base03
+*foreground: S_base0
+*fadeColor: S_base03
+*cursorColor: S_base1
+*pointerColorBackground: S_base01
+*pointerColorForeground: S_base1
+
+#define S_yellow #b58900
+#define S_orange #cb4b16
+#define S_red #dc322f
+#define S_magenta #d33682
+#define S_violet #6c71c4
+#define S_blue #268bd2
+#define S_cyan #2aa198
+!#define S_green #859900
+#define S_green #85c000
+! black dark/light
+*color0: S_base02
+*color8: S_base03
+! red dark/light
+*color1: S_red
+*color9: S_orange
+! green dark/light
+*color2: S_green
+*color10: S_base01
+! yellow dark/light
+*color3: S_yellow
+*color11: S_base00
+! blue dark/light
+*color4: S_blue
+*color12: S_base0
+! magenta dark/light
+*color5: S_magenta
+*color13: S_violet
+! cyan dark/light
+*color6: S_cyan
+*color14: S_base1
+! white dark/light
+*color7: S_base2
+*color15: S_base3
+
+
+! urxvt
+urxvt.termName: rxvt-256color
+urxvt.perl-ext:
+urxvt.perl-ext-common:
+
+urxvt.cursorBlink: on
+urxvt.cursorUnderline: on
+urxvt.scrollstyle: plain
+urxvt.scrollBar_right: true
+urxvt.urgentOnBell: true
+
+urxvt*depth: 32
+urxvt.background: rgba:0000/0e00/1200/ee00
+urxvt.dynamicColors: true
+urxvt.intensityStyles: false
+
+xvkbd.Alt_R.width: 1
+xvkbd.Meta_R.width: 1
+xvkbd.Multi_key.width: 1
+xvkbd.Shift_R.width: 75
--- /dev/null
+use_colors = ON
+use_shadow = ON
+screen_color = (BLUE,BLACK,ON)
+dialog_color = (WHITE,BLACK,OFF)
+shadow_color = (BLACK,BLACK,OFF)
+title_color = screen_color
+border_color = (WHITE,BLACK,ON)
+button_inactive_color = border_color
+button_key_inactive_color = (BLUE,BLACK,ON)
+button_label_inactive_color = button_inactive_color
+button_active_color = (WHITE,BLUE,ON)
+button_key_active_color = button_key_inactive_color
+button_label_active_color = (WHITE,BLUE,ON)
+inputbox_color = dialog_color
+inputbox_border_color = dialog_color
+searchbox_color = dialog_color
+searchbox_title_color = title_color
+searchbox_border_color = border_color
+position_indicator_color = title_color
+menubox_color = dialog_color
+menubox_border_color = border_color
+item_color = dialog_color
+item_selected_color = button_active_color
+tag_color = title_color
+tag_selected_color = button_label_active_color
+tag_key_color = button_key_inactive_color
+tag_key_selected_color = (BLACK,BLUE,ON)
+check_color = dialog_color
+check_selected_color = button_active_color
+uarrow_color = (GREEN,BLACK,ON)
+darrow_color = uarrow_color
+itemhelp_color = (WHITE,BLACK,OFF)
+form_active_text_color = button_active_color
+form_text_color = border_color
+form_item_readonly_color = (BLACK,WHITE,ON)
+gauge_color = title_color
+border2_color = dialog_color
+inputbox_border2_color = dialog_color
+searchbox_border2_color = dialog_color
+menubox_border2_color = dialog_color
--- /dev/null
+# $FreeBSD: releng/11.0/share/skel/dot.login_conf 77995 2001-06-10 17:08:53Z ache $
+#
+# see login.conf(5)
+#
+me:\
+ :charset=UTF-8:\
+ :lang=en_US.UTF-8:\
+ :setenv=LC_ALL=en_US.UTF-8:
--- /dev/null
+def clear():
+ import os
+ os.system('clear')
--- /dev/null
+" File: todo.txt.vim
+" Description: Todo.txt filetype detection
+" Author: Leandro Freitas <freitass@gmail.com>
+" License: Vim license
+" Website: http://github.com/freitass/todo.txt-vim
+" Version: 0.4
+
+" Export Context Dictionary for unit testing {{{1
+function! s:get_SID()
+ return matchstr(expand('<sfile>'), '<SNR>\d\+_')
+endfunction
+let s:SID = s:get_SID()
+delfunction s:get_SID
+
+function! todo#txt#__context__()
+ return { 'sid': s:SID, 'scope': s: }
+endfunction
+
+" Functions {{{1
+function! s:remove_priority()
+ :s/^(\w)\s\+//ge
+endfunction
+
+function! s:get_current_date()
+ return strftime('%Y-%m-%d')
+endfunction
+
+function! todo#txt#prepend_date()
+ execute 'normal! I' . s:get_current_date() . ' '
+endfunction
+
+function! todo#txt#replace_date()
+ let current_line = getline('.')
+ if (current_line =~ '^\(([a-zA-Z]) \)\?\d\{2,4\}-\d\{2\}-\d\{2\} ') &&
+ \ exists('g:todo_existing_date') && g:todo_existing_date == 'n'
+ return
+ endif
+ execute 's/^\(([a-zA-Z]) \)\?\(\d\{2,4\}-\d\{2\}-\d\{2\} \)\?/\1' . s:get_current_date() . ' /'
+endfunction
+
+function! todo#txt#mark_as_done()
+ call s:remove_priority()
+ call todo#txt#prepend_date()
+ execute 'normal! Ix '
+endfunction
+
+function! todo#txt#mark_all_as_done()
+ :g!/^x /:call todo#txt#mark_as_done()
+endfunction
+
+function! s:append_to_file(file, lines)
+ let l:lines = []
+
+ " Place existing tasks in done.txt at the beggining of the list.
+ if filereadable(a:file)
+ call extend(l:lines, readfile(a:file))
+ endif
+
+ " Append new completed tasks to the list.
+ call extend(l:lines, a:lines)
+
+ " Write to file.
+ call writefile(l:lines, a:file)
+endfunction
+
+function! todo#txt#remove_completed()
+ " Check if we can write to done.txt before proceeding.
+
+ let l:target_dir = expand('%:p:h')
+ let l:todo_file = expand('%:p')
+ let l:done_file = substitute(substitute(l:todo_file, 'todo.txt$', 'done.txt', ''), 'Todo.txt$', 'Done.txt', '')
+ if !filewritable(l:done_file) && !filewritable(l:target_dir)
+ echoerr "Can't write to file 'done.txt'"
+ return
+ endif
+
+ let l:completed = []
+ :g/^x /call add(l:completed, getline(line(".")))|d
+ call s:append_to_file(l:done_file, l:completed)
+endfunction
+
+function! todo#txt#sort_by_context() range
+ execute a:firstline . "," . a:lastline . "sort /\\(^\\| \\)\\zs@[^[:blank:]]\\+/ r"
+endfunction
+
+function! todo#txt#sort_by_project() range
+ execute a:firstline . "," . a:lastline . "sort /\\(^\\| \\)\\zs+[^[:blank:]]\\+/ r"
+endfunction
+
+function! todo#txt#sort_by_date() range
+ let l:date_regex = "\\d\\{2,4\\}-\\d\\{2\\}-\\d\\{2\\}"
+ execute a:firstline . "," . a:lastline . "sort /" . l:date_regex . "/ r"
+ execute a:firstline . "," . a:lastline . "g!/" . l:date_regex . "/m" . a:lastline
+endfunction
+
+function! todo#txt#sort_by_due_date() range
+ let l:date_regex = "due:\\d\\{2,4\\}-\\d\\{2\\}-\\d\\{2\\}"
+ execute a:firstline . "," . a:lastline . "sort /" . l:date_regex . "/ r"
+ execute a:firstline . "," . a:lastline . "g!/" . l:date_regex . "/m" . a:lastline
+endfunction
+
+" Increment and Decrement The Priority
+:set nf=octal,hex,alpha
+
+function! todo#txt#prioritize_increase()
+ normal! 0f)h\ 1
+endfunction
+
+function! todo#txt#prioritize_decrease()
+ normal! 0f)h\18
+endfunction
+
+function! todo#txt#prioritize_add(priority)
+ " Need to figure out how to only do this if the first visible letter in a line is not (
+ :call todo#txt#prioritize_add_action(a:priority)
+endfunction
+
+function! todo#txt#prioritize_add_action(priority)
+ execute 's/^\(([a-zA-Z]) \)\?/(' . a:priority . ') /'
+endfunction
+
+" Modeline {{{1
+" vim: ts=8 sw=4 sts=4 et foldenable foldmethod=marker foldcolumn=1
--- /dev/null
+'g:todo_existing_date' todo.txt /*'g:todo_existing_date'*
+'g:todo_load_python' todo.txt /*'g:todo_load_python'*
+todo-commands todo.txt /*todo-commands*
+todo-commands-date todo.txt /*todo-commands-date*
+todo-commands-done todo.txt /*todo-commands-done*
+todo-commands-priority todo.txt /*todo-commands-priority*
+todo-commands-sorting todo.txt /*todo-commands-sorting*
+todo-contents todo.txt /*todo-contents*
+todo-options todo.txt /*todo-options*
+todo.txt todo.txt /*todo.txt*
--- /dev/null
+*todo.txt* Vim plugin for Todo.txt files
+ _____ _ _ _ ~
+ |_ _|__ __| | ___ | |___ _| |_ ~
+ | |/ _ \ / _` |/ _ \| __\ \/ / __|~
+ | | (_) | (_| | (_) | |_ > <| |_ ~
+ |_|\___/ \__,_|\___(_)__/_/\_\\__|~
+
+ Reference Manual~
+
+==============================================================================
+CONTENTS *todo-contents*
+
+ 1. Commands ..................................... |todo-commands|
+ 1.1. Sorting tasks ............................ |todo-commands-sorting|
+ 1.2. Edit priority ............................ |todo-commands-priority|
+ 1.3. Date ..................................... |todo-commands-date|
+ 1.4. Mark as done ............................. |todo-commands-done|
+ 2. Options ...................................... |todo-options|
+
+==============================================================================
+1. Commands *todo-commands*
+
+1.1 Sorting tasks: *todo-commands-sorting*
+ `<localleader>s` Sort the file
+ `<localleader>s+` Sort the file on +Projects
+ `<localleader>s@` Sort the file on @Contexts
+ `<localleader>sd` Sort the file on dates
+ `<localleader>sdd` Sort the file on due dates (i.e. due:2015-10-25)
+
+1.2 Edit priority: *todo-commands-priority*
+ `<localleader>j` Decrease the priority of the current line
+ `<localleader>k` Increase the priority of the current line
+ `<localleader>a` Add the priority (A) to the current line
+ `<localleader>b` Add the priority (B) to the current line
+ `<localleader>c` Add the priority (C) to the current line
+
+1.3 Date: *todo-commands-date*
+ `<localleader>d` Set current task's creation date to the current date
+ `date<tab>` (Insert mode) Insert the current date
+
+1.4 Mark as done: *todo-commands-done*
+ `<localleader>x` Mark current task as done
+ `<localleader>X` Mark all tasks as done
+ `<localleader>D` Move completed tasks to done.txt
+
+See :h <localleader> for more information about the commands' prefix.
+
+==============================================================================
+2. Options *todo-options*
+
+ *'g:todo_existing_date'*
+Specify the behavior of date insertion functions when the task already has a
+date of creation: >
+ let g:todo_existing_date = 'n'
+<
+ r - replace existing date (default)
+ n - do nothing
+
+ *'g:todo_load_python'*
+Specify if the plugin should load the python module. Useful if you use Neovim
+for example or if perhaps you just don't have/want python for vim: >
+ let g:todo_load_python = 1
+<
+ 1 - Load (default)
+ 0 - Don't load
+
+===============================================================================
+vim:ft=help:et:ts=2:sw=2:sts=2:norl
--- /dev/null
+" File: todo.txt.vim
+" Description: Todo.txt filetype detection
+" Author: Leandro Freitas <freitass@gmail.com>
+" License: Vim license
+" Website: http://github.com/freitass/todo.txt-vim
+" Version: 0.1
+
+autocmd BufNewFile,BufRead [Tt]odo.txt set filetype=todo
+autocmd BufNewFile,BufRead *.[Tt]odo.txt set filetype=todo
+autocmd BufNewFile,BufRead [Dd]one.txt set filetype=todo
+autocmd BufNewFile,BufRead *.[Dd]one.txt set filetype=todo
+
--- /dev/null
+" File: todo.txt.vim
+" Description: Todo.txt filetype detection
+" Author: Leandro Freitas <freitass@gmail.com>
+" License: Vim license
+" Website: http://github.com/freitass/todo.txt-vim
+" Version: 0.4
+
+" Save context {{{1
+let s:save_cpo = &cpo
+set cpo&vim
+
+" General options {{{1
+" Some options lose their values when window changes. They will be set every
+" time this script is invocated, which is whenever a file of this type is
+" created or edited.
+setlocal textwidth=0
+setlocal wrapmargin=0
+
+" Mappings {{{1
+" Sort tasks {{{2
+nnoremap <script> <silent> <buffer> <localleader>s :%sort<CR>
+vnoremap <script> <silent> <buffer> <localleader>s :sort<CR>
+nnoremap <script> <silent> <buffer> <localleader>s@ :%call todo#txt#sort_by_context()<CR>
+vnoremap <script> <silent> <buffer> <localleader>s@ :call todo#txt#sort_by_context()<CR>
+nnoremap <script> <silent> <buffer> <localleader>s+ :%call todo#txt#sort_by_project()<CR>
+vnoremap <script> <silent> <buffer> <localleader>s+ :call todo#txt#sort_by_project()<CR>
+nnoremap <script> <silent> <buffer> <localleader>sd :%call todo#txt#sort_by_date()<CR>
+vnoremap <script> <silent> <buffer> <localleader>sd :call todo#txt#sort_by_date()<CR>
+nnoremap <script> <silent> <buffer> <localleader>sdd :%call todo#txt#sort_by_due_date()<CR>
+vnoremap <script> <silent> <buffer> <localleader>sdd :call todo#txt#sort_by_due_date()<CR>
+
+" Change priority {{{2
+nnoremap <script> <silent> <buffer> <localleader>j :call todo#txt#prioritize_increase()<CR>
+vnoremap <script> <silent> <buffer> <localleader>j :call todo#txt#prioritize_increase()<CR>
+nnoremap <script> <silent> <buffer> <localleader>k :call todo#txt#prioritize_decrease()<CR>
+vnoremap <script> <silent> <buffer> <localleader>k :call todo#txt#prioritize_decrease()<CR>
+nnoremap <script> <silent> <buffer> <localleader>a :call todo#txt#prioritize_add('A')<CR>
+vnoremap <script> <silent> <buffer> <localleader>a :call todo#txt#prioritize_add('A')<CR>
+nnoremap <script> <silent> <buffer> <localleader>b :call todo#txt#prioritize_add('B')<CR>
+vnoremap <script> <silent> <buffer> <localleader>b :call todo#txt#prioritize_add('B')<CR>
+nnoremap <script> <silent> <buffer> <localleader>c :call todo#txt#prioritize_add('C')<CR>
+vnoremap <script> <silent> <buffer> <localleader>c :call todo#txt#prioritize_add('C')<CR>
+
+" Insert date {{{2
+inoremap <script> <silent> <buffer> date<Tab> <C-R>=strftime("%Y-%m-%d")<CR>
+nnoremap <script> <silent> <buffer> <localleader>d :call todo#txt#replace_date()<CR>
+vnoremap <script> <silent> <buffer> <localleader>d :call todo#txt#replace_date()<CR>
+
+" Mark done {{{2
+nnoremap <script> <silent> <buffer> <localleader>x :call todo#txt#mark_as_done()<CR>
+vnoremap <script> <silent> <buffer> <localleader>x :call todo#txt#mark_as_done()<CR>
+
+" Mark all done {{{2
+nnoremap <script> <silent> <buffer> <localleader>X :call todo#txt#mark_all_as_done()<CR>
+
+" Remove completed {{{2
+nnoremap <script> <silent> <buffer> <localleader>D :call todo#txt#remove_completed()<CR>
+
+" Folding {{{1
+" Options {{{2
+setlocal foldmethod=expr
+setlocal foldexpr=s:todo_fold_level(v:lnum)
+setlocal foldtext=s:todo_fold_text()
+
+" s:todo_fold_level(lnum) {{{2
+function! s:todo_fold_level(lnum)
+ " The match function returns the index of the matching pattern or -1 if
+ " the pattern doesn't match. In this case, we always try to match a
+ " completed task from the beginning of the line so that the matching
+ " function will always return -1 if the pattern doesn't match or 0 if the
+ " pattern matches. Incrementing by one the value returned by the matching
+ " function we will return 1 for the completed tasks (they will be at the
+ " first folding level) while for the other lines 0 will be returned,
+ " indicating that they do not fold.
+ return match(getline(a:lnum),'^[xX]\s.\+$') + 1
+endfunction
+
+" s:todo_fold_text() {{{2
+function! s:todo_fold_text()
+ " The text displayed at the fold is formatted as '+- N Completed tasks'
+ " where N is the number of lines folded.
+ return '+' . v:folddashes . ' '
+ \ . (v:foldend - v:foldstart + 1)
+ \ . ' Completed tasks '
+endfunction
+
+" Restore context {{{1
+let &cpo = s:save_cpo
+" Modeline {{{1
+" vim: ts=8 sw=4 sts=4 et foldenable foldmethod=marker foldcolumn=1
--- /dev/null
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+# File: __init__.py
+# Author: Guilherme Victal <guilherme at victal.eti.br>
+# Description: Dateregex library entry point
+# License: Vim license
+# Website: http://github.com/freitass/todo.txt-vim
+# Version: 0.1
+
+from dateregex.after import regex_date_after
+from dateregex.before import regex_date_before
--- /dev/null
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+# File: after.py
+# Author: Guilherme Victal <guilherme at victal.eti.br>
+# Description: Generates regexes after a certain date
+# License: Vim license
+# Website: http://github.com/freitass/todo.txt-vim
+# Version: 0.1
+
+from datetime import date, timedelta, MAXYEAR
+
+
+def _year_regex_after(year):
+ if int(year) > MAXYEAR:
+ return None
+
+ year_regex = r'(\d+\d{%s}' % len(year)
+ for idx, digit in enumerate(year):
+ if digit != '9':
+ regex = '|' + year[0:idx]
+ regex += '9' if digit == '8' else '[%s-9]' % str(int(digit) + 1)
+ if idx < len(year) - 1:
+ regex += '\d{%s}' % (len(year) - (idx + 1))
+ year_regex += regex
+
+ year_regex += ')'
+ return '-'.join((year_regex, r'\d{2}', r'\d{2}'))
+
+
+def _month_regex_after(year, month):
+ if month == '12':
+ return None
+
+ digit1, digit2 = month
+ if digit1 == '1':
+ month_regex = r'12' if month == '11' else r'1[12]'
+ else:
+ month_regex = r'1[0-2]'
+ if digit2 != '9':
+ if digit2 == '8':
+ month_regex = r'(' + month_regex + r'|09)'
+ else:
+ month_regex = r'(' + month_regex + r'|0[%s-9])'
+ month_regex = month_regex % str(int(digit2) + 1)
+ return '-'.join((year, month_regex, r'\d{2}'))
+
+def _day_regex_after(year, month, day):
+ last_month_day = str((date(int(year), (int(month) + 1) % 12, 1) + - date.resolution).day)
+ if day == last_month_day:
+ return None
+ day_regex = r'('
+ digit1, digit2 = day
+ last_digit1, last_digit2 = last_month_day
+ if digit1 == last_digit1:
+ day_regex = last_month_day if int(digit2) == int(last_digit2) - 1 else last_digit1 + r'[%s-%s]' % (str(int(digit2) + 1), last_digit2)
+ else:
+ day_regex = r'('
+ day_regex += last_digit1 if int(digit1) == int(last_digit1) - 1 else r'[%s-%s]' % (str(int(digit1) + 1), last_digit1)
+ day_regex +=r'\d'
+ if digit2 < '9':
+ day_regex += '|' + digit1
+ day_regex += '9' if digit2 == '8' else r'[%s-9]' % str(int(digit2) + 1)
+
+ day_regex += ')'
+ return '-'.join((year, month, day_regex))
+
+
+def regex_date_after(given_date):
+ year, month, day = given_date.isoformat().split('-')
+
+ year_regex = _year_regex_after(year)
+ month_regex = _month_regex_after(year, month)
+ day_regex = _day_regex_after(year, month, day)
+
+ date_regex = '(' + year_regex if year_regex else '('
+ date_regex += ('|' + month_regex) if month_regex else ''
+ date_regex += ('|' + day_regex) if day_regex else ''
+ date_regex += ')'
+ return date_regex
+
+
+def __main():
+ import re
+ date_regex = regex_date_after(date(1999,12,31))
+ print(date_regex)
+ pattern = re.compile(date_regex)
+
+
+ d = date.today() + date.resolution
+ assert pattern.match(date.strftime(d, '%Y-%m-%d')) is not None
+ print(date.strftime(d, '%Y-%m-%d') + ' is okay')
+ d += date.resolution
+
+if __name__ == '__main__':
+ __main()
--- /dev/null
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+# File: before.py
+# Author: Guilherme Victal <guilherme at victal.eti.br>
+# Description: Generates regexes before a certain date
+# License: Vim license
+# Website: http://github.com/freitass/todo.txt-vim
+# Version: 0.1
+
+from datetime import date, timedelta, MINYEAR
+
+def _year_regex_before(year):
+ if int(year) <= MINYEAR:
+ return None
+ year_regex = r'('
+ year_regex += r'\d{1,%s}' % str(len(year) - 1) if len(year) > 1 else ''
+ for idx, digit in enumerate(year):
+ if digit != '0':
+ regex = '|' + year[0:idx]
+ regex += '0' if digit == '1' else '[0-%s]' % str(int(digit) - 1)
+ if idx < len(year) - 1:
+ regex += '\d{%s}' % (len(year) - (idx + 1))
+ year_regex += regex
+
+ year_regex += ')'
+ return '-'.join((year_regex, r'\d{2}', r'\d{2}'))
+
+def _month_regex_before(year, month):
+ if month == '01':
+ return None
+
+ digit1, digit2 = month
+ if digit1 == '0':
+ month_regex = '01' if month == '02' else r'0[1-%s]' % str(int(digit2) - 1)
+ elif month == '10':
+ month_regex = r'0\d'
+ elif month == '11':
+ month_regex = r'(0\d|10)'
+ else:
+ month_regex = r'(0\d|1[01])'
+
+ return '-'.join((year, month_regex, r'\d{2}'))
+
+def _day_regex_before(year, month, day):
+ if day == '01':
+ return None
+ last_month_day = str((date(int(year), int(month) % 12 + 1, 1) + - date.resolution).day)
+ last_digit1, last_digit2 = last_month_day
+
+ digit1, digit2 = day
+ if digit1 == '0':
+ day_regex = '01' if day == '02' else r'0[1-%s]' % str(int(digit2) - 1)
+ else:
+ day_regex = r'('
+ day_regex += '0' if digit1 == '1' else r'[0-%s]' % str(int(digit1) - 1)
+ day_regex += r'\d'
+ if digit2 != '0':
+ day_regex += '|'
+ day_regex += digit1
+ day_regex += '0' if digit2 == '1' else r'[0-%s]' % str(int(digit2) - 1)
+ day_regex += ')'
+
+ return '-'.join((year, month, day_regex))
+
+
+
+
+def regex_date_before(given_date):
+ year, month, day = given_date.isoformat().split('-')
+
+ year_regex = _year_regex_before(year)
+ month_regex = _month_regex_before(year, month)
+ day_regex = _day_regex_before(year, month, day)
+
+ date_regex = '(' + year_regex if year_regex else '('
+ date_regex += ('|' + month_regex) if month_regex else ''
+ date_regex += ('|' + day_regex) if day_regex else ''
+ date_regex += ')'
+ return date_regex
--- /dev/null
+#!/usr/bin/env python2
+# -*- coding: utf-8 -*-
+# File: todo.py
+# Description: Todo.txt overdue date syntax script
+# License: Vim license
+# Website: http://github.com/freitass/todo.txt-vim
+# Version: 0.1
+
+import vim
+import os
+import sys
+from datetime import date
+
+dateregex_dir = os.path.join(vim.eval('s:script_dir'), 'dateregex')
+if os.path.isdir(dateregex_dir):
+ sys.path.insert(0, dateregex_dir)
+
+def add_due_date_syntax_highlight():
+ try:
+ from dateregex import regex_date_before
+ except ImportError:
+ print("dateregex module not found. Overdue dates won't be highlighted")
+ return
+
+ regex = regex_date_before(date.today())
+ regex = r'(^|<)due:%s(>|$)' % regex
+
+ vim.command("syntax match OverDueDate '\\v%s'" % regex)
+ vim.command("highlight default link OverDueDate Error")
+
+add_due_date_syntax_highlight()
--- /dev/null
+" File: todo.txt.vim
+" Description: Todo.txt syntax settings
+" Author: Leandro Freitas <freitass@gmail.com>
+" License: Vim license
+" Website: http://github.com/freitass/todo.txt-vim
+" Version: 0.3
+
+if exists("b:current_syntax")
+ finish
+endif
+
+syntax match TodoDone '^[xX]\s.\+$'
+syntax match TodoPriorityA '^([aA])\s.\+$' contains=TodoDate,TodoProject,TodoContext,OverDueDate
+syntax match TodoPriorityB '^([bB])\s.\+$' contains=TodoDate,TodoProject,TodoContext,OverDueDate
+syntax match TodoPriorityC '^([cC])\s.\+$' contains=TodoDate,TodoProject,TodoContext,OverDueDate
+syntax match TodoPriorityD '^([dD])\s.\+$' contains=TodoDate,TodoProject,TodoContext,OverDueDate
+syntax match TodoPriorityE '^([eE])\s.\+$' contains=TodoDate,TodoProject,TodoContext,OverDueDate
+syntax match TodoPriorityF '^([fF])\s.\+$' contains=TodoDate,TodoProject,TodoContext,OverDueDate
+syntax match TodoPriorityG '^([gG])\s.\+$' contains=TodoDate,TodoProject,TodoContext,OverDueDate
+syntax match TodoPriorityH '^([hH])\s.\+$' contains=TodoDate,TodoProject,TodoContext,OverDueDate
+syntax match TodoPriorityI '^([iI])\s.\+$' contains=TodoDate,TodoProject,TodoContext,OverDueDate
+syntax match TodoPriorityJ '^([jJ])\s.\+$' contains=TodoDate,TodoProject,TodoContext,OverDueDate
+syntax match TodoPriorityK '^([kK])\s.\+$' contains=TodoDate,TodoProject,TodoContext,OverDueDate
+syntax match TodoPriorityL '^([lL])\s.\+$' contains=TodoDate,TodoProject,TodoContext,OverDueDate
+syntax match TodoPriorityM '^([mM])\s.\+$' contains=TodoDate,TodoProject,TodoContext,OverDueDate
+syntax match TodoPriorityN '^([nN])\s.\+$' contains=TodoDate,TodoProject,TodoContext,OverDueDate
+syntax match TodoPriorityO '^([oO])\s.\+$' contains=TodoDate,TodoProject,TodoContext,OverDueDate
+syntax match TodoPriorityP '^([pP])\s.\+$' contains=TodoDate,TodoProject,TodoContext,OverDueDate
+syntax match TodoPriorityQ '^([qQ])\s.\+$' contains=TodoDate,TodoProject,TodoContext,OverDueDate
+syntax match TodoPriorityR '^([rR])\s.\+$' contains=TodoDate,TodoProject,TodoContext,OverDueDate
+syntax match TodoPriorityS '^([sS])\s.\+$' contains=TodoDate,TodoProject,TodoContext,OverDueDate
+syntax match TodoPriorityT '^([tT])\s.\+$' contains=TodoDate,TodoProject,TodoContext,OverDueDate
+syntax match TodoPriorityU '^([uU])\s.\+$' contains=TodoDate,TodoProject,TodoContext,OverDueDate
+syntax match TodoPriorityV '^([vV])\s.\+$' contains=TodoDate,TodoProject,TodoContext,OverDueDate
+syntax match TodoPriorityW '^([wW])\s.\+$' contains=TodoDate,TodoProject,TodoContext,OverDueDate
+syntax match TodoPriorityX '^([xX])\s.\+$' contains=TodoDate,TodoProject,TodoContext,OverDueDate
+syntax match TodoPriorityY '^([yY])\s.\+$' contains=TodoDate,TodoProject,TodoContext,OverDueDate
+syntax match TodoPriorityZ '^([zZ])\s.\+$' contains=TodoDate,TodoProject,TodoContext,OverDueDate
+
+syntax match TodoDate '\d\{2,4\}-\d\{2\}-\d\{2\}' contains=NONE
+syntax match TodoProject '\(^\|\W\)+[^[:blank:]]\+' contains=NONE
+syntax match TodoContext '\(^\|\W\)@[^[:blank:]]\+' contains=NONE
+
+" Other priority colours might be defined by the user
+highlight default link TodoDone Comment
+highlight default link TodoPriorityA Constant
+highlight default link TodoPriorityB Statement
+highlight default link TodoPriorityC Identifier
+highlight default link TodoDate PreProc
+highlight default link TodoProject Special
+highlight default link TodoContext Special
+
+if exists('g:todo_load_python') && g:todo_load_python
+ if has('python')
+ let b:curdir = expand('<sfile>:p:h')
+ let s:script_dir = b:curdir . "/python/"
+ execute "pyfile " . s:script_dir. "todo.py"
+ elseif has('python3')
+ let b:curdir = expand('<sfile>:p:h')
+ let s:script_dir = b:curdir . "/python/"
+ execute "py3file " . s:script_dir. "todo.py"
+ else
+ echom "Your version of vim has no python support. Overdue dates won't be highlighted"
+ endif
+endif
+
+let b:current_syntax = "todo"
--- /dev/null
+if v:progname =~? "evim"
+ finish
+endif
+source $VIMRUNTIME/defaults.vim
+
+packadd matchit
+
+set backup
+set backupdir=$HOME/tmp//
+set undofile
+set undodir=$HOME/tmp//
+
+set autoindent
+set textwidth=79
+set colorcolumn=80
+autocmd FileType python setlocal tabstop=4 shiftwidth=4 expandtab
+autocmd FileType markdown setlocal tabstop=4 shiftwidth=4 expandtab
+autocmd FileType javascript setlocal tabstop=2 shiftwidth=2 expandtab
+autocmd FileType json setlocal tabstop=2 shiftwidth=2 expandtab
+autocmd FileType html setlocal tabstop=2 shiftwidth=2 expandtab
+
+set cursorline
+set hlsearch
+nnoremap <CR> :noh<CR><CR>
+set list
+set listchars=tab:├─,extends:»,precedes:«,space:·,trail:∙,nbsp:■
+set number
+set relativenumber
+autocmd FocusLost * :set norelativenumber
+autocmd FocusGained * :set relativenumber
+autocmd InsertEnter * :set norelativenumber
+autocmd InsertLeave * :set relativenumber
--- /dev/null
+#!/bin/sh
+
+sysmodmap=/usr/local/etc/X11/xinit/.Xmodmap
+sysresources=/usr/local/etc/X11/xinit/.Xresources
+usermodmap="$HOME/.Xmodmap"
+userresources="$HOME/.Xresources"
+
+if [ -f $sysresources ]; then
+ xrdb -merge $sysresources
+fi
+if [ -f $sysmodmap ]; then
+ xmodmap $sysmodmap
+fi
+if [ -f "$userresources" ]; then
+ xrdb -merge "$userresources"
+fi
+if [ -f "$usermodmap" ]; then
+ xmodmap "$usermodmap"
+fi
+
+xset r rate 290 26
+xset m 1/1 0
+redon &
+dunst &
+tint2 &
+xautolock -time 10 -locker "$HOME/bin/l" &
+xbanish &
+
+if [ -x /usr/local/bin/urxvtd ]; then
+ for i in 1 2; do
+ # try to start client twice, once before checking for daemon and
+ # another after trying to start it
+ urxvtc
+ if [ $? -eq 2 ]; then
+ # daemon not started, attempt to start once
+ if [ $i -eq 1 ]; then
+ urxvtd -q -o -f
+ fi
+ else
+ TERMINAL=/usr/local/bin/urxvtc
+ export TERMINAL
+ break
+ fi
+ done
+ unset i
+fi
+
+# try to wait for session to start, but not critical
+#XXX: may not be applicable to sessions other than i3
+(sleep 0.2 && [ -x "$HOME/bin/acpi_ac" ] && "$HOME/bin/acpi_ac" "0x0`sysctl -n hw.acpi.acline`" ) &
+(sleep 1 && "$HOME/.fehbg") &
+(sleep 1.5 && [ -x /usr/local/bin/conky ] && conky -c "$HOME/.conkyrc.d/dock" ) &
+
+if [ -d /usr/local/etc/X11/xinit/xinitrc.d ]; then
+ for f in /usr/local/etc/X11/xinit/xinitrc.d/?*.sh; do
+ [ -x "$f" ] && . "$f"
+ done
+ unset f
+fi
+
+if [ ! -n "$1" ]; then
+ session=i3
+else
+ session=$1
+fi
+exec $session
--- /dev/null
+echo logout
+clear
--- /dev/null
+export EDITOR=vim
+export XDG_CACHE_HOME="$HOME/tmp/"
+
+export CLICOLOR=
+export LS_COLORS='di=34:ln=35:so=32:pi=33:ex=31:bd=46;34:cd=43;34:su=41;30:sg=46;30:tw=42;30:ow=43;30'
+export GREP_OPTIONS=--color=auto
+
+export PYTHONSTARTUP=~/.pythonrc
+
+export PUUSH_API_KEY=159C54A56C88394136BA1ACB6A9D8F80
--- /dev/null
+# modules
+autoload -Uz vcs_info
+zstyle ':vcs_info:*' enable git
+zstyle ':vcs_info:*' get-revision true
+zstyle ':vcs_info:git*' formats "(%F{green}%r/%b%f) %m%u%c "
+precmd() { vcs_info }
+
+# prompt
+setopt prompt_subst
+PROMPT='%F{$VICOL}%n%f@%F{$VICOL}%m%f%(?../%F{red}$?%f)%# '
+RPROMPT='${vcs_info_msg_0_}%F{yellow}%~%f %T'
+
+function zle-line-init zle-keymap-select {
+ VICOL="${${KEYMAP/vicmd/red}/(main|viins)/green}"
+ zle reset-prompt
+}
+zle -N zle-line-init
+zle -N zle-keymap-select
+
+# common aliases
+alias h="history -25"
+alias j="jobs -l"
+alias la="ls -aF"
+alias lf="ls -AF"
+alias ll="ls -lhAF"
+alias pa="sudo ps -Sudax"
+
+# be paranoid
+alias cp='cp -ip'
+alias mv='mv -i'
+alias rm='rm -I'
+
+# venv
+alias activate="source bin/activate"
+
+# ports
+alias pkg-install-make-build-depends="sudo pkg install --automatic \`make build-depends-list | sed 's/\/usr\/ports\// /' | tr -d '\n'\`"
+alias pkg-install-make-run-depends="sudo pkg install --automatic \`make run-depends-list | sed 's/\/usr\/ports\// /' | tr -d '\n'\`"
+
+# keys
+bindkey "^[[7~" beginning-of-line #Home
+bindkey "^[[8~" end-of-line #End
+bindkey "^[[3~" delete-char #Del
+# vt keys
+bindkey "^[[H" beginning-of-line #Home
+bindkey "^[[F" end-of-line #End
+
+autoload -Uz up-line-or-beginning-search down-line-or-beginning-search
+zle -N up-line-or-beginning-search
+zle -N down-line-or-beginning-search
+[[ -n "$key[Up]" ]] && bindkey -- "$key[Up]" up-line-or-beginning-search
+[[ -n "$key[Down]" ]] && bindkey -- "$key[Down]" down-line-or-beginning-search
+
+# The following lines were added by compinstall
+zstyle ':completion:*' auto-description 'specify: %d'
+zstyle ':completion:*' expand suffix
+zstyle ':completion:*' format '# %d'
+zstyle ':completion:*' group-name ''
+zstyle ':completion:*' ignore-parents parent
+zstyle ':completion:*' insert-unambiguous false
+zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
+zstyle ':completion:*' list-prompt '%B%i%b'
+zstyle ':completion:*' list-suffixes true
+zstyle ':completion:*' matcher-list '' 'm:{[:lower:]}={[:upper:]}' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} r:|[._-]=* r:|=*' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} l:|=* r:|=*'
+zstyle ':completion:*' menu select=1
+zstyle ':completion:*' original false
+zstyle ':completion:*' select-prompt '%B%l%b'
+zstyle ':completion:*' verbose true
+zstyle :compinstall filename '/home/ds6/.zshrc'
+
+autoload -Uz compinit
+compinit
+# End of lines added by compinstall
+
+# Lines configured by zsh-newuser-install
+HISTFILE=~/.histfile
+HISTSIZE=100
+SAVEHIST=100
+setopt appendhistory autocd extendedglob
+unsetopt beep
+bindkey -v
+# End of lines configured by zsh-newuser-install
+
+# vim: ts=8:sts=4:sw=4:et:tw=80
--- /dev/null
+# i3 config file (v4)
+# Please see http://i3wm.org/docs/userguide.html for a complete reference!
+
+# Font for window titles. Will also be used by the bar unless a different font
+# is used in the bar {} block below.
+
+font pango:Dina, DejaVu Sans Mono, monospace 7
+
+# This font is widely installed, provides lots of unicode glyphs, right-to-left
+# text rendering and scalability on retina/hidpi displays (thanks to pango).
+#font pango:DejaVu Sans Mono 8
+
+# Before i3 v4.8, we used to recommend this one as the default:
+# font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
+# The font above is very space-efficient, that is, it looks good, sharp and
+# clear in small sizes. However, its unicode glyph coverage is limited, the old
+# X core fonts rendering does not support right-to-left and this being a bitmap
+# font, it doesn’t scale on retina/hidpi displays.
+
+# Modifier key
+set $mod Mod4
+
+# use these keys for focus, movement, and resize directions
+set $up k
+set $down j
+set $left h
+set $right l
+# and arrow keys
+set $up2 Up
+set $down2 Down
+set $left2 Left
+set $right2 Right
+
+# use Mouse+$mod to drag floating windows to their wanted position
+floating_modifier $mod
+
+# start a terminal
+bindsym $mod+Return exec --no-startup-id i3-sensible-terminal
+
+# kill focused window
+bindsym $mod+Shift+q kill
+
+# start dmenu
+bindsym $mod+d exec --no-startup-id $HOME/bin/dmenu_runsmart -p "%"
+
+# change focus
+bindsym $mod+$left focus left
+bindsym $mod+$down focus down
+bindsym $mod+$up focus up
+bindsym $mod+$right focus right
+bindsym $mod+$left2 focus left
+bindsym $mod+$down2 focus down
+bindsym $mod+$up2 focus up
+bindsym $mod+$right2 focus right
+
+# move focused window
+bindsym $mod+Shift+$left move left
+bindsym $mod+Shift+$down move down
+bindsym $mod+Shift+$up move up
+bindsym $mod+Shift+$right move right
+bindsym $mod+Shift+$left2 move left
+bindsym $mod+Shift+$down2 move down
+bindsym $mod+Shift+$up2 move up
+bindsym $mod+Shift+$right2 move right
+
+# split in horizontal orientation
+bindsym $mod+i split h
+
+# split in vertical orientation
+bindsym $mod+o split v
+
+# enter fullscreen mode for the focused container
+bindsym $mod+f fullscreen toggle
+bindsym $mod+Shift+f fullscreen toggle global
+
+# change container layout (stacked, tabbed, toggle split)
+bindsym $mod+s layout stacking
+bindsym $mod+w layout tabbed
+bindsym $mod+e layout toggle split
+
+# toggle tiling / floating
+bindsym $mod+Shift+space floating toggle
+
+# change focus between tiling / floating windows
+bindsym $mod+space focus mode_toggle
+
+# focus the parent container
+bindsym $mod+a focus parent
+
+# focus the child container
+bindsym $mod+z focus child
+
+# move the currently focused window to the scratchpad
+bindsym $mod+Shift+minus move scratchpad
+
+# Show the next scratchpad window or hide the focused scratchpad window.
+# If there are multiple scratchpad windows, this command cycles through them.
+bindsym $mod+minus scratchpad show
+
+# switch to workspace
+bindsym $mod+1 workspace 1
+bindsym $mod+2 workspace 2
+bindsym $mod+3 workspace 3
+bindsym $mod+4 workspace 4
+bindsym $mod+5 workspace 5
+bindsym $mod+6 workspace 6
+bindsym $mod+7 workspace 7
+bindsym $mod+8 workspace 8
+bindsym $mod+9 workspace 9
+bindsym $mod+0 workspace 10
+
+# move focused container to workspace
+bindsym $mod+Shift+1 move container to workspace 1
+bindsym $mod+Shift+2 move container to workspace 2
+bindsym $mod+Shift+3 move container to workspace 3
+bindsym $mod+Shift+4 move container to workspace 4
+bindsym $mod+Shift+5 move container to workspace 5
+bindsym $mod+Shift+6 move container to workspace 6
+bindsym $mod+Shift+7 move container to workspace 7
+bindsym $mod+Shift+8 move container to workspace 8
+bindsym $mod+Shift+9 move container to workspace 9
+Bindsym $mod+Shift+0 move container to workspace 10
+
+# rename current window
+bindsym $mod+t --no-startup-id xrename
+
+# reload the configuration file
+bindsym $mod+Shift+c reload
+# restart i3 inplace
+bindsym $mod+Shift+r restart
+# exit i3
+bindsym $mod+Shift+e exec --no-startup-id i3-nagbar -t warning -m Exit? -b Yes 'i3-msg exit'
+
+# x220t bezel buttons
+bindcode 198 exec --no-startup-id rotate set normal
+bindcode 204 exec --no-startup-id rotate right
+
+# volume buttons
+bindsym XF86AudioMute exec -no-startup-id mixer vol 0
+bindsym XF86AudioRaiseVolume exec -no-startup-id mixer vol +5
+bindsym XF86AudioLowerVolume exec -no-startup-id mixer vol -5
+
+# move and resize [floating] windows
+mode "translate" {
+ bindsym $left resize shrink width 20 px
+ bindsym $down resize grow height 20 px
+ bindsym $up resize shrink height 20 px
+ bindsym $right resize grow width 20 px
+ bindsym $left2 resize shrink width 20 px
+ bindsym $down2 resize grow height 20 px
+ bindsym $up2 resize shrink height 20 px
+ bindsym $right2 resize grow width 20 px
+
+ bindsym Shift+$left move left 20 px
+ bindsym Shift+$down move down 20 px
+ bindsym Shift+$up move up 20 px
+ bindsym Shift+$right move right 20 px
+ bindsym Shift+$left2 move left 20 px
+ bindsym Shift+$down2 move down 20 px
+ bindsym Shift+$up2 move up 20 px
+ bindsym Shift+$right2 move right 20 px
+
+ # smaller movements
+ bindsym Control+$left resize shrink width 1 px or 1 ppt
+ bindsym Control+$down resize grow height 1 px or 1 ppt
+ bindsym Control+$up resize shrink height 1 px or 1 ppt
+ bindsym Control+$right resize grow width 1 px or 1 ppt
+ bindsym Control+$left2 resize shrink width 1 px or 1 ppt
+ bindsym Control+$down2 resize grow height 1 px or 1 ppt
+ bindsym Control+$up2 resize shrink height 1 px or 1 ppt
+ bindsym Control+$right2 resize grow width 1 px or 1 ppt
+
+ bindsym Control+Shift+$left move left 1 px
+ bindsym Control+Shift+$down move down 1 px
+ bindsym Control+Shift+$up move up 1 px
+ bindsym Control+Shift+$right move right 1 px
+ bindsym Control+Shift+$left2 move left 1 px
+ bindsym Control+Shift+$down2 move down 1 px
+ bindsym Control+Shift+$up2 move up 1 px
+ bindsym Control+Shift+$right2 move right 1 px
+
+ # toggle tiling / floating
+ bindsym $mod+Shift+space floating toggle
+
+ # change focus between tiling / floating windows
+ bindsym $mod+space focus mode_toggle
+
+ # focus the parent container
+ bindsym $mod+a focus parent
+
+ # focus the child container
+ bindsym $mod+z focus child
+
+ # back to normal: Enter, Escape, or original key
+ bindsym return mode default
+ bindsym escape mode default
+ bindsym $mod+r mode default
+}
+bindsym $mod+r mode "translate"
+
+# borders
+hide_edge_borders smart
+#new_window normal 1
+new_window pixel 1
+gaps inner 6
+smart_gaps on
+#for_window [class="^URxvt$"] border pixel 1
+#for_window [class="^links$"] border pixel 1
+
+# misc
+workspace_auto_back_and_forth yes
+force_display_urgency_hint 2000 ms
+
+# color definitions
+# class border backgr. text indicator child_border
+set $focused #cc6600 #aa5500 #eee8d5 #4466ff #cc6600
+set $inactive #884400 #221100 #93a1a1 #264bd2 #884400
+set $urgent #ff4444 #dc322f #000000 #4466ff #ff4444
+set $blue #4466ff #264bd2 #fdf6e3 #264db2 #4466ff
+
+bar {
+ position top
+ tray_output primary
+ status_command i3status
+ separator_symbol "|"
+
+ colors {
+ background #110800
+ statusline #93a1a1
+ separator #268bd2
+
+ # class border backgr. text
+ focused_workspace $focused
+ active_workspace $inactive
+ inactive_workspace $inactive
+ urgent_workspace $urgent
+ binding_mode $blue
+ }
+}
+
+# colors
+# class border backgr. text indicator child_border
+client.focused $focused
+client.focused_inactive $inactive
+client.unfocused $inactive
+client.urgent $urgent
+client.placeholder $blue
+
+client.background #221100
--- /dev/null
+general {
+ output_format = "i3bar"
+ interval = 6
+ color_good = "#85c000"
+ color_degraded = "#b58900"
+ color_bad = "#dc322f"
+}
+
+order += "wireless wlan0"
+order += "ethernet _first_"
+order += "cpu_usage"
+order += "load"
+order += "battery 0"
+#order += "tztime local"
+
+wireless wlan0 {
+ format_up = "WLAN0 %essid %ip"
+ format_down = ""
+}
+
+ethernet _first_ {
+ format_up = "ETH %ip"
+ format_down = ""
+}
+
+cpu_usage {
+ format = "CPU %usage "
+ max_threshold = 90
+ degraded_threshold = 50
+ separator = false
+ separator_block_width = 0
+}
+
+load {
+ format = "%1min %5min %15min"
+ max_threshold = "1.5"
+}
+
+battery 0 {
+ format = "%status %percentage %remaining"
+ format_down = ""
+ low_threshold = 20
+}
+
+#tztime local {
+# format = "%a/%b %d/%m/%Y %H:%M:%S"
+#}
--- /dev/null
+#!/bin/sh
+d="$HOME/.dotfiles"
+for x in .*; do ln -vwis "$d/$x" "$HOME/$x"; done
+ln -vwis "$d/i3-config" "$HOME/.config/i3/config"
+ln -vwis "$d/i3status-config" "$HOME/.config/i3status/config"