Update vimrc

This commit is contained in:
Marco Thomas
2020-11-13 19:26:53 +01:00
parent 9b66bdd5f5
commit 549ae175d6
5 changed files with 50 additions and 38 deletions

View File

@@ -136,7 +136,7 @@
# Show age of message if message is older than show_age_threshold # Show age of message if message is older than show_age_threshold
# seconds. # seconds.
# Set to -1 to disable. # Set to -1 to disable.
show_age_threshold = 5 show_age_threshold = -1
# Split notifications into multiple lines if they don't fit into # Split notifications into multiple lines if they don't fit into
# geometry. # geometry.

View File

@@ -95,7 +95,6 @@ bindsym $mod+o mode "Open"
# ======================================== Shutdown # ======================================== Shutdown
mode "Shutdown" { mode "Shutdown" {
bindsym s exec shutdown now
bindsym l exec "~/scripts/lock.sh" bindsym l exec "~/scripts/lock.sh"
bindsym e exec "i3-nagbar -t warning -m 'Logout?' -B 'Yes!' 'i3-msg exit'" bindsym e exec "i3-nagbar -t warning -m 'Logout?' -B 'Yes!' 'i3-msg exit'"

View File

@@ -196,7 +196,7 @@ format-disconnected-underline = ${colors.urgent}
type = custom/script type = custom/script
exec = ~/.config/polybar/scripts/yay_updates.sh exec = ~/.config/polybar/scripts/yay_updates.sh
tail = true tail = true
interval = 60 interval = 600
click-left = alacritty -e yay & click-left = alacritty -e yay &
format-prefix = " " format-prefix = " "

View File

@@ -12,16 +12,16 @@ let mapleader = "\<Space>"
" ============================== vim-plug " ============================== vim-plug
call plug#begin() call plug#begin()
Plug 'joshdick/onedark.vim' " Colorscheme Plug 'joshdick/onedark.vim' " color
Plug 'tpope/vim-sleuth' " Automatic intendations Plug 'tpope/vim-sleuth' " intendations
Plug 'jiangmiao/auto-pairs' " Pair completion Plug 'jiangmiao/auto-pairs' " pair completion
Plug 'airblade/vim-gitgutter' " Show git changes Plug 'airblade/vim-gitgutter' " git
Plug 'vim-airline/vim-airline' " Fancy Bar Plug 'itchyny/lightline.vim' " bar
Plug 'vim-airline/vim-airline-themes' " Themes for fancy Bar Plug 'ryanoasis/vim-devicons' " icons in bar
if executable("fzf") if executable("fzf")
Plug 'junegunn/fzf' Plug 'junegunn/fzf'
@@ -29,15 +29,15 @@ if executable("fzf")
endif endif
if has ("nvim") if has ("nvim")
Plug 'neovim/nvim-lspconfig' " LSP Plug 'neovim/nvim-lspconfig' " lsp
Plug 'Shougo/neosnippet.vim' " Snippet support Plug 'Shougo/neosnippet.vim' " snippet support
Plug 'Shougo/neosnippet-snippets' " Actual snippets Plug 'Shougo/neosnippet-snippets' " actual snippets
Plug 'nvim-lua/completion-nvim' " Fancy autocomplete Plug 'nvim-lua/completion-nvim' " autocomplete
endif endif
call plug#end() call plug#end()
" ============================== Colors """ ============================== Colors
syntax on syntax on
set background=dark set background=dark
colorscheme onedark colorscheme onedark
@@ -65,33 +65,37 @@ set wildmenu " autocomplete :e
set scrolloff=7 " min lines aboive or below the cursor set scrolloff=7 " min lines aboive or below the cursor
" ============================== Statusline " ============================== Statusline
let g:airline_theme='onedark' set laststatus=2
"let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#tabline#formatter = 'unique_tail'
set laststatus=0 function! GitStatus()
set statusline= let [a,m,r] = GitGutterGetHunkSummary()
return printf('+%d ~%d -%d', a, m, r)
endfunction
hi User1 guibg=NONE function! FileNameWithIcon() abort
return winwidth(0) > 70 ? WebDevIconsGetFileTypeSymbol() . ' ' . expand('%:t') : ''
endfunction
" Left Side let g:lightline = {
set statusline +=%1*%F " full path \ 'colorscheme': 'onedark',
set statusline +=%1*\ %m " modified flag \ }
" Right Side let g:lightline.component_function = { 'gitstatus': 'GitStatus' }
set statusline +=%1*%=%y " file type let g:lightline.component = { 'filename_with_icon': '%{FileNameWithIcon()}' }
set statusline +=%1*\ %c " column
set statusline +=%1*%5l " current line
set statusline +=%1*/%L " total lines
" ============================== Minimap Settings let g:lightline.active = {
"let g:minimap_auto_start=1 \ 'left': [['mode', 'readonly'], ['filename_with_icon', 'modified'], ['gitstatus']],
"let g:minimap_width=6 \ 'right': [['lineinfo'], ['percent'], ['fileformat', 'fileencoding', 'filetype']]
\ }
let g:lightline.separator = { 'left': "", 'right': "" }
let g:lightline.tabline_separator = { 'left': "", 'right': "" }
let g:lightline.subseparator = { 'left': '|', 'right': '|' }
" ============================== Indents and Whitespaces " ============================== Indents and Whitespaces
set list set list
"set listchars=tab:»\ ,extends:,precedes:,nbsp:·,trail:· set listchars=tab:»\ ,extends:,precedes:,nbsp,trail
set listchars=tab:\┊\ ,extends:,precedes:,nbsp,trail "set listchars=tab:\┊\ ,extends:,precedes:,nbsp:·,trail:·
set fillchars+=vert:\ "draw verticle split set fillchars+=vert:\ "draw verticle split
autocmd FileType perl set tabstop=8 shiftwidth=4 softtabstop=4 autocmd FileType perl set tabstop=8 shiftwidth=4 softtabstop=4

View File

@@ -12,13 +12,22 @@ autoload -U colors && colors
precmd_vcs_info() { vcs_info } precmd_vcs_info() { vcs_info }
precmd_functions+=( precmd_vcs_info ) precmd_functions+=( precmd_vcs_info )
setopt prompt_subst setopt prompt_subst
ICON="%{$fg[blue]%}"
ICON_DYN="%(?.%{$fg[green]%}.%{$fg[red]%})" LN=$'\n'
ICON="%(?.%{$fg[green]%}.%{$fg[red]%})λ"
DIR="%{$fg[blue]%}%~" DIR="%{$fg[blue]%}%~"
GIT_ICON=""
GIT="%{$fg[cyan]%}\$vcs_info_msg_0_" GIT="%{$fg[cyan]%}\$vcs_info_msg_0_"
if [[ -n "$SSH_CONNECTION" ]]; then
NAME="%{$fg[yellow]%}%m" NAME="%{$fg[yellow]%}%m"
export PROMPT="$NAME $DIR$GIT $ICON_DYN %{$reset_color%}" else
zstyle ':vcs_info:git:*' formats ' [%b ]' NAME="%{$fg[yellow]%}»"
fi
export PROMPT="${NAME} ${DIR}${GIT} ${LN}${ICON} %{$reset_color%}"
zstyle ':vcs_info:git:*' formats '  %b'
# ============================== Exports # ============================== Exports
export EDITOR="nvim" export EDITOR="nvim"