From: Samir Benmendil Date: Sat, 1 Apr 2017 17:48:19 +0000 (+0100) Subject: Merge branch 'cadscan' (early part) X-Git-Url: https://git.rmz.io/dotfiles.git/commitdiff_plain/172cfbb4b15794f9dd12a4531e6ba6b8f0edbb2a?ds=sidebyside;hp=-c Merge branch 'cadscan' (early part) --- 172cfbb4b15794f9dd12a4531e6ba6b8f0edbb2a diff --combined qutebrowser/qutebrowser.conf index a68065e,b14fedb..d1c56d3 --- a/qutebrowser/qutebrowser.conf +++ b/qutebrowser/qutebrowser.conf @@@ -36,20 -36,13 +36,20 @@@ # # startpage (List of String): # The default page(s) to open at the start, separated by commas. -# Default: https://duckduckgo.com +# Default: https://start.duckduckgo.com # # yank-ignored-url-parameters (List of String): # The URL parameters to strip with :yank url, separated by commas. # Default: # ref,utm_source,utm_medium,utm_campaign,utm_term,utm_content # +# default-open-dispatcher (String): +# The default program used to open downloads. Set to an empty string +# to use the default internal handler. +# Any {} in the string will be expanded to the filename, else the +# filename will be appended. +# Default: +# # default-page (FuzzyUrl): # The page to open if :open -t/-b/-w is used without URL. Use # `about:blank` for a blank page. @@@ -92,8 -85,7 +92,8 @@@ # developer-extras (Bool): # Enable extra tools for Web developers. # This needs to be enabled for `:inspector` to work and also adds an -# _Inspect_ entry to the context menu. +# _Inspect_ entry to the context menu. For QtWebEngine, see +# 'qutebrowser --help' instead. # Valid values: true, false # Default: false # @@@ -174,7 -166,6 +174,7 @@@ ignore-case = smart startpage = https://duckduckgo.com/?t=chakra yank-ignored-url-parameters = ref,utm_source,utm_medium,utm_campaign,utm_term,utm_content +default-open-dispatcher = default-page = ${startpage} auto-search = naive auto-save-config = true @@@ -246,15 -237,11 +246,15 @@@ url-incdec-segments = path,quer # Valid values: true, false # Default: false # -# user-stylesheet (UserStyleSheet): -# User stylesheet to use (absolute filename, filename relative to -# the config directory or CSS string). Will expand environment -# variables. -# Default: html > ::-webkit-scrollbar { width: 0px; height: 0px; } +# user-stylesheet (File): +# User stylesheet to use (absolute filename or filename relative to +# the config directory). Will expand environment variables. +# Default: +# +# hide-scrollbar (Bool): +# Hide the main scrollbar. +# Valid values: true, false +# Default: true # # css-media-type (String): # Set the CSS media type. @@@ -290,7 -277,6 +290,7 @@@ # * `{id}`: The internal window ID of this window. # * `{scroll_pos}`: The page scroll position. # * `{host}`: The host of the current web page. +# * `{backend}`: Either 'webkit' or 'webengine' # Default: {perc}{title}{title_sep}qutebrowser # # modal-js-dialog (Bool): @@@ -308,15 -294,6 +308,15 @@@ # Globs are supported, so ';*' will blacklist all keychainsstarting # with ';'. Use '*' to disable keyhints # Default: +# +# prompt-radius (Int): +# The rounding radius for the edges of prompts. +# Default: 8 +# +# prompt-filebrowser (Bool): +# Show a filebrowser in upload/download prompts. +# Valid values: true, false +# Default: true zoom-levels = 25%,33%,50%,67%,75%,90%,100%,110%,125%,150%,175%,200%,250%,300%,400%,500% default-zoom = 100% downloads-position = top @@@ -326,8 -303,7 +326,8 @@@ message-unfocused = fals confirm-quit = downloads zoom-text-only = false frame-flattening = false -user-stylesheet = html > ::-webkit-scrollbar { width: 0px; height: 0px; } +user-stylesheet = +hide-scrollbar = true css-media-type = smooth-scrolling = false remove-finished-downloads = -1 @@@ -337,8 -313,6 +337,8 @@@ window-title-format = {perc}{title}{tit modal-js-dialog = false hide-wayland-decoration = false keyhint-blacklist = +prompt-radius = 8 +prompt-filebrowser = true [network] # Settings related to the network. @@@ -391,11 -365,6 +391,11 @@@ # custom-headers (HeaderDict): # Set custom headers for qutebrowser HTTP requests. # Default: +# +# netrc-file (File): +# Set location of a netrc-file for HTTP authentication. If empty, +# ~/.netrc is used. +# Default: do-not-track = true accept-language = en-US,en,de,fr referer-header = same-domain @@@ -405,7 -374,6 +405,7 @@@ proxy-dns-requests = tru ssl-strict = ask dns-prefetch = true custom-headers = +netrc-file = [completion] # Options related to completion and command history. @@@ -539,7 -507,7 +539,7 @@@ scrollbar-padding = # into zoom increments. # Default: 512 timeout = 500 -partial-timeout = 1000 +partial-timeout = 5000 insert-mode-on-plugins = false auto-leave-insert-mode = true auto-insert-mode = false @@@ -559,27 -527,25 +559,27 @@@ mouse-zoom-divider = 51 # # select-on-remove (SelectOnRemove): # Which tab to select when the focused tab is removed. -# left: Select the tab on the left. -# right: Select the tab on the right. -# previous: Select the previously selected tab. -# Default: right +# prev: Select the tab which came before the closed one (left in +# horizontal, above in vertical). +# next: Select the tab which came after the closed one (right in +# horizontal, below in vertical). +# last-used: Select the previously selected tab. +# Default: next # # new-tab-position (NewTabPosition): # How new tabs are positioned. -# left: On the left of the current tab. -# right: On the right of the current tab. -# first: At the left end. -# last: At the right end. -# Default: right +# prev: Before the current tab. +# next: After the current tab. +# first: At the beginning. +# last: At the end. +# Default: next # # new-tab-position-explicit (NewTabPosition): # How new tabs opened explicitly are positioned. -# left: On the left of the current tab. -# right: On the right of the current tab. -# first: At the left end. -# last: At the right end. +# prev: Before the current tab. +# next: After the current tab. +# first: At the beginning. +# last: At the end. # Default: last # # last-close (String): @@@ -657,7 -623,6 +657,7 @@@ # * `{id}`: The internal tab ID of this tab. # * `{scroll_pos}`: The page scroll position. # * `{host}`: The host of the current web page. +# * `{backend}`: Either 'webkit' or 'webengine' # Default: {index}: {title} # # title-alignment (TextAlignment): @@@ -678,9 -643,9 +678,9 @@@ # Padding for indicators (top, bottom, left, right). # Default: 2,2,0,4 background-tabs = false -select-on-remove = left -new-tab-position = right -new-tab-position-explicit = right +select-on-remove = prev +new-tab-position = next +new-tab-position-explicit = next last-close = ignore show = always show-switching-delay = 800 @@@ -808,7 -773,7 +808,7 @@@ cache-size = 5242880 # Enables or disables WebGL. For QtWebEngine, Qt/PyQt >= 5.7 is # required for this setting. # Valid values: true, false -# Default: false +# Default: true # # css-regions (Bool): # Enable or disable support for CSS regions. @@@ -830,11 -795,6 +830,11 @@@ # Valid values: true, false, ask # Default: ask # +# media-capture (BoolAsk): +# Allow websites to record audio/video. +# Valid values: true, false, ask +# Default: ask +# # javascript-can-open-windows-automatically (Bool): # Whether JavaScript programs can open new windows without user # interaction. @@@ -895,7 -855,7 +895,7 @@@ # - A zip-file of any of the above, with either only one file, or a # file named 'hosts' (with any extension). # Default: -# http://www.malwaredomainlist.com/hostslist/hosts.txt,http://someonewhocares.org/hosts/hosts,http://winhelp2002.mvps.org/hosts.zip,http://malwaredomains.lehigh.edu/files/justdomains.zip,http://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&mimetype=plaintext +# https://www.malwaredomainlist.com/hostslist/hosts.txt,http://someonewhocares.org/hosts/hosts,http://winhelp2002.mvps.org/hosts.zip,http://malwaredomains.lehigh.edu/files/justdomains.zip,https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&mimetype=plaintext # # host-blocking-enabled (Bool): # Whether host blocking is enabled. @@@ -923,8 -883,7 +923,8 @@@ webgl = tru css-regions = true hyperlink-auditing = false geolocation = ask - notifications = ask + notifications = false +media-capture = ask javascript-can-open-windows-automatically = false javascript-can-close-windows = false javascript-can-access-clipboard = false @@@ -1020,7 -979,7 +1020,7 @@@ border = 1px solid #E3BE2 mode = letter chars = aoeuidhtns min-chars = 2 - scatter = true + scatter = false uppercase = true dictionary = /usr/share/dict/words auto-follow = unique-match @@@ -1053,10 -1012,11 +1053,11 @@@ cv = http://docs.opencv.org/3.1.0/index # Aliases for commands. # By default, no aliases are defined. Example which adds a new command # `:qtb` to open qutebrowsers website: -# `qtb = open http://www.qutebrowser.org/` +# `qtb = open https://www.qutebrowser.org/` quit = close q = close exit = quit + mpv = spawn --userscript ~/src/qutebrowser/misc/userscripts/view_in_mpv [colors] # Colors used in the UI. @@@ -1138,6 -1098,30 +1139,6 @@@ # Background color of the statusbar. # Default: black # -# statusbar.fg.error (QssColor): -# Foreground color of the statusbar if there was an error. -# Default: ${statusbar.fg} -# -# statusbar.bg.error (QssColor): -# Background color of the statusbar if there was an error. -# Default: red -# -# statusbar.fg.warning (QssColor): -# Foreground color of the statusbar if there is a warning. -# Default: ${statusbar.fg} -# -# statusbar.bg.warning (QssColor): -# Background color of the statusbar if there is a warning. -# Default: darkorange -# -# statusbar.fg.prompt (QssColor): -# Foreground color of the statusbar if there is a prompt. -# Default: ${statusbar.fg} -# -# statusbar.bg.prompt (QssColor): -# Background color of the statusbar if there is a prompt. -# Default: darkblue -# # statusbar.fg.insert (QssColor): # Foreground color of the statusbar in insert mode. # Default: ${statusbar.fg} @@@ -1331,54 -1315,6 +1332,54 @@@ # keyhint.bg (QssColor): # Background color of the keyhint widget. # Default: rgba(0, 0, 0, 80%) +# +# messages.fg.error (QssColor): +# Foreground color of an error message. +# Default: white +# +# messages.bg.error (QssColor): +# Background color of an error message. +# Default: red +# +# messages.border.error (QssColor): +# Border color of an error message. +# Default: #bb0000 +# +# messages.fg.warning (QssColor): +# Foreground color a warning message. +# Default: white +# +# messages.bg.warning (QssColor): +# Background color of a warning message. +# Default: darkorange +# +# messages.border.warning (QssColor): +# Border color of an error message. +# Default: #d47300 +# +# messages.fg.info (QssColor): +# Foreground color an info message. +# Default: white +# +# messages.bg.info (QssColor): +# Background color of an info message. +# Default: black +# +# messages.border.info (QssColor): +# Border color of an info message. +# Default: #333333 +# +# prompts.fg (QssColor): +# Foreground color for prompts. +# Default: white +# +# prompts.bg (QssColor): +# Background color for prompts. +# Default: darkblue +# +# prompts.selected.bg (QssColor): +# Background color for the selected item in filename prompts. +# Default: #308cc6 completion.fg = white completion.bg = #333333 completion.alternate-bg = #444444 @@@ -1395,6 -1331,12 +1396,6 @@@ completion.scrollbar.fg = ${completion. completion.scrollbar.bg = ${completion.bg} statusbar.fg = white statusbar.bg = black -statusbar.fg.error = ${statusbar.fg} -statusbar.bg.error = red -statusbar.fg.warning = ${statusbar.fg} -statusbar.bg.warning = darkorange -statusbar.fg.prompt = ${statusbar.fg} -statusbar.bg.prompt = darkblue statusbar.fg.insert = ${statusbar.fg} statusbar.bg.insert = darkgreen statusbar.fg.command = ${statusbar.fg} @@@ -1439,18 -1381,6 +1440,18 @@@ webpage.bg = whit keyhint.fg = #FFFFFF keyhint.fg.suffix = #FFFF00 keyhint.bg = rgba(0, 0, 0, 80%) +messages.fg.error = ${statusbar.fg} +messages.bg.error = red +messages.border.error = #bb0000 +messages.fg.warning = ${statusbar.fg} +messages.bg.warning = darkorange +messages.border.warning = #d47300 +messages.fg.info = white +messages.bg.info = black +messages.border.info = #333333 +prompts.fg = ${statusbar.fg} +prompts.bg = #333333 +prompts.selected.bg = #308cc6 [fonts] # Fonts used for the UI, with optional style/weight/size. @@@ -1535,23 -1465,7 +1536,23 @@@ # keyhint (Font): # Font used in the keyhint widget. # Default: 8pt ${_monospace} -_monospace = Terminus, Monospace, "DejaVu Sans Mono", Monaco, "Bitstream Vera Sans Mono", "Andale Mono", "Liberation Mono", "Courier New", Courier, monospace, Fixed, Consolas, Terminal +# +# messages.error (Font): +# Font used for error messages. +# Default: 8pt ${_monospace} +# +# messages.warning (Font): +# Font used for warning messages. +# Default: 8pt ${_monospace} +# +# messages.info (Font): +# Font used for info messages. +# Default: 8pt ${_monospace} +# +# prompts (Font): +# Font used for prompts. +# Default: 8pt sans-serif +_monospace = Hack, Terminus, Monospace, "DejaVu Sans Mono", Monaco, "Bitstream Vera Sans Mono", "Andale Mono", "Liberation Mono", "Courier New", Courier, monospace, Fixed, Consolas, Terminal completion = 8pt ${_monospace} completion.category = bold ${completion} tabbar = 8pt ${_monospace} @@@ -1570,7 -1484,3 +1571,7 @@@ web-size-minimum-logical web-size-default = web-size-default-fixed = keyhint = 8pt ${_monospace} +messages.error = 8pt ${_monospace} +messages.warning = 8pt ${_monospace} +messages.info = 8pt ${_monospace} +prompts = 8pt sans-serif diff --combined systemd/user/ssh-agent.service index 08b7dcb,8a1d157..df24fe9 --- a/systemd/user/ssh-agent.service +++ b/systemd/user/ssh-agent.service @@@ -3,8 -3,8 +3,8 @@@ Description=SSH key agen [Service] Type=forking - Environment=SSH_AUTH_SOCK=%t/ssh-agent.socket + PassEnvironment=SSH_AUTH_SOCK -ExecStart=/usr/bin/ssh-agent -a $SSH_AUTH_SOCK +ExecStart=/usr/bin/ssh-agent -a $SSH_AUTH_SOCK -t 1h [Install] WantedBy=default.target diff --combined vim/ftplugin/cpp.vim index 7631f49,23503b8..faa7395 --- a/vim/ftplugin/cpp.vim +++ b/vim/ftplugin/cpp.vim @@@ -17,13 -17,39 +17,39 @@@ let b:load_doxygen_syntax = augroup fswitch au BufEnter *.h let b:fswitchdst = 'cpp,c' au BufEnter *.h let b:fswitchlocs = 'reg:|include.*|source|' - au BufEnter *.cpp let b:fswitchdst = 'h' + au BufEnter *.cpp let b:fswitchdst = 'hpp,h' au BufEnter *.cpp let b:fswitchlocs = 'reg:|source|include/**|' augroup END + let g:switch_const_definitions = + \ [ { + \ '\%(const \)\@!\([[:alnum:]_:<>]\{-}\) \%(&\)\@!': 'const \1 ', + \ 'const \([[:alnum:]_:<>]\{-}\) &\@!': 'const \1 &' , + \ 'const \([[:alnum:]_:<>]\{-}\) &': '\1 ' + \ } ] + + nnoremap c :call switch#Switch(g:switch_const_definitions, {}) + nnoremap gd :YcmCompleter GoTo nnoremap d :vs:YcmCompleter GoTo + " format with = + map = (operator-clang-format) + vnoremap = :ClangFormat + " restore = mapping to g= + nnoremap g= = + vnoremap g= = + + setlocal errorformat= + setlocal errorformat+=%f:%l:%c:\ %trror:\ %m + setlocal errorformat+=%f:%l:%c:\ %tarning:\ %m + setlocal errorformat+=%D%*\\a[%*\\d]:\ Entering\ directory\ [`']%f' + setlocal errorformat+=%X%*\\a[%*\\d]:\ Leaving\ directory\ [`']%f' + setlocal errorformat+=%D%*\\a:\ Entering\ directory\ [`']%f' + setlocal errorformat+=%X%*\\a:\ Leaving\ directory\ [`']%f' + setlocal errorformat+=%*[^[]\[%tRROR\]%m\ \[%f:%l\] + setlocal errorformat+=%*[^[]\[%tARNING\]%m\ \[%f:%l\] + setlocal foldmethod=syntax " set foldlevel according to number of matches of 'namespace' and 'class' not " containing ';' diff --combined vim/vimrc index f1dc3f8,1674f0f..8409f10 --- a/vim/vimrc +++ b/vim/vimrc @@@ -69,11 -69,11 +69,13 @@@ Plugin 'ompugao/ctrlp-ros Plugin 'vim-latex/vim-latex' Plugin 'alx741/vinfo' Plugin 'derekwyatt/vim-protodef' + Plugin 'ram-z/vim-clang-format' + Plugin 'sgeb/vim-diff-fold' " needs editing colorscheme " Plugin 'jeaye/color_coded' " Check LucHermites plugins: https://github.com/LucHermitte/lh-cpp +Plugin 'wincent/loupe' +Plugin 'Ram-Z/vimwiki' call vundle#end() @@@ -158,18 -158,10 +160,18 @@@ set mouse=rnv " list set ttymouse=xterm " type of mouse " messages and info {{{2 -set showcmd " Show (partial) command in status line. -set ruler " show the cursor position all the time -set confirm " Ask what to do when closing unsaved documents -set shortmess=filnxtoOI " don't show intro message +set showcmd " Show (partial) command in status line. +set ruler " show the cursor position all the time +set confirm " Ask what to do when closing unsaved documents +set shortmess= " reset option +set shortmess+=a " all abbreviations +set shortmess+=o " overwrite file-written message +set shortmess+=O " file-read message overrides previous +set shortmess+=t " truncate file message at start +set shortmess+=T " truncate other messages in the middle +set shortmess+=W " don't give 'written' or '[w]' when writing a file +set shortmess+=A " ignore swapfile warning +set shortmess+=I " no splash screen " editing text {{{2 set backspace=indent,eol,start " allow backspacing over everything in insert mode @@@ -216,8 -208,8 +218,8 @@@ set foldlevelstart=0 " valu " open folds when jumping to line set foldopen+=jump - " save and restore folds - set viewoptions=cursor " only save cursor position + set viewoptions=cursor " save cursor position + set viewoptions+=folds " save folds " diff mode {{{2 set diffopt+=filler " show filler lines @@@ -445,9 -437,9 +447,9 @@@ nnoremap zx zMzxz map :ls:b -" move between windows -nnoremap w -nnoremap W +" move between windows (skip previewwindow) +nnoremap w:if &previewwindow \| wincmd w \| endif +nnoremap W:if &previewwindow \| wincmd W \| endif "xterm mouse with middleclick paste nnoremap i @@@ -476,7 -468,7 +478,7 @@@ nnoremap [oe :set expandtab for idt in range(1,8) - exe 'nnoremap co'.idt.' :set tabstop='.idt.' shiftwidth='.idt.' softtabstop='.idt.'' + exe 'nnoremap co'.idt.' :setlocal tabstop='.idt.' shiftwidth='.idt.' softtabstop='.idt.'' endfor " toggle auto format of text @@@ -657,7 -649,7 +659,7 @@@ let g:unite_source_grep_max_candidates if executable('ag') " Use ag in unite grep source. let g:unite_source_grep_command = 'ag' - let g:unite_source_grep_default_opts = '--smart-case --vimgrep --hidden --ignore ''.hg'' --ignore ''.svn'' --ignore ''.git'' --ignore ''.bzr''' + let g:unite_source_grep_default_opts = '--smart-case --vimgrep --ignore ''.hg'' --ignore ''.svn'' --ignore ''.git'' --ignore ''.bzr''' let g:unite_source_grep_recursive_opt = '' end nnoremap [unite]a :Unite grep:.:: @@@ -666,7 -658,7 +668,7 @@@ command! -nargs=1 Ag Unite grep:.:: [unite]f :Unite -start-insert file_rec/async call unite#custom#source('file_rec/async', 'sorters', 'sorter_selecta') @@@ -742,15 -734,6 +744,15 @@@ xmap T Sneak_ omap t Sneak_t omap T Sneak_T +" vimviki {{{2 +let g:vimwiki_list = [{'path': '$XDG_DATA_HOME/vimwiki'}] +let g:vimwiki_auto_chdir = 1 +augroup myvimwiki + au! BufRead $XDG_DATA_HOME/vimwiki/index.wiki !git -C "%:p:h" pull + au! BufRead,BufNewFile $XDG_DATA_HOME/vimwiki/diary/*.wiki !git -C "%:p:h" pull + au! BufWritePost $XDG_DATA_HOME/vimwiki/*.wiki exe '!git add "";git commit -m"' . strftime("%FT%R") . '";git push' +augroup END + " functions {{{1 " Convenient command to see the difference between the current buffer and the diff --combined zshenv index b3ce2e5,9184040..b161335 --- a/zshenv +++ b/zshenv @@@ -5,15 -5,15 +5,18 @@@ export XDG_DATA_HOME="$HOME/.local/shar export XDG_CACHE_HOME="$HOME/.cache" export HOST=$(hostname) +# gpg +export GNUPGHOME="$XDG_CONFIG_HOME/gnupg" + # ssh + export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket" if hash systemctl 2>/dev/null; then systemctl --user import-environment \ XDG_CACHE_HOME \ XDG_CONFIG_HOME \ XDG_DATA_HOME \ - GNUPGHOME ++ GNUPGHOME \ + SSH_AUTH_SOCK fi # vim stuff @@@ -41,11 -41,8 +44,11 @@@ export TASKRC="$XDG_CONFIG_HOME/taskrc export MPV_HOME="$XDG_CONFIG_HOME/mpv" export MPLAYER_HOME="$XDG_CONFIG_HOME/mplayer" -# gpg -export GNUPGHOME="$XDG_CONFIG_HOME/gnupg" - # pass export PASSWORD_STORE_DIR="$XDG_DATA_HOME/pass" + +# SSH Agent +export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket" + +# weechat +export WEECHAT_HOME="$XDG_CONFIG_HOME/weechat"