diff --git a/.config/git/config b/.config/git/config index 7faf909..ce7c45a 100644 --- a/.config/git/config +++ b/.config/git/config @@ -1,8 +1,5 @@ -[filter "lfs"] - clean = git-lfs clean -- %f - smudge = git-lfs smudge -- %f - process = git-lfs filter-process - required = true +[init] + defaultBranch = main [user] name = Jan Andrle email = andrle.jan@centrum.cz @@ -38,6 +35,11 @@ editor = vim pager = delta whitespace = -trailing-space,-space-before-tab +[filter "lfs"] + clean = git-lfs clean -- %f + smudge = git-lfs smudge -- %f + process = git-lfs filter-process + required = true [status] submoduleSummary = true [diff] @@ -61,8 +63,6 @@ reflogExpireUnreachable = 90 [push] autoSetupRemote = true -[init] - defaultBranch = main [commit] gpgsign = true [rerere] diff --git a/.config/github-releases/config.json b/.config/github-releases/config.json index d15c32a..10b71d3 100644 --- a/.config/github-releases/config.json +++ b/.config/github-releases/config.json @@ -13,6 +13,18 @@ "version": "release-3.4.2-linux1", "glare": ".*x86_64.*.AppImage" }, + { + "repository": "pinokiocomputer/pinokio", + "name": "Pinokio", + "group": "ai", + "file_name": "pinokio", + "exec": "yes", + "description": "AI Browser", + "glare": "AppImage", + "last_update": "2024-07-17T20:36:36Z", + "version": "2.0.4", + "downloads": "/home/jaandrle/bin/pinokio" + }, { "repository": "jaandrle/jaaCSS-cli", "name": "jaaCSS", @@ -32,9 +44,9 @@ "group": "nondev", "file_name": "youtube-music", "exec": "yes", - "last_update": "2024-06-08T11:04:49Z", + "last_update": "2024-07-14T15:26:52Z", "downloads": "/home/jaandrle/bin/youtube-music", - "version": "v3.3.12", + "version": "v3.4.1", "glare": "AppImage" }, { @@ -164,9 +176,9 @@ "group": "nondev", "file_name": "fedistar", "exec": "yes", - "last_update": "2024-06-20T14:45:03Z", + "last_update": "2024-07-21T09:19:41Z", "downloads": "/home/jaandrle/bin/fedistar", - "version": "v1.9.7", + "version": "v1.9.9", "glare": ".*amd64.*.AppImage" }, { @@ -176,9 +188,9 @@ "group": "ai", "file_name": "ollama", "exec": "yes", - "last_update": "2024-07-02T19:25:35Z", + "last_update": "2024-07-21T18:21:56Z", "downloads": "/home/jaandrle/bin/ollama", - "version": "v0.1.49-rc3", + "version": "v0.2.8-rc1", "glare": "linux-amd64" }, { @@ -200,9 +212,9 @@ "group": "dev", "file_name": "escrcpy", "exec": "yes", - "last_update": "2024-07-02T01:38:32Z", + "last_update": "2024-07-14T08:47:24Z", "downloads": "/home/jaandrle/bin/escrcpy", - "version": "v1.19.4", + "version": "v1.21.4", "glare": ".*x86_64.*.AppImage" }, { @@ -224,9 +236,9 @@ "group": "ai", "file_name": "jan", "exec": "yes", - "last_update": "2024-06-21T09:44:25Z", + "last_update": "2024-07-15T08:37:42Z", "downloads": "/home/jaandrle/bin/jan", - "version": "v0.5.1", + "version": "v0.5.2", "glare": ".*x86_64.*.AppImage" }, { diff --git a/.config/nodejsscript/nodejsscriptrc.mjs b/.config/nodejsscript/nodejsscriptrc.mjs index 4034566..081bfee 100644 --- a/.config/nodejsscript/nodejsscriptrc.mjs +++ b/.config/nodejsscript/nodejsscriptrc.mjs @@ -9,7 +9,11 @@ globalThis.cyclicLoop= function*(items){ } Reflect.defineProperty($, "clipboard", { - get(){ return s.$().run`xclip -o -selection clipboard`; } + get(){ + if($.env.XDG_SESSION_TYPE === "x11") + return s.$().run`xclip -o -selection clipboard`; + return s.$().run`wl-paste`; + } }) // /** Custom uncaughtException function */ diff --git a/.config/tridactyl/tridactylrc b/.config/tridactyl/tridactylrc index f9e17c7..4147ba3 100644 --- a/.config/tridactyl/tridactylrc +++ b/.config/tridactyl/tridactylrc @@ -44,7 +44,9 @@ unbindurl ^https://www.youtube.com/* << bindurl ^https://www.youtube.com/* ss fillcmdline open B: YT bindurl ^https://www.o2tv.cz/* ss fillcmdline open B: O2 bindurl ^https://chatgpt.com/* ss fillcmdline open B: OPENAI - +bindurl ^https://chat.mistral.ai/chat* ss fillcmdline open B: OPENAI +bindurl ^https://rss.jaandrle.cz/* ss nmode ignore 1 mode normal +bindurl ^https://rss.jaandrle.cz/* sn hint -c div command pauseVideos js Array.from(document.querySelectorAll("video")).forEach(el=> ( location.hostname!=="www.o2tv.cz" ? el.pause() : [ "Pauza" ].map(l=> document.querySelector(`[aria-label=${l}]`)).find(Boolean)?.dispatchEvent(new Event("click")) )) tri.controller.acceptExCmd(`tabopen -c pracovní https://gist.github.com/jaandrle/ff1de72c500557f401e190b4ec05aa62#${document.title.replace(/["':|\.,\?\!_]/g, '').replace(/ /g, '-').toLowerCase()}`) @@ -64,6 +66,7 @@ bind dd tabclose unbind --mode=normal s bind st fillcmdline_notrail tab +bind \t fillcmdline_notrail tab " h keyboardlayoutoverrides … https://gistpreview.github.io/?324119c773fac31651f6422087b36804 " set keyboardlayoutoverrides "Digit2: ;, Backquote: :" @@ -83,7 +86,7 @@ bind --mode=normal n fillcmdline tabopen bind --mode=normal N current_url tabopen bind -c fillcmdline recontain -bind sc fillcmdline_notrail container +bind \c fillcmdline_notrail container bind --mode=visual \t composite js "https://libretranslate.com/?source=auto&target=cs&q="+encodeURI(document.getSelection().toString()) | tabopen bind --mode=visual \T composite js "https://translate.google.com/?sl=auto&tl=cs&op=translate&text="+encodeURI(document.getSelection().toString()) | tabopen @@ -96,12 +99,6 @@ bind gnC tabopen -c osobní https://calendar.google.com bind goC open -c osobní https://calendar.google.com bind gwC winopen -c osobní https://calendar.google.com -" Sites (mails) notes using Github Gists -bind sn js tri.controller.acceptExCmd(`tabopen -c pracovní https://gist.github.com/jaandrle/ff1de72c500557f401e190b4ec05aa62#${document.title.replace(/["':|\.,\?\!_]/g, '').replace(/ /g, '-').toLowerCase()}`) -bind sN composite clipboard yankmd ; tabopen -c pracovní https://gist.github.com/jaandrle/ff1de72c500557f401e190b4ec05aa62/edit -bindurl ^https://mail.centrum.cz/* sn js tri.controller.acceptExCmd(`tabopen -c pracovní https://gist.github.com/jaandrle/ff1de72c500557f401e190b4ec05aa62#${(new URLSearchParams(window.location.search)).get("msg")}`) -bindurl ^https://mail.centrum.cz/* sN composite js tri.controller.acceptExCmd(`clipboard yank [${(new URLSearchParams(window.location.search)).get("msg")}](https://mail.centrum.cz/?msg=${(new URLSearchParams(window.location.search)).get("msg")})`) ; tabopen -c pracovní https://gist.github.com/jaandrle/ff1de72c500557f401e190b4ec05aa62/edit - alias hint_focus hint -; quickmark c moz-extension://616498c0-3916-4f0b-b0a9-ce01ecf2298d/popup.html diff --git a/.profile b/.profile index 026226c..200ee16 100644 --- a/.profile +++ b/.profile @@ -35,3 +35,8 @@ export JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64/" PATH=/home/jaandrle/.local/share/umake/bin:$PATH [ -f /home/jaandrle/.bash/.profile_androidsdk ] && . /home/jaandrle/.bash/.profile_androidsdk + + +# Added by Toolbox App +export PATH="$PATH:/home/jaandrle/.local/share/JetBrains/Toolbox/scripts" + diff --git a/.vim/after/ftplugin/markdown/mdexpr.vim b/.vim/after/ftplugin/markdown/mdexpr.vim index ec81c29..615a43e 100644 --- a/.vim/after/ftplugin/markdown/mdexpr.vim +++ b/.vim/after/ftplugin/markdown/mdexpr.vim @@ -1,3 +1,3 @@ execute "source ".system("mdexpr-agenda vim 2> /dev/null") command MDEXPRclose lclose | lexpr [] -call scommands#map('m', 'MDEXPR', "n") +cabbrev žm feedkeys("MDEXPR") diff --git a/.vim/user_tips.vim b/.vim/user_tips.vim index c553d8b..1886d61 100644 --- a/.vim/user_tips.vim +++ b/.vim/user_tips.vim @@ -9,10 +9,13 @@ let g:user_tips_list= [ \ ':set foldopen-=search', \ 'Buffer info → g … :map ', \ 'Rename file → :saveas * | :silent !rm # | :bw #', - \ 'packadd cfilter', + \ 'packadd cfilter justify', \ 'Next word location → ]I [I ] []I [I', \ ':w !sudo tee > /dev/null %', \ 'v`]o`[ visual last change — https://www.reddit.com/r/vim/comments/ypt6uf/comment/ivl68xu/?utm_source=share&utm_medium=web2x&context=3', + \ ':exec ''argdo bw'' | %argdelete', + \ 'changes g, g; || jumps ^i ^o || marks g`…', + \ 'set foldmethod=marker/indent foldlevel=i foldnestmax=j', \ '`0·`"·`.·`` … last exit·edit·change·pre-jump … also g''*', \ 'q: q? q/ … @: ? / :& , ;', \ ' … :h ins-completion', diff --git a/.vimrc b/.vimrc index ef66c9c..154565f 100644 --- a/.vimrc +++ b/.vimrc @@ -1,10 +1,10 @@ -""" VIM config file | Jan Andrle | 2024-02-07 (VIM >=8.1) +""" VIM config file | Jan Andrle | 2024-07-10 (VIM >=8.1) "" #region B – Base scriptencoding utf-8 | set encoding=utf-8 let $BASH_ENV = "~/.bashrc" set runtimepath^=~/.vim/bundle/* packadd! matchit - set hidden + " set hidden set title colorscheme codedark @@ -13,6 +13,7 @@ set belloff=esc set confirm set guioptions-=T + set shortmess-=i cabbrev %PWD% execute('pwd') cabbrev %CD% fnameescape(expand('%:p:h')) @@ -48,25 +49,15 @@ let g:vifm_replace_netrw= 1 | let g:loaded_netrw= 1 | let g:loaded_netrwPlugin= 1 " this line needs to be commented to let vim dowmload spelllangs!!! … see http://jdem.cz/fgyw25 """ #endregion BB "" #endregion B -"" #region H – Helpers + remap 'sS' (primary ss, see `vim-scommands`) - nmap sh :execute 'ALTredir :map s \ map '.mapleader.' \ map § \ map ů \ map ; \ map U \ map ž':g/^$/d:g/^v s/m$úgg - call scommands#map('s', 'CL', "n,v") +"" #region H – Helpers command! -nargs=? CLscratch 10split | enew | setlocal buftype=nofile bufhidden=wipe noswapfile nobuflisted | if !='' | execute 'normal "'..'p' | endif | nnoremap ;q :q - call scommands#map('S', 'SET', "n,v") - call scommands#map('a', 'ALT', "n,V") cabbrev ALTR ALTredrawSyntax set grepprg=LC_ALL=C\ grep\ -nrsH command! -nargs=0 \ ALTredrawSyntax edit | exec 'normal `"' | exec 'set ft='.&ft command! -complete=command -bar -range -nargs=+ \ ALTredir call jaandrle_utils#redir(0, , , , ) - command! -nargs=+ -complete=file_in_path -bar - \ ALTgrep cgetexpr jaandrle_utils#grep() | call setqflist([], 'a', {'title': ':' . g:jaandrle_utils#last_command}) - command! -nargs=+ -complete=file_in_path -bar - \ ALTlgrep lgetexpr jaandrle_utils#grep() | call setloclist(0, [], 'a', {'title': ':' . g:jaandrle_utils#last_command}) - command! -nargs=0 - \ ALTargsBWQA execute 'argdo bw' | %argdelete let g:quickfix_len= 0 function! QuickFixStatus() abort @@ -99,7 +90,7 @@ "" #endregion H "" #region SLH – Status Line + Command Line + History (general) + Sessions + File Update, … set showcmd cmdheight=2 showmode - set wildmenu wildoptions=pum + set wildmenu wildoptions=pum,fuzzy "" wildmode=list:longest,list:full " Tab autocomplete in command mode cabbrev wbw wbw @@ -144,13 +135,12 @@ set pastetoggle= | nnoremap :set invpaste paste? nnoremap " :call jaandrle_utils#copyRegister() - nmap š buffer_number("#")==-1 ? "sš" : "\" - nmap s3 :buffers:b - nmap sš :CtrlPBuffer - nmap č sš + nmap š buffer_number("#")==-1 ? "\š" : "\" + nmap 3 :buffers:b + nmap š :CtrlPBuffer + nmap č š let g:ctrlp_map = 'ě' command! -nargs=? SETctrlp execute 'nnoremap '.g:ctrlp_map.' :CtrlP ' - call scommands#map(g:ctrlp_map, 'CtrlP', "n") let g:ctrlp_clear_cache_on_exit = 0 let g:ctrlp_prompt_mappings= { \ 'ToggleType(1)': [''], @@ -173,7 +163,6 @@ set wildignore+=*.pdf,*.psd nmap e :Vifm - call scommands#map('e', 'Vifm', "n") nnoremap gx :silent exec "!xdg-open '".shellescape(substitute(expand(''), '?', '\\?', ''), 1)."'" \| redraw! vnoremap gx :silent exec "!xdg-open '".shellescape(substitute(mini_enhancement#selectedText(), '?', '\\?', ''), 1)."'" \| redraw! "" #endregion FOS @@ -181,13 +170,9 @@ set hlsearch incsearch " highlight search, start when typing if maparg('', 'n') ==# '' nnoremap :nohlsearch=has('diff')?'diffupdate':'' | endif - - call scommands#map('n', 'NAV', "n") - command! NAVjumps call jaandrle_utils#gotoJumpChange('jump') - command! NAVchanges call jaandrle_utils#gotoJumpChange('change') - command! NAVmarks call jaandrle_utils#gotoMarks() let g:markbar_persist_mark_names = v:false + let g:markbar_cache_with_hidden_buffers = v:false " last buffers are reopened as hidden https://github.com/Yilin-Yang/vim-markbar/blob/9f5a948d44652074bf2b90d3da6a400d8a369ba5/doc/vim-markbar.txt#L136 nmap m ToggleMarkbar "" #endregion EN "" #region EA – Editing adjustment + Syntax + White chars + Folds @@ -200,7 +185,7 @@ let g:markdown_fenced_languages= [ 'javascript', 'js=javascript', 'json', 'html', 'php', 'bash', 'vim', 'vimscript=javascript', 'sass' ] augroup conceal autocmd! - au FileType markdown + au FileType markdown \ syn region markdownLink matchgroup=markdownLinkDelimiter start="(" end=")" contains=markdownUrl keepend contained conceal \| syn region markdownLinkText matchgroup=markdownLinkTextDelimiter start="!\=\[\%(\%(\_[^][]\|\[\_[^][]*\]\)*]\%( \=[[(]\)\)\@=" end="\]\%( \=[[(]\)\@=" nextgroup=markdownLink,markdownId skipwhite contains=@markdownInline,markdownLineStart concealends au FileType markdown,json @@ -250,10 +235,10 @@ nnoremap a for l in [ 'y', 'p', 'P', 'd' ] | for m in [ 'n', 'v' ] execute m.'noremap '.l.' "+'.l | endfor | endfor - " FOLDS - command! -nargs=0 SETFOLDregions set foldmethod=marker - command! -nargs=1 SETFOLDindent set foldmethod=indent | let &foldlevel= | let &foldnestmax=+1 - command! -nargs=* SETFOLDindents set foldmethod=indent | let &foldlevel=split(, ' ')[0] | let &foldnestmax=split(, ' ')[1] + " TODO DEL: FOLDS + " TODO DEL: command! -nargs=0 SETFOLDregions set foldmethod=marker + " TODO DEL: command! -nargs=1 SETFOLDindent set foldmethod=indent | let &foldlevel= | let &foldnestmax=+1 + " TODO DEL: command! -nargs=* SETFOLDindents set foldmethod=indent | let &foldlevel=split(, ' ')[0] | let &foldnestmax=split(, ' ')[1] set foldmarker=#region,#endregion " SAVE VIEW set viewoptions=cursor,folds @@ -264,7 +249,6 @@ augroup END "" #endregion EA "" #region GIT - call scommands#map('g', 'GIT', "n,V") function s:gitCompletion(_, CmdLine, __) let l:cmd= a:CmdLine->split() let l:cmd_start= l:cmd[0] @@ -339,7 +323,7 @@ endif endfunction - set completeopt=menuone,preview,noinsert,noselect + set completeopt=menuone,longest,preview "longest vs ,noinsert,noselect inoremap coc#pum#visible() ? coc#pum#confirm() : coc#refresh() set wildcharm= inoremap coc#pum#visible() ? coc#pum#next(1) : check_back_space() ? "\" : coc#refresh() @@ -352,11 +336,13 @@ nmap gd (coc-definition) nmap / :CocSearch nmap ? / - command! -bang NAVdiagnostic call CocActionAsync('diagnostic'.( "" == '!' ? 'Previous' : 'Next' )) - command! NAVdefinition call CocActionAsync('jumpDefinition') - command! NAVtype call CocActionAsync('jumpTypeDefinition') - command! NAVimplementation call CocActionAsync('jumpImplementation') - command! NAVreferences call CocActionAsync('jumpReferences') + command! -nargs=* -complete=customlist,SCommandCocActionComplete CocAction call CocActionAsync() + function s:SCommandCocActionComplete(argLead, cmdLine, cursorPos) + return readfile(expand('~/.vim/pack/coc/start/coc.nvim/doc/tags'), 'r') + \->filter('v:val =~ ''^CocAction''') + \->map({ k, v -> strpart(v, 11, stridx(v, ')')-12) }) + \->filter({ k, v -> v =~ a:argLead && !v->empty() }) + endfunction " navigate diagnostics, use `:CocDiagnostics` to get all diagnostics of current buffer in location list. nnoremap gh :call show_documentation(expand("")) vnoremap gh :call show_documentation(mini_enhancement#selectedText()) @@ -372,11 +358,13 @@ vnoremap coc#float#has_scroll() ? coc#float#scroll(0) : "\" endif """ #endregion COCP - command! -nargs=? SETFOLDcoc :call CocAction('fold', ) + " TODO DEL: command! -nargs=? SETFOLDcoc :call CocAction('fold', ) - call scommands#map('C', 'Coc', "n,v") - nmap sc :CocList lists - nmap Sc :CocListResume + command! -nargs=? CLhelpMy if !='' | exec 'map '. | else | call popup_notification([ + \ 'Custom mappings starting: '.mapleader.',§, ů, ;, U, ž', + \ 'Custom commands starting: CL, SET, ALT, CtrlP, Vifm, GIT, Coc', + \ 'Helpful commands: CocAction, CocCommand, CocList', + \], #{ line: &lines-3, pos: 'botleft', moved: 'any', close: 'button', time: 6000 }) | endif nnoremap :CLwhereami command! CLwhereami :call popup_notification([ \expand('%:t').( coc#status() != "" ? '/'.CocAction("getCurrentFunctionSymbol")."\t…\t".coc#status() : '' ), @@ -384,18 +372,13 @@ \"Line:\t".line('.').' / '.line('$'), \"Column:\t".col('.').' / '.col('$'), \"Path:\t".expand('%:p:h') - \], #{ line: &lines-3, pos: 'botleft', moved: 'any', close: 'button', time: 3000 }) + \], #{ line: &lines-3, pos: 'botleft', moved: 'any', close: 'button', time: 6000 }) command! CLhelpCocPlug call feedkeys(':help (coc ', 'tn') command! CLhelpCocAction call feedkeys(':help CocAction('' ', 'tn') - command! CLrename call CocActionAsync('rename') - command! CLrenameFile exec 'CocCommand workspace.renameCurrentFile' command! -nargs=? -bang \ CLreplace call feedkeys(':'.(==''?'.':).'s/'.(""=='!'?mini_enhancement#selectedText():expand('')).'//cgODODOD', 'tn') command! CLrepeatLastChange call feedkeys('/\V"cgn', 'tn') - command! CLjsdoc exec 'CocCommand docthis.documentThis' command! CLjshintGlobal normal yiwmm?\/\* globalf*hi, p`m - command! CLcodeactionCursor call CocActionAsync('codeAction', 'cursor') - command! CLfixCodeQuick call CocActionAsync('doQuickfix') function! AIcodeFn(range, ...) range abort let l:instruction = 'Hi, can you help me with ' . &filetype . 'code? Thanks in advance. I would like to: ' diff --git a/bin/github-releases.mjs b/bin/github-releases.mjs index 87ce6ec..3bdb774 100755 --- a/bin/github-releases.mjs +++ b/bin/github-releases.mjs @@ -37,7 +37,7 @@ const path_config= $.xdg.config`github-releases`; const path_config_json= join(path_config, "config.json"); const path_config_lock= join(path_config, "lock"); const path_temp= $.xdg.temp`github-releases.json`; -const url_api= "https://api.github.com/repos/"; +const url_api= "https://api.github.com/repos/"; // "https://ungh.cc/repos/"; const url_download= "https://glare.now.sh/"; // https://github.com/Contextualist/glare const css= echo.css` .pkg { color: lightcyan; } @@ -215,11 +215,19 @@ async function fetchRelease({ repository, tag_name_regex }, cache){ const releases= await fetch(url, { headers }).then(res=> res.json()); if(releases.message) return $.error(url+": "+releases.message); - return releases.find(function ({ draft, published_at, tag_name }){ - if(draft||!published_at) return false; + if(url.includes("github.com")) + return releases.find(function ({ draft, published_at, tag_name }){ + if(draft||!published_at) return false; + if(!tag_name_regex) return true; + return (new RegExp(tag_name_regex, 'g')).test(tag_name); + }); + + const { draft, publishedAt, tag }= releases.releases.find(function ({ draft, publishedAt, tag }){ + if(draft||!publishedAt) return false; if(!tag_name_regex) return true; - return (new RegExp(tag_name_regex, 'g')).test(tag_name); + return (new RegExp(tag_name_regex, 'g')).test(tag); }); + return { draft, published_at: publishedAt, tag_name: tag }; } function readConfig(){