aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAbdus <abdus@abdus.net>2020-12-13 23:48:22 +0530
committerAbdus <abdus@abdus.net>2020-12-13 23:48:22 +0530
commitfc0e193b81c869f4d5e42f74f8011b026efb9e57 (patch)
treead1e1509d23ffe6d75e8d2babf78ecbb5d8c6c05
parent441e5ad123331418859ceed43d2372df44d4f89e (diff)
downloaddotfiles-fc0e193b81c869f4d5e42f74f8011b026efb9e57.tar.bz2
dotfiles-fc0e193b81c869f4d5e42f74f8011b026efb9e57.zip
:zap: automated updates
-rw-r--r--sway/config12
-rw-r--r--vim/.vimrc88
-rw-r--r--vim/coc-settings.json4
-rw-r--r--vim/init.vim14
-rw-r--r--waybar/conf.d/config.material20
-rw-r--r--waybar/styles.d/style.custom-1.css10
-rw-r--r--waybar/styles.d/style.mac-like.css2
-rw-r--r--waybar/styles.d/style.material.css2
8 files changed, 119 insertions, 33 deletions
diff --git a/sway/config b/sway/config
index 50a9bfd..5a08886 100644
--- a/sway/config
+++ b/sway/config
@@ -38,11 +38,11 @@ output * background $HOME/Pictures/wallpaper/25.jpg fill
#
# Example configuration:
#
-# exec swayidle -w \
-# timeout 300 'swaylock -f -c 000000' \
-# timeout 600 'swaymsg "output * dpms off"' \
-# resume 'swaymsg "output * dpms on"' \
-# before-sleep 'swaylock -f -c 000000'
+exec swayidle -w \
+ timeout 300 'swaylock -f -c 000000' \
+ timeout 600 'swaymsg "output * dpms off"' \
+ resume 'swaymsg "output * dpms on"' \
+ before-sleep 'swaylock -f -c 000000'
#
# This will lock your screen after 300 seconds of inactivity, then turn off
# your displays after another 300 seconds, and turn your screens back on when
@@ -63,6 +63,8 @@ input * {
input "type:keyboard" {
xkb_options caps:escape
+ #repeat_rate 10
+ repeat_delay 150
}
#
diff --git a/vim/.vimrc b/vim/.vimrc
index 1f928a7..1305dad 100644
--- a/vim/.vimrc
+++ b/vim/.vimrc
@@ -22,14 +22,18 @@ set lbr wrap nolist " breaks line whenever needed/on resize
set cursorline " highlight cursorline
set splitbelow splitright " new windows below and right of the current one
+au BufRead,BufNewFile *.md set textwidth=80 " wrap lines exceeding 80 chars
+
let g:mapleader = ',' " keybinding leader
call plug#begin('~/.config/nvim/plug')
-Plug 'abdus/palenight.vim' " color theme
+"Plug 'abdus/palenight.vim' " color therr
Plug 'vim-airline/vim-airline' " airline (bottom bar)
-Plug 'morhetz/gruvbox'
+"Plug 'morhetz/gruvbox'
+Plug 'ayu-theme/ayu-vim'
+Plug 'chrisbra/Colorizer' " highlight colorcodes and names
Plug 'preservim/nerdtree' " file manager plugin
Plug 'preservim/nerdcommenter' " comments
@@ -40,6 +44,7 @@ Plug 'neoclide/coc.nvim', {'branch': 'release'} " Language Server
Plug 'mattn/emmet-vim' " Emmet for Vim
Plug 'sheerun/vim-polyglot' " language pack
Plug 'dense-analysis/ale' " async lint engine
+Plug 'editorconfig/editorconfig-vim' " editorconfig support for vim
Plug 'airblade/vim-gitgutter' " git events visualised
Plug 'tpope/vim-fugitive' " Git Wrapper
@@ -81,9 +86,20 @@ endif
"let g:palenight_terminal_italics=1
"let g:airline_theme = "palenight" " airline theme
-let g:gruvbox_invert_selection = 0
-colorscheme gruvbox " color theme
-let g:airline_theme = "gruvbox" " airline theme
+"let g:gruvbox_invert_selection = 0
+"colorscheme gruvbox " color theme
+"let g:airline_theme = "gruvbox" " airline theme
+
+let ayucolor="dark" " mirage
+colorscheme ayu
+let g:airline_theme = "ayu"
+
+" indent line
+let g:indentLine_char = ''
+let g:indentLine_first_char = ''
+let g:indentLine_showFirstIndentLevel = 1
+let g:indentLine_setColors = 0
+
let g:airline#extensions#tabline#enabled = 1 " enable upper tabline
let g:airline#extensions#tabline#fnamemod = ':t' " no idea what this does
@@ -103,7 +119,7 @@ let g:rustfmt_autosave = 1 " rust format on save
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" >- polyglot.vim
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-let g:polyglot_disabled = [''] " disable languages
+"let g:polyglot_disabled = [''] " disable languages
@@ -124,9 +140,13 @@ let g:ale_fixers.html = ['prettier']
let g:ale_fixers.css = ['prettier']
let g:ale_fixers.markdown = ['prettier']
let g:ale_fixers.javascript = ['prettier', 'eslint']
+let g:ale_fixers.javascriptreact = ['prettier', 'eslint']
+let g:ale_fixers.typescript = ['prettier', 'eslint']
let g:ale_fixers.rust = ['rustfmt']
+let g:ale_fixers.sh = ['shfmt']
let g:ale_fixers['*'] = ['remove_trailing_lines', 'trim_whitespace']
+"let g:ale_linters_ignore = {'javascript': ['eslint']}
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
@@ -134,8 +154,8 @@ let g:ale_fixers['*'] = ['remove_trailing_lines', 'trim_whitespace']
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
let wiki_default = {}
let wiki_default.path = "~/vimwiki/"
-let wiki_default.syntax = "default"
-let wiki_default.ext = ".vimwiki"
+let wiki_default.syntax = "markdown"
+let wiki_default.ext = ".md"
let wiki_default.path_html = "/tmp/vimwiki_html"
let g:vimwiki_list = [wiki_default]
@@ -175,6 +195,44 @@ if has('persistent_undo')
endif
+"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+" >- Autosave Sessions
+"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+" create a session based on currently opened directory and save it on vim exit
+fu! SessionSave()
+ if filewritable(expand('~/.vim/sessions/' . split(getcwd(), '/')[-1] . '.vim'))
+ execute 'mksession! ~/.vim/sessions/' . split(getcwd(), '/')[-1] . '.vim'
+ endif
+endfunction
+
+fu! SessionCreate()
+ if !isdirectory(expand("~/.vim/sessions"))
+ execute "call mkdir(expand('~/.vim/sessions', 'p'))"
+ endif
+ execute 'mksession ~/.vim/sessions/' . split(getcwd(), '/')[-1] . '.vim'
+endfunction
+
+fu! SessionRestore()
+ let l:session_file = '~/.vim/sessions/' . split(getcwd(), '/')[-1] . '.vim'
+ if filereadable(expand(session_file))
+ echo session_file
+ execute 'source ~/.vim/sessions/' . split(getcwd(), '/')[-1] . '.vim'
+
+ if bufexists(1)
+ for l in range(1, bufnr('$'))
+ if bufwinnr(l) == -1
+ exec 'sbuffer ' . l
+ endif
+ endfor
+ endif
+ endif
+endfunction
+
+autocmd VimLeave * :tabdo NERDTreeClose " just close that damn thing
+autocmd VimLeave * call SessionSave()
+autocmd VimEnter * nested call SessionRestore()
+command SessCreate call SessionCreate()
+set sessionoptions-=options " dont save options
@@ -194,6 +252,7 @@ endif
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
inoremap <C-CR> <CR><Esc>kA<CR>| " indented newline on Ctrl + Enter
inoremap ii <esc>| " use ii to exit modes
+inoremap <C-b> <esc>lce
nnoremap
\ <silent><expr> <Leader>H
@@ -263,13 +322,24 @@ nnoremap <S-s> <esc>:w<CR>| " quick save
" >- NERDTree
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
map <C-n> :NERDTreeToggle<CR>| " Opens up NerdTree
+map <C-m> :NERDTreeMirror<CR>| " mirror available nerdtree instance
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+" >- FZF
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-nnoremap <space><space> :FZF<CR>| " open fuzzy search
+nnoremap <space>F :FZF<CR>| " open fuzzy search
nnoremap <space>f :Filetypes<CR>| " open filetype window
+nnoremap <space><space> :Buffers<CR>| " open fuzzy search
+
+
+
+"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+" >- coc.vim
+"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+"typescript.validate.enable": false,
+"javascript.validate.enable": false,
diff --git a/vim/coc-settings.json b/vim/coc-settings.json
new file mode 100644
index 0000000..7f16f6c
--- /dev/null
+++ b/vim/coc-settings.json
@@ -0,0 +1,4 @@
+{
+ "typescript.validate.enable": false,
+ "javascript.suggestionActions.enabled": false
+}
diff --git a/vim/init.vim b/vim/init.vim
index 34c90c1..1305dad 100644
--- a/vim/init.vim
+++ b/vim/init.vim
@@ -34,7 +34,6 @@ Plug 'vim-airline/vim-airline' " airline (bottom bar)
"Plug 'morhetz/gruvbox'
Plug 'ayu-theme/ayu-vim'
Plug 'chrisbra/Colorizer' " highlight colorcodes and names
-Plug 'jbgutierrez/vim-better-comments' " highlight comments with diff colors
Plug 'preservim/nerdtree' " file manager plugin
Plug 'preservim/nerdcommenter' " comments
@@ -91,7 +90,7 @@ endif
"colorscheme gruvbox " color theme
"let g:airline_theme = "gruvbox" " airline theme
-let ayucolor="mirage"
+let ayucolor="dark" " mirage
colorscheme ayu
let g:airline_theme = "ayu"
@@ -142,6 +141,7 @@ let g:ale_fixers.css = ['prettier']
let g:ale_fixers.markdown = ['prettier']
let g:ale_fixers.javascript = ['prettier', 'eslint']
let g:ale_fixers.javascriptreact = ['prettier', 'eslint']
+let g:ale_fixers.typescript = ['prettier', 'eslint']
let g:ale_fixers.rust = ['rustfmt']
let g:ale_fixers.sh = ['shfmt']
let g:ale_fixers['*'] = ['remove_trailing_lines', 'trim_whitespace']
@@ -322,10 +322,12 @@ nnoremap <S-s> <esc>:w<CR>| " quick save
" >- NERDTree
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
map <C-n> :NERDTreeToggle<CR>| " Opens up NerdTree
+map <C-m> :NERDTreeMirror<CR>| " mirror available nerdtree instance
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+" >- FZF
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
nnoremap <space>F :FZF<CR>| " open fuzzy search
nnoremap <space>f :Filetypes<CR>| " open filetype window
@@ -334,6 +336,14 @@ nnoremap <space><space> :Buffers<CR>| " open fuzzy search
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+" >- coc.vim
+"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+"typescript.validate.enable": false,
+"javascript.validate.enable": false,
+
+
+
+"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" >- Others
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
nnoremap <Leader>n :set relativenumber!<CR>| " toggle relative numbers
diff --git a/waybar/conf.d/config.material b/waybar/conf.d/config.material
index b38d096..c6ef274 100644
--- a/waybar/conf.d/config.material
+++ b/waybar/conf.d/config.material
@@ -134,19 +134,19 @@
},
"custom/logo": {
- "format": ""
+ "format": ""
},
- "custom/emailicon": {
- "format": ""
- },
+ // "custom/emailicon": {
+ // "format": ""
+ // },
- "custom/unreademail": {
- "format": "{}",
- "exec": "cat /tmp/unread-email-count.txt || echo ErrNF",
- "signal": 2,
- "interval": 10,
- },
+ // "custom/unreademail": {
+ // "format": "{}",
+ // "exec": "cat /tmp/unread-email-count.txt || echo ErrNF",
+ // "signal": 2,
+ // "interval": 10,
+ // },
"custom/icon-cube": {
"format": ""
diff --git a/waybar/styles.d/style.custom-1.css b/waybar/styles.d/style.custom-1.css
index 147ae02..88de0e8 100644
--- a/waybar/styles.d/style.custom-1.css
+++ b/waybar/styles.d/style.custom-1.css
@@ -23,7 +23,7 @@ window#waybar.hidden {
#workspaces button {
padding: 0.5rem 0.7rem;
- margin: 10px 0;
+ margin: 0px 0;
background: #282a36;
}
@@ -65,14 +65,14 @@ window#waybar.hidden {
#custom-linuxlogo {
padding: 0.5rem 0.7rem;
color: #ffffff;
- margin: 10px 0;
+ margin: 0px 0;
background: #282a36;
}
#clock {
background-color: #50fa7b;
color: #282a36;
- margin-right: 10px;
+ margin-right: 0px;
}
#battery {
@@ -120,7 +120,7 @@ label:focus {
}
#backlight.value {
- margin-right: 10px;
+ margin-right: 0px;
}
#network {
@@ -134,7 +134,7 @@ label:focus {
#pulseaudio.icon {
background: #50fa7b;
color: #000;
- margin-left: 10px;
+ margin-left: 0px;
}
#pulseaudio.muted.icon {
diff --git a/waybar/styles.d/style.mac-like.css b/waybar/styles.d/style.mac-like.css
index 853a797..6a67386 100644
--- a/waybar/styles.d/style.mac-like.css
+++ b/waybar/styles.d/style.mac-like.css
@@ -15,7 +15,7 @@ window#waybar {
color: #000;
transition-property: background-color;
transition-duration: 0.5s;
- padding: 10px 0;
+ padding: 0px 0;
}
window#waybar.hidden {
diff --git a/waybar/styles.d/style.material.css b/waybar/styles.d/style.material.css
index 1d9e96e..07d0cf2 100644
--- a/waybar/styles.d/style.material.css
+++ b/waybar/styles.d/style.material.css
@@ -173,7 +173,7 @@ label:focus {
#custom-logo {
background: deeppink;
- font-size: 1.3em;
+ font-size: 1.15em;
color: #282a36;
}