updated

This commit is contained in:
Jan Andrle 2024-11-29 16:09:45 +01:00
parent f3bf9e0612
commit 5e7e5b6f33
Signed by: jaandrle
GPG Key ID: B3A25AED155AFFAB
16 changed files with 102 additions and 66 deletions

View File

@ -122,10 +122,12 @@ alias npx-hint='npx -y hint'
alias npx-markdown='nohup npx markserv' alias npx-markdown='nohup npx markserv'
alias fzf=fzf-carroarmato0.fzf alias fzf=fzf-carroarmato0.fzf
alias smerge='/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=sublime_merge --file-forwarding com.sublimemerge.App @@u %u @@'
kommit(){ command kommit $* > /dev/null 2>&1 & disown; }
§url-curl(){ curl --silent -I "$1" | grep -i location; } §url-curl(){ curl --silent -I "$1" | grep -i location; }
alias bathelp='bat --plain --language=help' alias bathelp='batcat --plain --language=help'
rpg(){ rpg(){
rpg-cli "$@" rpg-cli "$@"

View File

@ -1,5 +1,6 @@
# IMPORT IN `$HOME/.profile` # IMPORT IN `$HOME/.profile`
export ANDROID_HOME_BAK="$HOME/.local/share/JetBrains/Toolbox/apps/android-studio/" export ANDROID_HOME_BAK2="$HOME/.local/share/JetBrains/Toolbox/apps/android-studio/"
export ANDROID_HOME_BAK="$HOME/Android/Sdk"
export ANDROID_SDK_ROOT="$HOME/Android/Sdk" export ANDROID_SDK_ROOT="$HOME/Android/Sdk"
export PATH=$PATH:$ANDROID_SDK_ROOT/platform-tools/ export PATH=$PATH:$ANDROID_SDK_ROOT/platform-tools/
export PATH=$PATH:$ANDROID_SDK_ROOT/emulator/ export PATH=$PATH:$ANDROID_SDK_ROOT/emulator/

View File

@ -12,7 +12,7 @@ shopt -s expand_aliases
[ -f $BASH_DOTFILES/.bash_sdkman ] && . $BASH_DOTFILES/.bash_sdkman [ -f $BASH_DOTFILES/.bash_sdkman ] && . $BASH_DOTFILES/.bash_sdkman
[ -f $BASH_DOTFILES/.bash_nvm ] && . $BASH_DOTFILES/.bash_nvm [ -f $BASH_DOTFILES/.bash_nvm ] && . $BASH_DOTFILES/.bash_nvm
export NODE_COMPILE_CACHE=~/.cache/nodejs-compile-cache # https://nolanlawson.com/2024/10/20/why-im-skeptical-of-rewriting-javascript-tools-in-faster-languages/ export NODE_COMPILE_CACHE=~/.cache/nodejs-compile-cache # https://nolanlawson.com/2024/10/20/why-im-skeptical-of-rewriting-javascript-tools-in-faster-languages/
export PATH="$HOME/.local/bin:$PATH" export PATH="$HOME/.local/bin:$PATH:/home/linuxbrew/.linuxbrew/bin"
[ -f $BASH_DOTFILES/.bash_completions ] && . $BASH_DOTFILES/.bash_completions # for Vim [ -f $BASH_DOTFILES/.bash_completions ] && . $BASH_DOTFILES/.bash_completions # for Vim
[[ $- != *i* ]] && return # If not running interactively, don't do anything [[ $- != *i* ]] && return # If not running interactively, don't do anything
@ -21,7 +21,7 @@ export PATH="$HOME/.local/bin:$PATH"
set -o vi # VIM mode for bash set -o vi # VIM mode for bash
bind -m vi-command 'Control-l: clear-screen' bind -m vi-command 'Control-l: clear-screen'
bind -m vi-insert 'Control-l: clear-screen' bind -m vi-insert 'Control-l: clear-screen'
export MANPAGER="/bin/sh -c \"col -b | vim --appimage-extract-and-run --not-a-term -c 'set ft=man ts=8 nomod nolist noma' -\"" export MANPAGER="/bin/sh -c \"sed -e 's/\x1B\[[[:digit:]]\+m//g' | col -b | vim --appimage-extract-and-run --not-a-term -c 'set ft=man ts=8 nomod nolist noma' -\""
shopt -s checkwinsize # dynamic columns update after every cmd shopt -s checkwinsize # dynamic columns update after every cmd
## History ## History
@ -61,4 +61,5 @@ export GPG_TTY=$(tty)
# HSTR configuration - add this to ~/.bashrc # HSTR configuration - add this to ~/.bashrc
# if this is interactive shell, then bind hstr to Ctrl-space # if this is interactive shell, then bind hstr to Ctrl-space
if [[ $- =~ .*i.* ]]; then bind '"\C-@": "\e^ihstr -- \C-j"'; fi # if [[ $- =~ .*i.* ]]; then bind '"\C-@": "\e^ihstr -- \C-j"'; fi
if [[ $- =~ .*i.* ]]; then bind '"\C-@": "\e^I history | grep '\''\e\e^A'\''\e\ei"'; fi

View File

@ -10,7 +10,7 @@ beep_on_errors=true
auto_focus=false auto_focus=false
sidebar_symbol_visible=true sidebar_symbol_visible=true
sidebar_openfiles_visible=true sidebar_openfiles_visible=true
editor_font=Ubuntu Mono Bold 9 editor_font=Ubuntu Sans Mono Medium 8
tagbar_font=Ubuntu Mono 8 tagbar_font=Ubuntu Mono 8
msgwin_font=Ubuntu Mono Bold 8 msgwin_font=Ubuntu Mono Bold 8
show_notebook_tabs=false show_notebook_tabs=false
@ -228,7 +228,6 @@ session_file=
project_file_path=/home/jaandrle/Dokumenty/Projekty/geany project_file_path=/home/jaandrle/Dokumenty/Projekty/geany
[files] [files]
recent_files=/home/jaandrle/Vzdálené/GitHub/dcp-fe-container-certifedpassport/src/app/stamps/index.tsx;/home/jaandrle/Vzdálené/GitHub/bs-repo/src/completion.js;/home/jaandrle/.local/share/JetBrains/Toolbox/apps/android-studio/Install-Linux-tar.txt;/media/jaandrle/neon/home/jaandrle/.local/share/umake/android/android-studio/product-info.json;/home/jaandrle/.profile;/home/jaandrle/bin/README.md;/home/jaandrle/Vzdálené/GitHub/deka-dom-el/package.json;/media/jaandrle/neon/home/jaandrle/Vzdálené/ftp/dhlcnetworkcom.ftp;/home/jaandrle/README.md;/home/jaandrle/.config/Seafile/Seafile Client.conf; recent_files=/home/jaandrle/.local/share/krunner-sources/krunner-alias-main/install.sh;/home/jaandrle/.local/share/krunner-sources/kolors/install.sh;/tmp/evolution-jaandrle-RZCWV2/Re: Fwd: 🎃Výstava dýní po mexicku🎃;/home/jaandrle/.vim/bundle/vim-html-template-literals/autoload/htl_syntax.vim;/home/jaandrle/.vim/bundle/vim-html-template-literals/test/example-code-tests/example-code-tests.vader;/home/jaandrle/Stažené/placeholder-sticker.svg;/media/jaandrle/neon/home/jaandrle/Vzdálené/GitHub/dcp-be-proxy-functions(1)/__azurite_db_blob__.json;/home/jaandrle/Vzdálené/GitHub/facilitator-network-cell/src/types/vite-env.d.ts;/media/jaandrle/neon/home/jaandrle/Stažené/.test_snap/wse_yl/test_conf/test.key;/home/jaandrle/Android/Sdk/emulator/NOTICE.txt;
recent_projects=/home/jaandrle/Dokumenty/Projekty/geany/Facilitator-App-Native.geany;/home/jaandrle/Dokumenty/Projekty/geany/deka-dom-el.geany;/home/jaandrle/Dokumenty/Projekty/geany/Facilitator-App-Native;/home/jaandrle/Dokumenty/Projekty/geany/deka-dom-el;/home/jaandrle/Dokumenty/Projekty/geany/deka-dom-el/deka-dom-el;/home/jaandrle/Dokumenty/Projekty/geany/.babelrc; recent_projects=/home/jaandrle/Dokumenty/Projekty/geany/Facilitator-App-Native.geany;/home/jaandrle/Dokumenty/Projekty/geany/deka-dom-el.geany;/home/jaandrle/Dokumenty/Projekty/geany/Facilitator-App-Native;/home/jaandrle/Dokumenty/Projekty/geany/deka-dom-el;/home/jaandrle/Dokumenty/Projekty/geany/deka-dom-el/deka-dom-el;/home/jaandrle/Dokumenty/Projekty/geany/.babelrc;
current_page=0 current_page=-1
FILE_NAME_0=1793;TypeScript;0;EUTF-8;1;1;0;%2Fhome%2Fjaandrle%2FVzdálené%2FGitHub%2Fdcp-fe-container-certifedpassport%2Fsrc%2Fapp%2Fstamps%2Findex.tsx;0;4

View File

@ -225,3 +225,7 @@ convert_selection=
set_anchor= set_anchor=
select_to_anchor= select_to_anchor=
rect_select_to_anchor= rect_select_to_anchor=
[spellcheck]
spell_check=
spell_toggle_typing=

View File

@ -11,7 +11,6 @@
# * replaced by git-extras # * replaced by git-extras
aliases = !git config -l | grep ^alias | cut -c 7- | sort # List all aliases. Stolen from here: https://twitter.com/TrevorBramble/status/774292970681937920 aliases = !git config -l | grep ^alias | cut -c 7- | sort # List all aliases. Stolen from here: https://twitter.com/TrevorBramble/status/774292970681937920
checkout-default= !git checkout `git branch-default` checkout-default= !git checkout `git branch-default`
checkout-default--= !git checkout-default && git branch --delete @{-1} --verbose
branch-default = !git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@' branch-default = !git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@'
branches = for-each-ref --sort=-committerdate refs --format=\"%(authordate:iso8601)\t%(color:blue)%(refname:short)%(HEAD)\t%(if:notequals="")%(upstream:short)%(then)→ %(upstream:short)%(color:reset)%(else)%(color:yellow)%(objectname:short)%(color:reset)\t%(contents:subject)%(end)\" branches = for-each-ref --sort=-committerdate refs --format=\"%(authordate:iso8601)\t%(color:blue)%(refname:short)%(HEAD)\t%(if:notequals="")%(upstream:short)%(then)→ %(upstream:short)%(color:reset)%(else)%(color:yellow)%(objectname:short)%(color:reset)\t%(contents:subject)%(end)\"
tags = tag -l --sort=-creatordate --format='%(refname:short): [%(creatordate:short)] %(subject)' tags = tag -l --sort=-creatordate --format='%(refname:short): [%(creatordate:short)] %(subject)'
@ -19,17 +18,15 @@
log-list = log --color --graph --pretty=format:'%Cred%h%Creset %Cgreen[%ad] -%C(yellow)%d%Creset %s %C(bold blue)<%an>%Creset' log-list = log --color --graph --pretty=format:'%Cred%h%Creset %Cgreen[%ad] -%C(yellow)%d%Creset %s %C(bold blue)<%an>%Creset'
log-list-nocolors = log --graph --pretty=format:'%h [%ad] -%d %s <%an>' log-list-nocolors = log --graph --pretty=format:'%h [%ad] -%d %s <%an>'
status--= !git fetch && git status && echo && echo Commits unpushed: && git log @{push}..HEAD && echo status--= !git fetch && git status && echo && echo Commits unpushed: && git log @{push}..HEAD && echo
commit--= !clear && git status -sb | grep -v -e '^ M' & git commit --interactive -v commit--interactive-v= !clear && git status -sb | grep -v -e '^ M' & git commit --interactive -v
stashpush = !git stash && git pull && git push && git stash pop pu-shll-stash = !git stash && git pull && git push && git stash pop
unstage = reset HEAD -- unstage = reset HEAD --
undoall = reset --soft HEAD^ undoall = reset --soft HEAD^
diff-dirs = diff --dirstat --find-copies --find-renames --histogram --color diff-dirs = diff --dirstat --find-copies --find-renames --histogram --color
status-submodule = !git submodule --quiet foreach 'git fetch' && git submodule foreach 'git status && echo' submodule-foreach-status = !git submodule --quiet foreach 'git fetch' && git submodule foreach 'git status && echo'
# * delete-submodule: rm-submodule = !git submodule deinit -f $1 && rm -rf .git/modules/$1 && git rm -rf $1 # * delete-submodule: rm-submodule = !git submodule deinit -f $1 && rm -rf .git/modules/$1 && git rm -rf $1
update-submodule = submodule update --remote --merge submodule-update-merge = submodule update --remote --merge
pull-submodule = submodule foreach 'git pull' set-upstream-to-current = !git branch --set-upstream-to=origin/`git symbolic-ref --short HEAD`
diff-submodule = submodule foreach 'git diff'
set-upstream = !git branch --set-upstream-to=origin/`git symbolic-ref --short HEAD`
push-new=!git push -u origin `git rev-parse --abbrev-ref HEAD` push-new=!git push -u origin `git rev-parse --abbrev-ref HEAD`
[core] [core]
editor = vim editor = vim

View File

@ -124,9 +124,9 @@
"group": "dev", "group": "dev",
"file_name": "bs", "file_name": "bs",
"exec": "yes", "exec": "yes",
"last_update": "2024-03-28T13:16:41Z", "last_update": "2024-10-22T12:04:29Z",
"downloads": "/home/jaandrle/bin/bs", "downloads": "/home/jaandrle/bin/bs",
"version": "v0.7.4", "version": "v0.8.0",
"glare": "bs-linux" "glare": "bs-linux"
}, },
{ {
@ -136,9 +136,9 @@
"group": "nondev", "group": "nondev",
"file_name": "fedistar", "file_name": "fedistar",
"exec": "yes", "exec": "yes",
"last_update": "2024-09-17T12:12:24Z", "last_update": "2024-10-23T12:45:06Z",
"downloads": "/home/jaandrle/bin/fedistar", "downloads": "/home/jaandrle/bin/fedistar",
"version": "v1.9.11", "version": "v1.9.12",
"glare": ".*amd64.*.AppImage" "glare": ".*amd64.*.AppImage"
}, },
{ {
@ -148,9 +148,9 @@
"group": "ai", "group": "ai",
"file_name": "ollama", "file_name": "ollama",
"exec": "yes", "exec": "yes",
"last_update": "2024-10-21T05:10:12Z", "last_update": "2024-11-08T19:58:30Z",
"downloads": "/home/jaandrle/bin/ollama", "downloads": "/home/jaandrle/bin/ollama",
"version": "v0.4.0-rc3", "version": "v0.4.1",
"glare": "linux-amd64" "glare": "linux-amd64"
}, },
{ {
@ -173,8 +173,8 @@
"file_name": "vim", "file_name": "vim",
"exec": "yes", "exec": "yes",
"downloads": "/home/jaandrle/bin/vim", "downloads": "/home/jaandrle/bin/vim",
"version": "v9.1.0794", "version": "v9.1.0857",
"last_update": "2024-10-21T01:18:07Z", "last_update": "2024-11-12T01:13:27Z",
"glare": "GVim.*x86_64.*.AppImage" "glare": "GVim.*x86_64.*.AppImage"
}, },
{ {
@ -184,9 +184,9 @@
"group": "dev", "group": "dev",
"file_name": "escrcpy", "file_name": "escrcpy",
"exec": "yes", "exec": "yes",
"last_update": "2024-10-21T02:03:58Z", "last_update": "2024-11-08T07:30:51Z",
"downloads": "/home/jaandrle/bin/escrcpy", "downloads": "/home/jaandrle/bin/escrcpy",
"version": "v1.24.3", "version": "v1.26.3",
"glare": ".*x86_64.*.AppImage" "glare": ".*x86_64.*.AppImage"
}, },
{ {
@ -208,9 +208,9 @@
"group": "ai", "group": "ai",
"file_name": "jan", "file_name": "jan",
"exec": "yes", "exec": "yes",
"last_update": "2024-10-17T10:32:20Z", "last_update": "2024-10-24T08:03:18Z",
"downloads": "/home/jaandrle/bin/jan", "downloads": "/home/jaandrle/bin/jan",
"version": "v0.5.7-rc2-beta", "version": "v0.5.7",
"glare": ".*x86_64.*.AppImage" "glare": ".*x86_64.*.AppImage"
}, },
{ {
@ -220,9 +220,9 @@
"group": "ai", "group": "ai",
"file_name": "Chatbox", "file_name": "Chatbox",
"exec": "yes", "exec": "yes",
"last_update": "2024-10-19T04:09:10Z", "last_update": "2024-11-07T15:22:15Z",
"downloads": "/home/jaandrle/bin/Chatbox", "downloads": "/home/jaandrle/bin/Chatbox",
"version": "v0.10.1", "version": "v0.10.2",
"glare": ".*x86_64.*.AppImage" "glare": ".*x86_64.*.AppImage"
} }
] ]

