diff --git a/i3/i3/config b/i3/i3/config index 9518496..377c45e 100644 --- a/i3/i3/config +++ b/i3/i3/config @@ -253,8 +253,8 @@ workspace_layout default # Draw normal borders around all windows with 1-pixel borders - new_window normal 1 - new_float normal 3 + new_window 1pixel + new_float normal 1 # Do show borders at the screen edges 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="^Conky$"] floating enable 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="^URxvt$"] border 1pixel + for_window [class="^URxvt$"] border none for_window [class="^Cairo-dock$"] floating enable , border none for_window [class="^Pavucontrol$"] floating enable 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="^Skype$" ] 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="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 + diff --git a/i3/i3/config.d/notebook.config b/i3/i3/config.d/notebook.config index 9b7d408..046841a 100644 --- a/i3/i3/config.d/notebook.config +++ b/i3/i3/config.d/notebook.config @@ -30,7 +30,7 @@ bar { id bar-0 - font pango:DejaVu Sans Mono, Icons 11 + font pango:DejaVu Sans Mono, Icons 10.5 colors { background #222222 diff --git a/i3/i3/i3bar_wrapper.bash b/i3/i3/i3bar_wrapper.bash index 62656d7..b777eeb 100644 --- a/i3/i3/i3bar_wrapper.bash +++ b/i3/i3/i3bar_wrapper.bash @@ -83,7 +83,7 @@ while read line ; do case "$name" in "mpd_toggle") - mpc toggle 1>/dev/null 2>%1 + mpc toggle 1>/dev/null 2>&1 ;; "pacman") width=500 diff --git a/i3/i3/scripts/update-status.bash b/i3/i3/scripts/update-status.bash index 6b9c306..5ec00f6 100644 --- a/i3/i3/scripts/update-status.bash +++ b/i3/i3/scripts/update-status.bash @@ -1,2 +1 @@ -echo "update" >> ~/test.log kill -SIGUSR1 $(cat $LOGDIR/i3/conky.pid) diff --git a/mpd/mpd/mpd.conf b/mpd/mpd/mpd.conf index ff64820..b04cf49 100644 --- a/mpd/mpd/mpd.conf +++ b/mpd/mpd/mpd.conf @@ -285,6 +285,14 @@ audio_output { ## 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). # #audio_output { @@ -401,7 +409,7 @@ replaygain_limit "yes" #max_connections "10" #max_playlist_length "16384" #max_command_list_size "2048" -#max_output_buffer_size "8192" +max_output_buffer_size "16384" # ############################################################################### diff --git a/ncmpcpp/ncmpcpp/config b/ncmpcpp/ncmpcpp/config index aec1858..6e57c7a 100644 --- a/ncmpcpp/ncmpcpp/config +++ b/ncmpcpp/ncmpcpp/config @@ -59,9 +59,9 @@ mpd_communication_mode = "notifications" ## 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 @@ -71,7 +71,7 @@ mpd_communication_mode = "notifications" ## are some problems with it. ## # -#visualizer_output_name = "" +visualizer_output_name = "mpd_fifo" # ## ## Note: Below parameter defines how often ncmpcpp @@ -81,16 +81,16 @@ mpd_communication_mode = "notifications" ## Keep in mind that sane values start with >=10. ## # -#visualizer_sync_interval = "30" +visualizer_sync_interval = "30" # ## ## Note: To enable spectrum frequency visualization ## you need to compile ncmpcpp with fftw3 support. ## # -#visualizer_type = "wave" (spectrum/wave) +visualizer_type = "spectrum" (spectrum/wave) # -#visualizer_look = "◆│" +visualizer_look = "◆│" # ##### system encoding ##### ## @@ -173,11 +173,11 @@ mpd_communication_mode = "notifications" # 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. @@ -255,7 +255,7 @@ tag_editor_album_format = "{(%y) }%b" ## 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 ##### # @@ -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_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" # -incremental_seeking = "yes" +#incremental_seeking = "yes" # -seek_time = "1" +#seek_time = "1" # #autocenter_mode = "no" # @@ -298,11 +298,11 @@ seek_time = "1" ## 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) # @@ -312,9 +312,9 @@ media_library_left_column = "A" (possible values: a,y,g,c,p, legend above) # #default_tag_editor_pattern = "%n - %t" # -header_visibility = "yes" +#header_visibility = "yes" # -statusbar_visibility = "yes" +#statusbar_visibility = "yes" # #titles_visibility = "yes" # @@ -393,11 +393,11 @@ statusbar_visibility = "yes" # #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) # @@ -406,15 +406,15 @@ display_remaining_time = "no" ## "The" word while sorting items in browser, tags in ## media library, etc. ## -ignore_leading_the = "yes" +#ignore_leading_the = "no" # #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 = "" # #tag_editor_extended_numeration = "no" # @@ -438,7 +438,7 @@ empty_tag_marker = "[empty]" ## 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 @@ -446,17 +446,17 @@ search_engine_default_search_mode = "1" ## 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_enabled = "yes" +#colors_enabled = "yes" # #empty_tag_color = "cyan" # diff --git a/ncmpcpp/ncmpcpp/keys b/ncmpcpp/ncmpcpp/keys index 3248e4c..9432696 100644 --- a/ncmpcpp/ncmpcpp/keys +++ b/ncmpcpp/ncmpcpp/keys @@ -12,175 +12,175 @@ ## will be used to switch between columns. ## # -#key_up = 259 'k' -# -#key_down = 258 'j' -# -#key_up_album = '[' -# -#key_down_album = ']' -# -#key_up_artist = '{' -# -#key_down_artist = '}' -# -#key_page_up = 339 -# -#key_page_down = 338 -# -#key_home = 262 -# -#key_end = 360 -# -#key_space = 32 -# -#key_enter = 10 -# -#key_delete = 330 'd' -# -#key_volume_up = 261 '+' -# -#key_volume_down = 260 '-' -# -#key_prev_column = 260 -# -#key_next_column = 261 -# -#key_toggle_space_mode = 't' -# -#key_toggle_add_mode = 'T' -# -#key_toggle_mouse = '|' -# -#key_toggle_bitrate_visibility = '#' -# -#key_screen_switcher = 9 -# -#key_backward_screen_switcher = 353 -# -#key_help = '1' 265 -# -#key_playlist = '2' 266 -# -#key_browser = '3' 267 -# -#key_search_engine = '4' 268 -# -#key_media_library = '5' 269 -# -#key_playlist_editor = '6' 270 -# -#key_tag_editor = '7' 271 -# -#key_outputs = '8' 272 -# -#key_music_visualizer = '9' 273 -# -#key_clock = '0' 274 -# -#key_server_info = '@' -# -#key_stop = 's' -# -#key_pause = 'P' -# -#key_next = '>' -# -#key_prev = '<' -# -#key_replay = 263 127 -# -#key_seek_forward = 'f' -# -#key_seek_backward = 'b' -# -#key_toggle_repeat = 'r' -# -#key_toggle_random = 'z' -# -#key_toggle_single = 'y' -# -#key_toggle_consume = 'R' -# -#key_toggle_replay_gain_mode = 'Y' -# -#key_shuffle = 'Z' -# -#key_toggle_crossfade = 'x' -# -#key_set_crossfade = 'X' -# -#key_update_db = 'u' -# -#key_sort_playlist = 22 -# -#key_apply_filter = 6 -# -#key_find_forward = '/' -# -#key_find_backward = '?' -# -#key_next_found_position = '.' -# -#key_prev_found_position = ',' -# -#key_toggle_find_mode = 'w' -# -#key_edit_tags = 'e' -# -#key_go_to_position = 'g' -# -#key_song_info = 'i' -# -#key_artist_info = 'I' -# -#key_lyrics = 'l' -# -#key_reverse_selection = 'v' -# -#key_deselect_all = 'V' -# -#key_select_album = 'B' -# -#key_add_selected_items = 'A' -# -#key_clear = 'c' -# -#key_crop = 'C' -# -#key_move_song_up = 'm' -# -#key_move_song_down = 'n' -# -#key_move_to = 'M' -# -#key_move_before = 0 -# -#key_move_after = 0 -# -#key_add = 'a' -# -#key_save_playlist = 'S' -# -#key_go_to_now_playing = 'o' -# -#key_toggle_auto_center = 'U' -# -#key_toggle_display_mode = 'p' -# -#key_toggle_separators_in_playlist = '!' -# -#key_toggle_lyrics_db = 'L' -# -#key_toggle_fetching_lyrics_for_current_song_in_background = 'F' -# -#key_go_to_containing_directory = 'G' -# -#key_go_to_media_library = '~' -# -#key_go_to_parent_dir = 263 127 -# -#key_switch_tag_type_list = '`' -# -#key_quit = 'q' 'Q' -# +key_up = 259 'k' + +key_down = 258 'j' + +key_up_album = '[' + +key_down_album = ']' + +key_up_artist = '{' + +key_down_artist = '}' + +key_page_up = 339 + +key_page_down = 338 + +key_home = 262 + +key_end = 360 + +key_space = 32 + +key_enter = 10 + +key_delete = 330 'd' + +key_volume_up = 261 '+' + +key_volume_down = 260 '-' + +key_prev_column = 260 + +key_next_column = 261 + +key_toggle_space_mode = 't' + +key_toggle_add_mode = 'T' + +key_toggle_mouse = '|' + +key_toggle_bitrate_visibility = '#' + +key_screen_switcher = 9 + +key_backward_screen_switcher = 353 + +key_help = '1' 265 + +key_playlist = '2' 266 + +key_browser = '3' 267 + +key_search_engine = '4' 268 + +key_media_library = '5' 269 + +key_playlist_editor = '6' 270 + +key_tag_editor = '7' 271 + +key_outputs = '8' 272 + +key_music_visualizer = '9' 273 + +key_clock = '0' 274 + +key_server_info = '@' + +key_stop = 's' + +key_pause = 'P' + +key_next = '>' + +key_prev = '<' + +key_replay = 263 127 + +key_seek_forward = 'f' + +key_seek_backward = 'b' + +key_toggle_repeat = 'r' + +key_toggle_random = 'z' + +key_toggle_single = 'y' + +key_toggle_consume = 'R' + +key_toggle_replay_gain_mode = 'Y' + +key_shuffle = 'Z' + +key_toggle_crossfade = 'x' + +key_set_crossfade = 'X' + +key_update_db = 'u' + +key_sort_playlist = 22 + +key_apply_filter = 6 + +key_find_forward = '/' + +key_find_backward = '?' + +key_next_found_position = '.' + +key_prev_found_position = ',' + +key_toggle_find_mode = 'w' + +key_edit_tags = 'e' + +key_go_to_position = 'g' + +key_song_info = 'i' + +key_artist_info = 'I' + +key_lyrics = 'l' + +key_reverse_selection = 'v' + +key_deselect_all = 'V' + +key_select_album = 'B' + +key_add_selected_items = 'A' + +key_clear = 'c' + +key_crop = 'C' + +key_move_song_up = 'm' + +key_move_song_down = 'n' + +key_move_to = 'M' + +key_move_before = 0 + +key_move_after = 0 + +key_add = 'a' + +key_save_playlist = 'S' + +key_go_to_now_playing = 'o' + +key_toggle_auto_center = 'U' + +key_toggle_display_mode = 'p' + +key_toggle_separators_in_playlist = '!' + +key_toggle_lyrics_db = 'L' + +key_toggle_fetching_lyrics_for_current_song_in_background = 'F' + +key_go_to_containing_directory = 'G' + +key_go_to_media_library = '~' + +key_go_to_parent_dir = 263 127 + +key_switch_tag_type_list = '`' + +key_quit = 'q' 'Q' + diff --git a/vim/vimrc b/vim/vimrc index 55b9eba..8b37308 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -35,6 +35,9 @@ Bundle 'gmarik/vundle' " solarized color theme Bundle 'altercation/vim-colors-solarized' +" monokai color theme +Bundle 'sickill/vim-monokai' + " display the undo history in a graph Bundle 'mbbill/undotree' @@ -45,10 +48,10 @@ Bundle 'scrooloose/nerdtree' Bundle 'tpope/vim-surround' " better commenting -Bundle 'scrooloose/nerdcommenter' +Bundle 'tpope/vim-commentary' " nice auto completion -Bundle 'Shougo/neocomplcache.vim' +Bundle 'Valloric/YouCompleteMe' " nice text alignment Bundle 'godlygeek/tabular' @@ -63,16 +66,57 @@ Bundle 'tpope/vim-speeddating' Bundle 'tpope/vim-fugitive' " buffer expolorer -Bundle 'fholgado/minibufexpl.vim' +"Bundle 'fholgado/minibufexpl.vim' " shows a code outline Bundle 'majutsushi/tagbar' -" automatically enables completion when typing -Bundle 'vim-scripts/autocomplpop' +" python specific stuff +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 +" 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 set background=dark let g:solarized_termcolors=16 @@ -80,16 +124,26 @@ let g:solarized_termtrans=1 let g:solarized_contrast="normal" let g:solarized_visibility="normal" syntax enable -colorscheme solarized +colorscheme monokai filetype plugin indent on " setup for vim-airline -let g:airline_left_sep = '▶' -let g:airline_right_sep = '◀' +let g:airline_theme='powerlineish' +let g:airline_left_sep='' +let g:airline_right_sep='' +"let g:airline_section_z='' + " enable tabline at the top showing all buffers -let g:airline#extensions#tabline#enabled = 1 -"let g:airline_theme= +"let g:airline#extensions#tabline#enabled = 1 + +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 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 listchars= " no trailing whitespace as '~' -let mapleader = "," +let mapleader = "\" +nnoremap w :w + +vmap y "+y +vmap d "+d +nmap p "+p +nmap P "+P +vmap p "+p +vmap P "+P + +nmap za + +map , : + +vmap v (expand_region_expand) +vmap (expand_region_shrink) + +vnoremap y y`] +vnoremap p p`] +nnoremap p p`] + " enable 'very-magic' in regex -nnoremap / /\v -vnoremap / /\v +"nnoremap / /\v +"vnoremap / /\v -nnoremap :nohlsearch -nnoremap % -vnoremap % +nnoremap , :nohlsearch + +noremap gV `[v`] " make Y behave like other capitals, otherwise Y would work like yy nnoremap Y y$ @@ -238,25 +312,26 @@ nnoremap Y y$ nnoremap j gj nnoremap k gk -function! TrimWhiteSpace() - %s/\s\+$//e - endfunction +"function! TrimWhiteSpace() +" %s/\s\+$//e +"endfunction " automatically reload .vimrc when it's saved autocmd BufWritePost .vimrc source ~/.vimrc -autocmd FileWritePre * :call TrimWhiteSpace() -autocmd FileAppendPre * :call TrimWhiteSpace() -autocmd FilterWritePre * :call TrimWhiteSpace() -autocmd BufWritePre * :call TrimWhiteSpace() +"autocmd FileWritePre * :call TrimWhiteSpace() +"autocmd FileAppendPre * :call TrimWhiteSpace() +"autocmd FilterWritePre * :call TrimWhiteSpace() +"autocmd BufWritePre * :call TrimWhiteSpace() " Start NERDTree when starting vim "autocmd vimenter * NERDTree "autocmd VimEnter * wincmd p +let NERDTreeQuitOnOpen = 1 " 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("") +"call togglebg#map("") nnoremap h nnoremap j @@ -264,9 +339,34 @@ nnoremap k nnoremap l nnoremap :NERDTreeToggle +nnoremap :TagbarToggle -map :MBEToggle " Autosave views when closing and restoring when opening again. autocmd BufWinLeave *.* mkview autocmd BufWinEnter *.* silent loadview + +":inoremap pumvisible() ? '' : '' + +":au WinEnter * :setlocal number relativenumber +":au WinLeave * :setlocal nonumber norelativenumber + +nnoremap +nnoremap +nnoremap +nnoremap +inoremap +inoremap +inoremap +inoremap + +inoremap jj + +nnoremap v vl + +" no more ex mode +nnoremap Q + +nnoremap r :%s/// + +set virtualedit="onemore,all" diff --git a/x/Xresources b/x/Xresources index 059c436..278e0e1 100644 --- a/x/Xresources +++ b/x/Xresources @@ -2,14 +2,14 @@ Xcursor.theme: Vanilla-DMZ 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 -!URxvt.perl-ext-common: default,matcher -!URxvt.urlLauncher: firefox -!URxvt.matcher.button: 1 +URxvt.perl-ext-common: default,matcher +URxvt.url-launcher: /usr/bin/chromium +URxvt.matcher.button: 1 URxvt.intensityStyles: false @@ -17,7 +17,7 @@ URxvt.intensityStyles: false URxvt.saveLines: 10000 -URxvt.fading: 20 +URxvt.fading: 40 URxvt.termName: urxvt @@ -95,3 +95,27 @@ URxvt*color14: S_base1 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 + diff --git a/x/xinitrc b/x/xinitrc index e95703b..4c5ce9e 100755 --- a/x/xinitrc +++ b/x/xinitrc @@ -25,6 +25,24 @@ fi 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_layout=de keyboard_variant=nodeadkeys @@ -45,18 +63,26 @@ redshift_colortemp="5500:4000" # start mpd if [[ -z "$(pgrep --euid hannes --exact "^mpd$")" ]] ; then log "mpd is not running, starting mpd" - mpd "$HOME/.mpd/mpd.conf" + mpd "$HOME/.mpd/mpd.conf" & else log "mpd already running, will not start another instance" 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 log "starting pasystray" -pasystray & +pasystray & &> $LOGFILE # start dropbox log "starting dropboxd" -dropboxd & +dropboxd & &> $LOGFILE # start the wallpaper changer log "starting $path_wallchanger" @@ -64,48 +90,33 @@ $path_wallchanger "$wallpaper_directory" "$wallpaper_interval" "$wallpaper_fallb # start redshift 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 log "setting keyboard layout" -setxkbmap -layout "$keyboard_layout" -variant "$keyboard_variant" & +setxkbmap -layout "$keyboard_layout" -variant "$keyboard_variant" & &> $LOGFILE # set 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 hostfile="$HOME/.xinitrc.d/$(hostname).xinitrc" log "looking for host specific xinitrc addition at $hostfile" if [[ -f "$hostfile" ]] ; then log "found it. executing" - bash "$hostfile" & + bash "$hostfile" & &> $LOGFILE else log "found none" fi if [[ -f ~/.Xresources ]] ; then log "found ~/.Xresources, merging it into xrdb" - xrdb -merge ~/.Xresources & + xrdb -merge ~/.Xresources & &> $LOGFILE else log "~/.Xresources not found" 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 diff --git a/zsh/zshrc b/zsh/zshrc index 768aed2..d7bd38d 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -1,50 +1,21 @@ -# Path to your oh-my-zsh configuration. -ZSH=$HOME/.oh-my-zsh +source ~/.ohmyzshrc -# Set name of the theme to load. -# Look in ~/.oh-my-zsh/themes/ -# Optionally, if you set this to "random", it'll load a random theme each -# time that oh-my-zsh is loaded. -ZSH_THEME="bira" #robbyrussell" +#autoload -U promptinit +#promptinit +# +#autoload -U colors +#colors +# +#autoload -U compinit +#compinit +# +#HISTSIZE=10000 +#SAVEHIST=10000 +HISTFILE="$HOME/.zsh_history" -# Example aliases -# alias zshconfig="mate ~/.zshrc" -# alias ohmyzsh="mate ~/.oh-my-zsh" - -# 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... +#PROMPT="%{$fg[white]%}╭─%{$fg[red]%}%n%{$fg[white]%}@%{$fg[green]%}%M %{$fg[cyan]%}%~ +#%{$fg[white]%}╰─%B$%b " +#RPROMPT="%{$fg[red]%}%? %{$fg[white]%}%*%{$reset_color%}" man() { env LESS_TERMCAP_mb=$'\E[01;31m' \ @@ -57,7 +28,32 @@ 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 +setopt EXTENDED_HISTORY +setopt HIST_EXPIRE_DUPS_FIRST +setopt HIST_VERIFY +setopt INC_APPEND_HISTORY +setopt SHARE_HISTORY setopt AUTO_CD setopt APPEND_HISTORY setopt HIST_IGNORE_DUPS @@ -74,14 +70,17 @@ setopt LONG_LIST_JOBS [[ $TERM == "urxvt" ]] && export TERM="rxvt-unicode" ### ALIASES -# + 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 la='ls -A' -alias ls='ls --group-directories-first --classify --color=auto' - alias grep='grep --color=auto' alias fgrep='fgrep --color=auto' alias egrep='egrep --color=auto' @@ -110,6 +109,10 @@ alias very="git" alias much="git" alias wow="git status" +alias v="vim" +alias g="grep" + + ### FUNCTIONS function mount() { @@ -159,6 +162,12 @@ ruler() { done } +addext() { + [[ -z "$1" ]] || [[ -z "$2" ]] && { echo "Usage: $0 " ; return } + mv "$1" "$1$2" + +} + ckwww() { ping -c 3 www.google.com } @@ -175,3 +184,7 @@ fnottype() { c () { echo "$*" | bc -l } + +function http() { + curl http://httpcode.info/$1 +}