This commit is contained in:
2014-06-14 00:26:03 +02:00
parent 6903a93059
commit 77c20f1302
11 changed files with 480 additions and 319 deletions

View File

@@ -253,8 +253,8 @@
workspace_layout default workspace_layout default
# Draw normal borders around all windows with 1-pixel borders # Draw normal borders around all windows with 1-pixel borders
new_window normal 1 new_window 1pixel
new_float normal 3 new_float normal 1
# Do show borders at the screen edges # Do show borders at the screen edges
hide_edge_borders none hide_edge_borders none
@@ -301,9 +301,9 @@ client.urgent #2f343a #900000 #ffffff #900000
for_window [class="^Xfce4-notifyd$"] floating enable , border none for_window [class="^Xfce4-notifyd$"] floating enable , border none
for_window [class="^Conky$"] floating enable for_window [class="^Conky$"] floating enable
for_window [class="^Terminator$"] border 1pixel for_window [class="^Terminator$"] border 1pixel
for_window [class="^Firefox$"] border 1pixel for_window [class="^Firefox$"] border none
for_window [class="^Truecrypt$"] floating enable for_window [class="^Truecrypt$"] floating enable
for_window [class="^URxvt$"] border 1pixel for_window [class="^URxvt$"] border none
for_window [class="^Cairo-dock$"] floating enable , border none for_window [class="^Cairo-dock$"] floating enable , border none
for_window [class="^Pavucontrol$"] floating enable for_window [class="^Pavucontrol$"] floating enable
for_window [title="^Skype.*for Linux$" ] floating enable , border none for_window [title="^Skype.*for Linux$" ] floating enable , border none
@@ -312,7 +312,13 @@ client.urgent #2f343a #900000 #ffffff #900000
for_window [class="^Docky$" ] floating enable , border none for_window [class="^Docky$" ] floating enable , border none
for_window [class="^Skype$" ] border 1pixel for_window [class="^Skype$" ] border 1pixel
for_window [class="^Steam$" ] border 1pixel for_window [class="^Steam$" ] border 1pixel
for_window [class="^Eclipse$" ] border none
#for_window [class="^Steam$" title="^Friends$" ] border 1pixel , floating enable , floating_maximum_size 200 x 700 #for_window [class="^Steam$" title="^Friends$" ] border 1pixel , floating enable , floating_maximum_size 200 x 700
#for_window [class="^Steam$" title="Chat$" ] border 1pixel , floating enable #for_window [class="^Steam$" title="Chat$" ] border 1pixel , floating enable
for_window [class="^sublime-text$" ] border none
for_window [class="^Evince$" ] border none
for_window [class="^Designer$" ] border none
for_window [class="^main\.py$" ] floating enable

View File

@@ -30,7 +30,7 @@ bar {
id bar-0 id bar-0
font pango:DejaVu Sans Mono, Icons 11 font pango:DejaVu Sans Mono, Icons 10.5
colors { colors {
background #222222 background #222222

View File

@@ -83,7 +83,7 @@ while read line ; do
case "$name" in case "$name" in
"mpd_toggle") "mpd_toggle")
mpc toggle 1>/dev/null 2>%1 mpc toggle 1>/dev/null 2>&1
;; ;;
"pacman") "pacman")
width=500 width=500

View File

@@ -1,2 +1 @@
echo "update" >> ~/test.log
kill -SIGUSR1 $(cat $LOGDIR/i3/conky.pid) kill -SIGUSR1 $(cat $LOGDIR/i3/conky.pid)

View File

@@ -285,6 +285,14 @@ audio_output {
## sink "remote_server_sink" # optional ## sink "remote_server_sink" # optional
} }
# #
# This is necessary for visualization in ncmpcpp
audio_output {
type "fifo"
name "mpd_fifo"
path "/tmp/mpd.fifo"
format "44100:16:2"
}
#
# An example of a winmm output (Windows multimedia API). # An example of a winmm output (Windows multimedia API).
# #
#audio_output { #audio_output {
@@ -401,7 +409,7 @@ replaygain_limit "yes"
#max_connections "10" #max_connections "10"
#max_playlist_length "16384" #max_playlist_length "16384"
#max_command_list_size "2048" #max_command_list_size "2048"
#max_output_buffer_size "8192" max_output_buffer_size "16384"
# #
############################################################################### ###############################################################################

View File

