mirror of
https://github.com/Ajetski/dotfiles.git
synced 2025-09-30 13:03:18 -09:00
fiddle
This commit is contained in:
parent
60e222eaf8
commit
fd8882df39
@ -1,6 +1,6 @@
|
||||
|
||||
font:
|
||||
size: 12
|
||||
size: 11
|
||||
#normal:
|
||||
#family: FiraCode Nerd Font Mono Regular
|
||||
|
||||
|
@ -158,14 +158,14 @@ bindsym $mod+Shift+8 move container to workspace number $ws8
|
||||
bindsym $mod+Shift+9 move container to workspace number $ws9
|
||||
bindsym $mod+Shift+0 move container to workspace number $ws10
|
||||
|
||||
bindsym $mod+Tab workspace next
|
||||
bindsym $mod+Tab workspace back_and_forth
|
||||
|
||||
# reload the configuration file
|
||||
bindsym $mod+Shift+c reload
|
||||
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
|
||||
bindsym $mod+Shift+r restart
|
||||
# exit i3 (logs you out of your X session)
|
||||
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'"
|
||||
bindsym $mod+Shift+q exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'"
|
||||
|
||||
# resize window (you can also use the mouse for that)
|
||||
mode "resize" {
|
||||
@ -200,5 +200,6 @@ bar {
|
||||
status_command i3blocks
|
||||
font pango:monospace 10
|
||||
tray_output primary
|
||||
position top
|
||||
}
|
||||
|
||||
|
@ -4,7 +4,7 @@ markup=none
|
||||
|
||||
[volume]
|
||||
label=🔊
|
||||
command=pactl list sinks | grep -e Volume: | head -n 1 | sed -r 's/.* ([0-9]+%).*/\1/'
|
||||
command=pactl list sinks | rg -e Volume: | head -n 1 | sed -r 's/.* ([0-9]+%).*/\1/'
|
||||
color=#A8DFEA
|
||||
interval=1
|
||||
|
||||
@ -14,7 +14,7 @@ color=#D5A3F7
|
||||
interval=1
|
||||
|
||||
[weather]
|
||||
command=curl -Ss 'https://wttr.in/?format=%25c%25t%20(%25f)&M'
|
||||
command=weather_cli | head -n 1
|
||||
color=#A4C2F4
|
||||
interval=900
|
||||
|
||||
|
2812
.config/nvim/autoload/plug.vim
Normal file
2812
.config/nvim/autoload/plug.vim
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,3 +1,8 @@
|
||||
{
|
||||
"svelte.ask-to-enable-ts-plugin": false
|
||||
"svelte.ask-to-enable-ts-plugin": false,
|
||||
"rust-analyzer.procMacro.enable": false,
|
||||
"zig.enabled": true,
|
||||
"zig.startUpMessage": true,
|
||||
"zig.path": "/snap/bin/zig",
|
||||
"zig.debugLog": false
|
||||
}
|
167
.config/nvim/init.lua
Normal file
167
.config/nvim/init.lua
Normal file
@ -0,0 +1,167 @@
|
||||
-- Basics
|
||||
vim.g.mapleader = " "
|
||||
|
||||
vim.opt.incsearch = true
|
||||
vim.opt.hlsearch = true
|
||||
vim.opt.ignorecase = true
|
||||
vim.o.mouse = "a"
|
||||
vim.o.number = true
|
||||
vim.o.relativenumber = true
|
||||
vim.o.wrap = true -- wrap lines
|
||||
vim.o.encoding = "UTF-8" -- set encoding to UTF-8 (default was "latin1")
|
||||
vim.o.wildmenu = true -- visual autocomplete for command menu
|
||||
vim.o.lazyredraw = true -- redraw screen only when we need to
|
||||
vim.o.showmatch = true -- highlight matching parentheses / brackets [{()}]
|
||||
vim.o.laststatus = 2 -- always show statusline (even with only single window)
|
||||
vim.o.ruler = true -- show line and column number of the cursor on right side of statusline
|
||||
vim.o.visualbell = true -- blink cursor on error, instead of beeping
|
||||
vim.o.invlist = true -- show tabs
|
||||
|
||||
|
||||
vim.api.nvim_set_keymap("n", "<leader>", "<Plug>(easymotion-bd-jk)", { noremap = true })
|
||||
vim.keymap.set("i", "kj", "<esc>", { silent = true }) -- sets noremap automatically
|
||||
vim.api.nvim_set_var("toggle_syntax_state", true)
|
||||
|
||||
-- Plugins
|
||||
local Plug = vim.fn['plug#']
|
||||
|
||||
vim.call('plug#begin', '~/.config/nvim/plugged')
|
||||
Plug 'tpope/vim-sensible'
|
||||
Plug 'tpope/vim-surround'
|
||||
Plug('scrooloose/nerdtree', {on = {'NERDTreeToggle', 'NERDTree'}})
|
||||
Plug 'junegunn/goyo.vim'
|
||||
Plug('junegunn/fzf', {['do'] = vim.fn['fzf#install']})
|
||||
Plug('nvim-treesitter/nvim-treesitter', {['do'] = vim.fn['TSUpdate']})
|
||||
Plug 'ctrlpvim/ctrlp.vim'
|
||||
Plug 'wadackel/vim-dogrun' -- colorscheme
|
||||
Plug 'tribela/vim-transparent'
|
||||
|
||||
-- LSP
|
||||
Plug 'neovim/nvim-lspconfig'
|
||||
Plug 'hrsh7th/cmp-nvim-lsp'
|
||||
Plug 'hrsh7th/cmp-buffer'
|
||||
Plug 'hrsh7th/cmp-path'
|
||||
Plug 'hrsh7th/cmp-cmdline'
|
||||
Plug 'hrsh7th/nvim-cmp'
|
||||
Plug 'saadparwaiz1/cmp_luasnip' -- Snippets source for nvim-cmp
|
||||
Plug 'L3MON4D3/LuaSnip' -- Snippets plugin
|
||||
|
||||
-- Airline
|
||||
Plug 'vim-airline/vim-airline'
|
||||
Plug 'vim-airline/vim-airline-themes'
|
||||
-- Lang Support
|
||||
Plug 'sheerun/vim-polyglot'
|
||||
Plug 'evanleck/vim-svelte'
|
||||
Plug 'pantharshit00/vim-prisma'
|
||||
Plug 'pangloss/vim-javascript'
|
||||
vim.call('plug#end')
|
||||
|
||||
vim.cmd(':colorscheme dogrun')
|
||||
|
||||
-- setup Airline
|
||||
vim.cmd('let g:airline#extensions#tabline#enabled = 1')
|
||||
vim.cmd("let g:airline#extensions#tabline#left_sep = ' '")
|
||||
vim.cmd("let g:airline#extensions#tabline#left_alt_sep = '|'")
|
||||
vim.cmd("let g:airline_theme='night_owl'")
|
||||
vim.cmd("let g:airline_section_y = '%{strftime(\"%H:%M\")}'")
|
||||
|
||||
-- setup TreeSitter
|
||||
require'nvim-treesitter.configs'.setup {
|
||||
ensure_installed = "all",
|
||||
sync_install = false
|
||||
}
|
||||
|
||||
-- luasnip setup
|
||||
local luasnip = require 'luasnip'
|
||||
|
||||
-- setup LSP
|
||||
local cmp = require'cmp'
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
luasnip.lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
window = {},
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
['<C-b>'] = cmp.mapping.scroll_docs(-4),
|
||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||
['<C-Space>'] = cmp.mapping.complete(),
|
||||
['<C-e>'] = cmp.mapping.abort(),
|
||||
['<CR>'] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
|
||||
}),
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'nvim_lsp' },
|
||||
}, {
|
||||
{ name = 'buffer' }
|
||||
})
|
||||
})
|
||||
-- Mappings.
|
||||
-- See `:help vim.diagnostic.*` for documentation on any of the below functions
|
||||
local opts = { noremap=true, silent=true }
|
||||
vim.keymap.set('n', '<space>e', vim.diagnostic.open_float, opts)
|
||||
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, opts)
|
||||
vim.keymap.set('n', ']d', vim.diagnostic.goto_next, opts)
|
||||
vim.keymap.set('n', '<space>q', vim.diagnostic.setloclist, opts)
|
||||
|
||||
-- Use an on_attach function to only map the following keys
|
||||
-- after the language server attaches to the current buffer
|
||||
local on_attach = function(client, bufnr)
|
||||
-- Enable completion triggered by <c-x><c-o>
|
||||
vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc')
|
||||
|
||||
-- Mappings.
|
||||
-- See `:help vim.lsp.*` for documentation on any of the below functions
|
||||
local bufopts = { noremap=true, silent=true, buffer=bufnr }
|
||||
vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, bufopts)
|
||||
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, bufopts)
|
||||
vim.keymap.set('n', 'K', vim.lsp.buf.hover, bufopts)
|
||||
vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, bufopts)
|
||||
vim.keymap.set('n', '<C-k>', vim.lsp.buf.signature_help, bufopts)
|
||||
vim.keymap.set('n', '<space>wa', vim.lsp.buf.add_workspace_folder, bufopts)
|
||||
vim.keymap.set('n', '<space>wr', vim.lsp.buf.remove_workspace_folder, bufopts)
|
||||
vim.keymap.set('n', '<space>wl', function()
|
||||
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
|
||||
end, bufopts)
|
||||
vim.keymap.set('n', '<space>D', vim.lsp.buf.type_definition, bufopts)
|
||||
vim.keymap.set('n', '<space>rn', vim.lsp.buf.rename, bufopts)
|
||||
vim.keymap.set('n', '<space>ca', vim.lsp.buf.code_action, bufopts)
|
||||
vim.keymap.set('n', 'gr', vim.lsp.buf.references, bufopts)
|
||||
vim.keymap.set('n', '<space>f', vim.lsp.buf.formatting, bufopts)
|
||||
end
|
||||
|
||||
vim.api.nvim_create_autocmd(
|
||||
{ "BufEnter" },
|
||||
{ pattern = { "*" }, command = "if tabpagenr('$') == 1 && winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() | quit | endif" }
|
||||
)
|
||||
|
||||
local lsp_flags = {
|
||||
}
|
||||
require('lspconfig')['tsserver'].setup{
|
||||
on_attach = on_attach,
|
||||
flags = lsp_flags,
|
||||
}
|
||||
require('lspconfig')['rust_analyzer'].setup{
|
||||
on_attach = on_attach,
|
||||
flags = lsp_flags,
|
||||
|
||||
-- Server-specific settings...
|
||||
settings = {
|
||||
["rust-analyzer"] = {}
|
||||
}
|
||||
}
|
||||
require('lspconfig')['svelte'].setup{
|
||||
on_attach = on_attach,
|
||||
flags = lsp_flags
|
||||
}
|
||||
|
||||
vim.cmd("let g:ctrlp_custom_ignore = 'node_modules\\|DS_Store\\|git\\|build\\|dist\\|target'")
|
||||
|
||||
-- keymaps
|
||||
vim.keymap.set("n", "<c-s>", ":wa<cr>")
|
||||
vim.keymap.set("n", "<c-t>", ":NERDTreeToggle<cr>")
|
||||
vim.keymap.set("n", "<leader>tt", ":TransparentToggle<cr>")
|
||||
vim.keymap.set("n", "gt", ":bn<cr>")
|
||||
vim.keymap.set("n", "gT", ":bp<cr>")
|
||||
vim.keymap.set("n", "<cr>", ":nohlsearch<cr><cr>")
|
||||
|
1
.config/nvim/plugged/LuaSnip
Submodule
1
.config/nvim/plugged/LuaSnip
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 7d78278c2a935b8cd1b6b43065223e14490f3133
|
1
.config/nvim/plugged/cmp-buffer
Submodule
1
.config/nvim/plugged/cmp-buffer
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 62fc67a2b0205136bc3e312664624ba2ab4a9323
|
1
.config/nvim/plugged/cmp-cmdline
Submodule
1
.config/nvim/plugged/cmp-cmdline
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit c36ca4bc1dedb12b4ba6546b96c43896fd6e7252
|
1
.config/nvim/plugged/cmp-nvim-lsp
Submodule
1
.config/nvim/plugged/cmp-nvim-lsp
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit affe808a5c56b71630f17aa7c38e15c59fd648a8
|
1
.config/nvim/plugged/cmp-path
Submodule
1
.config/nvim/plugged/cmp-path
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 981baf9525257ac3269e1b6701e376d6fbff6921
|
1
.config/nvim/plugged/cmp_luasnip
Submodule
1
.config/nvim/plugged/cmp_luasnip
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit a9de941bcbda508d0a45d28ae366bb3f08db2e36
|
1
.config/nvim/plugged/ctrlp.vim
Submodule
1
.config/nvim/plugged/ctrlp.vim
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 3ce448c9687ae96dea0caf4da388ecd8d9072f72
|
1
.config/nvim/plugged/fzf
Submodule
1
.config/nvim/plugged/fzf
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 51fdaad002a5ad827bd5ebfac43386592005d02c
|
1
.config/nvim/plugged/goyo.vim
Submodule
1
.config/nvim/plugged/goyo.vim
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit a9c7283dce60ffcdec952384f6451ff42f8914f2
|
1
.config/nvim/plugged/nerdtree
Submodule
1
.config/nvim/plugged/nerdtree
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit fc85a6f07c2cd694be93496ffad75be126240068
|
1
.config/nvim/plugged/nvim-cmp
Submodule
1
.config/nvim/plugged/nvim-cmp
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 9897465a7663997b7b42372164ffc3635321a2fe
|
1
.config/nvim/plugged/nvim-lspconfig
Submodule
1
.config/nvim/plugged/nvim-lspconfig
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 06161eca0aaaafbede0234216aefaed2e5eb46d8
|
1
.config/nvim/plugged/nvim-treesitter
Submodule
1
.config/nvim/plugged/nvim-treesitter
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 0fc45ea650df87c47ab4fcfe903693ce170c71c3
|
1
.config/nvim/plugged/vim
Submodule
1
.config/nvim/plugged/vim
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit d7723a842a6cfa2f62cf85530ab66eb418521dc2
|
1
.config/nvim/plugged/vim-airline
Submodule
1
.config/nvim/plugged/vim-airline
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 91b67e3ca2d7bc66544724f9c702265c564a1f2e
|
1
.config/nvim/plugged/vim-airline-themes
Submodule
1
.config/nvim/plugged/vim-airline-themes
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 97cf3e6e638f936187d5f6e9b5eb1bdf0a4df256
|
1
.config/nvim/plugged/vim-dogrun
Submodule
1
.config/nvim/plugged/vim-dogrun
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit f1a6ec680da5f2da7d8629dfa55fe222ae878c2d
|
1
.config/nvim/plugged/vim-javascript
Submodule
1
.config/nvim/plugged/vim-javascript
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit d6e137563c47fb59f26ed25d044c0c7532304f18
|
1
.config/nvim/plugged/vim-polyglot
Submodule
1
.config/nvim/plugged/vim-polyglot
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 38282d58387cff48ac203f6912c05e4c8686141b
|
1
.config/nvim/plugged/vim-prisma
Submodule
1
.config/nvim/plugged/vim-prisma
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit e91ac5011232e1bd8ea53204db8d01203d5d0f3c
|
1
.config/nvim/plugged/vim-sensible
Submodule
1
.config/nvim/plugged/vim-sensible
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 226203be173bf0b95ee2a5cb6575ae604b3f9f7a
|
1
.config/nvim/plugged/vim-surround
Submodule
1
.config/nvim/plugged/vim-surround
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit bf3480dc9ae7bea34c78fbba4c65b4548b5b1fea
|
1
.config/nvim/plugged/vim-svelte
Submodule
1
.config/nvim/plugged/vim-svelte
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 1080030d6a1bc6582389c133a07552ba0a442410
|
1
.config/nvim/plugged/vim-transparent
Submodule
1
.config/nvim/plugged/vim-transparent
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit e2f16c1e3341773518b68799264c6cfd7ac8bd7a
|
1
.config/nvim/plugged/yats.vim
Submodule
1
.config/nvim/plugged/yats.vim
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 68cd1da2bcea5fb3fbe6b6266958ae7c72e814da
|
@ -19,6 +19,12 @@ bind -n M-j select-pane -D
|
||||
bind -n M-k select-pane -U
|
||||
bind -n M-l select-pane -R
|
||||
|
||||
bind -n M-H resize-pane -L 5
|
||||
bind -n M-J resize-pane -D 5
|
||||
bind -n M-K resize-pane -U 5
|
||||
bind -n M-L resize-pane -R 5
|
||||
|
||||
|
||||
set -s escape-time 0
|
||||
|
||||
#add vim binds with prefix
|
||||
|
@ -1,8 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
pactl list | \
|
||||
grep -e media.name | \
|
||||
grep -v -e recStream -e playStream -e Playback | \
|
||||
rg -e media.name | \
|
||||
rg -v -e recStream -e playStream -e Playback -e playback | \
|
||||
tail -n 1 | \
|
||||
sed -r 's/.*"(.*)".*/\1/'
|
||||
sed -r 's/^.*= "(.*)"$/\1/' | \
|
||||
sed 's/\\"/"/g'
|
||||
|
||||
|
5
.scripts/utils/killport
Executable file
5
.scripts/utils/killport
Executable file
@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
PORT=$1
|
||||
kill -9 $(lsof -t -i:$PORT)
|
||||
|
9
.scripts/utils/screenshot
Executable file
9
.scripts/utils/screenshot
Executable file
@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [[ -f ~/Pictures/screenshot.png ]]; then
|
||||
rm ~/Pictures/screenshot.png
|
||||
fi
|
||||
|
||||
scrot ~/Pictures/screenshot.png
|
||||
convert ~/Pictures/screenshot.png -crop 1920x1080+0+0 ~/Pictures/screenshot.png
|
||||
|
@ -11,7 +11,8 @@ let mapleader = ' '
|
||||
let maplocalleader = ' '
|
||||
|
||||
" save file bind
|
||||
noremap <c-s> :w<cr>
|
||||
nnoremap <c-s> :w<cr>
|
||||
inoremap <c-s> <esc>:w<cr>
|
||||
|
||||
" exit terminal mode
|
||||
:tnoremap <Esc> <C-\><C-n>
|
||||
@ -110,26 +111,13 @@ if has('nvim')
|
||||
EOF
|
||||
endif
|
||||
|
||||
function! s:check_back_space() abort
|
||||
let col = col('.') - 1
|
||||
return !col || getline('.')[col - 1] =~ '\s'
|
||||
endfunction
|
||||
|
||||
function! CheckBackspace() abort
|
||||
let col = col('.') - 1
|
||||
return !col || getline('.')[col - 1] =~# '\s'
|
||||
endfunction
|
||||
inoremap <silent><expr> <TAB>
|
||||
\ pumvisible() ? "\<C-n>" :
|
||||
\ CheckBackspace() ? "\<TAB>" :
|
||||
\ coc#refresh()
|
||||
inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>"
|
||||
|
||||
" Make <CR> auto-select the first completion item and notify coc.nvim to
|
||||
" " format on enter, <cr> could be remapped by other vim plugin
|
||||
inoremap <silent><expr> <cr> pumvisible() ? coc#_select_confirm()
|
||||
\: "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"
|
||||
|
||||
inoremap <silent><expr> <tab> pumvisible() ? coc#_select_confirm()
|
||||
\: "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"
|
||||
|
||||
" Use <c-space> to trigger completion.
|
||||
if has('nvim')
|
||||
|
Loading…
x
Reference in New Issue
Block a user