merged laptop into master

This commit is contained in:
paul-loedige
2023-02-22 17:54:22 +01:00
parent 3280a62cac
commit 61dc1712af
8 changed files with 60 additions and 34 deletions
+26 -24
View File
@@ -1,30 +1,36 @@
" TextEdit might fail if hidden is not set.
set hidden
" May need for vim (not neovim) since coc.nvim calculate byte offset by count
" utf-8 byte sequence.
set encoding=utf-8
" Some servers have issues with backup files, see #649. " Some servers have issues with backup files, see #649.
set nobackup set nobackup
set nowritebackup set nowritebackup
" Give more space for displaying messages.
set cmdheight=2
" Having longer updatetime (default is 4000 ms = 4 s) leads to noticeable " Having longer updatetime (default is 4000 ms = 4 s) leads to noticeable
" delays and poor user experience. " delays and poor user experience.
set updatetime=300 set updatetime=300
" Don't pass messages to |ins-completion-menu|. " Always show the signcolumn, otherwise it would shift the text each time
set shortmess+=c " diagnostics appear/become resolved.
set signcolumn=yes
" Use tab for trigger completion with characters ahead and navigate. " Use tab for trigger completion with characters ahead and navigate.
" NOTE: There's always complete item selected by default, you may want to enable
" no select by `"suggest.noselect": true` in your configuration file.
" NOTE: Use command ':verbose imap <tab>' to make sure tab is not mapped by " NOTE: Use command ':verbose imap <tab>' to make sure tab is not mapped by
" other plugin before putting this into your config. " other plugin before putting this into your config.
inoremap <silent><expr> <TAB> inoremap <silent><expr> <TAB>
\ pumvisible() ? "\<C-n>" : \ coc#pum#visible() ? coc#pum#next(1) :
\ <SID>check_back_space() ? "\<TAB>" : \ CheckBackspace() ? "\<Tab>" :
\ coc#refresh() \ coc#refresh()
inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>" inoremap <expr><S-TAB> coc#pum#visible() ? coc#pum#prev(1) : "\<C-h>"
function! s:check_back_space() abort " Make <CR> to accept selected completion item or notify coc.nvim to format
" <C-g>u breaks current undo, please make your own choice.
inoremap <silent><expr> <CR> coc#pum#visible() ? coc#pum#confirm()
\: "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"
function! CheckBackspace() abort
let col = col('.') - 1 let col = col('.') - 1
return !col || getline('.')[col - 1] =~# '\s' return !col || getline('.')[col - 1] =~# '\s'
endfunction endfunction
@@ -36,11 +42,6 @@ else
inoremap <silent><expr> <c-@> coc#refresh() inoremap <silent><expr> <c-@> coc#refresh()
endif endif
" 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>"
" Use `[g` and `]g` to navigate diagnostics " Use `[g` and `]g` to navigate diagnostics
" Use `:CocDiagnostics` to get all diagnostics of current buffer in location list. " Use `:CocDiagnostics` to get all diagnostics of current buffer in location list.
nmap <silent> [g <Plug>(coc-diagnostic-prev) nmap <silent> [g <Plug>(coc-diagnostic-prev)
@@ -53,15 +54,13 @@ nmap <silent> gi <Plug>(coc-implementation)
nmap <silent> gr <Plug>(coc-references) nmap <silent> gr <Plug>(coc-references)
" Use K to show documentation in preview window. " Use K to show documentation in preview window.
nnoremap <silent> K :call <SID>show_documentation()<CR> nnoremap <silent> K :call ShowDocumentation()<CR>
function! s:show_documentation() function! ShowDocumentation()
if (index(['vim','help'], &filetype) >= 0) if CocAction('hasProvider', 'hover')
execute 'h '.expand('<cword>')
elseif (coc#rpc#ready())
call CocActionAsync('doHover') call CocActionAsync('doHover')
else else
execute '!' . &keywordprg . " " . expand('<cword>') call feedkeys('K', 'in')
endif endif
endfunction endfunction
@@ -93,6 +92,9 @@ nmap <leader>ac <Plug>(coc-codeaction)
" Apply AutoFix to problem on the current line. " Apply AutoFix to problem on the current line.
nmap <leader>qf <Plug>(coc-fix-current) nmap <leader>qf <Plug>(coc-fix-current)
" Run the Code Lens action on the current line.
nmap <leader>cl <Plug>(coc-codelens-action)
" Map function and class text objects " Map function and class text objects
" NOTE: Requires 'textDocument.documentSymbol' support from the language server. " NOTE: Requires 'textDocument.documentSymbol' support from the language server.
xmap if <Plug>(coc-funcobj-i) xmap if <Plug>(coc-funcobj-i)
@@ -120,13 +122,13 @@ nmap <silent> <C-s> <Plug>(coc-range-select)
xmap <silent> <C-s> <Plug>(coc-range-select) xmap <silent> <C-s> <Plug>(coc-range-select)
" Add `:Format` command to format current buffer. " Add `:Format` command to format current buffer.
command! -nargs=0 Format :call CocAction('format') command! -nargs=0 Format :call CocActionAsync('format')
" Add `:Fold` command to fold current buffer. " Add `:Fold` command to fold current buffer.
command! -nargs=? Fold :call CocAction('fold', <f-args>) command! -nargs=? Fold :call CocAction('fold', <f-args>)
" Add `:OR` command for organize imports of the current buffer. " Add `:OR` command for organize imports of the current buffer.
command! -nargs=0 OR :call CocAction('runCommand', 'editor.action.organizeImport') command! -nargs=0 OR :call CocActionAsync('runCommand', 'editor.action.organizeImport')
" Add (Neo)Vim's native statusline support. " Add (Neo)Vim's native statusline support.
" NOTE: Please see `:h coc-status` for integrations with external plugins that " NOTE: Please see `:h coc-status` for integrations with external plugins that
-2
View File
@@ -1,5 +1,3 @@
" set german as default
setlocal spelllang=de
" folding " folding
setlocal foldmethod=expr setlocal foldmethod=expr
setlocal foldexpr=vimtex#fold#level(v:lnum) setlocal foldexpr=vimtex#fold#level(v:lnum)
+16 -1
View File
@@ -54,6 +54,7 @@ let mapleader=" " " set mapleader to space
let maplocalleader=" " " set localleader to space let maplocalleader=" " " set localleader to space
set timeoutlen=1000 " set timeout length set timeoutlen=1000 " set timeout length
set spell " activate spell-checking set spell " activate spell-checking
setlocal spelllang=de,en_us " enable German and English spell checking
set nocompatible " disable compatibility to old-time vi set nocompatible " disable compatibility to old-time vi
let g:indentLine_setConceal = 0 " disable the conceal 'feature' of indentLine plugin let g:indentLine_setConceal = 0 " disable the conceal 'feature' of indentLine plugin
set showmatch " show matching brackets. set showmatch " show matching brackets.
@@ -193,7 +194,21 @@ highlight CursorLineNr ctermfg=7
lua <<EOF lua <<EOF
require'nvim-treesitter.configs'.setup { require'nvim-treesitter.configs'.setup {
-- One of "all", "maintained" (parsers with maintainers), or a list of languages -- One of "all", "maintained" (parsers with maintainers), or a list of languages
ensure_installed = "maintained", ensure_installed = {
"bash", "bibtex",
"c", "cmake", "comment", "cpp", "css",
"diff", "dockerfile", "dot",
"gitattributes", "gitignore",
"html", "http",
"javascript", "json", "json5",
"latex", "lua",
"make", "markdown", "markdown_inline",
"python",
"regex",
"sql",
"toml", "typescript",
"vim",
"yaml"},
-- Install languages synchronously (only applied to `ensure_installed`) -- Install languages synchronously (only applied to `ensure_installed`)
sync_install = false, sync_install = false,
+12 -1
View File
@@ -12,7 +12,7 @@ group_names = [("","Home", 'h',{'layout': 'monadtall'}),
("","Documents", 'l',{'layout': 'monadtall'}), ("","Documents", 'l',{'layout': 'monadtall'}),
("","Music", 'u',{'layout': 'monadtall', 'matches' : [Match(wm_class="spotify")]}), ("","Music", 'u',{'layout': 'monadtall', 'matches' : [Match(wm_class="spotify")]}),
("","Video", 'v',{'layout': 'monadtall', 'matches' : [Match(wm_class="vlc")]}), ("","Video", 'v',{'layout': 'monadtall', 'matches' : [Match(wm_class="vlc")]}),
("","Discord", 'd',{'layout': 'monadtall', 'matches':[Match(wm_class="discord")]}), ("","VideoChat", 'z',{'layout': 'monadtall', 'matches':[Match(wm_class="discord")]}),
("","ClickUp", 'k',{'layout': 'monadtall', 'matches' : [Match(wm_class="clickup")]}), ("","ClickUp", 'k',{'layout': 'monadtall', 'matches' : [Match(wm_class="clickup")]}),
("","etc1", '1', {'layout': 'monadtall'}), ("","etc1", '1', {'layout': 'monadtall'}),
("","etc2", '2', {'layout': 'monadtall'}), ("","etc2", '2', {'layout': 'monadtall'}),
@@ -93,6 +93,15 @@ groups.append(
on_focus_lost_hide=False, on_focus_lost_hide=False,
opacity=1 opacity=1
), ),
DropDown(
'Deepl',
'surf deepl.com',
height = 0.5,
width = 0.8,
x = 0.1,
on_focus_lost_hide=False,
opacity=1
),
DropDown( DropDown(
'Telegram', 'Telegram',
'telegram-desktop', 'telegram-desktop',
@@ -138,4 +147,6 @@ keys.extend([
desc="open the dropdown for Telegram"), desc="open the dropdown for Telegram"),
Key(['mod1','control'],'q',lazy.group['scratchpad'].dropdown_toggle('Qalculate!'), Key(['mod1','control'],'q',lazy.group['scratchpad'].dropdown_toggle('Qalculate!'),
desc="open the dropdown for Qalculate!"), desc="open the dropdown for Qalculate!"),
Key(['mod1','control'],'d',lazy.group['scratchpad'].dropdown_toggle('Deepl'),
desc="open the dropdown for Deepl")
]) ])
+1 -1
View File
@@ -19,7 +19,7 @@ cmd = ['xrandr']
p = subprocess.Popen(cmd, stdout=subprocess.PIPE) p = subprocess.Popen(cmd, stdout=subprocess.PIPE)
resolution_string, junk = p.communicate() resolution_string, junk = p.communicate()
p.stdout.close() p.stdout.close()
screen_resolutions = [np.array(screen_res.split('x')).astype(np.int) for screen_res in re.findall('[0-9]+x[0-9]+(?=[^\\\\n]*\*)',str(resolution_string))] screen_resolutions = [np.array(screen_res.split('x')).astype(int) for screen_res in re.findall('[0-9]+x[0-9]+(?=[^\\\\n]*\*)',str(resolution_string))]
number_of_screens = len(screen_resolutions) number_of_screens = len(screen_resolutions)
max_width = max(screen_resolutions, key=lambda res: res[0])[0] max_width = max(screen_resolutions, key=lambda res: res[0])[0]
defined_main_window = False defined_main_window = False
-1
View File
@@ -41,7 +41,6 @@ def Left_widgets(size,fontsize,prompt=False):
text='', text='',
foreground=light_foreground_color, foreground=light_foreground_color,
fontsize=fontsize, fontsize=fontsize,
# margin=5,
background=blue_color background=blue_color
), ),
*powerline_arrow('r',blue_color,base_color,size), *powerline_arrow('r',blue_color,base_color,size),
+2 -1
View File
@@ -16,4 +16,5 @@ nm-applet &
blueman-applet & blueman-applet &
thunderbird & thunderbird &
clickup & clickup &
fcitx -d& fcitx5 -d&
emacs --daemon &