@@ -59,9 +59,9 @@ mpd_communication_mode = "notifications"
## If you set format to 44100:16:2, make it 'yes'. ## If you set format to 44100:16:2, make it 'yes'.
## ##
# #
#visualizer_in_stereo = "no" visualizer_in_stereo = "no"
# #
#visualizer_fifo_path = "" visualizer_fifo_path = "/tmp/mpd.fifo"
# #
## ##
## Note: Below parameter is needed for ncmpcpp ## Note: Below parameter is needed for ncmpcpp
@@ -71,7 +71,7 @@ mpd_communication_mode = "notifications"
## are some problems with it. ## are some problems with it.
## ##
# #
#visualizer_output_name = "" visualizer_output_name = "mpd_fifo"
# #
## ##
## Note: Below parameter defines how often ncmpcpp ## Note: Below parameter defines how often ncmpcpp
@@ -81,16 +81,16 @@ mpd_communication_mode = "notifications"
## Keep in mind that sane values start with >=10. ## Keep in mind that sane values start with >=10.
## ##
# #
#visualizer_sync_interval = "30" visualizer_sync_interval = "30"
# #
## ##
## Note: To enable spectrum frequency visualization ## Note: To enable spectrum frequency visualization
## you need to compile ncmpcpp with fftw3 support. ## you need to compile ncmpcpp with fftw3 support.
## ##
# #
#visualizer_type = "wave" (spectrum/wave) visualizer_type = "spectrum" (spectrum/wave)
# #
#visualizer_look = "◆│" visualizer_look = "◆│"
# #
##### system encoding ##### ##### system encoding #####
## ##
@@ -173,11 +173,11 @@ mpd_communication_mode = "notifications"
# #
song_list_format = "{%a - }{%t}|{$8%f$9}$R{$3(%l)$9}" song_list_format = "{%a - }{%t}|{$8%f$9}$R{$3(%l)$9}"
# #
song_status_format = "{{%a{ \"%b\"{ (%y)}} - }{%t}}|{%f}" #song_status_format = "{{%a{ \"%b\"{ (%y)}} - }{%t}}|{%f}"
# #
song_library_format = "{%n - }{%t}|{%f}" #song_library_format = "{%n - }{%t}|{%f}"
# #
tag_editor_album_format = "{(%y) }%b" #tag_editor_album_format = "{(%y) }%b"
# #
## ##
## Note: Below variables are for alternative version of user's interface. ## Note: Below variables are for alternative version of user's interface.
@@ -255,7 +255,7 @@ tag_editor_album_format = "{(%y) }%b"
## not available. ## not available.
## ##
# #
song_columns_list_format = "(7f)[green]{l} (25)[cyan]{a} (40)[]{t|f} (30)[red]{b}" #song_columns_list_format = "(7f)[green]{l} (25)[cyan]{a} (40)[]{t|f} (30)[red]{b}"
# #
##### various settings ##### ##### various settings #####
# #
@@ -274,19 +274,19 @@ song_columns_list_format = "(7f)[green]{l} (25)[cyan]{a} (40)[]{t|f} (30)[red]{b
# #
#playlist_separate_albums = "no" #playlist_separate_albums = "no"
# #
playlist_display_mode = "columns" (classic/columns) #playlist_display_mode = "classic" (classic/columns)
# #
browser_display_mode = "columns" (classic/columns) #browser_display_mode = "classic" (classic/columns)
# #
search_engine_display_mode = "columns" (classic/columns) #search_engine_display_mode = "classic" (classic/columns)
# #
playlist_editor_display_mode = "columns" (classic/columns) #playlist_editor_display_mode = "classic" (classic/columns)
# #
#discard_colors_if_item_is_selected = "yes" #discard_colors_if_item_is_selected = "yes"
# #
incremental_seeking = "yes" #incremental_seeking = "yes"
# #
seek_time = "1" #seek_time = "1"
# #
#autocenter_mode = "no" #autocenter_mode = "no"
# #
@@ -298,11 +298,11 @@ seek_time = "1"
## ##
progressbar_look = "==" progressbar_look = "=="
# #
default_place_to_search_in = "database" (database/playlist) #default_place_to_search_in = "database" (database/playlist)
# #
user_interface = "alternative" (classic/alternative) #user_interface = "classic" (classic/alternative)
# #
media_library_left_column = "A" (possible values: a,y,g,c,p, legend above) #media_library_left_column = "a" (possible values: a,y,g,c,p, legend above)
# #
#default_find_mode = "wrapped" (wrapped/normal) #default_find_mode = "wrapped" (wrapped/normal)
# #
@@ -312,9 +312,9 @@ media_library_left_column = "A" (possible values: a,y,g,c,p, legend above)
# #
#default_tag_editor_pattern = "%n - %t" #default_tag_editor_pattern = "%n - %t"
# #
header_visibility = "yes" #header_visibility = "yes"
# #
statusbar_visibility = "yes" #statusbar_visibility = "yes"
# #
#titles_visibility = "yes" #titles_visibility = "yes"
# #
@@ -393,11 +393,11 @@ statusbar_visibility = "yes"
# #
#clock_display_seconds = "no" #clock_display_seconds = "no"
# #
display_volume_level = "yes" #display_volume_level = "yes"
# #
display_bitrate = "no" #display_bitrate = "no"
# #
display_remaining_time = "no" #display_remaining_time = "no"
# #
#regular_expressions = "basic" (basic/extended) #regular_expressions = "basic" (basic/extended)
# #
@@ -406,15 +406,15 @@ display_remaining_time = "no"
## "The" word while sorting items in browser, tags in ## "The" word while sorting items in browser, tags in
## media library, etc. ## media library, etc.
## ##
ignore_leading_the = "yes" #ignore_leading_the = "no"
# #
#block_search_constraints_change_if_items_found = "yes" #block_search_constraints_change_if_items_found = "yes"
# #
mouse_support = "yes" #mouse_support = "yes"
# #
mouse_list_scroll_whole_page = "yes" #mouse_list_scroll_whole_page = "yes"
# #
empty_tag_marker = "[empty]" #empty_tag_marker = "<empty>"
# #
#tag_editor_extended_numeration = "no" #tag_editor_extended_numeration = "no"
# #
@@ -438,7 +438,7 @@ empty_tag_marker = "[empty]"
## in database and local one for searching in current playlist) ## in database and local one for searching in current playlist)
## ##
# #
search_engine_default_search_mode = "1" #search_engine_default_search_mode = "1"
# #
## ##
## Note: Below variables can allow you to physically ## Note: Below variables can allow you to physically
@@ -446,17 +446,17 @@ search_engine_default_search_mode = "1"
## ncmpcpp's browser screen. ## ncmpcpp's browser screen.
## ##
# #
allow_physical_files_deletion = "no" #allow_physical_files_deletion = "no"
# #
allow_physical_directories_deletion = "no" #allow_physical_directories_deletion = "no"
# #
external_editor = "vim" #external_editor = ""
# #
use_console_editor = "yes" (set to yes, if your editor is console app) #use_console_editor = "no" (set to yes, if your editor is console app)
# #
##### colors definitions ##### ##### colors definitions #####
# #
colors_enabled = "yes" #colors_enabled = "yes"
# #
#empty_tag_color = "cyan" #empty_tag_color = "cyan"
# #

