Browse Source

initial commit of my dotfiles, now with all sensitive stuff outside the repo, yay

master
Von Random 8 years ago
parent
commit
729a63775e
  1. 122
      bashrc
  2. 126
      pentadactylrc
  3. 499
      rc.lua
  4. 26
      screenrc
  5. 124
      theme.lua
  6. 52
      tmux.conf
  7. 1117
      vim/colors/solarized.vim
  8. 142
      vim/colors/xoria256.vim
  9. 438
      vim/plugins/svndiff.vim
  10. 94
      vimrc
  11. 118
      xresources
  12. 204
      zshrc

122
bashrc

@ -0,0 +1,122 @@
# ~/.bashrc
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
# Export some useful variables
[[ -r $HOME/.local/bin && $PATH != *$HOME/.local/bin* ]] && PATH=$PATH:$HOME/.local/bin
# Some history tweaks
HISTCONTROL=ignoredups:ignorespace
HISTSIZE=1000
HISTFILESIZE=2000
# Other useful vars
#export LC_CTYPE= <- for system messages locale
[[ $TERM == screen || $TERM == xterm ]] && export TERM=$TERM-256color
export LC_ALL='en_GB.UTF-8'
export LANG=$LC_ALL
export PAGER='less'
export EDITOR='vim'
export LS_COLORS='no=00:fi=00:di=34:ow=34;40:ln=35:pi=30;44:so=35;44:do=35;44:bd=33;44:cd=37;44:or=05;37;41:mi=05;37;41:ex=01;31:*.cmd=01;31:*.exe=01;31:*.com=01;31:*.bat=01;31:*.reg=01;31:*.app=01;31:*.txt=32:*.org=32:*.md=32:*.mkd=32:*.h=32:*.c=32:*.C=32:*.cc=32:*.cpp=32:*.cxx=32:*.objc=32:*.sh=32:*.csh=32:*.zsh=32:*.el=32:*.vim=32:*.java=32:*.pl=32:*.pm=32:*.py=32:*.rb=32:*.hs=32:*.php=32:*.htm=32:*.html=32:*.shtml=32:*.erb=32:*.haml=32:*.xml=32:*.rdf=32:*.css=32:*.sass=32:*.scss=32:*.less=32:*.js=32:*.coffee=32:*.man=32:*.0=32:*.1=32:*.2=32:*.3=32:*.4=32:*.5=32:*.6=32:*.7=32:*.8=32:*.9=32:*.l=32:*.n=32:*.p=32:*.pod=32:*.tex=32:*.bmp=33:*.cgm=33:*.dl=33:*.dvi=33:*.emf=33:*.eps=33:*.gif=33:*.jpeg=33:*.jpg=33:*.JPG=33:*.mng=33:*.pbm=33:*.pcx=33:*.pdf=33:*.pgm=33:*.png=33:*.ppm=33:*.pps=33:*.ppsx=33:*.ps=33:*.svg=33:*.svgz=33:*.tga=33:*.tif=33:*.tiff=33:*.xbm=33:*.xcf=33:*.xpm=33:*.xwd=33:*.xwd=33:*.yuv=33:*.aac=33:*.au=33:*.flac=33:*.mid=33:*.midi=33:*.mka=33:*.mp3=33:*.mpa=33:*.mpeg=33:*.mpg=33:*.ogg=33:*.ra=33:*.wav=33:*.anx=33:*.asf=33:*.avi=33:*.axv=33:*.flc=33:*.fli=33:*.flv=33:*.gl=33:*.m2v=33:*.m4v=33:*.mkv=33:*.mov=33:*.mp4=33:*.mp4v=33:*.mpeg=33:*.mpg=33:*.nuv=33:*.ogm=33:*.ogv=33:*.ogx=33:*.qt=33:*.rm=33:*.rmvb=33:*.swf=33:*.vob=33:*.wmv=33:*.doc=31:*.docx=31:*.rtf=31:*.dot=31:*.dotx=31:*.xls=31:*.xlsx=31:*.ppt=31:*.pptx=31:*.fla=31:*.psd=31:*.7z=1;35:*.apk=1;35:*.arj=1;35:*.bin=1;35:*.bz=1;35:*.bz2=1;35:*.cab=1;35:*.deb=1;35:*.dmg=1;35:*.gem=1;35:*.gz=1;35:*.iso=1;35:*.jar=1;35:*.msi=1;35:*.rar=1;35:*.rpm=1;35:*.tar=1;35:*.tbz=1;35:*.tbz2=1;35:*.tgz=1;35:*.tx=1;35:*.war=1;35:*.xpi=1;35:*.xz=1;35:*.z=1;35:*.Z=1;35:*.zip=1;35:*.ANSI-30-black=30:*.ANSI-01;30-brblack=01;30:*.ANSI-31-red=31:*.ANSI-01;31-brred=01;31:*.ANSI-32-green=32:*.ANSI-01;32-brgreen=01;32:*.ANSI-33-yellow=33:*.ANSI-01;33-bryellow=01;33:*.ANSI-34-blue=34:*.ANSI-01;34-brblue=01;34:*.ANSI-35-magenta=35:*.ANSI-01;35-brmagenta=01;35:*.ANSI-36-cyan=36:*.ANSI-01;36-brcyan=01;36:*.ANSI-37-white=37:*.ANSI-01;37-brwhite=01;37:*.log=01;32:*~=01;32:*#=01;32:*.bak=01;33:*.BAK=01;33:*.old=01;33:*.OLD=01;33:*.org_archive=01;33:*.off=01;33:*.OFF=01;33:*.dist=01;33:*.DIST=01;33:*.orig=01;33:*.ORIG=01;33:*.swp=01;33:*.swo=01;33:*,v=01;33:*.gpg=34:*.gpg=34:*.pgp=34:*.asc=34:*.3des=34:*.aes=34:*.enc=34:'
# Append to history, not 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
# Change directory by typing a path without 'cd' and enable 256 colors
# works only for bash versions greater or equal 4.
if [[ $BASH_VERSINFO -ge 4 ]]; then
shopt -s autocd
fi
# Color escapes description
# color escape looks like \[\e[x;3ym\]
# background escape looks like \[\e[4ym\]
# style reset escape is \[\e[0m\]
# x is style:
# 0 - regular, 1 - bold, 4 - underlined
# y is color:
# 0 - Black, 1 - Red, 2 - Green, 3 - Yellow
# 4 - Blue, 5 - Magenta, 6 - Cyan, 7 - White
if [[ $UID -eq 1000 || $UID -eq 1205 || $UID -eq 0 || $USER == 'Von Random' ]]; then
user_ps=""
else
user_ps="\[\e[1;31m\]\u\[\e[0m\]@"
fi
if [[ $UID -eq 0 ]]; then
bang_ps='\[\e[1;31m\]\$\[\e[0m\]'
else
bang_ps='\[\e[1;32m\]\$\[\e[0m\]'
fi
PS1="$user_ps\[\e[1;34m\]\h\[\e[0m\] \[\e[1;33m\]\v\[\e[0m\] \[\e[37m\]\w\[\e[0m\] $bang_ps "
# bindings
#PgUp/PgDown and ctrl-arrows for skip word
bind '"[5~"':backward-word
bind '"[6~"':forward-word
# aliases
alias vi='command vim'
alias less='command less -R'
alias cower='command cower -c'
alias pacman='command pacman --color=auto'
alias rscreen='command screen -Dr'
alias atmux='command tmux attach'
alias iconvwk='command iconv -c -f cp1251 -t koi8-r'
alias iconvuk='command iconv -c -f utf-8 -t koi8-r'
alias hist='fc -l 1'
alias beep='echo -en "\007"'
alias fixterm='echo "^[c"'
# grc:
if [[ -x /usr/bin/grc ]]; then
alias ping='command grc --colour=auto ping'
alias ping6='command grc --colour=auto ping'
alias traceroute='command grc --colour=auto traceroute'
alias traceroute6='command grc --colour=auto traceroute'
alias make='command grc --colour=auto make'
alias diff='command grc --colour=auto diff'
alias cvs='command grc --colour=auto cvs'
alias netstat='command grc --colour=auto netstat'
fi
# ls:
if [[ $OSTYPE == freebsd* ]]; then
alias ls='command ls -G '
elif [[ $OSTYPE == linux-gnu ]] && [[ $HOSTNAME != *pvc* ]]; then
alias ls='command ls --color=auto --group-directories-first '
fi
alias la='ls -FA'
alias ll='ls -lha'
alias ld='ls -lhda'
if [[ -x /usr/bin/colordiff || -x $HOME/.local/bin/colordiff ]]; then
alias diff='command colordiff'
fi
# mount:
alias mountiso='sudo mount -t iso9660 -o loop'
alias mountmdf='sudo mount -o loop'
alias mountnrg='sudo mount -o loop,offset=307200'
# git:
alias gss='command git status -s'
alias gdf='command git diff'
alias gci='command git commit -a'
alias gup='command git pull'
# svn:
alias sss='command svn status'
alias sdf='command svn diff'
alias sci='command svn commit -m'
alias sup='command svn up'
# we want to see exit code on error
trap 'echo -e "\e[0mbash: exit \e[1;37m$?\e[0m"' ERR
# load additional functions and overrides
extras=( "$HOME/.bashrc.work" )
for i in ${extras[@]}; do
if [[ -r $i ]]; then
source $i
fi
done