View File

@ -1,13 +1,3 @@
/* deprecated/fallback */
globalThis.cyclicLoop= function*(items){
if(!items) items= 'win32'===process.platform ? '|/-\\' : "⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏";
const { length }= items;
for(let i=0; true; i++){
if(i===length) i= 0;
yield items[i];
}
}
Reflect.defineProperty($, "clipboard", { Reflect.defineProperty($, "clipboard", {
get(){ get(){
if($.env.XDG_SESSION_TYPE === "x11") if($.env.XDG_SESSION_TYPE === "x11")
@ -25,8 +15,4 @@ export function onrepl(){
Reflect.defineProperty(s, "jq", { get(){ return file=> s.cat(file).xargs(JSON.parse); } }); Reflect.defineProperty(s, "jq", { get(){ return file=> s.cat(file).xargs(JSON.parse); } });
} }
/** Place for custom code when eval starts (`--eval`/`--print`) */ /** Place for custom code when eval starts (`--eval`/`--print`) */
export function oneval(){ /* --print/--echo aliases */ // export function oneval(){}
Reflect.defineProperty($, "nosed", { get(){ return this.stdin.text(""); }, });
Reflect.defineProperty($, "nojq", { get(){ return this.stdin.json(null); }, });
Reflect.defineProperty($, "noawk", { get(){ return this.stdin.lines([]); }, });
}

View File

@ -59,7 +59,7 @@ bind ůůl fillcmdline_notrail js document.querySelector("video").currentTime+=
bind ůk js (v=> { if(!v) return; v.playbackRate+= 0.25 })(document.querySelector("video")) bind ůk js (v=> { if(!v) return; v.playbackRate+= 0.25 })(document.querySelector("video"))
bind ůj js (v=> { if(!v) return; v.playbackRate-= 0.25 })(document.querySelector("video")) bind ůj js (v=> { if(!v) return; v.playbackRate-= 0.25 })(document.querySelector("video"))
bind ů= js (v=> { if(!v) return; v.playbackRate= 1 })(document.querySelector("video")) bind ů= js (v=> { if(!v) return; v.playbackRate= 1 })(document.querySelector("video"))
bind ůG js (v=> { if(!v) return; v.play(); v.currentTime= v.duration-10; setTimeout(()=> tri.controller.acceptExCmd("pauseVideos"), 5000); })(document.querySelector("video")) bind ůG js (v=> { if(!v) return; v.play(); v.currentTime= ( location.hostname!=="www.disneyplus.com" ? v.duration : (document.querySelector(".time-remaining-label").textContent.split(":").reduce((acc, curr, i)=> (!i ? 60 : 1)*curr+acc, 0)+v.currentTime) )-10; setTimeout(()=> tri.controller.acceptExCmd("pauseVideos"), 5000); })(document.querySelector("video"))
unbind --mode=normal d unbind --mode=normal d
bind dd tabclose bind dd tabclose
@ -103,7 +103,7 @@ alias hint_focus hint -;
quickmark c moz-extension://616498c0-3916-4f0b-b0a9-ce01ecf2298d/popup.html quickmark c moz-extension://616498c0-3916-4f0b-b0a9-ce01ecf2298d/popup.html
command mastodonUncoverAll composite hint_focus .scrollable ; js (onclick=document.createEvent("Events"), onclick.initEvent("click", true, false), Array.from(document.activeElement.getElementsByClassName("status__content__spoiler-link")).forEach(el=> el.dispatchEvent(onclick))) command mastodonUncoverAll composite hint_focus .scrollable ; js (onclick=document.createEvent("Events"), onclick.initEvent("click", true, false), Array.from(document.activeElement.getElementsByClassName("status__content__spoiler-link")).forEach(el=> el.dispatchEvent(onclick)))
command mastodonRedirectHome js const parts = location.pathname.split('/'); if(parts.length===2) location.href= `https://fosstodon.org/${parts[1]}@${location.host}`; else location.href= `https://fosstodon.org/authorize_interaction?uri=${location.href}`; command mastodonRedirectHome js const canonicalHref = document.querySelector('link[rel=canonical]')?.href; const parts = (canonicalHref ? new URL(canonicalHref) : location).pathname.split('/'); if(parts.length===2) location.href= `https://fosstodon.org/${parts[1]}@${location.host}`; else location.href= `https://fosstodon.org/authorize_interaction?uri=${location.href}`;
bind sm fillcmdline_notrail mastodon bind sm fillcmdline_notrail mastodon
command data_delall composite hint_focus * ; js document.activeElement.querySelectorAll("input").forEach(el=> el.checked=false) command data_delall composite hint_focus * ; js document.activeElement.querySelectorAll("input").forEach(el=> el.checked=false)

View File

@ -280,7 +280,7 @@
else else
fileviewer fileviewer
\*.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm, \*.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm,
\ env -u COLORTERM viu-image-viewer.viu %"c -w %pw -t && \ env -u COLORTERM viu %"c -w %pw -t &&
\ echo $(file -b %f) \ echo $(file -b %f)
\ %pc \ %pc
fileviewer fileviewer

View File

@ -3,8 +3,8 @@ AntiAliasFonts=true
BoldIntense=true BoldIntense=true
ColorScheme=DarkPastels ColorScheme=DarkPastels
DimmValue=54 DimmValue=54
Font=Ubuntu Mono,9,-1,5,700,0,0,0,0,0,0,0,0,0,0,1,Bold Font=Ubuntu Mono,9,-1,5,500,0,0,0,0,0,0,0,0,0,0,1,Medium
UseFontLineChararacters=false UseFontLineChararacters=true
[General] [General]
DimWhenInactive=false DimWhenInactive=false

View File

@ -12,6 +12,9 @@ To navigate my secondary editor use [../vscode](../vscode).
See [./§vim_plugins_export-v0.json](./§vim_plugins_export-v0.json). Also call `:helptags ~/.vim/bundle/`. See [./§vim_plugins_export-v0.json](./§vim_plugins_export-v0.json). Also call `:helptags ~/.vim/bundle/`.
## Removed
- [jasonccox/vim-wayland-clipboard](https://github.com/jasonccox/vim-wayland-clipboard) due to https://github.com/vim/vim/issues/5157#issuecomment-1916375710
## To consider ## To consider
- [yaegassy/coc-html-css-support: HTML id and class attribute "completion" for coc.nvim.](https://github.com/yaegassy/coc-html-css-support): `alpine.js`, `petite-vue` - [yaegassy/coc-html-css-support: HTML id and class attribute "completion" for coc.nvim.](https://github.com/yaegassy/coc-html-css-support): `alpine.js`, `petite-vue`
- [vimwiki/vimwiki: Personal Wiki for Vim](https://github.com/vimwiki/vimwiki) - [vimwiki/vimwiki: Personal Wiki for Vim](https://github.com/vimwiki/vimwiki)

3
.vimrc
View File

@ -168,6 +168,7 @@
vnoremap gx :silent exec "!xdg-open '".shellescape(substitute(mini_enhancement#selectedText(), '?', '\\?', ''), 1)."'" \| redraw!<cr> vnoremap gx :silent exec "!xdg-open '".shellescape(substitute(mini_enhancement#selectedText(), '?', '\\?', ''), 1)."'" \| redraw!<cr>
"" #endregion FOS "" #endregion FOS
"" #region EN Editor navigation + search "" #region EN Editor navigation + search
set grepprg=LC_ALL=C\ grep\ -HRIns
set hlsearch incsearch " highlight search, start when typing set hlsearch incsearch " highlight search, start when typing
if maparg('<C-L>', 'n') ==# '' if maparg('<C-L>', 'n') ==# ''
nnoremap <silent> <c-l> :nohlsearch<c-r>=has('diff')?'<bar>diffupdate':''<cr><cr><c-l> | endif nnoremap <silent> <c-l> :nohlsearch<c-r>=has('diff')?'<bar>diffupdate':''<cr><cr><c-l> | endif
@ -435,6 +436,8 @@
"" #endregion COC "" #endregion COC
let g:codeium_disable_bindings = 1 let g:codeium_disable_bindings = 1
imap <script><silent><nowait><expr> <f3><f3> codeium#Accept() imap <script><silent><nowait><expr> <f3><f3> codeium#Accept()
imap <script><silent><nowait><expr> <f3><w> codeium#AcceptNextWord()
imap <script><silent><nowait><expr> <f3><j> codeium#AcceptLine()
imap <f3>n <Cmd>call codeium#CycleCompletions(1)<CR> imap <f3>n <Cmd>call codeium#CycleCompletions(1)<CR>
imap <f3>N <Cmd>call codeium#CycleCompletions(-1)<CR> imap <f3>N <Cmd>call codeium#CycleCompletions(-1)<CR>
imap <f3>d <Cmd>call codeium#Clear()<CR> imap <f3>d <Cmd>call codeium#Clear()<CR>

View File

@ -78,7 +78,7 @@ function removePack(path){
s.cd(dirs.pack); s.cd(dirs.pack);
s.$("-V").rm("-rf", path); s.$("-V").rm("-rf", path);
const root= dirs.pack+path.split("/")[0]; const root= dirs.pack+path.split("/")[0];
const { code, stdout }= s.$().find(root+"/*/*"); const { code, stdout }= s.$("-Sf").find(root+"/*/*");
if(!code) echo(stdout); if(!code) echo(stdout);
else if(s.test("-d", root)) else if(s.test("-d", root))
s.$("-V").rm("-rf", root); s.$("-V").rm("-rf", root);

View File

@ -1,6 +1,20 @@
#!/bin/bash #!/bin/bash
# heredoc
read -r -d '' JS <<JS
const dir= '/home/jaandrle/Obrázky/Bing Image Of The Day/';
const img= 'horizontally.jpg';
desktops()
.filter(d=> d.wallpaperPlugin==='org.kde.image')
.forEach(d=> {
d.currentConfigGroup= ['Wallpaper', 'org.kde.image', 'General'];
if(!d.readConfig('Image').endsWith(img)) return;
d.writeConfig('Image', 'file://' + dir + 'now.jpg');
d.writeConfig('Image', 'file://' + dir + img);
});
JS
nm-online -x -q && \ nm-online -x -q && \
node "/home/jaandrle/.nvm/versions/node/$(node --version)/bin/nodejsscript" /home/jaandrle/bin/§wallpaper_WCPOTD.mjs pull && \ node "/home/jaandrle/.nvm/versions/node/$(node --version)/bin/nodejsscript" /home/jaandrle/bin/§wallpaper_WCPOTD.mjs pull && \
cd "/home/jaandrle/Obrázky/Bing Image Of The Day" && \ qdbus org.kde.plasmashell /PlasmaShell org.kde.PlasmaShell.evaluateScript "$JS"
qdbus org.kde.plasmashell /PlasmaShell org.kde.PlasmaShell.evaluateScript 'const d= desktops().filter(d=> d.wallpaperPlugin==="de.unkn0wn.htmlwallpaper")[0];const url= (i= "")=> `file:///home/jaandrle/Obr%C3%A1zky/Bing%20Image%20Of%20The%20Day/index${i}.html`;d.currentConfigGroup= Array("Wallpaper", "de.unkn0wn.htmlwallpaper","General");d.writeConfig("DisplayPage", url("1"));d.writeConfig("DisplayPage", url());' # plasma-apply-wallpaperimage '/home/jaandrle/Obrázky/Bing Image Of The Day/now.jpg' && plasma-apply-wallpaperimage '/home/jaandrle/Obrázky/Bing Image Of The Day/horizontally.jpg'
# convert now.jpg prev.jpg +append horizontally.jpg # cd "/home/jaandrle/Obrázky/Bing Image Of The Day" && \
# qdbus org.kde.plasmashell /PlasmaShell org.kde.PlasmaShell.evaluateScript 'const d= desktops().filter(d=> d.wallpaperPlugin==="de.unkn0wn.htmlwallpaper")[0];const url= (i= "")=> `file:///home/jaandrle/Obr%C3%A1zky/Bing%20Image%20Of%20The%20Day/index${i}.html`;d.currentConfigGroup= Array("Wallpaper", "de.unkn0wn.htmlwallpaper","General");d.writeConfig("DisplayPage", url("1"));d.writeConfig("DisplayPage", url());' && \

View File

@ -9,7 +9,7 @@ const path_home= $.xdg.home`Obrázky/Bing Image Of The Day/`;
const path_info= join(path_home, "images.json"); const path_info= join(path_home, "images.json");
$.api() $.api()
.version("2024-06-17") .version("2024-11-14")
.command("pull", "Pull new/today image(s)") .command("pull", "Pull new/today image(s)")
.action(async function pull(){ .action(async function pull(){
const images= { const images= {
@ -18,15 +18,19 @@ $.api()
}; };
const paths= await downloadImages(images); const paths= await downloadImages(images);
updateHTML(images); updateHTML(images);
convert(paths); const images_save= Object.entries(images)
pipe(
images=> Object.entries(images)
.reduce((acc, [ key, { caption } ])=> .reduce((acc, [ key, { caption } ])=>
Reflect.set(acc, key, caption) && acc, Reflect.set(acc, key, caption) && acc,
{}), {});
images=> JSON.stringify(images, null, "\t"), convert(paths, images_save);
s.echo s.echo(JSON.stringify(images_save, null, "\t")).to(path_info);
)(images).to(path_info); $.exit(0);
})
.command("redraw")
.action(function redraw(){
const paths= [ "now", "prev" ].map(key=> join(path_home, `${key}.jpg`));
const images= s.cat(path_info).xargs(JSON.parse);
convert(paths, images);
$.exit(0); $.exit(0);
}) })
.command("status") .command("status")
@ -40,13 +44,35 @@ $.api()
/** @typedef {{ url: string, caption: string }} T_response */ /** @typedef {{ url: string, caption: string }} T_response */
/** @typedef {Record<"now"|"prev",T_response>} T_images */ /** @typedef {Record<"now"|"prev",T_response>} T_images */
/** @param {Record<"now"|"prev",string>} paths */ /** @param {Record<"now"|"prev",string>} paths */
function convert(paths){ function convert(paths, images){
const resize_to= "1920x1080"; const resize_to= "1920x1080";
paths= Object.values(paths); paths= Object.values(paths);
const target= join(path_home, "horizontally.jpg"); const target= join(path_home, "horizontally.jpg");
const params= `-resize ${resize_to}^ -gravity center -extent ${resize_to}`.split(" "); const params= `-resize ${resize_to}^ -gravity center -extent ${resize_to}`.split(" ");
const caption= (position, text)=> [
"convert",
`"${target}"`,
"\\(",
"-pointsize", "12",
"-background", "transparent",
"-fill", "white",
"-family", `"Ubuntu Mono"`,
"-weight", "Bold",
"-gravity", "center",
"-bordercolor", '"rgba(0,0,0,0.3)"',
"-border", "10",
"-size", "500x",
`caption:"${text}"`,
"\\)",
"-gravity", position,
"-geometry", "+0+0",
"-composite",
`"${target}"`,
].join(" ");
s.run`convert ${paths} ${params} +append ${target}`; s.run`convert ${paths} ${params} +append ${target}`;
s.run(caption("southwest", images.now));
s.run(caption("southeast", images.prev));
} }
import { writeFileSync } from "node:fs"; import { writeFileSync } from "node:fs";
/** @param {T_images} images */ /** @param {T_images} images */