View File

@@ -12,175 +12,175 @@
## will be used to switch between columns. ## will be used to switch between columns.
## ##
# #
#key_up = 259 'k' key_up = 259 'k'
#
#key_down = 258 'j' key_down = 258 'j'
#
#key_up_album = '[' key_up_album = '['
#
#key_down_album = ']' key_down_album = ']'
#
#key_up_artist = '{' key_up_artist = '{'
#
#key_down_artist = '}' key_down_artist = '}'
#
#key_page_up = 339 key_page_up = 339
#
#key_page_down = 338 key_page_down = 338
#
#key_home = 262 key_home = 262
#
#key_end = 360 key_end = 360
#
#key_space = 32 key_space = 32
#
#key_enter = 10 key_enter = 10
#
#key_delete = 330 'd' key_delete = 330 'd'
#
#key_volume_up = 261 '+' key_volume_up = 261 '+'
#
#key_volume_down = 260 '-' key_volume_down = 260 '-'
#
#key_prev_column = 260 key_prev_column = 260
#
#key_next_column = 261 key_next_column = 261
#
#key_toggle_space_mode = 't' key_toggle_space_mode = 't'
#
#key_toggle_add_mode = 'T' key_toggle_add_mode = 'T'
#
#key_toggle_mouse = '|' key_toggle_mouse = '|'
#
#key_toggle_bitrate_visibility = '#' key_toggle_bitrate_visibility = '#'
#
#key_screen_switcher = 9 key_screen_switcher = 9
#
#key_backward_screen_switcher = 353 key_backward_screen_switcher = 353
#
#key_help = '1' 265 key_help = '1' 265
#
#key_playlist = '2' 266 key_playlist = '2' 266
#
#key_browser = '3' 267 key_browser = '3' 267
#
#key_search_engine = '4' 268 key_search_engine = '4' 268
#
#key_media_library = '5' 269 key_media_library = '5' 269
#
#key_playlist_editor = '6' 270 key_playlist_editor = '6' 270
#
#key_tag_editor = '7' 271 key_tag_editor = '7' 271
#
#key_outputs = '8' 272 key_outputs = '8' 272
#
#key_music_visualizer = '9' 273 key_music_visualizer = '9' 273
#
#key_clock = '0' 274 key_clock = '0' 274
#
#key_server_info = '@' key_server_info = '@'
#
#key_stop = 's' key_stop = 's'
#
#key_pause = 'P' key_pause = 'P'
#
#key_next = '>' key_next = '>'
#
#key_prev = '<' key_prev = '<'
#
#key_replay = 263 127 key_replay = 263 127
#
#key_seek_forward = 'f' key_seek_forward = 'f'
#
#key_seek_backward = 'b' key_seek_backward = 'b'
#
#key_toggle_repeat = 'r' key_toggle_repeat = 'r'
#
#key_toggle_random = 'z' key_toggle_random = 'z'
#
#key_toggle_single = 'y' key_toggle_single = 'y'
#
#key_toggle_consume = 'R' key_toggle_consume = 'R'
#
#key_toggle_replay_gain_mode = 'Y' key_toggle_replay_gain_mode = 'Y'
#
#key_shuffle = 'Z' key_shuffle = 'Z'
#
#key_toggle_crossfade = 'x' key_toggle_crossfade = 'x'
#
#key_set_crossfade = 'X' key_set_crossfade = 'X'
#
#key_update_db = 'u' key_update_db = 'u'
#
#key_sort_playlist = 22 key_sort_playlist = 22
#
#key_apply_filter = 6 key_apply_filter = 6
#
#key_find_forward = '/' key_find_forward = '/'
#
#key_find_backward = '?' key_find_backward = '?'
#
#key_next_found_position = '.' key_next_found_position = '.'
#
#key_prev_found_position = ',' key_prev_found_position = ','
#
#key_toggle_find_mode = 'w' key_toggle_find_mode = 'w'
#
#key_edit_tags = 'e' key_edit_tags = 'e'
#
#key_go_to_position = 'g' key_go_to_position = 'g'
#
#key_song_info = 'i' key_song_info = 'i'
#
#key_artist_info = 'I' key_artist_info = 'I'
#
#key_lyrics = 'l' key_lyrics = 'l'
#
#key_reverse_selection = 'v' key_reverse_selection = 'v'
#
#key_deselect_all = 'V' key_deselect_all = 'V'
#
#key_select_album = 'B' key_select_album = 'B'
#
#key_add_selected_items = 'A' key_add_selected_items = 'A'
#
#key_clear = 'c' key_clear = 'c'
#
#key_crop = 'C' key_crop = 'C'
#
#key_move_song_up = 'm' key_move_song_up = 'm'
#
#key_move_song_down = 'n' key_move_song_down = 'n'
#
#key_move_to = 'M' key_move_to = 'M'
#
#key_move_before = 0 key_move_before = 0
#
#key_move_after = 0 key_move_after = 0
#
#key_add = 'a' key_add = 'a'
#
#key_save_playlist = 'S' key_save_playlist = 'S'
#
#key_go_to_now_playing = 'o' key_go_to_now_playing = 'o'
#
#key_toggle_auto_center = 'U' key_toggle_auto_center = 'U'
#
#key_toggle_display_mode = 'p' key_toggle_display_mode = 'p'
#
#key_toggle_separators_in_playlist = '!' key_toggle_separators_in_playlist = '!'
#
#key_toggle_lyrics_db = 'L' key_toggle_lyrics_db = 'L'
#
#key_toggle_fetching_lyrics_for_current_song_in_background = 'F' key_toggle_fetching_lyrics_for_current_song_in_background = 'F'
#
#key_go_to_containing_directory = 'G' key_go_to_containing_directory = 'G'
#
#key_go_to_media_library = '~' key_go_to_media_library = '~'
#
#key_go_to_parent_dir = 263 127 key_go_to_parent_dir = 263 127
#
#key_switch_tag_type_list = '`' key_switch_tag_type_list = '`'
#
#key_quit = 'q' 'Q' key_quit = 'q' 'Q'
#