126
pentadactylrc

@ -0,0 +1,126 @@
"1.1
loadplugins '\.(js|penta)$'
group user
highlight Addon:nth-child(2n+1) background: rgba(0, 43, 54, .04);
highlight -link=s_red_back Bell
highlight -link=s_cyan Boolean color: red;
highlight -link=s_blue Button display: inline-block; font-weight: bold; cursor: pointer; color: black; text-decoration: none;
highlight -link=s_base1,s_base00 Comment color: gray;
highlight -link=s_base1 CompDesc color: gray; width: 62%; padding-left: 1em;
highlight CompItem:nth-child(2n+1) background: rgba(0, 43, 54, .04);
highlight -link=s_base3,s_magenta_back CompItem[selected]
highlight -link=s_base3,s_comp_title CompTitle
highlight -link=s_comp_sep CompTitleSep height: 2px;
highlight -link=s_base01 Disabled color: gray !important;
highlight Download:nth-child(2n+1) background: rgba(0, 43, 54, .04);
highlight -link=s_base3,s_orange_back EditorBlink1
highlight -link=s_base01 EditorBlink2
highlight -link=s_base2,s_base3_back EditorEditing
highlight -link=s_base2,s_base3_back EditorEditing>*
highlight -link=s_base3,s_red_back EditorError
highlight -link=s_blue Enabled color: blue;
highlight -link=s_base3,s_magenta_back ErrorMsg
highlight -link=s_green Filter font-weight: bold;
highlight FontFixed font-family: "Terminus" !important; font-size: 14px !important;
highlight -link=s_blue_back FrameIndicator background-color: red; opacity: 0.5; z-index: 999999; position: fixed; top: 0; bottom: 0; left: 0; right: 0;
highlight -link=s_blue Function color: navy;
highlight -link=FontCode,s_cyan HelpArg color: #6A97D4;
highlight -link=s_base00,s_base3_back HelpBody display: block; margin: 1em auto; max-width: 100ex; padding-bottom: 1em; margin-bottom: 4em; border-bottom-width: 1px;
highlight HelpBorder border-color: #93a1a1 !important; border-width: 0px; border-style: solid;
highlight -link=FontCode,s_orange HelpEx display: inline-block; color: #527BBD;
highlight -link=s_yellow HelpHead font-weight: bold; color: #527BBD; clear: both;
highlight -link=s_magenta HelpInfoLabel display: inline-block; width: 6em; color: magenta; font-weight: bold; vertical-align: text-top;
highlight -link=FontCode,s_green HelpKey color: #102663;
highlight -link=s_red HelpKeyword font-weight: bold; color: navy;
highlight HelpLink[href] color: #268bd2;
highlight -link=s_green HelpNewsTag font-style: normal; position: absolute; left: 100%; padding-left: 1em; color: #527BBD; opacity: .6; white-space: pre;
highlight -link=s_magenta HelpNote color: red; font-weight: bold;
highlight -link=FontCode,s_cyan HelpOpt color: #106326;
highlight -link=FontCode,s_cyan HelpOptionalArg color: #6A97D4;
highlight -link=FontCode,s_cyan HelpSpec display: block; margin-left: -10em; float: left; clear: left; color: #527BBD; margin-right: 1em;
highlight -link=FontCode,s_violet HelpString color: green; font-weight: normal;
highlight -link=FontCode,s_red HelpTag display: inline-block; color: #527BBD; margin-left: 1ex; font-weight: normal;
highlight -link=FontCode,s_blue HelpTopic color: #102663;
highlight -link=s_blue HelpType margin-right: 2ex;
highlight -link=s_magenta HelpWarning color: red; font-weight: bold;
highlight -link=HelpXMLBase HelpXML display: inline-block; border: none;
highlight -link=FontCode,s_base0,s_base03_back HelpXMLBase white-space: pre; color: #C5F779; background-color: #444444; font-family: Terminus, Fixed, monospace; padding: 7px;
highlight -link=HelpXMLBase HelpXMLBlock display: block; margin-left: 2em; border: none;
highlight -link=s_base03 Hint font: "Terminus"; margin: -.2ex; padding: 0 0 0 1px; outline: 1px solid rgba(0, 43, 54, .5); background: rgba(253, 246, 227, .8); color: black; font-family: "Terminus" !important; font-size: 14 !important;
highlight -link=s_base3,s_magenta_back HintActive
highlight -link=s_base3,s_blue_back HintElem
highlight -link=s_blue Indicator color: blue; width: 1.5em; text-align: center;
highlight -link=s_base00 InfoMsg
highlight -link=s_yellow Keyword color: red;
highlight -link=s_base3,s_base2_back LineNr
highlight -link=s_base0,s_base03_back LinkInfo color: black; position: absolute; left: 100%; padding: 1ex; margin: -1ex -1em; background: rgba(255, 255, 255, .8); border-radius: 1ex;
highlight -link=s_base00,s_base3_back Message
highlight -link=s_base01 ModeMsg
highlight MoreMsg color: inherit !important; background: white !important; background-color: inherit !important;
highlight -link=s_blue,s_base3_back NonText color: blue; background: transparent !important; min-height: 16px; padding-left: 2px;
highlight -link=s_base00,s_base3_back Normal
highlight -link=s_blue Null color: blue;
highlight -link=s_blue Number color: blue;
highlight -link=s_green Object color: maroon;
highlight -link=s_base1 Preview color: gray;
highlight -link=s_cyan Question
highlight s_base0 color: #839496 !important;
highlight s_base0_back background-color: #839496 !important;
highlight s_base00 color: #657b83 !important;
highlight s_base00_back background-color: #657b83 !important;
highlight s_base01 color: #586e75 !important;
highlight s_base01_back background-color: #586e75 !important;
highlight s_base02 color: #073642 !important;
highlight s_base02_back background-color: #073642 !important;
highlight s_base03 color: #002b36 !important;
highlight s_base03_back background-color: #002b36 !important;
highlight s_base1 color: #93a1a1 !important;
highlight s_base1_back background-color: #93a1a1 !important;
highlight s_base2 color: #eee8d5 !important;
highlight s_base2_back background-color: #eee8d5 !important;
highlight s_base3 color: #fdf6e3 !important;
highlight s_base3_back background-color: #fdf6e3 !important;
highlight s_blue color: #268bd2 !important;
highlight s_blue_back background-color: #268bd2 !important;
highlight s_comp_sep background: -moz-linear-gradient(60deg, #2aa198, #fdf6e3) !important;
highlight s_comp_title background: -moz-linear-gradient(60deg, #839496, #fdf6e3) !important;
highlight s_cyan color: #2aa198 !important;
highlight s_cyan_back background-color: #2aa198 !important;
highlight s_green color: #859900 !important;
highlight s_green_back background-color: #859900 !important;
highlight s_magenta color: #d33682 !important;
highlight s_magenta_back background-color: #d33682 !important;
highlight s_orange color: #cb4b16 !important;
highlight s_orange_back background-color: #cb4b16 !important;
highlight s_red color: #dc322f !important;
highlight s_red_back background-color: #dc322f !important;
highlight s_violet color: #6c71c4 !important;
highlight s_violet_back background-color: #6c71c4 !important;
highlight s_yellow color: #b58900 !important;
highlight s_yellow_back background-color: #b58900 !important;
highlight -link=s_base3,s_orange_back StatusLineBroken
highlight -link=s_base3,s_violet_back StatusLineExtended
highlight -link=s_base00,s_base2_back StatusLineNormal
highlight -link=s_base3,s_blue_back StatusLineSecure
highlight StatusQuestion color: inherit !important; background: transparent !important; background-color: inherit !important;
highlight -link=s_base3,s_magenta_back StatusWarningMsg
highlight -link=s_base3 TabIconNumber cursor: default; width: 16px; margin: 0 2px 0 -18px !important; font-weight: bold; color: white; text-align: center; text-shadow: #002b36 -1px 0 1px, #002b36 0 1px 1px, #002b36 1px 0 1px, #002b36 0 -1px 1px;
highlight -link=s_blue Tag color: blue;
highlight -link=s_red Title color: magenta; font-weight: bold;
highlight -link=s_base1 URL
highlight -link=s_base1 URLExtra
highlight UsageItem:nth-of-type(2n) background: rgba(0, 43, 54, .04);
highlight -link=s_base3,s_yellow_back WarningMsg
map -count -modes=n -silent d -builtin <Nop>
map -count -modes=n <C-a> -builtin <Nop>
map -count -modes=n,v <C-h> -builtin <count><C-p>
map -count -modes=n,v <C-l> -builtin <count><C-n>
set editor=/usr/bin/gvim
set guioptions=s
set hintkeys=fdsaghjkl;
set hlfind
set noincfind
set showtabline=always
" vim: set ft=pentadactyl:

499
rc.lua

@ -0,0 +1,499 @@
-- Standard awesome library
local gears = require('gears')
local awful = require('awful')
awful.rules = require('awful.rules')
require('awful.autofocus')
-- Widget and layout library
local wibox = require('wibox')
-- Theme handling library
local beautiful = require('beautiful')
-- Notification library
local naughty = require('naughty')
local menubar = require('menubar')
-- enable testing if file exists
function ifexists(name)
local f=io.open(name,'r')
if f ~= nil then io.close(f) return true else return false end
end
-- {{{ Error handling
-- Check if awesome encountered an error during startup and fell back to
-- another config (This code will only ever execute for the fallback config)
if awesome.startup_errors then
naughty.notify({ preset = naughty.config.presets.critical,
title = 'Oops, there were errors during startup!',
text = awesome.startup_errors })
end
-- Handle runtime errors after startup
do
local in_error = false
awesome.connect_signal('debug::error', function (err)
-- Make sure we don't go into an endless error loop
if in_error then return end
in_error = true
naughty.notify({ preset = naughty.config.presets.critical,
title = 'Oops, an error happened!',
text = err })
in_error = false
end)
end
-- }}}
-- {{{ Variable definitions
-- Themes define colours, icons, and wallpapers
beautiful.init('/home/von/vdotfiles/theme.lua')
theme.border_width = 1
theme.font = 'Terminus 9'
-- set wallpaper
local wallpaper = '/home/von/Pictures/wallpaper.png'
if ifexists(wallpaper) then
theme.wallpaper = wallpaper
end
-- This is used later as the default terminal and editor to run.
terminal = 'roxterm'
editor = os.getenv('EDITOR') or 'vim'
editor_cmd = terminal .. ' -e ' .. editor
-- Default modkey.
-- Usually, Mod4 is the key with a logo between Control and Alt.
-- If you do not like this or do not have such a key,
-- I suggest you to remap Mod4 to another key using xmodmap or other tools.
-- However, you can use another modifier like Mod1, but it may interact with others.
modkey = 'Mod4'
-- Table of layouts to cover with awful.layout.inc, order matters.
local layouts =
{
awful.layout.suit.floating,
awful.layout.suit.tile,
awful.layout.suit.tile.bottom,
awful.layout.suit.max,
awful.layout.suit.magnifier
}
-- }}}
-- {{{ Wallpaper
if beautiful.wallpaper then
for s = 1, screen.count() do
gears.wallpaper.centered(beautiful.wallpaper, s)
end
end
-- }}}
-- {{{ Tags
-- Provide tag names and layout settings if we wish to define them
tags = {}
for s = 1, screen.count() do
tags[s] = { name = {}, layout = {} }
end
-- screen 1
--tags[1].name =
--{
-- [1] = '1:browser',
-- [2] = '2:terminal',
-- [3] = '3:terminal',
-- [4] = '4:float',
-- [9] = '9:mail'
--}
tags[1].layout =
{
[1] = layouts[2],
[4] = layouts[1],
[5] = layouts[1]
}
-- screens 2+
if screen.count() >= 2 then
--tags[2].name =
--{
-- [3] = '3:float',
--}
tags[2].layout =
{
[3] = layouts[1]
}
end
-- Fill the missing values with defaults
for s = 1, screen.count() do
for tag = 1, 9 do
tags[s].name[tag] = tags[s].name[tag] or tag
tags[s].layout[tag] = tags[s].layout[tag] or layouts[3]
end
end
-- Set tags instances in wm
for s = 1, screen.count() do
tags[s] = awful.tag(tags[s].name, s, tags[s].layout)
end
-- }}}
-- {{{ Menu
-- Create a laucher widget and a main menu
restartmenu = {
{ 'restart', awesome.restart }
}
quitmenu = {
{ 'quit', awesome.quit }
}
mymainmenu = awful.menu({ items = { { 'restart', restartmenu, beautiful.awesome_icon },
{ 'quit', quitmenu, beautiful.awesome_icon }
}
})
mylauncher = awful.widget.launcher({ image = beautiful.awesome_icon,
menu = mymainmenu })
-- Menubar configuration
menubar.utils.terminal = terminal -- Set the terminal for applications that require it
-- }}}
-- {{{ Wibox
-- Create a textclock widget
mytextclock = awful.widget.textclock('%a %d %H:%M')
mytextclock:set_font('Terminus Bold 11')
mytextbox = wibox.widget.textbox()
mytextbox:set_text('')
mytextbox:set_font('Terminus 9')
-- Create a wibox for each screen and add it
mywibox = {}
mypromptbox = {}
mylayoutbox = {}
mytaglist = {}
mytaglist.buttons = awful.util.table.join(
awful.button({ }, 1, awful.tag.viewonly),
awful.button({ modkey }, 1, awful.client.movetotag),
awful.button({ }, 3, awful.tag.viewtoggle),
awful.button({ modkey }, 3, awful.client.toggletag),
awful.button({ }, 5, function(t) awful.tag.viewnext(awful.tag.getscreen(t)) end),
awful.button({ }, 4, function(t) awful.tag.viewprev(awful.tag.getscreen(t)) end)
)
mytasklist = {}
mytasklist.buttons = awful.util.table.join(
awful.button({ }, 1, function (c)
if c == client.focus then
c.minimized = true
else
-- Without this, the following
-- :isvisible() makes no sense
c.minimized = false
if not c:isvisible() then
awful.tag.viewonly(c:tags()[1])
end
-- This will also un-minimize
-- the client, if needed
client.focus = c
c:raise()
end
end),
awful.button({ }, 3, function ()
if instance then
instance:hide()
instance = nil
else
instance = awful.menu.clients({ width=250 })
end
end),
awful.button({ }, 4, function ()
awful.client.focus.byidx(1)
if client.focus then client.focus:raise() end
end),
awful.button({ }, 5, function ()
awful.client.focus.byidx(-1)
if client.focus then client.focus:raise() end
end))
for s = 1, screen.count() do
-- Create a promptbox for each screen
mypromptbox[s] = awful.widget.prompt()
-- Create an imagebox widget which will contains an icon indicating which layout we're using.
-- We need one layoutbox per screen.
mylayoutbox[s] = awful.widget.layoutbox(s)
mylayoutbox[s]:buttons(awful.util.table.join(
awful.button({ }, 1, function () awful.layout.inc(layouts, 1) end),
awful.button({ }, 3, function () awful.layout.inc(layouts, -1) end),
awful.button({ }, 4, function () awful.layout.inc(layouts, 1) end),
awful.button({ }, 5, function () awful.layout.inc(layouts, -1) end)))
-- Create a taglist widget
mytaglist[s] = awful.widget.taglist(s, awful.widget.taglist.filter.noempty, mytaglist.buttons)
-- Create a tasklist widget
mytasklist[s] = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, mytasklist.buttons)
-- Create the wibox
mywibox[s] = awful.wibox({ position = 'top', height = '16', screen = s })
local left_layout = wibox.layout.fixed.horizontal()
local right_layout = wibox.layout.fixed.horizontal()
if s == 1 then
left_layout:add(mytextbox)
right_layout:add(mypromptbox[s])
right_layout:add(mytaglist[s])
if screen.count() == 1 then
right_layout:add(wibox.widget.systray())
right_layout:add(mytextclock)
end
right_layout:add(mylayoutbox[s])
elseif s == 2 then
left_layout:add(mylayoutbox[s])
left_layout:add(mytextclock)
left_layout:add(wibox.widget.systray())
left_layout:add(mytaglist[s])
left_layout:add(mypromptbox[s])
else
left_layout:add(mytaglist[s])
left_layout:add(mypromptbox[s])
right_layout:add(mylayoutbox[s])
end
-- Now bring it all together (with the tasklist in the middle)
local layout = wibox.layout.align.horizontal()
layout:set_left(left_layout)
layout:set_middle(mytasklist[s])
layout:set_right(right_layout)
mywibox[s]:set_widget(layout)
end
-- }}}
-- {{{ Mouse bindings
root.buttons(awful.util.table.join(
awful.button({ }, 3, function () mymainmenu:toggle() end),
awful.button({ }, 5, awful.tag.viewnext),
awful.button({ }, 4, awful.tag.viewprev)
))
-- }}}
-- {{{ Key bindings
globalkeys = awful.util.table.join(
awful.key({ modkey, }, 'Up', function () awful.screen.focus_relative( 1) end),
awful.key({ modkey, }, 'Down', function () awful.screen.focus_relative(-1) end),
awful.key({ modkey, }, 'Left', awful.tag.viewprev ),
awful.key({ modkey, }, 'Right', awful.tag.viewnext ),
awful.key({ modkey, }, 'Escape', awful.tag.history.restore),
awful.key({ modkey, }, 'j',
function ()
awful.client.focus.byidx( 1)
if client.focus then client.focus:raise() end
end),
awful.key({ modkey, }, 'k',
function ()
awful.client.focus.byidx(-1)
if client.focus then client.focus:raise() end
end),
awful.key({ modkey, }, 'w', function () mymainmenu:show() end),
-- Layout manipulation
awful.key({ modkey, 'Shift' }, 'j', function () awful.client.swap.byidx( 1) end),
awful.key({ modkey, 'Shift' }, 'k', function () awful.client.swap.byidx( -1) end),
awful.key({ modkey, 'Control' }, 'j', function () awful.screen.focus_relative( 1) end),
awful.key({ modkey, 'Control' }, 'k', function () awful.screen.focus_relative(-1) end),
awful.key({ modkey, }, 'u', awful.client.urgent.jumpto),
awful.key({ modkey, }, 'Tab',
function ()
awful.client.focus.history.previous()
if client.focus then
client.focus:raise()
end
end),
awful.key({ 'Mod1', }, 'Tab',
function ()
awful.client.focus.byidx(-1)
if client.focus then
client.focus:raise()
end
end),
awful.key({ 'Mod1', 'Shift' }, 'Tab',
function ()
awful.client.focus.byidx(1)
if client.focus then
client.focus:raise()
end
end),
-- Standard program
--awful.key({ modkey, 'Control' }, 'r', awesome.restart),
--awful.key({ modkey, 'Shift' }, 'q', awesome.quit),
awful.key({ modkey, }, 'l', function () awful.tag.incmwfact( 0.05) end),
awful.key({ modkey, }, 'h', function () awful.tag.incmwfact(-0.05) end),
awful.key({ modkey, 'Shift' }, 'h', function () awful.tag.incnmaster( 1) end),
awful.key({ modkey, 'Shift' }, 'l', function () awful.tag.incnmaster(-1) end),
awful.key({ modkey, 'Control' }, 'h', function () awful.tag.incncol( 1) end),
awful.key({ modkey, 'Control' }, 'l', function () awful.tag.incncol(-1) end),
awful.key({ modkey, }, 'space', function () awful.layout.inc(layouts, 1) end),
awful.key({ modkey, 'Shift' }, 'space', function () awful.layout.inc(layouts, -1) end),
awful.key({ modkey, 'Control' }, 'n', awful.client.restore),
-- Prompt
awful.key({ modkey, }, 'r', function () mypromptbox[mouse.screen]:run() end),
awful.key({ 'Mod1', }, 'F2', function () mypromptbox[mouse.screen]:run() end),
awful.key({ modkey, }, 'e',
function ()
awful.prompt.run({ prompt = 'Run Lua code: ' },
mypromptbox[mouse.screen].widget,
awful.util.eval, nil,
awful.util.getdir('cache') .. '/history_eval')
end),
-- Menubar
awful.key({ modkey, }, 'p', function () menubar.show() end),
-- Glbal commands
awful.key({ modkey, }, 'x', function () awful.util.spawn(terminal) end),
awful.key({ modkey, }, 'q', function () awful.util.spawn('/home/von/.local/bin/ticket_watch') end),
awful.key({ modkey, }, 'z', function () awful.util.spawn('dm-tool lock') end),
awful.key({ modkey, }, 'F6', function () awful.util.spawn('/home/von/touchpad_hotkey.sh') end),
awful.key({ }, 'Print', function () awful.util.spawn('xfce4-screenshooter -ws /home/von/screenshots') end),
awful.key({ modkey, }, 'Print', function () awful.util.spawn('xfce4-screenshooter -fs /home/von/screenshots') end)
-- screenshot via scrot (might be useful at some point
-- awful.key({ }, 'Print', function() awful.util.spawn('scrot /home/von/screenshots/%Y-%m-%d_%H-%M_all.png') end),
)
clientkeys = awful.util.table.join(
awful.key({ modkey, }, 'f', function (c) c.fullscreen = not c.fullscreen end),
awful.key({ modkey, 'Shift' }, 'c', function (c) c:kill() end),
awful.key({ modkey, 'Control' }, 'space', awful.client.floating.toggle ),
awful.key({ modkey, }, 'Return', function (c) c:swap(awful.client.getmaster()) end),
awful.key({ modkey, }, 'o', awful.client.movetoscreen ),
awful.key({ modkey, }, 't', function (c) c.ontop = not c.ontop end),
awful.key({ modkey, }, 's', function (c) c.sticky = not c.sticky end),
awful.key({ modkey, }, 'n',
function (c)
-- The client currently has the input focus, so it cannot be
-- minimized, since minimized clients can't have the focus.
c.minimized = true
end),
awful.key({ modkey, }, 'm',
function (c)
c.maximized_horizontal = not c.maximized_horizontal
c.maximized_vertical = not c.maximized_vertical
end)
)
-- Bind all key numbers to tags.
-- Be careful: we use keycodes to make it works on any keyboard layout.
-- This should map on the top row of your keyboard, usually 1 to 9.
for i = 1, 9 do
globalkeys = awful.util.table.join(globalkeys,
awful.key({ modkey }, '#' .. i + 9,
function ()
local screen = mouse.screen
local tag = awful.tag.gettags(screen)[i]
if tag then
awful.tag.viewonly(tag)
end
end),
awful.key({ modkey, 'Control' }, '#' .. i + 9,
function ()
local screen = mouse.screen
local tag = awful.tag.gettags(screen)[i]
if tag then
awful.tag.viewtoggle(tag)
end
end),
awful.key({ modkey, 'Shift' }, '#' .. i + 9,
function ()
if client.focus then
local tag = awful.tag.gettags(client.focus.screen)[i]
if tag then
awful.client.movetotag(tag)
end
end
end),
awful.key({ modkey, 'Control', 'Shift' }, '#' .. i + 9,
function ()
if client.focus then
local tag = awful.tag.gettags(client.focus.screen)[i]
if tag then
awful.client.toggletag(tag)
end
end
end))
end
clientbuttons = awful.util.table.join(
awful.button({ }, 1, function (c) client.focus = c; c:raise() end),
awful.button({ modkey }, 1, awful.mouse.client.move),
awful.button({ modkey }, 3, awful.mouse.client.resize))
-- Set keys
root.keys(globalkeys)
-- }}}
-- {{{ Rules
awful.rules.rules = {
-- All clients will match this rule.
{ rule = { },
properties = { border_width = beautiful.border_width,
border_color = beautiful.border_normal,
focus = awful.client.focus.filter,
keys = clientkeys,
buttons = clientbuttons } },
-- Floating only rules class based rules
{ rule_any = { class = { 'pinentry', 'Skype', 'Deadbeef', 'Pavucontrol', 'Qmmp', 'Vncviewer', 'plugin-container', 'mpv' }, instance = { 'sun-awt-X11-XFramePeer' } },
properties = { floating = true } },
-- Mostly floating rules, we want to keep them separately since it's easier to manage
-- firefox
{ rule = { class = 'Firefox' }, except = { instance = 'Navigator' },
properties = { floating = true } },
-- ardour3
{ rule = { class = 'Ardour' }, except = { instance = 'ardour_editor' },
properties = { floating = true } },
-- Remove gaps between terminal windows:
-- roxterm
{ rule = { class = 'Roxterm' },
properties = { size_hints_honor = false } },
-- Specific desktops rules: place windows only on specific tags by default
-- steam
{ rule = { class = 'Steam' },
properties = { tag = tags[1][4] } },
-- games
{ rule_any = { class = { 'dota_linux', 'hl2_linux', 'Strife', 'ck2', 'Pandora', 'witcher2', 'Symphony.bin.x86_64', 'Civ5XP', 'game.x86_64', 'deponia_tcj' }, instance = { 'Civ4BeyondSword.exe', 'KB.exe' } },
properties = { border_width = 0,
floating = true,
tag = tags[1][5] } }
}
-- }}}
-- {{{ Signals
-- Signal function to execute when a new client appears.
client.connect_signal('manage', function (c, startup)
-- Enable sloppy focus
c:connect_signal('mouse::enter', function(c)
if (awful.layout.get(c.screen) ~= awful.layout.suit.magnifier and awful.layout.get(c.screen) ~= awful.layout.suit.floating)
and awful.client.focus.filter(c) then
client.focus = c
end
end)
if not startup then
-- Set the windows at the slave,
-- i.e. put it at the end of others instead of setting it master.
-- awful.client.setslave(c)
-- Put windows in a smart way, only if they does not set an initial position.
if not c.size_hints.user_position and not c.size_hints.program_position then
awful.placement.no_overlap(c)
awful.placement.no_offscreen(c)
end
end
end)
client.connect_signal('focus', function(c) c.border_color = beautiful.border_focus end)
client.connect_signal('unfocus', function(c) c.border_color = beautiful.border_normal end)
-- }}}
-- {{{ Autostart
-- don't forget you sync this file
-- this shit runs every time you restart your wm, dumbass.
awful.util.spawn_with_shell('setxkbmap -layout us,ru -variant altgr-intl,typewriter -option grp:caps_toggle,compose:menu,grp_led:scroll')
awful.util.spawn_with_shell('xrdb /home/von/.Xresources')
if ifexists('/home/von/.autostart') then
awful.util.spawn_with_shell('/home/von/.autostart')
end
-- }}}

26
screenrc

@ -0,0 +1,26 @@
#term xterm
termcapinfo urxvt* ti@:te@
terminfo urxvt* ti@:te@
termcapinfo xterm* 'is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l'
terminfo xterm* 'is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l'
#termcapinfo xterm* ks@:ke@
#terminfo xterm* ks@:ke@
startup_message off
hardstatus off
defscrollback 10000
vbell on
vbell_msg "vbell on %n"
vbellwait 900
bell_msg "bell on %n"
autodetach on
defbce on
altscreen on
activity "activity on %n"
#hardstatus alwayslastline
caption always '%{= kw}[ %{kw}%-w%{bW}%n %t%{kw}%+w%{kW} %-=][ %{kr}%l%{kw} ]'
#shelltitle "$ |zsh"
#bindkey ^[q prev
#bindkey ^[w next
#bindkey ^[a screen
#bindkey ^[[1;3D prev
#bindkey ^[[1;3C next

124
theme.lua

@ -0,0 +1,124 @@
---------------------------------
-- "Solarized" awesome theme --
-- By Gwenhael Le Moine --
---------------------------------
-- Alternative icon sets and widget icons:
-- * http://awesome.naquadah.org/wiki/Nice_Icons
-- {{{ Main
theme = {}
theme.default_themes_path = "/usr/share/awesome/themes"
theme.wallpaper_cmd = { "awsetbg "..theme.default_themes_path.."/zenburn/zenburn-background.png" }
theme.colors = {}
theme.colors.base3 = "#002b36ff"
theme.colors.base2 = "#073642ff"
theme.colors.base1 = "#586e75ff"
theme.colors.base0 = "#657b83ff"
theme.colors.base00 = "#839496ff"
theme.colors.base01 = "#93a1a1ff"
theme.colors.base02 = "#eee8d5ff"
theme.colors.base03 = "#fdf6e3ff"
theme.colors.yellow = "#b58900ff"
theme.colors.orange = "#cb4b16ff"
theme.colors.red = "#dc322fff"
theme.colors.magenta = "#d33682ff"
theme.colors.violet = "#6c71c4ff"
theme.colors.blue = "#268bd2ff"
theme.colors.cyan = "#2aa198ff"
theme.colors.green = "#859900ff"
-- }}}
-- {{{ Styles
theme.font = "Terminus 9"
-- {{{ Colors
theme.fg_normal = theme.colors.base02
theme.fg_focus = theme.colors.base03
theme.fg_urgent = theme.colors.base3
theme.bg_normal = theme.colors.base3
theme.bg_focus = theme.colors.base1
theme.bg_urgent = theme.colors.red
theme.bg_systray = theme.bg_normal
-- }}}
-- {{{ Borders
theme.border_width = "2"
theme.border_normal = theme.bg_normal
theme.border_focus = theme.bg_focus
theme.border_marked = theme.bg_urgent
-- }}}
-- {{{ Titlebars
theme.titlebar_bg_focus = theme.bg_focus
theme.titlebar_bg_normal = theme.bg_normal
-- }}}
-- {{{ Mouse finder
theme.mouse_finder_color = theme.colors.green
-- mouse_finder_[timeout|animate_timeout|radius|factor]
-- }}}
-- {{{ Menu
-- Variables set for theming the menu:
-- menu_[bg|fg]_[normal|focus]
-- menu_[border_color|border_width]
theme.menu_height = "15"
theme.menu_width = "100"
-- }}}
-- {{{ Icons
-- {{{ Taglist
theme.taglist_squares_sel = theme.default_themes_path.."/zenburn/taglist/squarefz.png"
theme.taglist_squares_unsel = theme.default_themes_path.."/zenburn/taglist/squarez.png"
--theme.taglist_squares_resize = "false"
-- }}}
-- {{{ Misc
theme.awesome_icon = theme.default_themes_path.."/zenburn/awesome-icon.png"
theme.menu_submenu_icon = theme.default_themes_path.."/default/submenu.png"
-- }}}
-- {{{ Layout
theme.layout_tile = theme.default_themes_path.."/zenburn/layouts/tile.png"
theme.layout_tileleft = theme.default_themes_path.."/zenburn/layouts/tileleft.png"
theme.layout_tilebottom = theme.default_themes_path.."/zenburn/layouts/tilebottom.png"
theme.layout_tiletop = theme.default_themes_path.."/zenburn/layouts/tiletop.png"
theme.layout_fairv = theme.default_themes_path.."/zenburn/layouts/fairv.png"
theme.layout_fairh = theme.default_themes_path.."/zenburn/layouts/fairh.png"
theme.layout_spiral = theme.default_themes_path.."/zenburn/layouts/spiral.png"
theme.layout_dwindle = theme.default_themes_path.."/zenburn/layouts/dwindle.png"
theme.layout_max = theme.default_themes_path.."/zenburn/layouts/max.png"
theme.layout_fullscreen = theme.default_themes_path.."/zenburn/layouts/fullscreen.png"
theme.layout_magnifier = theme.default_themes_path.."/zenburn/layouts/magnifier.png"
theme.layout_floating = theme.default_themes_path.."/zenburn/layouts/floating.png"
-- }}}
-- {{{ Titlebar
theme.titlebar_close_button_focus = theme.default_themes_path.."/zenburn/titlebar/close_focus.png"
theme.titlebar_close_button_normal = theme.default_themes_path.."/zenburn/titlebar/close_normal.png"
theme.titlebar_ontop_button_focus_active = theme.default_themes_path.."/zenburn/titlebar/ontop_focus_active.png"
theme.titlebar_ontop_button_normal_active = theme.default_themes_path.."/zenburn/titlebar/ontop_normal_active.png"
theme.titlebar_ontop_button_focus_inactive = theme.default_themes_path.."/zenburn/titlebar/ontop_focus_inactive.png"
theme.titlebar_ontop_button_normal_inactive = theme.default_themes_path.."/zenburn/titlebar/ontop_normal_inactive.png"
theme.titlebar_sticky_button_focus_active = theme.default_themes_path.."/zenburn/titlebar/sticky_focus_active.png"
theme.titlebar_sticky_button_normal_active = theme.default_themes_path.."/zenburn/titlebar/sticky_normal_active.png"
theme.titlebar_sticky_button_focus_inactive = theme.default_themes_path.."/zenburn/titlebar/sticky_focus_inactive.png"
theme.titlebar_sticky_button_normal_inactive = theme.default_themes_path.."/zenburn/titlebar/sticky_normal_inactive.png"
theme.titlebar_floating_button_focus_active = theme.default_themes_path.."/zenburn/titlebar/floating_focus_active.png"
theme.titlebar_floating_button_normal_active = theme.default_themes_path.."/zenburn/titlebar/floating_normal_active.png"
theme.titlebar_floating_button_focus_inactive = theme.default_themes_path.."/zenburn/titlebar/floating_focus_inactive.png"
theme.titlebar_floating_button_normal_inactive = theme.default_themes_path.."/zenburn/titlebar/floating_normal_inactive.png"
theme.titlebar_maximized_button_focus_active = theme.default_themes_path.."/zenburn/titlebar/maximized_focus_active.png"
theme.titlebar_maximized_button_normal_active = theme.default_themes_path.."/zenburn/titlebar/maximized_normal_active.png"
theme.titlebar_maximized_button_focus_inactive = theme.default_themes_path.."/zenburn/titlebar/maximized_focus_inactive.png"
theme.titlebar_maximized_button_normal_inactive = theme.default_themes_path.."/zenburn/titlebar/maximized_normal_inactive.png"
-- }}}
-- }}}
return theme

52
tmux.conf

@ -0,0 +1,52 @@
bind r source-file /home/von/.tmux.conf\; display-message "Config reloaded."
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind < resize-pane -L 1
bind > resize-pane -R 1
bind - resize-pane -D 1
bind + resize-pane -U 1
bind m set-option -g mode-mouse on\; set-option -g mouse-select-pane on\; set-option -g mouse-select-window on\; set-option -g mouse-resize-pane on\; display-message "mouse mode ON"
bind M set-option -g mode-mouse off\; set-option -g mouse-select-pane off\; set-option -g mouse-select-window off\; set-option -g mouse-resize-pane off\; display-message "mouse mode OFF"
bind -n C-a display-message "Powered by tmux!"
bind -n M-w select-window -n
bind -n M-q select-window -p
bind -n S-Pageup copy-mode -u
set -g base-index 1
set -g history-limit 10000
set -g set-titles on
set -g set-titles-string "#T"
set -g status-left-length 20
set -g status-right-length 40
set -g monitor-activity on
set-window-option -g window-status-format ' #I:#W '
# Fancy & solarized
set -g pane-active-border-fg white
set -g pane-border-fg brightgreen
set -g status-bg black
set -g status-fg green
set -g status-attr bright
set -g status-left '#[bg=brightcyan,fg=brightwhite] #H #[bg=brightyellow,fg=brightcyan]#[fg=brightwhite] #S #[bg=black,fg=brightyellow]#[default]'
set -g status-right '#[fg=brightyellow]#[bg=brightyellow,fg=brightwhite] #(cat /proc/loadavg|cut -d" " -f1,2,3) #[fg=brightcyan]#[bg=brightcyan,fg=brightwhite] %a %e %k:%M #[default]'
set-window-option -g window-status-current-format '#[bg=brightblack,fg=brightcyan] #I:#W #[default]'
set-window-option -g window-status-bell-bg black
set-window-option -g window-status-bell-fg white
set-window-option -g window-status-bell-attr bright
set-window-option -g window-status-activity-bg black
set-window-option -g window-status-activity-fg blue
set-window-option -g window-status-activity-attr bright
# 256-colours
#set -g pane-active-border-fg colour112
#set -g pane-border-fg colour195
#set -g status-bg colour233
#set -g status-fg colour195
#set -g status-left '[ #[fg=colour112]#H#[default]:#S ]['
#set -g status-right '][ #[fg=colour227]#(cat /proc/loadavg|cut -d" " -f1,2,3)#[default] ][ #[fg=colour112]%a %e %k:%M#[default] ]'
#set-window-option -g window-status-current-format '#[bg=colour25,fg=colour195] #I.#W #[default]'
#set-window-option -g window-status-bell-bg colour196
#set-window-option -g window-status-bell-fg colour233
#set-window-option -g window-status-activity-bg colour111
#set-window-option -g window-status-activity-fg colour233

1117
vim/colors/solarized.vim

File diff suppressed because it is too large Load Diff

142
vim/colors/xoria256.vim

@ -0,0 +1,142 @@
" Vim color file
"
" Name: xoria256.vim
" Version: 1.5
" Maintainer: Dmitriy Y. Zotikov (xio) <xio@ungrund.org>
"
" Should work in recent 256 color terminals. 88-color terms like urxvt are
" NOT supported.
"
" Don't forget to install 'ncurses-term' and set TERM to xterm-256color or
" similar value.
"
" Color numbers (0-255) see:
" http://www.calmar.ws/vim/256-xterm-24bit-rgb-color-chart.html
"
" For a specific filetype highlighting rules issue :syntax list when a file of
" that type is opened.
" Initialization {{{
if &t_Co != 256 && ! has("gui_running")
echomsg ""
echomsg "err: please use GUI or a 256-color terminal (so that t_Co=256 could be set)"
echomsg ""
finish
endif
set background=dark
hi clear
if exists("syntax_on")
syntax reset
endif
let colors_name = "xoria256"
"}}}
" Colours {{{1
"" General {{{2
hi Normal ctermfg=252 guifg=#d0d0d0 ctermbg=234 guibg=#1c1c1c cterm=none gui=none
hi Cursor ctermbg=214 guibg=#ffaf00
hi CursorColumn ctermbg=238 guibg=#444444
hi CursorLine ctermbg=237 guibg=#3a3a3a cterm=none gui=none
hi Error ctermfg=15 guifg=#ffffff ctermbg=1 guibg=#800000
hi ErrorMsg ctermfg=15 guifg=#ffffff ctermbg=1 guibg=#800000
hi FoldColumn ctermfg=247 guifg=#9e9e9e ctermbg=233 guibg=#121212
hi Folded ctermfg=255 guifg=#eeeeee ctermbg=60 guibg=#5f5f87
hi IncSearch ctermfg=0 guifg=#000000 ctermbg=223 guibg=#ffdfaf cterm=none gui=none
hi LineNr ctermfg=247 guifg=#9e9e9e ctermbg=233 guibg=#121212
hi MatchParen ctermfg=188 guifg=#dfdfdf ctermbg=68 guibg=#5f87df cterm=bold gui=bold
" TODO
" hi MoreMsg
hi NonText ctermfg=247 guifg=#9e9e9e ctermbg=233 guibg=#121212 cterm=bold gui=bold
hi Pmenu ctermfg=0 guifg=#000000 ctermbg=250 guibg=#bcbcbc
hi PmenuSel ctermfg=255 guifg=#eeeeee ctermbg=243 guibg=#767676
hi PmenuSbar ctermbg=252 guibg=#d0d0d0
hi PmenuThumb ctermfg=243 guifg=#767676
hi Search ctermfg=0 guifg=#000000 ctermbg=149 guibg=#afdf5f
hi SignColumn ctermfg=248 guifg=#a8a8a8
hi SpecialKey ctermfg=77 guifg=#5fdf5f
hi SpellBad ctermfg=160 guifg=fg ctermbg=bg cterm=underline guisp=#df0000
hi SpellCap ctermfg=189 guifg=#dfdfff ctermbg=bg guibg=bg cterm=underline gui=underline
hi SpellRare ctermfg=168 guifg=#df5f87 ctermbg=bg guibg=bg cterm=underline gui=underline
hi SpellLocal ctermfg=98 guifg=#875fdf ctermbg=bg guibg=bg cterm=underline gui=underline
hi StatusLine ctermfg=15 guifg=#ffffff ctermbg=239 guibg=#4e4e4e cterm=bold gui=bold
hi StatusLineNC ctermfg=249 guifg=#b2b2b2 ctermbg=237 guibg=#3a3a3a cterm=none gui=none
hi TabLine ctermfg=fg guifg=fg ctermbg=242 guibg=#666666 cterm=none gui=none
hi TabLineFill ctermfg=fg guifg=fg ctermbg=237 guibg=#3a3a3a cterm=none gui=none
" FIXME
hi Title ctermfg=225 guifg=#ffdfff
hi Todo ctermfg=0 guifg=#000000 ctermbg=184 guibg=#dfdf00
hi Underlined ctermfg=39 guifg=#00afff cterm=underline gui=underline
hi VertSplit ctermfg=237 guifg=#3a3a3a ctermbg=237 guibg=#3a3a3a cterm=none gui=none
" hi VIsualNOS ctermfg=24 guifg=#005f87 ctermbg=153 guibg=#afdfff cterm=none gui=none
" hi Visual ctermfg=24 guifg=#005f87 ctermbg=153 guibg=#afdfff
hi Visual ctermfg=255 guifg=#eeeeee ctermbg=96 guibg=#875f87
" hi Visual ctermfg=255 guifg=#eeeeee ctermbg=24 guibg=#005f87
hi VisualNOS ctermfg=255 guifg=#eeeeee ctermbg=60 guibg=#5f5f87
hi WildMenu ctermfg=0 guifg=#000000 ctermbg=150 guibg=#afdf87 cterm=bold gui=bold
"" Syntax highlighting {{{2
hi Comment ctermfg=244 guifg=#808080
hi Constant ctermfg=229 guifg=#ffffaf
hi Identifier ctermfg=182 guifg=#dfafdf cterm=none
hi Ignore ctermfg=238 guifg=#444444
hi Number ctermfg=180 guifg=#dfaf87
hi PreProc ctermfg=150 guifg=#afdf87
hi Special ctermfg=174 guifg=#df8787
hi Statement ctermfg=110 guifg=#87afdf cterm=none gui=none
hi Type ctermfg=146 guifg=#afafdf cterm=none gui=none
"" Special {{{2
""" .diff {{{3
hi diffAdded ctermfg=150 guifg=#afdf87
hi diffRemoved ctermfg=174 guifg=#df8787
""" vimdiff {{{3
hi diffAdd ctermfg=bg guifg=bg ctermbg=151 guibg=#afdfaf
"hi diffDelete ctermfg=bg guifg=bg ctermbg=186 guibg=#dfdf87 cterm=none gui=none
hi diffDelete ctermfg=bg guifg=bg ctermbg=246 guibg=#949494 cterm=none gui=none
hi diffChange ctermfg=bg guifg=bg ctermbg=181 guibg=#dfafaf
hi diffText ctermfg=bg guifg=bg ctermbg=174 guibg=#df8787 cterm=none gui=none
""" HTML {{{3
" hi htmlTag ctermfg=146 guifg=#afafdf
" hi htmlEndTag ctermfg=146 guifg=#afafdf
hi htmlTag ctermfg=244
hi htmlEndTag ctermfg=244
hi htmlArg ctermfg=182 guifg=#dfafdf
hi htmlValue ctermfg=187 guifg=#dfdfaf
hi htmlTitle ctermfg=254 ctermbg=95
" hi htmlArg ctermfg=146
" hi htmlTagName ctermfg=146
" hi htmlString ctermfg=187
""" django {{{3
hi djangoVarBlock ctermfg=180
hi djangoTagBlock ctermfg=150
hi djangoStatement ctermfg=146
hi djangoFilter ctermfg=174
""" python {{{3
hi pythonExceptions ctermfg=174
""" NERDTree {{{3
hi Directory ctermfg=110 guifg=#87afdf
hi treeCWD ctermfg=180 guifg=#dfaf87
hi treeClosable ctermfg=174 guifg=#df8787
hi treeOpenable ctermfg=150 guifg=#afdf87
hi treePart ctermfg=244 guifg=#808080
hi treeDirSlash ctermfg=244 guifg=#808080
hi treeLink ctermfg=182 guifg=#dfafdf
""" VimDebug {{{3
" FIXME
" you may want to set SignColumn highlight in your .vimrc
" :help sign
" :help SignColumn
" hi currentLine term=reverse cterm=reverse gui=reverse
" hi breakPoint term=NONE cterm=NONE gui=NONE
" hi empty term=NONE cterm=NONE gui=NONE
" sign define currentLine linehl=currentLine
" sign define breakPoint linehl=breakPoint text=>>
" sign define both linehl=currentLine text=>>
" sign define empty linehl=empty

438
vim/plugins/svndiff.vim

@ -0,0 +1,438 @@
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" svndiff (C) 2007 Ico Doornekamp
"
" This program is free software; you can redistribute it and/or modify it
" under the terms of the GNU General Public License as published by the Free
" Software Foundation; either version 2 of the License, or (at your option)
" any later version.
"
" This program is distributed in the hope that it will be useful, but WITHOUT
" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
" more details.
"
" Introduction
" ------------
"
" NOTE: This plugin is unix-only!
"
" An small vim 7.0 plugin for showing RCS diff information in a file while
" editing. This plugin runs a diff between the current buffer and the original
" file from the version control system, and shows coloured signs indicating
" where the buffer differs from the original file from the repository. The
" original text is not shown, only signs are used to indicate where changes were
" made. With proper key bindings configured, fast navigation between changed
" blocks is also provided.
"
" Despite the name 'svndiff' this plugin supports the following RCS systems:
"
" - CVS
" - Fossil
" - Git
" - Mercurial
" - Perforce / p4
" - Subversion
"
" The type of RCS will be detected when first issuing a svndiff command on
" the file.
"
" The following symbols and syntax highlight groups are used for the signs:
"
" > DiffAdd: Newly added lines. (default=blue)
"
" ! DiffChange: Lines which are changed from the original. (default=cyan)
"
" < DiffDel: Applied to the lines directly above and below a deleted block
" (default=magenta)
"
" Usage
" -----
"
" The plugin defines one function: Svndiff(). This function figures out the
" difference between the current buffer and it's RCS original, and adds the
" signs at the places where the buffer differs from the original file from svn
" or git. You'll need to call this function after making changes to update the
" highlighting.
"
" The function takes one argument specifying an additional action to perform:
"
" "prev" : jump to the previous different block
" "next" : jump to the next different block
" "clear" : clean up all signs
"
" You might want to map some keys to run the Svndiff function. For
" example, add to your .vimrc:
"
" noremap <F3> :call Svndiff("prev")<CR>
" noremap <F4> :call Svndiff("next")<CR>
" noremap <F5> :call Svndiff("clear")<CR>
"
"
" Configuration
" -------------
"
" The following configuration variables are availabe:
"
" * g:svndiff_autoupdate
"
" If this variable is defined, svndiff will automatically update the signs
" when the user stops typing for a short while, and when leaving insert
" mode. This might slow things down on large files, so use with caution.
" The vim variable 'updatetime' can be used to set the auto-update interval,
" but note that changing this variable other effects as well. (refer to the
" vim docs for more info)
" To use, add to your .vimrc:
"
" let g:svndiff_autoupdate = 1
"
" * g:svndiff_one_sign_delete
"
" Normally, two 'delete' signs are placed around the location where
" text was deleted. When this variable is defined, only one sign is
" placed, above the location of the deleted text.
" To use, add to your .vimrc:
"
" let g:svndiff_one_sign_delete = 1
"
" Colors
" ------
"
" Personally, I find the following colours more intuitive for diff colours:
" red=deleted, green=added, yellow=changed. If you want to use these colours,
" try adding the following lines to your .vimrc
"
" hi DiffAdd ctermfg=0 ctermbg=2 guibg='green'
" hi DiffDelete ctermfg=0 ctermbg=1 guibg='red'
" hi DiffChange ctermfg=0 ctermbg=3 guibg='yellow'
"
" Changelog
" ---------
"
" 1.0 2007-04-02 Initial version
"
" 1.1 2007-04-02 Added goto prev/next diffblock commands
"
" 1.2 2007-06-14 Updated diff arguments from -u0 (obsolete) to -U0
"
" 2.0 2007-08-16 Changed from syntax highlighting to using signs, thanks
" to Noah Spurrier for the idea. NOTE: the name of the
" function changed from Svndiff_show() to Svndiff(), so
" you might need to update your .vimrc mappings!
"
" 3.0 2008-02-02 Redesign with some ideas from Jan Bezdekovsky. The
" diff is only updated when the buffer actually changes,
" cleanup of signs is now done properly and some info
" about each diff block is printed in the status line.
"
" 3.1 2008-02-04 Fixed bug that broke plugin in non-english locales, thanks
" to Bernhard Walle for the patch
"
" 3.2 2008-02-27 The latest rewrite broke vim 6 compatiblity. The plugin
" is now simply disabled for older vim versions to avoid
" a lot of warnings when loading.
"
" 4.0 2008-11-24 Added GIT support. The RCS type is now detected (svn/git)
"
" 4.1 2008-11-25 Added CVS support.
"
" 4.2 2009-07-31 Added support for proper handling of non-unix file formats
" which use different newline conventions (dos, mac)
"
" 4.3 2010-05-08 Added support for Mercurial, fixed git support (thanks
" Frankovskyi Bogdan)
"
" 4.4 2011-03-30 Added support for perforce/p4 (thanks, Timandahaf)
"
" 4.5 2011-10-09 Bugfix when trying to use svndiff in a new fileless buffer
" (Frankovskyi Bogdan)
"
" 4.6 2012-06-02 Added support for the Fossil SCM (Andrea Federico
" Grisotto)
"
" 4.7 2013-04-25 Fixed git diff when not in top git directory
"
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
if v:version < 700
finish
endif
" Globals for this plugin
let s:sign_base = 200000 " Base for our sign id's, hoping to avoid colisions
let s:is_active = {} " dictionary with buffer names that have svndiff active
let s:rcs_type = {} " RCS type, will be autodetected to one of svn/git/hg/cvs/p4
let s:rcs_cmd = {} " Shell command to execute to get contents of clean file from RCS
let s:diff_signs = {} " dict with list of ids of all signs, per file
let s:diff_blocks = {} " dict with list of ids of first line of each diff block, per file
let s:changedtick = {} " dict with changedticks of each buffer since last invocation
let s:newline = {} " dict with newline character of each buffer
" Commands to execute to get current file contents in various rcs systems
let s:rcs_cmd_svn = "svn cat '%s'"
let s:rcs_cmd_git = "git cat-file -p HEAD:$(git ls-files --full-name '%s')"
let s:rcs_cmd_hg = "hg cat '%s'"
let s:rcs_cmd_cvs = "cvs -q update -p '%s'"
let s:rcs_cmd_p4 = "p4 print '%s'"
let s:rcs_cmd_fossil = "fossil finfo -p '%s'"
"
" Do the diff and update signs.
"
function s:Svndiff_update(...)
let fname = bufname("%")
if ! exists("s:is_active[fname]")
return 0
end
" Guess RCS type for this file
if ! has_key(s:rcs_type, fname)
" skip new files created in vim buffer
if ! filereadable(fname)
return 0
end
let info = system("LANG=C svn info " . fname)
if match(info, "Path") != -1
let s:rcs_type[fname] = "svn"
let s:rcs_cmd[fname] = s:rcs_cmd_svn
end
let info = system("git status " . fname)
if v:shell_error == 0
let s:rcs_type[fname] = "git"
let s:rcs_cmd[fname] = s:rcs_cmd_git
end
let info = system("fossil status " . fname)
if v:shell_error == 0
let s:rcs_type[fname] = "fossil"
let s:rcs_cmd[fname] = s:rcs_cmd_fossil
end
let info = system("cvs st " . fname)
if v:shell_error == 0
let s:rcs_type[fname] = "cvs"
let s:rcs_cmd[fname] = s:rcs_cmd_cvs
end
let info = system("hg status " . fname)
if v:shell_error == 0
let s:rcs_type[fname] = "hg"
let s:rcs_cmd[fname] = s:rcs_cmd_hg
end
let info = system("p4 fstat " . fname)
if match(info, "depotFile") != -1
let s:rcs_type[fname] = "p4"
let s:rcs_cmd[fname] = s:rcs_cmd_p4
end
end
" Could not detect RCS type, print message and exit
if ! has_key(s:rcs_type, fname)
echom "Svndiff: Warning, file " . fname . " is not managed by a supported versioning system!"
unlet s:is_active[fname]
return
end
" Find newline characters for the current file
if ! has_key(s:newline, fname)
let l:ff_to_newline = { "dos": "\r\n", "unix": "\n", "mac": "\r" }
let s:newline[fname] = l:ff_to_newline[&l:fileformat]
echom s:newline[fname]
end
" Check if the changedticks changed since the last invocation of this
" function. If nothing changed, there's no need to update the signs.
if exists("s:changedtick[fname]") && s:changedtick[fname] == b:changedtick
return 1
end
let s:changedtick[fname] = b:changedtick
" The diff has changed since the last time, so we need to update the signs.
" This is where the magic happens: pipe the current buffer contents to a
" shell command calculating the diff in a friendly parsable format.
let contents = join(getbufline("%", 1, "$"), s:newline[fname])
let diff = system("diff -U0 <(" . substitute(s:rcs_cmd[fname], "%s", fname, "") . ") <(cat;echo)", contents)
" clear the old signs
call s:Svndiff_clear()
" Parse the output of the diff command and put signs at changed, added and
" removed lines
for line in split(diff, '\n')
let part = matchlist(line, '@@ -\([0-9]*\),*\([0-9]*\) +\([0-9]*\),*\([0-9]*\) @@')
if ! empty(part)
let old_from = part[1]
let old_count = part[2] == '' ? 1 : part[2]
let new_from = part[3]
let new_count = part[4] == '' ? 1 : part[4]
" Figure out if text was added, removed or changed.
if old_count == 0
let from = new_from
let to = new_from + new_count - 1
let name = 'svndiff_add'
let info = new_count . " lines added"
elseif new_count == 0
let from = new_from
let to = new_from
let name = 'svndiff_delete'
let info = old_count . " lines deleted"
if ! exists("g:svndiff_one_sign_delete")
let to += 1
endif
else
let from = new_from
let to = new_from + new_count - 1
let name = 'svndiff_change'
let info = new_count . " lines changed"
endif
let id = from + s:sign_base
let s:diff_blocks[fname] += [{ 'id': id, 'info': info }]
" Add signs to mark the changed lines
let line = from
while line <= to
let id = line + s:sign_base
exec 'sign place ' . id . ' line=' . line . ' name=' . name . ' file=' . fname
let s:diff_signs[fname] += [id]
let line = line + 1
endwhile
endif
endfor
endfunction
"
" Remove all signs we placed earlier
"
function s:Svndiff_clear(...)
let fname = bufname("%")
if exists("s:diff_signs[fname]")
for id in s:diff_signs[fname]