152
vim/vimrc
View File

@@ -35,6 +35,9 @@ Bundle 'gmarik/vundle'
" solarized color theme " solarized color theme
Bundle 'altercation/vim-colors-solarized' Bundle 'altercation/vim-colors-solarized'
" monokai color theme
Bundle 'sickill/vim-monokai'
" display the undo history in a graph " display the undo history in a graph
Bundle 'mbbill/undotree' Bundle 'mbbill/undotree'
@@ -45,10 +48,10 @@ Bundle 'scrooloose/nerdtree'
Bundle 'tpope/vim-surround' Bundle 'tpope/vim-surround'
" better commenting " better commenting
Bundle 'scrooloose/nerdcommenter' Bundle 'tpope/vim-commentary'
" nice auto completion " nice auto completion
Bundle 'Shougo/neocomplcache.vim' Bundle 'Valloric/YouCompleteMe'
" nice text alignment " nice text alignment
Bundle 'godlygeek/tabular' Bundle 'godlygeek/tabular'
@@ -63,16 +66,57 @@ Bundle 'tpope/vim-speeddating'
Bundle 'tpope/vim-fugitive' Bundle 'tpope/vim-fugitive'
" buffer expolorer " buffer expolorer
Bundle 'fholgado/minibufexpl.vim' "Bundle 'fholgado/minibufexpl.vim'
" shows a code outline " shows a code outline
Bundle 'majutsushi/tagbar' Bundle 'majutsushi/tagbar'
" automatically enables completion when typing " python specific stuff
Bundle 'vim-scripts/autocomplpop' Bundle 'klen/python-mode'
" incremental visual mode
Bundle 'terryma/vim-expand-region'
" splitting single line code
Bundle 'AndrewRadev/splitjoin.vim'
" motion to two characters
Bundle 'justinmk/vim-sneak'
" alignment operator
Bundle 'tommcdo/vim-lion'
Bundle 'wincent/Command-T'
Bundle 'sjl/gundo.vim'
Bundle 'kien/ctrlp.vim'
Bundle 'PeterRincker/vim-argumentative'
Bundle 'wellle/targets.vim'
Bundle 'Lokaltog/vim-easymotion'
Bundle 'terryma/vim-multiple-cursors'
Bundle 'flazz/vim-colorschemes'
set t_Co=256 set t_Co=256
" setup for pymode
let g:pymode_trim_whitespaces = 1
let g:pymode_lint_on_write = 0
let g:pymode_lint_unmodified = 0
let g:pymode_lint_on_fly = 0
let g:pymoe_rope = 0
let g:pymode_rope_completion = 0
"let g:pymode_rope_completion_on_dot = 1
let g:pymode_rope_goto_definition_cmd = "new"
let g:pymode_syntax_all = 1
let g:pymode_options = 1
" setup for the solarized color theme " setup for the solarized color theme
set background=dark set background=dark
let g:solarized_termcolors=16 let g:solarized_termcolors=16
@@ -80,16 +124,26 @@ let g:solarized_termtrans=1
let g:solarized_contrast="normal" let g:solarized_contrast="normal"
let g:solarized_visibility="normal" let g:solarized_visibility="normal"
syntax enable syntax enable
colorscheme solarized colorscheme monokai
filetype plugin indent on filetype plugin indent on
" setup for vim-airline " setup for vim-airline
let g:airline_left_sep = '' let g:airline_theme='powerlineish'
let g:airline_right_sep = '' let g:airline_left_sep=''
let g:airline_right_sep=''
"let g:airline_section_z=''
" enable tabline at the top showing all buffers " enable tabline at the top showing all buffers
let g:airline#extensions#tabline#enabled = 1 "let g:airline#extensions#tabline#enabled = 1
"let g:airline_theme=
let g:ycm_complete_in_comments = 0
let g:ycm_complete_in_strings = 1
let g:ycm_collect_identifiers_from_comments_and_strings = 0
let g:ycm_seed_identifiers_with_syntax = 1
let g:ycm_add_preview_to_completeopt = 1
let g:ycm_autoclose_preview_window_after_completion = 1
let g:ycm_autoclose_preview_window_after_insertion = 1
set colorcolumn=79 set colorcolumn=79
set clipboard=unnamed " enable copying into the clipboard set clipboard=unnamed " enable copying into the clipboard
@@ -222,15 +276,35 @@ set colorcolumn=80 " highlight the 80st column
"set list " show specific spectial characters "set list " show specific spectial characters
"set listchars= " no trailing whitespace as '~' "set listchars= " no trailing whitespace as '~'
let mapleader = "," let mapleader = "\<Space>"
nnoremap <Leader>w :w<CR>
vmap <Leader>y "+y
vmap <Leader>d "+d
nmap <Leader>p "+p
nmap <Leader>P "+P
vmap <Leader>p "+p
vmap <Leader>P "+P
nmap <Leader><Leader> za
map , :
vmap v <Plug>(expand_region_expand)
vmap <C-v> <Plug>(expand_region_shrink)
vnoremap <silent> y y`]
vnoremap <silent> p p`]
nnoremap <silent> p p`]
" enable 'very-magic' in regex " enable 'very-magic' in regex
nnoremap / /\v "nnoremap / /\v
vnoremap / /\v "vnoremap / /\v
nnoremap <leader><space> :nohlsearch<CR> nnoremap <leader>, :nohlsearch<CR>
nnoremap <tab> %
vnoremap <tab> % noremap gV `[v`]
" make Y behave like other capitals, otherwise Y would work like yy " make Y behave like other capitals, otherwise Y would work like yy
nnoremap Y y$ nnoremap Y y$
@@ -238,25 +312,26 @@ nnoremap Y y$
nnoremap j gj nnoremap j gj
nnoremap k gk nnoremap k gk
function! TrimWhiteSpace() "function! TrimWhiteSpace()
%s/\s\+$//e " %s/\s\+$//e
endfunction "endfunction
" automatically reload .vimrc when it's saved " automatically reload .vimrc when it's saved
autocmd BufWritePost .vimrc source ~/.vimrc autocmd BufWritePost .vimrc source ~/.vimrc
autocmd FileWritePre * :call TrimWhiteSpace() "autocmd FileWritePre * :call TrimWhiteSpace()
autocmd FileAppendPre * :call TrimWhiteSpace() "autocmd FileAppendPre * :call TrimWhiteSpace()
autocmd FilterWritePre * :call TrimWhiteSpace() "autocmd FilterWritePre * :call TrimWhiteSpace()
autocmd BufWritePre * :call TrimWhiteSpace() "autocmd BufWritePre * :call TrimWhiteSpace()
" Start NERDTree when starting vim " Start NERDTree when starting vim
"autocmd vimenter * NERDTree "autocmd vimenter * NERDTree
"autocmd VimEnter * wincmd p "autocmd VimEnter * wincmd p
let NERDTreeQuitOnOpen = 1
" close NERDTree when it's the only window left " close NERDTree when it's the only window left
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif "autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif
call togglebg#map("<F5>") "call togglebg#map("<F5>")
nnoremap <C-h> <C-w>h nnoremap <C-h> <C-w>h
nnoremap <C-j> <C-w>j nnoremap <C-j> <C-w>j
@@ -264,9 +339,34 @@ nnoremap <C-k> <C-w>k
nnoremap <C-l> <C-w>l nnoremap <C-l> <C-w>l
nnoremap <F3> :NERDTreeToggle<CR> nnoremap <F3> :NERDTreeToggle<CR>
nnoremap <F4> :TagbarToggle<CR>
map <F4> :MBEToggle<CR>
" Autosave views when closing and restoring when opening again. " Autosave views when closing and restoring when opening again.
autocmd BufWinLeave *.* mkview autocmd BufWinLeave *.* mkview
autocmd BufWinEnter *.* silent loadview autocmd BufWinEnter *.* silent loadview
":inoremap <expr> <CR> pumvisible() ? '<C-e><CR>' : '<CR>'
":au WinEnter * :setlocal number relativenumber
":au WinLeave * :setlocal nonumber norelativenumber
nnoremap <up> <nop>
nnoremap <down> <nop>
nnoremap <left> <nop>
nnoremap <right> <nop>
inoremap <up> <nop>
inoremap <down> <nop>
inoremap <left> <nop>
inoremap <right> <nop>
inoremap jj <ESC>
nnoremap <leader>v <C-w>v<C-w>l
" no more ex mode
nnoremap Q <nop>
nnoremap <leader>r :%s///<Left><Left>
set virtualedit="onemore,all"

View File

@@ -2,14 +2,14 @@
Xcursor.theme: Vanilla-DMZ Xcursor.theme: Vanilla-DMZ
URxvt.scrollBar: false URxvt.scrollBar: false
URxvt.font: xft:DejaVu Sans Mono:size=11 URxvt.font: xft:DejaVu Sans Mono:size=10.5
URxvt.letterSpace: -2 URxvt.letterSpace: -1
! clickable URLs ! clickable URLs
!URxvt.perl-ext-common: default,matcher URxvt.perl-ext-common: default,matcher
!URxvt.urlLauncher: firefox URxvt.url-launcher: /usr/bin/chromium
!URxvt.matcher.button: 1 URxvt.matcher.button: 1
URxvt.intensityStyles: false URxvt.intensityStyles: false
@@ -17,7 +17,7 @@ URxvt.intensityStyles: false
URxvt.saveLines: 10000 URxvt.saveLines: 10000
URxvt.fading: 20 URxvt.fading: 40
URxvt.termName: urxvt URxvt.termName: urxvt
@@ -95,3 +95,27 @@ URxvt*color14: S_base1
URxvt*color15: S_base3 URxvt*color15: S_base3
urxvt*foreground: white
urxvt*background: black
*color0: #2E3436
*color1: #a40000
*color2: #4E9A06
*color3: #C4A000
*color4: #3465A4
*color5: #75507B
*color6: #ce5c00
*color7: #babdb9
*color8: #555753
*color9: #EF2929
*color10: #8AE234
*color11: #FCE94F
*color12: #729FCF
*color13: #AD7FA8
*color14: #fcaf3e
*color15: #EEEEEC

View File

@@ -25,6 +25,24 @@ fi
export LANG=en_US.UTF-8 export LANG=en_US.UTF-8
start_wm() {
log "generating i3 config"
I3_LOG="$LOGDIR/i3/i3.log"
I3_LOGOLD="${I3_LOG}.old"
# simple logrotate so we can still get info about the last session
if [[ -f "$I3_LOG" ]] ; then
log "moving old i3 log at $I3_LOG to $I3_LOGOLD"
mv -f "$I3_LOG" "$I3_LOGOLD"
fi
[[ ! -d "$(dirname $I3_LOG)" ]] && mkdir -p "$(dirname $I3_LOG)"
SESSION_CONF=$(bash "$HOME/.i3/scripts/genconfig.bash")
log "generated, starting i3"
exec i3 -c "$SESSION_CONF" >> "$LOGDIR/i3/i3.log"
}
# keyboard options # keyboard options
keyboard_layout=de keyboard_layout=de
keyboard_variant=nodeadkeys keyboard_variant=nodeadkeys
@@ -45,18 +63,26 @@ redshift_colortemp="5500:4000"
# start mpd # start mpd
if [[ -z "$(pgrep --euid hannes --exact "^mpd$")" ]] ; then if [[ -z "$(pgrep --euid hannes --exact "^mpd$")" ]] ; then
log "mpd is not running, starting mpd" log "mpd is not running, starting mpd"
mpd "$HOME/.mpd/mpd.conf" mpd "$HOME/.mpd/mpd.conf" &
else else
log "mpd already running, will not start another instance" log "mpd already running, will not start another instance"
fi fi
## start the urxvt daemon
#if pidof urxvtd &>/dev/null ; then
# log "urxvtd already running"
#else
# log "starting urxvtd"
# urxvtd -q --fork
#fi
# start the pulseaudio volume control tray applet # start the pulseaudio volume control tray applet
log "starting pasystray" log "starting pasystray"
pasystray & pasystray & &> $LOGFILE
# start dropbox # start dropbox
log "starting dropboxd" log "starting dropboxd"
dropboxd & dropboxd & &> $LOGFILE
# start the wallpaper changer # start the wallpaper changer
log "starting $path_wallchanger" log "starting $path_wallchanger"
@@ -64,48 +90,33 @@ $path_wallchanger "$wallpaper_directory" "$wallpaper_interval" "$wallpaper_fallb
# start redshift # start redshift
log "starting redshift-gtk" log "starting redshift-gtk"
redshift-gtk -l "$redshift_lat_long" -t "$redshift_colortemp" & redshift-gtk -l "$redshift_lat_long" -t "$redshift_colortemp" & &> $LOGFILE
# not it
# set keyboard layout # set keyboard layout
log "setting keyboard layout" log "setting keyboard layout"
setxkbmap -layout "$keyboard_layout" -variant "$keyboard_variant" & setxkbmap -layout "$keyboard_layout" -variant "$keyboard_variant" & &> $LOGFILE
# set key repeat delay # set key repeat delay
log "setting key repeat delay" log "setting key repeat delay"
xset r rate "$keyboard_repeat_delay" "$keyboard_repeat_speed" & xset r rate "$keyboard_repeat_delay" "$keyboard_repeat_speed" & &> $LOGFILE
# execute the host-specific .xinitrc-addition # execute the host-specific .xinitrc-addition
hostfile="$HOME/.xinitrc.d/$(hostname).xinitrc" hostfile="$HOME/.xinitrc.d/$(hostname).xinitrc"
log "looking for host specific xinitrc addition at $hostfile" log "looking for host specific xinitrc addition at $hostfile"
if [[ -f "$hostfile" ]] ; then if [[ -f "$hostfile" ]] ; then
log "found it. executing" log "found it. executing"
bash "$hostfile" & bash "$hostfile" & &> $LOGFILE
else else
log "found none" log "found none"
fi fi
if [[ -f ~/.Xresources ]] ; then if [[ -f ~/.Xresources ]] ; then
log "found ~/.Xresources, merging it into xrdb" log "found ~/.Xresources, merging it into xrdb"
xrdb -merge ~/.Xresources & xrdb -merge ~/.Xresources & &> $LOGFILE
else else
log "~/.Xresources not found" log "~/.Xresources not found"
fi fi
I3_LOG="$LOGDIR/i3/i3.log"
I3_LOGOLD="${I3_LOG}.old"
# simple logrotate so we can still get info about the last session
if [[ -f "$I3_LOG" ]] ; then
log "moving old i3 log at $I3_LOG to $I3_LOGOLD"
mv -f "$I3_LOG" "$I3_LOGOLD"
fi
[[ ! -d "$(dirname $I3_LOG)" ]] && mkdir -p "$(dirname $I3_LOG)"
log "generating i3 config"
SESSION_CONF=$(bash "$HOME/.i3/scripts/genconfig.bash")
log "generated, starting i3"
exec i3 -c "$SESSION_CONF" >> "$LOGDIR/i3/i3.log"
start_wm

109
zsh/zshrc
View File

@@ -1,50 +1,21 @@
# Path to your oh-my-zsh configuration. source ~/.ohmyzshrc
ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load. #autoload -U promptinit
# Look in ~/.oh-my-zsh/themes/ #promptinit
# Optionally, if you set this to "random", it'll load a random theme each #
# time that oh-my-zsh is loaded. #autoload -U colors
ZSH_THEME="bira" #robbyrussell" #colors
#
#autoload -U compinit
#compinit
#
#HISTSIZE=10000
#SAVEHIST=10000
HISTFILE="$HOME/.zsh_history"
# Example aliases #PROMPT="%{$fg[white]%}╭─%{$fg[red]%}%n%{$fg[white]%}@%{$fg[green]%}%M %{$fg[cyan]%}%~
# alias zshconfig="mate ~/.zshrc" #%{$fg[white]%}╰─%B$%b "
# alias ohmyzsh="mate ~/.oh-my-zsh" #RPROMPT="%{$fg[red]%}%? %{$fg[white]%}%*%{$reset_color%}"
# Set to this to use case-sensitive completion
CASE_SENSITIVE="true"
# Comment this out to disable bi-weekly auto-update checks
DISABLE_AUTO_UPDATE="true"
# Uncomment to change how often before auto-updates occur? (in days)
# export UPDATE_ZSH_DAYS=13
# Uncomment following line if you want to disable colors in ls
# DISABLE_LS_COLORS="true"
# Uncomment following line if you want to disable autosetting terminal title.
# DISABLE_AUTO_TITLE="true"
# Uncomment following line if you want to disable command autocorrection
DISABLE_CORRECTION="true"
# Uncomment following line if you want red dots to be displayed while waiting for completion
# COMPLETION_WAITING_DOTS="true"
# Uncomment following line if you want to disable marking untracked files under
# VCS as dirty. This makes repository status check for large repositories much,
# much faster.
# DISABLE_UNTRACKED_FILES_DIRTY="true"
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
plugins=(git)
source $ZSH/oh-my-zsh.sh
# Customize to your needs...
man() { man() {
env LESS_TERMCAP_mb=$'\E[01;31m' \ env LESS_TERMCAP_mb=$'\E[01;31m' \
@@ -57,7 +28,32 @@ man() {
man "$@" man "$@"
} }
### VARIABLES
export EDITOR="vim"
export VISUAL="vim"
### BOOKMARKS
bm() {
case "$1" in
dev)
cd "$HOME/development/projects"
;;
dot)
cd "$HOME/dotfiles"
;;
*)
echo "unknown target"
;;
esac
}
### SHELL OPTIONS ### SHELL OPTIONS
setopt EXTENDED_HISTORY
setopt HIST_EXPIRE_DUPS_FIRST
setopt HIST_VERIFY
setopt INC_APPEND_HISTORY
setopt SHARE_HISTORY
setopt AUTO_CD setopt AUTO_CD
setopt APPEND_HISTORY setopt APPEND_HISTORY
setopt HIST_IGNORE_DUPS setopt HIST_IGNORE_DUPS
@@ -74,14 +70,17 @@ setopt LONG_LIST_JOBS
[[ $TERM == "urxvt" ]] && export TERM="rxvt-unicode" [[ $TERM == "urxvt" ]] && export TERM="rxvt-unicode"
### ALIASES ### ALIASES
#
alias su="su -" alias su="su -"
LS_HIDE="*.py[co]"
# --dereference-command-line
alias ls="ls --group-directories-first --classify --color=auto --hide=\"$LS_HIDE\""
alias ll='ls -AlF' alias ll='ls -AlF'
alias la='ls -A' alias la='ls -A'
alias ls='ls --group-directories-first --classify --color=auto'
alias grep='grep --color=auto' alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto' alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto' alias egrep='egrep --color=auto'
@@ -110,6 +109,10 @@ alias very="git"
alias much="git" alias much="git"
alias wow="git status" alias wow="git status"
alias v="vim"
alias g="grep"
### FUNCTIONS ### FUNCTIONS
function mount() { function mount() {
@@ -159,6 +162,12 @@ ruler() {
done done
} }
addext() {
[[ -z "$1" ]] || [[ -z "$2" ]] && { echo "Usage: $0 <file> <extension>" ; return }
mv "$1" "$1$2"
}
ckwww() { ckwww() {
ping -c 3 www.google.com ping -c 3 www.google.com
} }
@@ -175,3 +184,7 @@ fnottype() {
c () { c () {
echo "$*" | bc -l echo "$*" | bc -l
} }
function http() {
curl http://httpcode.info/$1
}