Compare commits

15 Commits

Author SHA1 Message Date
386ff7259c git-identity 2025-05-08 12:20:48 +02:00
28f1604b78 updates 2025-05-08 11:07:28 +02:00
04477c25bf 2025-04-25 16:23:44 +02:00
46e9b50a13 (bash) crossSession, m; (git) interactive (+vim) 2025-02-22 14:36:08 +01:00
fff74676d9 vim cleanup 2025-01-07 14:21:11 +01:00
40b17c99e4 cleaning vimrc 2025-01-07 10:38:55 +01:00
cf083e866b manpager, gh releases, Potd 2025-01-07 09:44:15 +01:00
5e7e5b6f33 updated 2024-11-29 16:09:45 +01:00
f3bf9e0612 Mainly because os (re)instalation TUXEDO OS 3 2024-10-21 16:06:54 +02:00
ded3151a67 apps 2024-10-11 09:49:05 +02:00
4674684254 update 2024-10-11 09:25:12 +02:00
e030342ca5 Sublime Merge small improvements 2024-08-20 16:56:41 +02:00
8f91b50c0c updates jaaENV (mainly better processing) 2024-08-20 16:55:50 +02:00
2c3b6dfc09 small improvement of github-release.mjs + update 2024-08-20 16:54:04 +02:00
1456b4a315 small ui and ux improvements of Geany 2024-08-20 16:53:10 +02:00
59 changed files with 2142 additions and 6700 deletions

View File

@ -14,6 +14,7 @@ if [ -x /usr/bin/dircolors ]; then
alias egrep='egrep --color=auto' alias egrep='egrep --color=auto'
alias diff='diff --color=auto' alias diff='diff --color=auto'
fi fi
alias §rm='rm -vi' alias §rm='rm -vi'
alias §cp='cp -vi' alias §cp='cp -vi'
alias §mv='mv -vi' alias §mv='mv -vi'
@ -26,9 +27,42 @@ alias §df='df -Th'
alias §xclip-copy='xclip -selection clipboard' alias §xclip-copy='xclip -selection clipboard'
alias §xclip-paste='xclip -o -selection clipboard' alias §xclip-paste='xclip -o -selection clipboard'
LAST_PWD_PATH="$BASH_DOTFILES/.bash_last_pwd" CROSS_SESSION="$BASH_DOTFILES/.bash_cross_session"
[ -f "$LAST_PWD_PATH" ] && OLDPWD=`cat $LAST_PWD_PATH` [ -f "$CROSS_SESSION" ] && . "$CROSS_SESSION"
cd(){ builtin cd "$@" && echo `pwd` > "$LAST_PWD_PATH"; } crossSession() {
if [[ '--help' == "${1:---help}" ]]; then
echo 'crossSession [--help]'
echo ' Print this help.'
echo 'crossSession [--list]'
echo ' Lists all cross session variables or print this help.'
echo 'crossSession <name> [<value>]'
echo ' Sets cross session variable <name> to <value> (or empty for unset).'
return 0
fi
if [[ '--list' == "$1" ]]; then
cat "$CROSS_SESSION"
return 0
fi
local name="$1"
local value="$2"
# Check if the variable already exists in the file
if grep -q "^export $name=" "$CROSS_SESSION"; then
if [ -z "$value" ]; then
# If new value is empty, remove the variable from the file
sed -i "/^export $name=/d" "$CROSS_SESSION"
else
# If it exists, replace the old value with the new value
sed -i "s|^export $name=.*|export $name=\"$value\"|" "$CROSS_SESSION"
fi
else
if [ -n "$value" ]; then
# If it doesn't exist and new value is not empty, append the new variable to the file
echo "export $name=\"$value\"" >> "$CROSS_SESSION"
fi
fi
}
cd(){ builtin cd "$@" && crossSession 'OLDPWD' "$(pwd)"; }
history_clean(){ awk '!seen[$0]++ {print $0}' $HOME/.bash_history; } history_clean(){ awk '!seen[$0]++ {print $0}' $HOME/.bash_history; }
history_edit(){ vim $HOME/.bash_history; } history_edit(){ vim $HOME/.bash_history; }
@ -46,6 +80,11 @@ history_most_used(){ LC_ALL=C cat ~/.bash_history | cut -d ';' -f 2- | §awk 1 |
alias §less='less -R -S' alias §less='less -R -S'
m(){ m(){
if [[ '-d' == "$1" ]]; then
unset "m$2"
crossSession "m$2"
return 0
fi
if [[ -z "$1" ]]; then if [[ -z "$1" ]]; then
printenv | grep -e '^m' printenv | grep -e '^m'
return 0 return 0
@ -53,6 +92,8 @@ m(){
if [[ "--help" == "$1" ]]; then if [[ "--help" == "$1" ]]; then
echo 'm [--help]' echo 'm [--help]'
echo ' Lists all marks or print this help.' echo ' Lists all marks or print this help.'
echo 'm -d <name>'
echo ' Deletes mark <name>. Unsets variable and cross session variable.'
echo 'm <name> [path]' echo 'm <name> [path]'
echo ' Sets mark <name> to current directory or [path].' echo ' Sets mark <name> to current directory or [path].'
echo ' The mark is just a bash variable, use `$m<name>`.' echo ' The mark is just a bash variable, use `$m<name>`.'
@ -61,6 +102,7 @@ m(){
local n="m$1" local n="m$1"
[[ -z "${!n}" ]] || return 1 [[ -z "${!n}" ]] || return 1
[[ -z "$2" ]] && local p="$(pwd)" || local p="$(readlink -f $2)" [[ -z "$2" ]] && local p="$(pwd)" || local p="$(readlink -f $2)"
crossSession "$n" "$p"
export $n="$p" export $n="$p"
} }
alias cd-vifm='cd `vifm --choose-dir -`' alias cd-vifm='cd `vifm --choose-dir -`'
@ -110,19 +152,22 @@ alias §ck-grep='cat /usr/share/X11/locale/en_US.UTF-8/Compose ~/.XCompose | gre
§cmdfu(){ curl "https://www.commandlinefu.com/commands/matching/$@/$(echo -n $@ | openssl base64)/plaintext"; } §cmdfu(){ curl "https://www.commandlinefu.com/commands/matching/$@/$(echo -n $@ | openssl base64)/plaintext"; }
aai(){ aai(){
[[ "$1" == '--help' ]] && ai ask --help && return 0; [[ "$1" == '--help' ]] && ai ask --help && return 0;
echo "ai ask \"$*, thanks for your help\""; ai ask "\"$*, thanks for your help\""; #echo "ai ask \"$*, thanks for your help\""; ai ask "\"$*, thanks for your help\"";
aipick -m "hi, would like to ask for help: $*\n…please response only with plain text to be used in terminal command without any explanation, thanks for your help";
} }
alias npx-wca='npx -y web-component-analyzer' alias npx-wca='npx -y web-component-analyzer'
alias npx-qnm='npx -y qnm' alias npx-qnm='npx -y qnm'
alias npx-hint='npx -y hint' alias npx-hint='npx -y hint'
alias npx-markdown='nohup npx markserv' alias npx-markdown='npx -y 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

@ -8,14 +8,15 @@ source "$SCRIPT_DIR/complete-alias/complete_alias"
complete -F _complete_alias gitdotfiles complete -F _complete_alias gitdotfiles
alias C--asana='eval "$($HOME/bin/asana.mjs completion_bash)"' alias C--asana='eval "$($HOME/bin/asana.mjs completion_bash)"'
alias C--himalaya='\. "$BASH_DOTFILES/himalaya.completion"' alias C--brew='\. "$BASH_DOTFILES/brew.completion"'
alias C--pnpm='\. "$BASH_DOTFILES/pnpm.completion"'
alias C--uu='eval "$($HOME/bin/uu --completion-bash)"' alias C--uu='eval "$($HOME/bin/uu --completion-bash)"'
alias C--bs='eval "$(bs .completion bash)"'
alias C--jc='eval "$(jc -B)" … newer version needed' alias C--jc='eval "$(jc -B)" … newer version needed'
\. <(bs .completion bash)
\. "$BASH_DOTFILES/cordova.completion" \. "$BASH_DOTFILES/cordova.completion"
eval "$(node --completion-bash)" \. <(node --completion-bash)
eval "$(npm completion)" \. <(npm completion)
eval "$(nodejsscript --completion bash)" \. <(nodejsscript --completion bash)
_npx() { _npx() {
local cur="${COMP_WORDS[COMP_CWORD]}" local cur="${COMP_WORDS[COMP_CWORD]}"

View File

@ -9,116 +9,145 @@ function jaaENV {
echo " jaaENV --save …to_save (example: jaaENV --save nodejs php)" echo " jaaENV --save …to_save (example: jaaENV --save nodejs php)"
echo "" echo ""
echo "Description:" echo "Description:"
echo " - Without arguments loads infos from '.jaaENV'" echo " - Without arguments, loads info from '.jaaENV'"
echo " - 'ls' shows supported options to auto load" echo " - 'ls' shows supported options to auto-load"
echo " - 'save' cerates config file '.jaaENV'" echo " - 'save' creates a config file '.jaaENV'"
echo "" echo ""
echo "Usage '.jaaENV' files: " echo "Usage '.jaaENV' files: "
echo " typical: '\nphp=5.6\nnodejs=16.13.0'" echo " typical: '\nphp=5.6\nnodejs=16.13.0'"
echo " link: '. ../.jaaENV' … use settings from parent folder" echo " link: '. ../.jaaENV' … use settings from parent folder"
echo " Options:" echo " Options:"
echo " 'android_home': Exports 'ANDROID_HOME' (uses 'ANDROID_HOME_BAK') instead of new 'ANDROID_SDK_ROOT'. Value can be anything (use '1')." echo " 'android_home': Exports 'ANDROID_HOME' (uses 'ANDROID_HOME_BAK') instead of 'ANDROID_SDK_ROOT'. Value can be anything (use '1')."
echo " 'jdk': Exports 'JAVA_HOME' based on wanted version (currently 11/1.8)" echo " 'jdk': Exports 'JAVA_HOME' based on the wanted version (currently 11/1.8)"
echo " 'nodejs'|'php': NodeJS/PHP versions" echo " 'nodejs'|'php': NodeJS/PHP versions"
echo " 'gradle': Cordova uses folder scoped → so unnecesarly" echo " 'gradle': Cordova uses folder-scoped → so unnecesarly"
echo "" echo ""
echo "Install: " echo "Install: "
echo " gradle ⇒ https://sdkman.io/" echo " gradle ⇒ https://sdkman.io/"
echo " node ⇒ https://github.com/nvm-sh/nvm" echo " node ⇒ https://github.com/nvm-sh/nvm"
echo " php ⇒ http://jdem.cz/fgyu56 + https://deb.sury.org/" echo " php ⇒ \`update-alternatives\` + https://deb.sury.org/"
echo " java ⇒ \`update-alternatives\`"
echo "" echo ""
echo "Tips:" echo "Tips:"
echo " sudo update-alternatives --set php /usr/bin/php\$php" echo " sudo update-alternatives --set php /usr/bin/php\$php"
return 0 return 0
fi fi
if [ "$1" = "--save" ]; then
if [ "$1" == "--save" ]; then
shift shift
rm -vi .jaaENV rm -vi .jaaENV
while test $# -gt 0 while [ $# -gt 0 ]; do
do
case "$1" in case "$1" in
nodejs|node) nodejs|node)
local nodejs_version=$(node --version) echo "nodejs=$(node --version | cut -c2-)" >> .jaaENV
echo "nodejs=${nodejs_version:1}" >> .jaaENV
;; ;;
gradle) gradle)
local gradle_version=$(gradle --version | head -n 3 | tail -n 1 | §awk 2) echo "gradle=$(gradle --version | awk '/Gradle/ {print $2}')" >> .jaaENV
echo "gradle=$gradle_version" >> .jaaENV
;; ;;
php) php)
local php_version=$(php --version | head -n 1 | §awk 2) echo "php=$(php --version | awk '/^PHP/ {print $2}')" >> .jaaENV
echo "php=$php_version" >> .jaaENV
;; ;;
java) java)
local java_version=$(java -version 2>&1 | head -n 1 | cut -d'"' -f2 | cut -d'.' -f1) local java_version=$(java -version 2>&1 | awk -F '"' '/version/ {print $2}')
if [[ "$java_version" == 1.8* ]]; then
java_version=8
else
java_version=$(echo "$java_version" | cut -d'.' -f1)
fi
echo "java=$java_version" >> .jaaENV echo "java=$java_version" >> .jaaENV
;; ;;
*) *)
echo "unknown '$1' skipped" echo "Unknown '$1' skipped"
;; ;;
esac esac
shift shift
done done
return 0 return 0
fi fi
if [ "$1" = "--ls" ]; then
echo ":: nvm ls ::\n" if [ "$1" == "--ls" ]; then
nvm ls echo ":: nvm ls --no-alias ::"
echo ":: find /usr/bin/ -name php* ::\n" nvm ls --no-alias
find /usr/bin/ -name php* echo ":: update-alternatives --list php ::"
echo ":: sdk ls gradle | cat :: " update-alternatives --list php
sdk ls gradle | cat echo ":: update-alternatives --list java ::"
update-alternatives --list java
echo ":: sdk ls gradle | grep -E '\*|>' :: "
sdk ls gradle | grep -E '\*|>'
return 0 return 0
fi fi
if [ -f "compose.yaml" ]; then if [ -f "compose.yaml" ]; then
jdk=$(grep -Po 'VERSION_JAVA=\K.*' compose.yaml) jdk=$(grep -Po 'VERSION_JAVA=\K.*' compose.yaml)
nodejs=$(grep -Po 'VERSION_NODEJS=\K.*' compose.yaml) nodejs=$(grep -Po 'VERSION_NODEJS=\K.*' compose.yaml)
else elif [ -f ".jaaENV" ]; then
. ./.jaaENV . ./.jaaENV
else
echo 'No env file `compose.yaml` or `.jaaENV`'
return 1
fi
local chP="\[\033[0;35m\]" #purple
local chW="\[\033[00m\]" #white
export PS1_jaaENV="${chP}¦${chW}"
if [ ! -z ${ANDROID_SDK_ROOT_BAK+x} ]; then
export ANDROID_SDK_ROOT=$ANDROID_SDK_ROOT_BAK
echo \$ANDROID_SDK_ROOT=$ANDROID_SDK_ROOT_BAK
unset ANDROID_SDK_ROOT_BAK
fi
if [ ! -z ${unset_android_sdk+x} ]; then
export ANDROID_SDK_ROOT_BAK=$ANDROID_SDK_ROOT
unset ANDROID_SDK_ROOT
fi fi
if [ ! -z ${java+x} ]; then if [ ! -z ${java+x} ]; then
[[ "$java" == "8" ]] && java=1.8 [[ "$java" == "8" ]] && java=1.8
local java_local=$(java -version 2>&1 | head -n 1 | cut -d'"' -f2) local java_local=$(java -version 2>&1 | awk -F '"' '/version/ {print $2}')
if [[ "$java_local" != "$java"* ]]; then if [[ "$java_local" != "$java"* ]]; then
[[ "$java" == "1.8" ]] && java=8 [[ "$java" == "1.8" ]] && java=8
echo "java $java$java_local" echo "Switching Java version: $java$java_local"
local v="/usr/lib/jvm/java-$java-openjdk-amd64/" local java_path="/usr/lib/jvm/java-$java-openjdk-amd64/"
[[ "$java" == "8" ]] && local vv="jre/" || local vv="" [[ "$java" == "8" ]] && java_path+="jre/"
sudo update-alternatives --set java ${v}${vv}bin/java sudo update-alternatives --set java "${java_path}bin/java"
local javac=$(update-alternatives --list javac | grep java-$java) local javac=$(update-alternatives --list javac | grep java-$java)
[ $javac ] && sudo update-alternatives --set javac $javac [ -n "$javac" ] && sudo update-alternatives --set javac "$javac"
sudo -k sudo -k
fi fi
export JAVA_HOME=$(update-alternatives --display java | grep momentálně | §awk 5 | cut -d \/ -f1-5)/ export JAVA_HOME=$(readlink -f $(which java) | cut -d '/' -f1-5)/
echo \$JAVA_HOME=$JAVA_HOME echo "\$JAVA_HOME=$JAVA_HOME"
fi fi
if [ ! -z ${android_home+x} ]; then export ANDROID_HOME=$ANDROID_HOME_BAK; echo "\$ANDROID_HOME=$ANDROID_HOME"; else unset ANDROID_HOME; echo "\$ANDROID_SDK_ROOT=$ANDROID_SDK_ROOT"; fi if [ ! -z ${android_home+x} ]; then
if [ ! -z ${android_home_is_sdk+x} ]; then export ANDROID_HOME=$ANDROID_SDK_ROOT; echo "\$ANDROID_HOME=$ANDROID_HOME"; fi export ANDROID_HOME=$ANDROID_HOME_BAK
echo "\$ANDROID_HOME=$ANDROID_HOME"
else
unset ANDROID_HOME
echo "\$ANDROID_SDK_ROOT=$ANDROID_SDK_ROOT"
fi
if [ ! -z ${android_home_is_sdk+x} ]; then
export ANDROID_HOME=$ANDROID_SDK_ROOT
echo "\$ANDROID_HOME=$ANDROID_HOME"
fi
if [ ! -z ${JAVA_HOME_BAK+x} ]; then export JAVA_HOME=$JAVA_HOME_BAK; unset JAVA_HOME_BAK; fi
if [ ! -z ${jdk+x} ]; then if [ ! -z ${jdk+x} ]; then
if (( $(echo "$jdk > 9" | bc -l) )); then if (( $(echo "$jdk > 9" | bc -l) )); then
export JAVA_HOME_bk=$JAVA_HOME export JAVA_HOME_BAK=$JAVA_HOME
export JAVA_HOME=/snap/android-studio/current/android-studio/jre; export JAVA_HOME="/snap/android-studio/current/android-studio/jre"
elif [ ! -z ${JAVA_HOME_bk+x} ]; then
export JAVA_HOME=$JAVA_HOME_bk
fi fi
echo "\$JAVA_HOME=$JAVA_HOME" echo "\$JAVA_HOME=$JAVA_HOME"
fi fi
if [ ! -z ${nodejs+x} ]; then nvm use $nodejs; fi if [ ! -z ${nodejs+x} ]; then nvm use $nodejs; fi
if [ ! -z ${gradle+x} ]; then sdk use gradle $gradle | tr -d '\n'; echo ; fi if [ ! -z ${gradle+x} ]; then sdk use gradle $gradle | tr -d '\n'; echo ; fi
if [ ! -z ${php+x} ]; then if [ ! -z ${php+x} ]; then
local php_local=$(php --version | head -n 1 | §awk 2) local php_local=$(php --version | awk '/^PHP/ {print $2}')
if [[ "$php_local" == "$php"* ]]; then if [[ "$php_local" == "$php"* ]]; then
echo "php $php" echo "PHP version: $php"
else else
echo "php $php$php_local" echo "Switching PHP version: $php$php_local"
sudo update-alternatives --set php /usr/bin/php$php sudo update-alternatives --set php "/usr/bin/php$php"
sudo -k sudo -k
fi fi
fi fi
unset android_home
unset nodejs # Cleanup variables
unset gradle unset android_home unset_android_sdk nodejs gradle php java
unset php
unset java
} }

View File

@ -52,7 +52,11 @@ function updatePromt {
PS1+="] " PS1+="] "
fi fi
PS1+="${chB}\w${chW}" PS1+="${chB}\w${chW}"
PS1+="\n:" if [ ! -z ${PS1_jaaENV+x} ]; then
PS1+="\n$PS1_jaaENV"
else
PS1+="\n:"
fi
history -a history -a
} }
setPromt setPromt

View File

@ -1,7 +1,6 @@
# IMPORT IN `$HOME/.profile` # IMPORT IN `$HOME/.profile`
export ANDROID_HOME_BAK="$HOME/.local/share/umake/android/android-studio" export ANDROID_HOME_BAK2="$HOME/.local/share/JetBrains/Toolbox/apps/android-studio/"
export ANDROID_SDK_ROOT="$HOME/.local/share/umake/android/android-studio-sdk" export ANDROID_HOME_BAK="$HOME/Android/Sdk"
export PATH=$PATH:$ANDROID_SDK_ROOT/tools/ 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/cmdline-tools/latest/bin/
export PATH=$PATH:$ANDROID_SDK_ROOT/emulator/ export PATH=$PATH:$ANDROID_SDK_ROOT/emulator/

File diff suppressed because it is too large Load Diff

14
.bashrc
View File

@ -11,9 +11,9 @@ shopt -s expand_aliases
[ -f $BASH_DOTFILES/.bash_jaaENV ] && . $BASH_DOTFILES/.bash_jaaENV [ -f $BASH_DOTFILES/.bash_jaaENV ] && . $BASH_DOTFILES/.bash_jaaENV
[ -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
# Install Ruby Gems to ~/.local/share/gems 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 GEM_HOME="$HOME/.local/share/gems" export PATH="$HOME/.local/bin:$PATH"
export PATH="$HOME/.local/share/gems/bin:$HOME/.local/bin:$PATH" eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
[ -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
@ -22,7 +22,8 @@ export PATH="$HOME/.local/share/gems/bin:$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 --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' -\""
export MANPAGER="vim --appimage-extract-and-run +MANPAGER --not-a-term -c 'set ts=8 nolist' -"
shopt -s checkwinsize # dynamic columns update after every cmd shopt -s checkwinsize # dynamic columns update after every cmd
## History ## History
@ -60,6 +61,9 @@ if ! shopt -oq posix; then
fi fi
export GPG_TTY=$(tty) export GPG_TTY=$(tty)
shopt -s cdspell # autocorrects cd misspellings
# 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 -- \n"'; 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

@ -1,5 +1,5 @@
# #
# This library is free software; you can redistribute it and/or # This library is free software; you can baseRedistribute it and/or
# modify it under the terms of the GNU Library General Public # modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either # License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version. # version 2 of the License, or (at your option) any later version.
@ -27,21 +27,20 @@ base1=#282828
base2=#3f3f3f base2=#3f3f3f
base3=#808080 base3=#808080
base4=#303030 base4=#303030
vsblue=#AA89C0 baseKeyword=#C89FE3
aqua=#6FB2EA baseString=#6FB2EA
bluegrey=#747e9e baseKeyWord2=#747e9e
orange=#CE9563 baseNumber=#F19B78
lime=#65ff00 baseComment=#94B386
grey=#94B386 baseRed=#f00
red=#f00 baseRedbg=#751212
redbg=#751212 baseGreen=#859900
green=#859900 baseKeyword3=#DCB55F
blue=#268bd2 baseFunction=#dcdcaa
yellow=#dcdcaa
[named_styles] [named_styles]
default=base0;base1;true;false default=base0;base1;true;false
error=red error=baseRed
# Editor styles # Editor styles
@ -49,76 +48,76 @@ error=red
selection=;#000000;;true selection=;#000000;;true
current_line=;#212121;true current_line=;#212121;true
brace_good=base0;base2;true brace_good=base0;base2;true
brace_bad=red;;true brace_bad=baseRed;;true
margin_line_number=base3;base4 margin_line_number=base3;base4
margin_folding=base3;#212121 margin_folding=base3;#212121
fold_symbol_highlight=base2 fold_symbol_highlight=base2
indent_guide=base2;;true indent_guide=base2;;true
caret=aqua;;false caret=baseString;;false
marker_line=#fff;#00f; marker_line=#fff;#00f;
marker_search=#fff;#d791a8; marker_search=#fff;#d791a8;
marker_mark=; marker_mark=;
call_tips=base0;base1 call_tips=base0;base1
white_space=base2;;true white_space=base3;;true
# Programming languages # Programming languages
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
comment=grey comment=baseComment
comment_doc=comment comment_doc=comment
comment_line=comment comment_line=comment
comment_line_doc=comment_doc comment_line_doc=comment_doc
comment_doc_keyword=comment_doc,bold comment_doc_keyword=comment_doc,bold
comment_doc_keyword_error=comment_doc,italic comment_doc_keyword_error=comment_doc,italic
number=orange number=baseNumber
number_1=number number_1=number
number_2=number_1 number_2=number_1
type=vsblue;;true type=baseKeyword;;true
class=aqua class=baseString
function=yellow function=baseFunction
parameter=function parameter=function
keyword=vsblue;;true keyword=baseKeyword;;true
keyword_1=keyword keyword_1=keyword
keyword_2=blue;;true keyword_2=baseKeyword3;;true
keyword_3=bluegrey keyword_3=baseKeyWord2
keyword_4=keyword_3 keyword_4=keyword_3
identifier=default identifier=default
identifier_1=identifier identifier_1=identifier
identifier_2=identifier_1 identifier_2=baseNumber
identifier_3=identifier_1 identifier_3=identifier_2
identifier_4=identifier_1 identifier_4=identifier_3
string=aqua string=baseString
string_1=string string_1=string
string_2=string_1 string_2=string_1
string_3=default string_3=default
string_4=default string_4=default
string_eol=red string_eol=baseRed
character=string_1 character=string_1
backticks=string_2 backticks=string_2
here_doc=string_2 here_doc=string_2
scalar=string_2 scalar=string_2
label=keyword,bold label=keyword,bold
preprocessor=aqua preprocessor=baseString
regex=number_1 regex=number_1
operator=base0 operator=base0
decorator=string_1,bold decorator=string_1,bold
other=aqua other=baseString
# Markup-type languages # Markup-type languages
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
tag=vsblue tag=baseKeyword
tag_unknown=tag,bold tag_unknown=tag,bold
tag_end=tag,bold tag_end=tag,bold
attribute=aqua attribute=baseString
attribute_unknown=attribute,bold attribute_unknown=attribute,bold
value=string_1 value=string_1
entity=default entity=default
@ -127,6 +126,6 @@ entity=default
# Diff # Diff
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
line_added=green line_added=baseGreen
line_removed=red line_removed=baseRed
line_changed=blue line_changed=baseKeyword3

View File

@ -24,7 +24,7 @@ lexer.cpp.track.preprocessor=1
lexer.cpp.update.preprocessor=1 lexer.cpp.update.preprocessor=1
[settings=CSS] [settings=CSS]
extension=less extension=styl
lexer_filetype=python lexer_filetype=python
tag_parser=CSS tag_parser=CSS

View File

@ -43,7 +43,7 @@ Dockerfile=Dockerfile;dockerfile;*.dockerfile;*.Dockerfile;
#Haxe=*.hx; #Haxe=*.hx;
#HTML=*.htm;*.html;*.shtml;*.hta;*.htd;*.htt;*.cfm;*.tpl; #HTML=*.htm;*.html;*.shtml;*.hta;*.htd;*.htt;*.cfm;*.tpl;
#Java=*.java;*.jsp; #Java=*.java;*.jsp;
JavaScript=*.js;*.mjs; JavaScript=*.js;*.mjs;*.jsx;
#JSON=*.json; #JSON=*.json;
#Julia=*.jl; #Julia=*.jl;
#Kotlin=*.kt;*.kts; #Kotlin=*.kt;*.kts;
@ -76,7 +76,7 @@ Stylus=*.styl;
#Swift=*.swift; #Swift=*.swift;
#Tcl=*.tcl;*.tk;*.wish;*.exp; #Tcl=*.tcl;*.tk;*.wish;*.exp;
#Txt2tags=*.t2t; #Txt2tags=*.t2t;
TypeScript=*.ts;*.tsx;*.d.ts; TypeScript=*.ts;*.tsx;
SCSS=*.scss SCSS=*.scss
SVG=*.svg SVG=*.svg
#Vala=*.vala;*.vapi; #Vala=*.vala;*.vapi;

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
@ -134,12 +134,12 @@ msgwin_messages_visible=true
msgwin_scribble_visible=true msgwin_scribble_visible=true
warn_on_project_close=true warn_on_project_close=true
documents_show_paths=true documents_show_paths=true
sidebar_page=4 sidebar_page=3
pref_main_project_session=true pref_main_project_session=true
use_native_windows_dialogs=false use_native_windows_dialogs=false
treeview_position=245 treeview_position=226
msgwindow_position=699 msgwindow_position=710
geometry=0;26;1920;1054;1; geometry=321;29;1275;1020;0;
use_native_dialogs=true use_native_dialogs=true
[tools] [tools]
@ -174,7 +174,7 @@ colour_fore=#DEDDDA
colour_back=#2B2B2B colour_back=#2B2B2B
send_cmd_prefix= send_cmd_prefix=
send_selection_unsafe=false send_selection_unsafe=false
last_dir=/home/jaandrle/Vzdálené/GitHub/Facilitator-App-Native last_dir=/home/jaandrle
[build-menu] [build-menu]
number_ft_menu_items=0 number_ft_menu_items=0
@ -204,30 +204,30 @@ find_close_dialog=true
replace_regexp=false replace_regexp=false
replace_regexp_multiline=false replace_regexp_multiline=false
replace_case_sensitive=false replace_case_sensitive=false
replace_escape_sequences=false replace_escape_sequences=true
replace_match_whole_word=false replace_match_whole_word=false
replace_match_word_start=false replace_match_word_start=false
replace_search_backwards=false replace_search_backwards=false
replace_close_dialog=true replace_close_dialog=true
find_all_expanded=false find_all_expanded=false
replace_all_expanded=false replace_all_expanded=true
position_find_x=1257 position_find_x=1014
position_find_y=459 position_find_y=519
position_replace_x=-1 position_replace_x=504
position_replace_y=-1 position_replace_y=397
position_fif_x=-1 position_fif_x=-1
position_fif_y=-1 position_fif_y=-1
[plugins] [plugins]
load_plugins=true load_plugins=true
custom_plugin_path= custom_plugin_path=
active_plugins=/usr/lib/x86_64-linux-gnu/geany/addons.so;/usr/lib/x86_64-linux-gnu/geany/autoclose.so;/usr/lib/x86_64-linux-gnu/geany/automark.so;/usr/lib/x86_64-linux-gnu/geany/commander.so;/usr/lib/x86_64-linux-gnu/geany/export.so;/usr/lib/x86_64-linux-gnu/geany/geanyextrasel.so;/usr/lib/x86_64-linux-gnu/geany/geanyctags.so;/usr/lib/x86_64-linux-gnu/geany/htmlchars.so;/usr/lib/x86_64-linux-gnu/geany/keyrecord.so;/usr/lib/x86_64-linux-gnu/geany/geanymacro.so;/usr/lib/x86_64-linux-gnu/geany/filebrowser.so;/usr/lib/x86_64-linux-gnu/geany/projectorganizer.so;/usr/lib/x86_64-linux-gnu/geany/saveactions.so;/usr/lib/x86_64-linux-gnu/geany/vimode.so; active_plugins=/usr/lib/x86_64-linux-gnu/geany/addons.so;/usr/lib/x86_64-linux-gnu/geany/autoclose.so;/usr/lib/x86_64-linux-gnu/geany/automark.so;/usr/lib/x86_64-linux-gnu/geany/commander.so;/usr/lib/x86_64-linux-gnu/geany/export.so;/usr/lib/x86_64-linux-gnu/geany/geanyextrasel.so;/usr/lib/x86_64-linux-gnu/geany/htmlchars.so;/usr/lib/x86_64-linux-gnu/geany/geanymacro.so;/usr/lib/x86_64-linux-gnu/geany/filebrowser.so;/usr/lib/x86_64-linux-gnu/geany/projectorganizer.so;/usr/lib/x86_64-linux-gnu/geany/spellcheck.so;/usr/lib/x86_64-linux-gnu/geany/saveactions.so;/usr/lib/x86_64-linux-gnu/geany/vimode.so;
[project] [project]
session_file= 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/Facilitator-App-Native/app/(app)/dashboard.tsx;/home/jaandrle/Vzdálené/GitHub/Facilitator-App-Native/components/SessionList/index.ts;/home/jaandrle/bin/asana.mjs;/home/jaandrle/Stažené/goto_matching_brace-function.txt;/home/jaandrle/.config/geany/filedefs/filetypes.SCSS.conf;/home/jaandrle/.config/geany/filedefs/filetypes.Less.conf;/home/jaandrle/.config/geany/filedefs/filetypes.Vue.conf;/home/jaandrle/Vzdálené/GitHub/deka-dom-el/index.js;/home/jaandrle/Vzdálené/GitHub/Facilitator-App-Native/app.config.ts;/home/jaandrle/Vzdálené/GitHub/deka-dom-el/src/dom.js; 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=-1 current_page=-1

View File

@ -14,9 +14,9 @@ menu_reloadall=
file_openlasttab= file_openlasttab=
menu_quit=<Primary>q menu_quit=<Primary>q
menu_undo=<Primary>z menu_undo=<Primary>z
menu_redo=<Primary>y menu_redo=<Primary><Shift>z
edit_duplicateline=<Primary>d edit_duplicateline=
edit_deleteline=<Primary>k edit_deleteline=
edit_deletelinetoend=<Primary><Shift>Delete edit_deletelinetoend=<Primary><Shift>Delete
edit_deletelinetobegin=<Primary><Shift>BackSpace edit_deletelinetobegin=<Primary><Shift>BackSpace
edit_transposeline= edit_transposeline=
@ -24,7 +24,7 @@ edit_scrolltoline=<Primary><Shift>l
edit_scrolllineup=<Alt>Up edit_scrolllineup=<Alt>Up
edit_scrolllinedown=<Alt>Down edit_scrolllinedown=<Alt>Down
edit_completesnippet=Tab edit_completesnippet=Tab
move_snippetnextcursor= move_snippetnextcursor=<Shift>ISO_Left_Tab
edit_suppresssnippetcompletion= edit_suppresssnippetcompletion=
popup_contextaction= popup_contextaction=
edit_autocomplete=<Primary>space edit_autocomplete=<Primary>space
@ -64,7 +64,7 @@ edit_sendtocmd9=
edit_sendtovte= edit_sendtovte=
format_reflowparagraph=<Primary>j format_reflowparagraph=<Primary>j
edit_joinlines= edit_joinlines=
menu_insert_date=<Shift><Alt>d menu_insert_date=
edit_insertwhitespace= edit_insertwhitespace=
edit_insertlinebefore= edit_insertlinebefore=
edit_insertlineafter= edit_insertlineafter=
@ -140,7 +140,7 @@ switch_compiler=
switch_messages= switch_messages=
switch_scribble=F6 switch_scribble=F6
switch_vte=F4 switch_vte=F4
switch_sidebar= switch_sidebar=<Shift>F2
switch_sidebar_symbol_list= switch_sidebar_symbol_list=
switch_sidebar_doc_list= switch_sidebar_doc_list=
switch_tableft=<Primary>Page_Up switch_tableft=<Primary>Page_Up
@ -171,8 +171,8 @@ switch_head_impl=<Shift><Alt>s
goto_file=<Shift><Alt>g goto_file=<Shift><Alt>g
[commander] [commander]
show_panel=<Primary>semicolon show_panel=
show_panel_commands= show_panel_commands=<Primary>semicolon
show_panel_files= show_panel_files=
[file_browser] [file_browser]
@ -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

@ -1,82 +1,116 @@
# better? defaults
[help]
autocorrect = prompt
[init] [init]
defaultBranch = main defaultBranch = main
[user] [column]
name = Jan Andrle ui = auto
email = andrle.jan@centrum.cz [branch]
signingkey = B3A25AED155AFFAB sort = -committerdate
[credential] [tag]
# see https://stackoverflow.com/questions/5343068/is-there-a-way-to-cache-https-credentials-for-pushing-commits/18362082#18362082 sort = version:refname
helper = /usr/share/doc/git/contrib/credential/libsecret/git-credential-libsecret [status]
[alias] branch = true
# * replaced by git-extras short = true
aliases = !git config -l | grep ^alias | cut -c 7- | sort # List all aliases. Stolen from here: https://twitter.com/TrevorBramble/status/774292970681937920 showStash = true
checkout-default= !git checkout `git branch-default` showUntrackedFiles = all
checkout-default--= !git checkout-default && git branch --delete @{-1} --verbose submoduleSummary = true
branch-default = !git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@' [log]
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)\" date = iso
tags = tag -l --sort=-creatordate --format='%(refname:short): [%(creatordate:short)] %(subject)' [fetch]
# * authors: log-authors = shortlog -ns prune = true
log-list = log --color --graph --pretty=format:'%Cred%h%Creset %Cgreen[%ad] -%C(yellow)%d%Creset %s %C(bold blue)<%an>%Creset' pruneTags = true
log-list-nocolors = log --graph --pretty=format:'%h [%ad] -%d %s <%an>' [push]
status--= !git fetch && git status && echo && echo Commits unpushed: && git log @{push}..HEAD && echo autoSetupRemote = true
commit--= !clear && git status -sb | grep -v -e '^ M' & git commit --interactive -v followTags = true
stashpush = !git stash && git pull && git push && git stash pop recurseSubmodules = on-demand
unstage = reset HEAD -- [pull]
undoall = reset --soft HEAD^ rebase = true
diff-dirs = diff --dirstat --find-copies --find-renames --histogram --color [rerere]
status-submodule = !git submodule --quiet foreach 'git fetch' && git submodule foreach 'git status && echo' enabled = true
# * delete-submodule: rm-submodule = !git submodule deinit -f $1 && rm -rf .git/modules/$1 && git rm -rf $1 autoupdate = true
update-submodule = submodule update --remote --merge [gc]
pull-submodule = submodule foreach 'git pull' reflogExpire = 200
diff-submodule = submodule foreach 'git diff' reflogExpireUnreachable = 90
set-upstream = !git branch --set-upstream-to=origin/`git symbolic-ref --short HEAD` [commit]
push-new=!git push -u origin `git rev-parse --abbrev-ref HEAD` verbose = true
gpgsign = true
template = ~/.config/git/template
[rebase]
autoSquash = true
autoStash = true
updateRefs = true
# my setup
[core] [core]
editor = vim editor = vim
pager = delta pager = delta
whitespace = -trailing-space,-space-before-tab whitespace = -trailing-space,-space-before-tab
[filter "lfs"] compression = 9 # trade cpu for network
clean = git-lfs clean -- %f [alias]
smudge = git-lfs smudge -- %f # * replaced by git-extras
process = git-lfs filter-process # * (alias) aliases = !git config -l | grep ^alias | cut -c 7- | sort # List all aliases. Stolen from here: https://twitter.com/TrevorBramble/status/774292970681937920
required = true branch-default = !git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@'
[status] # * 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)\"
submoduleSummary = true h-branches = !echo 'brv (git-extras)'
tags = tag -l --sort=-creatordate --format='%(refname:short): [%(creatordate:short)] %(subject)'
# * authors: log-authors = shortlog -ns
h-format-htma = !echo '%Cred%h%Creset %Cgreen[%ad] -%C(yellow)%d%Creset %s %C(bold blue)<%an>%Creset'
commit--interactive= !clear && git status && git commit --interactive
h-unstage = !echo reset HEAD --
h-undoall = !echo reset --soft HEAD^
diff-dirs = diff --dirstat --find-copies --find-renames --histogram --color
h-submodule-delete = !echo 'delete-submodule (git-extras)' # * delete-submodule: rm-submodule = !git submodule deinit -f $1 && rm -rf .git/modules/$1 && git rm -rf $1
submodule-update-merge = submodule update --remote --merge
set-upstream-to-current = !git branch --set-upstream-to=origin/`git symbolic-ref --short HEAD`
[diff] [diff]
wsErrorHighlight = all
tool = vimdiff tool = vimdiff
colorMoved = default
submodule = log submodule = log
[merge] algorithm = histogram
tool = vimdiff # https://git-scm.com/docs/git-diff#Documentation/git-diff.txt-code--color-movedltmodegtcode
conflictstyle = diff3 colorMoved = dimmed-zebra
[log] mnemonicPrefix = true
date = iso renames = true
[interactive] [interactive]
diffFilter = delta --color-only diffFilter = delta --color-only
[merge]
tool = vimdiff
conflictstyle = zdiff3
[delta] # [dandavison/delta: A syntax-highlighting pager for git, diff, and grep output](https://github.com/dandavison/delta) [delta] # [dandavison/delta: A syntax-highlighting pager for git, diff, and grep output](https://github.com/dandavison/delta)
syntax-theme= Visual Studio Dark+ syntax-theme= Visual Studio Dark+
navigate = true navigate = true
side-by-side = true side-by-side = true
line-numbers = true line-numbers = true
[gc] [filter "lfs"]
reflogExpire = 200 required = true
reflogExpireUnreachable = 90 clean = git-lfs clean -- %f
[push] smudge = git-lfs smudge -- %f
autoSetupRemote = true process = git-lfs filter-process
[commit] [diff "exif"]
gpgsign = true textconv = exiftool
[rerere] [difftool "kommitdiff"]
enabled = true cmd = kommitdiff \"$LOCAL\" \"$REMOTE\"
[credential "https://github.com"] [mergetool "kommitmerge"]
helper = cmd = kommitmerge \"$BASE\" \"$LOCAL\" \"$REMOTE\" \"$MERGED\"
helper = !/usr/bin/gh auth git-credential trustExitCode = true
[credential "https://gist.github.com"]
helper =
helper = !/usr/bin/gh auth git-credential
[credential "https://git.dhl.com"]
helper =
helper = !/usr/bin/gh auth git-credential
[maintenance] [maintenance]
repo = /home/jaandrle/Vzdálené/GitHub/dcp-fe-container-certifedpassport repo = /home/jaandrle/Vzdálené/GitHub/dcp-fe-container-certifedpassport
repo = /home/jaandrle/Vzdálené/GitHub/DHLC-Internet-Networking-old repo = /home/jaandrle/Vzdálené/GitHub/DHLC-Internet-Networking-old
repo = /home/jaandrle/Vzdálené/GitHub/DGF-Certified-Supervisory-Academy repo = /home/jaandrle/Vzdálené/GitHub/DGF-Certified-Supervisory-Academy
[submodule]
recurse = true
[format]
coverLetter = auto
compactSummary = true
minimal = true
signOff = true
outputDirectory = .patches
thread = shallow
numbered = auto
[am]
# keepcr = true # to preserve line endings
threeWay = true
[include]
path = ./identities/current.conf

View File

@ -0,0 +1,21 @@
[user]
name = Jan Andrle
email = andrle.jan@centrum.cz
signingkey = B3A25AED155AFFAB
[credential]
# see https://stackoverflow.com/questions/5343068/is-there-a-way-to-cache-https-credentials-for-pushing-commits/18362082#18362082
helper = /usr/share/doc/git/contrib/credential/libsecret/git-credential-libsecret
[credential "https://github.com"]
helper = !/usr/bin/gh auth git-credential
[credential "https://gist.github.com"]
helper = !/usr/bin/gh auth git-credential
[credential "https://git.dhl.com"]
helper = !/usr/bin/gh auth git-credential
[sendemail]
anotate = true
smtpserver = smtp.centrum.cz
# chainReplyTo = false
suppresscc = self
smtpuser = andrle.jan@centrum.cz
smtpencryption = ssl
smtpserverport = 465

View File

@ -4,13 +4,13 @@
{ {
"repository": "shiftkey/desktop", "repository": "shiftkey/desktop",
"name": "GitHub Desktop", "name": "GitHub Desktop",
"group": "dev", "group": "skip-dev",
"file_name": "github-desktop", "file_name": "github-desktop",
"exec": "yes", "exec": "yes",
"description": "Fork of GitHub Desktop to support various Linux distributions", "description": "Fork of GitHub Desktop to support various Linux distributions",
"last_update": "2024-07-01T20:15:47Z", "last_update": "2024-08-17T01:47:21Z",
"downloads": "/home/jaandrle/bin/github-desktop", "downloads": "/home/jaandrle/bin/github-desktop",
"version": "release-3.4.2-linux1", "version": "release-3.4.4-linuxbeta2",
"glare": ".*x86_64.*.AppImage" "glare": ".*x86_64.*.AppImage"
}, },
{ {
@ -21,8 +21,8 @@
"exec": "yes", "exec": "yes",
"description": "AI Browser", "description": "AI Browser",
"glare": "AppImage", "glare": "AppImage",
"last_update": "2024-07-17T20:36:36Z", "last_update": "2025-04-01T05:57:12Z",
"version": "2.0.4", "version": "3.8.0",
"downloads": "/home/jaandrle/bin/pinokio" "downloads": "/home/jaandrle/bin/pinokio"
}, },
{ {
@ -41,19 +41,19 @@
"repository": "th-ch/youtube-music", "repository": "th-ch/youtube-music",
"name": "youtube-music", "name": "youtube-music",
"description": "YouTube Music Desktop App bundled with custom plugins (and built-in ad blocker / downloader)", "description": "YouTube Music Desktop App bundled with custom plugins (and built-in ad blocker / downloader)",
"group": "nondev", "group": "skip-nondev",
"file_name": "youtube-music", "file_name": "youtube-music",
"exec": "yes", "exec": "yes",
"last_update": "2024-07-14T15:26:52Z", "last_update": "2024-10-16T11:58:54Z",
"downloads": "/home/jaandrle/bin/youtube-music", "downloads": "/home/jaandrle/bin/youtube-music",
"version": "v3.4.1", "version": "v3.6.2",
"glare": "AppImage" "glare": "AppImage"
}, },
{ {
"repository": "ArchGPT/insomnium", "repository": "ArchGPT/insomnium",
"name": "insomnium", "name": "insomnium",
"description": "Insomnium is a fast local API testing tool that is privacy-focused and 100% local. For testing GraphQL, REST, WebSockets and gRPC. This is a fork of Kong/insomnia", "description": "Insomnium is a fast local API testing tool that is privacy-focused and 100% local. For testing GraphQL, REST, WebSockets and gRPC. This is a fork of Kong/insomnia",
"group": "dev", "group": "skip-dev",
"file_name": "insomnium", "file_name": "insomnium",
"exec": "yes", "exec": "yes",
"last_update": "2023-11-13T10:03:28Z", "last_update": "2023-11-13T10:03:28Z",
@ -62,59 +62,43 @@
"version": "core@0.2.3-a", "version": "core@0.2.3-a",
"glare": "AppImage" "glare": "AppImage"
}, },
{
"repository": "Kong/insomnia",
"name": "insomnia",
"description": "The open-source, cross-platform API client for GraphQL, REST, and gRPC.",
"group": "skip",
"file_name": "insomnia",
"exec": "yes",
"last_update": "2024-04-17T16:38:03Z",
"downloads": "/home/jaandrle/bin/insomnia",
"tag_name_regex": "core@.*",
"version": "core@9.0.0-beta.4",
"glare": "AppImage"
},
{ {
"repository": "rvpanoz/luna", "repository": "rvpanoz/luna",
"name": "luna", "name": "luna",
"description": "Manage npm dependencies through a modern UI.", "description": "Manage npm dependencies through a modern UI.",
"group": "skip", "group": "skip-dev",
"file_name": "luna", "file_name": "luna",
"exec": "yes", "exec": "yes",
"glare": "AppImage" "glare": "AppImage",
"last_update": "2020-10-29T23:06:39Z",
"version": "v.3.4.6",
"downloads": "/home/jaandrle/bin/luna"
}, },
{ {
"repository": "angela-d/wifi-channel-watcher", "repository": "angela-d/wifi-channel-watcher",
"name": "wifi-channel-watcher", "name": "wifi-channel-watcher",
"group": "skip", "group": "skip-nondev",
"file_name": "wifi-channel-watcher", "file_name": "wifi-channel-watcher",
"exec": "no", "exec": "no",
"description": "Monitor channel usage of neighboring routers & get an alert if your active channel is not optimal.\tTroubleshoot wifi without lifting a finger!" "description": "Monitor channel usage of neighboring routers & get an alert if your active channel is not optimal.\tTroubleshoot wifi without lifting a finger!"
}, },
{
"repository": "vinceliuice/Tela-circle-icon-theme",
"name": "Tela-circle-icon-theme",
"description": "Tela-circle-icon-theme",
"group": "skip",
"file_name": "tela-circle-icon-theme.zip",
"last_update": "2021-07-19T14:12:05Z",
"exec": "no"
},
{ {
"repository": "AppImage/AppImageKit", "repository": "AppImage/AppImageKit",
"name": "AppImageKit", "name": "AppImageKit",
"group": "skip", "group": "skip-nondev",
"file_name": "appimagekit", "file_name": "appimagekit",
"exec": "yes", "exec": "yes",
"description": "Package desktop applications as AppImages that run on common Linux-based operating systems, such as RHEL, CentOS, openSUSE, SLED, Ubuntu, Fedora, debian and derivatives. Join #AppImage on irc.freenode.net", "description": "Package desktop applications as AppImages that run on common Linux-based operating systems, such as RHEL, CentOS, openSUSE, SLED, Ubuntu, Fedora, debian and derivatives. Join #AppImage on irc.freenode.net",
"glare": ".*x86_64.*.AppImage" "glare": ".*x86_64.*.AppImage",
"last_update": "2023-03-08T23:25:46Z",
"version": "continuous",
"downloads": "/home/jaandrle/bin/appimagekit"
}, },
{ {
"repository": "dynobo/normcap", "repository": "dynobo/normcap",
"name": "NormCap", "name": "NormCap",
"description": "Switched to flatpak version | OCR powered screen-capture tool to capture information instead of images", "description": "Switched to flatpak version | OCR powered screen-capture tool to capture information instead of images",
"group": "skip", "group": "skip-nondev",
"file_name": "normcap", "file_name": "normcap",
"exec": "yes", "exec": "yes",
"last_update": "2023-12-12T22:23:37Z", "last_update": "2023-12-12T22:23:37Z",
@ -128,35 +112,11 @@
"group": "nondev", "group": "nondev",
"file_name": "upscayl", "file_name": "upscayl",
"exec": "yes", "exec": "yes",
"last_update": "2024-06-01T14:48:20Z", "last_update": "2024-12-25T13:44:34Z",
"downloads": "/home/jaandrle/bin/upscayl", "downloads": "/home/jaandrle/bin/upscayl",
"version": "v2.11.5", "version": "v2.15.0",
"glare": "AppImage" "glare": "AppImage"
}, },
{
"repository": "RasmusLindroth/tut",
"name": "tut",
"description": "TUI for Mastodon with vim inspired keys",
"group": "nondev",
"file_name": "tut",
"exec": "yes",
"last_update": "2023-01-26T17:48:00Z",
"downloads": "/home/jaandrle/bin/tut",
"version": "2.0.1",
"glare": "tut-amd64"
},
{
"repository": "sunner/ChatALL",
"name": "ChatALL",
"description": " Concurrently chat with ChatGPT, Bing Chat, bard, Alpaca, Vincuna, Claude, ChatGLM, MOSS, iFlytek Spark, ERNIE and more, discover the best answers",
"group": "skip",
"file_name": "chatall",
"exec": "yes",
"last_update": "2024-04-14T02:09:42Z",
"downloads": "/home/jaandrle/bin/chatall",
"version": "v1.71.100",
"glare": ".*x86_64.*.AppImage"
},
{ {
"repository": "jaandrle/bs", "repository": "jaandrle/bs",
"name": "bs", "name": "bs",
@ -164,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"
}, },
{ {
@ -174,11 +134,11 @@
"name": "Fedistar", "name": "Fedistar",
"description": "Multi-column Mastodon, Pleroma, and Friendica client for desktop", "description": "Multi-column Mastodon, Pleroma, and Friendica client for desktop",
"group": "nondev", "group": "nondev",
"file_name": "fedistar", "file_name": "fedistar.appimage",
"exec": "yes", "exec": "yes",
"last_update": "2024-07-21T09:19:41Z", "last_update": "2025-04-08T11:56:38Z",
"downloads": "/home/jaandrle/bin/fedistar", "downloads": "/home/jaandrle/bin/fedistar.appimage",
"version": "v1.9.9", "version": "v1.11.3",
"glare": ".*amd64.*.AppImage" "glare": ".*amd64.*.AppImage"
}, },
{ {
@ -188,9 +148,9 @@
"group": "ai", "group": "ai",
"file_name": "ollama", "file_name": "ollama",
"exec": "yes", "exec": "yes",
"last_update": "2024-07-21T18:21:56Z", "last_update": "2025-04-26T09:16:02Z",
"downloads": "/home/jaandrle/bin/ollama", "downloads": "/home/jaandrle/bin/ollama",
"version": "v0.2.8-rc1", "version": "v0.6.7-rc1",
"glare": "linux-amd64" "glare": "linux-amd64"
}, },
{ {
@ -198,23 +158,35 @@
"name": "neovim", "name": "neovim",
"tag_name_regex": "v.*", "tag_name_regex": "v.*",
"description": "Vim-fork focused on extensibility and usability", "description": "Vim-fork focused on extensibility and usability",
"group": "skip", "group": "skip-dev",
"file_name": "nvim", "file_name": "nvim",
"exec": "yes", "exec": "yes",
"downloads": "/home/jaandrle/bin/nvim", "downloads": "/home/jaandrle/bin/nvim",
"version": "v0.9.5", "version": "v0.9.5",
"last_update": "2023-12-30T13:31:47Z" "last_update": "2023-12-30T13:31:47Z"
}, },
{
"repository": "vim/vim-appimage",
"name": "vim",
"description": "AppImage for gVim",
"group": "dev",
"file_name": "vim",
"exec": "yes",
"downloads": "/home/jaandrle/bin/vim",
"version": "v9.1.1355",
"last_update": "2025-04-30T01:25:38Z",
"glare": "GVim.*x86_64.*.AppImage"
},
{ {
"repository": "viarotel-org/escrcpy", "repository": "viarotel-org/escrcpy",
"name": "Escrcpy", "name": "Escrcpy",
"description": "📱 Graphical Scrcpy to display and control Android, devices powered by Electron. | 使用图形化的 Scrcpy 显示和控制您的 Android 设备,由 Electron 驱动。", "description": "📱 Graphical Scrcpy to display and control Android, devices powered by Electron. | 使用图形化的 Scrcpy 显示和控制您的 Android 设备,由 Electron 驱动。",
"group": "dev", "group": "dev",
"file_name": "escrcpy", "file_name": "escrcpy.appimage",
"exec": "yes", "exec": "yes",
"last_update": "2024-07-14T08:47:24Z", "last_update": "2025-04-27T07:04:58Z",
"downloads": "/home/jaandrle/bin/escrcpy", "downloads": "/home/jaandrle/bin/escrcpy.appimage",
"version": "v1.21.4", "version": "v1.29.6",
"glare": ".*x86_64.*.AppImage" "glare": ".*x86_64.*.AppImage"
}, },
{ {
@ -224,9 +196,9 @@
"group": "dev-test", "group": "dev-test",
"file_name": "drovp", "file_name": "drovp",
"exec": "yes", "exec": "yes",
"last_update": "2023-12-06T11:30:02Z", "last_update": "2024-10-06T16:26:38Z",
"downloads": "/home/jaandrle/bin/drovp", "downloads": "/home/jaandrle/bin/drovp",
"version": "0.8.0", "version": "0.8.2",
"glare": "x64.AppImage" "glare": "x64.AppImage"
}, },
{ {
@ -236,9 +208,9 @@
"group": "ai", "group": "ai",
"file_name": "jan", "file_name": "jan",
"exec": "yes", "exec": "yes",
"last_update": "2024-07-15T08:37:42Z", "last_update": "2025-03-24T02:02:04Z",
"downloads": "/home/jaandrle/bin/jan", "downloads": "/home/jaandrle/bin/jan",
"version": "v0.5.2", "version": "v0.5.16",
"glare": ".*x86_64.*.AppImage" "glare": ".*x86_64.*.AppImage"
}, },
{ {
@ -248,10 +220,34 @@
"group": "ai", "group": "ai",
"file_name": "Chatbox", "file_name": "Chatbox",
"exec": "yes", "exec": "yes",
"last_update": "2024-05-15T06:10:47Z", "last_update": "2025-01-14T13:29:06Z",
"downloads": "/home/jaandrle/bin/Chatbox", "downloads": "/home/jaandrle/bin/Chatbox",
"version": "v1.3.10", "version": "v0.10.4",
"glare": ".*x86_64.*.AppImage" "glare": ".*x86_64.*.AppImage"
},
{
"repository": "Martichou/rquickshare",
"group": "nondev",
"name": "r-quick-share",
"description": "Rust implementation of NearbyShare/QuickShare from Android for Linux and macOS.",
"file_name": "r-quick-share",
"exec": "yes",
"downloads": "/home/jaandrle/bin/r-quick-share",
"glare": ".*main.*amd64.AppImage",
"last_update": "2025-02-23T18:15:49Z",
"version": "v0.11.5"
},
{
"repository": "konnektoren/konnektoren-mobile-app",
"group": "nondev",
"name": "Konnektoren",
"description": "Konnektoren Mobile App (learning german) — https://konnektoren.help/home/",
"file_name": "konnektoren",
"exec": "yes",
"downloads": "/home/jaandrle/bin/konnektoren",
"glare": "AppImage",
"last_update": "2025-04-27T07:33:51Z",
"version": "konnektoren-mobile-app-v0.1.4"
} }
] ]
} }

View File

@ -1,39 +0,0 @@
name = "Jan Andrle"
downloads-dir = "~/Stažené"
[centrum]
default = true
email = "andrle.jan@centrum.cz"
imap-host = "imap.centrum.cz"
imap-port = 993
imap-login = "andrle.jan@centrum.cz"
imap-passwd-cmd = "bw get password mail-centrum"
smtp-host = "smtp.centrum.cz"
smtp-port = 465
smtp-login = "andrle.jan@centrum.cz"
smtp-passwd-cmd = "bw get password mail-centrum"
[centrum.mailboxes]
sent = "Odeslan&AOE- po&AWE-ta"
draft = "Koncepty"
[indigo]
email = "jan.andrle@indigo.cz"
imap-host = "imap.gmail.com"
imap-port = 993
imap-login = "jan.andrle@indigo.cz"
imap-passwd-cmd = "bw get password mail-gmail-indigo"
smtp-host = "smtp.gmail.com"
smtp-port = 465
smtp-login = "jan.andrle@indigo.cz"
smtp-passwd-cmd = "bw get password mail-gmail-indigo"
[indigo.mailboxes]
sent = "Odeslan&AOE- po&AWE-ta"
draft = "Koncepty"
# vim: ft=apachestyle cms=#\ %s :

View File

@ -1,8 +0,0 @@
[
{ "type": "text", "value": "Složka 'Příchozí'" },
{ "type": "himalaya", "value": [ "-m", "inbox", "list" ], "label": "inbox" },
{ "type": "text", "value": "Složka 'Hromadná'" },
{ "type": "himalaya", "value": [ "-m", "Hromadn&AOE-", "list" ], "label": "Hromadná" },
{ "type": "text", "value": "Složka 'Práce'" },
{ "type": "himalaya", "value": [ "-m", "_Prace", "list" ], "label": "_Prace" }
]

View File

@ -1,8 +1,8 @@
[General] [General]
ColorScheme=BreezeDark ColorScheme=TUXEDODark
[Icons] [Icons]
Theme=breeze-dark Theme=tuxedo-breeze-dark
[KDE] [KDE]
widgetStyle=Breeze widgetStyle=Breeze

View File

@ -1,2 +0,0 @@
[Greeter]
Theme=org.kde.breezedark.desktop

View File

@ -1,3 +1,3 @@
[KSplash] [KSplash]
Engine=KSplashQML Engine=KSplashQML
Theme=org.kde.breezedark.desktop Theme=org.tuxedodark.desktop

View File

@ -1,6 +1,10 @@
[TabBox]
LayoutName=org.kde.breeze.desktop
[Windows] [Windows]
Placement=Centered Placement=Centered
[org.kde.kdecoration2] [org.kde.kdecoration2]
NoPlugin=false
library=org.kde.breeze library=org.kde.breeze
theme=Breeze theme=Breeze

View File

@ -1 +1 @@
org.kde.breezedark.desktop org.tuxedodark.desktop

View File

@ -1,2 +1,2 @@
[Theme] [Theme]
name=default name=tuxedo-dark

View File

@ -48,6 +48,17 @@
"--help", "--help",
"--version" "--version"
] ]
},
"/home/jaandrle/Vzdálené/GitHub/DGF-Certified-Supervisory-Academy/build/bs/publishModule.mjs": {
"npx": true,
"completions": {},
"completions_all": [
"--lang",
"--division",
"--APP_CODE",
"--help",
"--version"
]
} }
} }
} }

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

@ -1,133 +0,0 @@
/*
* breeze-dark.rasi
* rofi theme inspired by plasma breeze
* MonsieurBedard
*/
* {
/* Base */
default-background: rgba(49, 52, 56, 97.5%); // <- change this for transparency
default-foreground: rgba(239, 240, 241, 100%);
default-border: rgba(97, 101, 105, 100%);
alternative-background: rgba(35, 38, 41, 100%);
invisible: rgba(0, 0, 0, 0%);
/* Colors */
hard-blue: rgba(240, 84, 76, 100%);
light-blue: rgba(240, 84, 76, 25%);
hard-red: rgba(141, 58, 80, 100%);
light-red: rgba(77, 31, 37, 100%);
hard-green: rgba(39, 161, 69, 100%);
light-green: rgba(19, 55, 35, 100%);
/* Universal */
background-color: @invisible;
border-color: @default-border;
font: "Noto Sans 10";
text-color: @default-foreground;
}
#window {
background-color: @default-background;
border: 1;
border-radius: 3;
border-color: @default-border;
padding: 7;
}
#mainbox {
border: 0;
padding: 0;
}
#message {
border: 1;
border-radius: 3;
padding: 5;
background-color: @alternative-background;
}
#textbox {
background-color: @entry-background;
}
#listview {
fixed-height: 0;
spacing: 2;
scrollbar: false;
padding: 2 0 0;
}
#element {
padding: 5;
border: 1;
border-radius: 3;
border-color: @invisible;
}
#element.normal.normal {
background-color: @invisible;
}
#element.normal.urgent {
background-color: @light-red;
}
#element.normal.active {
background-color: @light-green;
}
#element.selected.normal {
background-color: @light-blue;
border-color: @hard-blue;
}
#element.selected.urgent {
background-color: @light-red;
border-color: @hard-red;
}
#element.selected.active {
background-color: @light-green;
border-color: @hard-green;
}
#mode-switcher {
spacing: 0;
}
#button {
border: 0 0 3 0;
border-color: @invisible;
padding: 3;
}
#button.selected {
border-color: @hard-blue;
}
#inputbar {
spacing: 0;
padding: 1;
}
#case-indicator {
spacing: 0;
padding: 3px;
background-color: @alternative-background;
border: 1 1 1 0;
border-radius: 0 2 2 0;
}
#entry {
background-color: @alternative-background;
padding: 3px;
border: 1 0 1 1;
border-radius: 2 0 0 2;
}
#prompt {
padding: 3 7 3 0;
}

View File

@ -1 +0,0 @@
@theme "~/.config/rofi/breeze-dark.rasi"

View File

@ -21,4 +21,11 @@
"command": "git", "command": "git",
"args": { "argv": [ "browse" ] } "args": { "argv": [ "browse" ] }
}, },
{
"caption": "Branch -D --all (delete remote and local branch)",
"command": "delete_branch",
"args": {
"argv": [ true, true, true ]
}
}
] ]

View File

@ -1,3 +1,4 @@
{ {
"draw_white_space": "all" "draw_white_space": "all",
"word_wrap": true,
} }

View File

@ -8,4 +8,6 @@
"side_bar_layout": "tabs", "side_bar_layout": "tabs",
"signature_error_highlighting": "no_public_key", "signature_error_highlighting": "no_public_key",
"theme": "Merge Dark.sublime-theme", "theme": "Merge Dark.sublime-theme",
"expand_merge_commits_by_default": true,
"ignore_diff_white_space": false,
} }

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

@ -1,7 +0,0 @@
[[Accounts]]
Name = 'jaandrle'
Server = 'https://fosstodon.org'
ClientID = 'ggYBuM2y_jtFV_3wR4tGdJUoNh-4ZfVRl1SByK5bihU'
ClientSecret = 'j7ClbSP2UY8syZgV4E-7Kk1bf8Ph_6GQ7szcqVfqDtI'
AccessToken = '1iO5wZL-nXcC3dZGjxNHLcbbFoSZ3fmutno96oD_ZY8'

View File

@ -1,830 +0,0 @@
# Configuration file for tut
[general]
# Shows a confirmation view before actions such as favorite, delete toot, boost
# etc.
# default=true
confirmation=true
# Enable support for using the mouse in tut to select items.
# default=false
mouse-support=false
# Timelines adds windows of feeds. You can customize the number of feeds, what
# they should show and the key to activate them.
#
# Available timelines: home, direct, local, federated, special, bookmarks,
# saved, favorited, notifications, lists, mentions, tag
#
# The one named special are the home timeline with only boosts and/or replies.
#
# Tag is special as you need to add the tag after, see the example below.
#
# The syntax is:
# timelines=feed,[name],[keys...],[showBoosts],[showReplies]
#
# Tha values in brackets are optional. You can see the syntax for keys under the
# [input] section.
#
# showBoosts and showReplies must be formated as bools. So either true or false.
# They always defaults to true.
#
# Some examples:
#
# home timeline with the name Home
# timelines=home,Home
#
# local timeline with the name Local and it gets focus when you press 2. It will
# also hide boosts in the timeline, but show toots that are replies.
# timelines=local,Local,'2',false,true
#
# notification timeline with the name [N]otifications and it gets focus when you
# press n or N
# timelines=notifications,[N]otifications,'n','N'
#
# tag timeline for #linux with the name Linux and it gets focus when you press
# timelines=tag linux,Linux,"F2"
#
#
# If you don't set any timelines it will default to this:
# timelines=home
# timelines=notifications,[N]otifications,'n','N'
#
timelines=lists,Lists,'1'
timelines=home,Home,'2'
timelines=notifications,Notifications,'3'
timelines=tag webdev,Webdev,'4'
# The date format to be used. See https://godoc.org/time#Time.Format
# default=2006-01-02 15:04
date-format=2006-01-02 15:04
# Format for dates the same day. See date-format for more info.
# default=15:04
date-today-format=15:04
# This displays relative dates instead for statuses that are one day or older
# the output is 1y2m1d (1 year 2 months and 1 day)
#
# The value is an integear
# -1 = don't use relative dates
# 0 = always use relative dates, except for dates < 1 day
# 1 - ∞ = number of days to use relative dates
#
# Example: date-relative=28 will display a relative date for toots that are
# between 1-28 days old. Otherwhise it will use the short or long format.
# default=-1
date-relative=-1
# The max width of text before it wraps when displaying toots.
# 0 = no restriction.
# default=0
max-width=0
# Where do you want the list of toots to be placed?
# Valid values: left, right, top, bottom.
# default=left
list-placement=right
# If you have notification-feed set to true you can display it under the main
# list of toots (row) or place it to the right of the main list of toots
# (column).
# default=row
list-split=column
# You can change the proportions of the list view in relation to the content
# view list-proportion=1 and content-proportoin=3 will result in the content
# taking up 3 times more space.
# Must be n > 0
# default=1
list-proportion=2
# See list-proportion
# default=2
content-proportion=1
# Hide notifications of this type. If you have multiple you separate them with a
# comma. Valid types: mention, status, boost, follow, follow_request, favorite,
# poll, edit.
# default=
notifications-to-hide=
# If you always want to quote original message when replying.
# default=false
quote-reply=false
# If you want to show icons in the list of toots.
# default=true
show-icons=true
# If you've learnt all the shortcut keys you can remove the help text and only
# show the key in tui. So it gets less cluttered.
# default=false
short-hints=false
# If you want to display the filter that filtered a toot.
# default=true
show-filter-phrase=true
# If you want to show a message in the cmdbar on how to access the help text.
# default=true
show-help=true
# If you always want tut to jump to the newest post. May ruin your reading
# experience.
# default=false
stick-to-top=false
# If you want to display the username of the person being boosted instead of the
# person that boosted.
# default=false
show-boosted-user=false
# 0 = No terminal title
# 1 = Show title in terminal and top bar
# 2 = Only show terminal title, and no top bar in tut.
# default=0
terminal-title=0
# If you don't want the whole UI to update, and only the text content you can
# set this option to true. This will lead to some artifacts being left on the
# screen when emojis are present. But it will keep the UI from flashing on every
# single toot in some terminals.
# default=true
redraw-ui=true
# The leader is used as a shortcut to run commands as you can do in Vim. By
# default this is disabled and you enable it by setting a leader-key. It can
# only consist of one char and I like to use comma as leader key. So to set it
# you write leader-key=,
# default=
leader-key=
# Number of milliseconds before the leader command resets. So if you tap the
# leader-key by mistake or are to slow it empties all the input after X
# milliseconds.
# default=1000
leader-timeout=1000
# You set actions for the leader-key with one or more leader-action. It consists
# of two parts first the action then the shortcut. And they're separated by a
# comma.
#
# Available commands: blocking, bookmarks, boosts, clear-notifications,
# close-window, compose, direct, edit, favorited, favorites, federated,
# followers, following, history, home, list-placement, list-split, lists, local,
# mentions, move-window-left, move-window-right, move-window-up,
# move-window-down, move-window-home, move-window-end, muting, newer,
# notifications, preferences, profile, proportions, refetch, saved, special-all,
# special-boosts, special-replies, stick-to-top, switch, tag, tags, window
#
# The ones named special-* are the home timeline with only boosts and/or
# replies. All contains both, -boosts only boosts and -replies only replies.
#
# The shortcuts are up to you, but keep them quite short and make sure they
# don't collide. If you have one shortcut that is "f" and an other one that is
# "fav", the one with "f" will always run and "fav" will never run.
#
# Some special leaders:
# tag is special as you need to add the tag after, e.g. tag linux
# window is special as it's a shortcut for switching between the timelines
# you've set under general and they are zero indexed. window 0 = your first
# timeline, window 1 = your second and so on.
# list-placement as it takes the argument top, right, bottom or left
# list-split as it takes the argument column or row
# proportions takes the arguments [int] [int], where the first integer is the
# list and the other content, e.g. proportions 1 3. See list-proportion above
# for more information.
# switch let's you go to a timeline if it already exists, if it doesn't it will
# open the timeline in a new window. The syntax is almost the same as in
# timelines= and is displayed under the examples.
#
# Some examples:
# leader-action=local,lo
# leader-action=lists,li
# leader-action=federated,fed
# leader-action=direct,d
# leader-action=history,h
# leader-action=tag linux,tl
# leader-action=window 0,h
# leader-action=list-placement bottom,b
# leader-action=list-split column,c
# leader-action=proportions 1 3,3
#
# Syntax for switch:
# leader-action=switch feed,shortcut,[name],[showBoosts],[showReplies]
# showBoosts can be either true or false and they are both optional. Here are
# some examples:
#
# leader-action=switch home,h,false,true
# leader-action=switch tag tut,tt
#
[media]
# Your image viewer.
# default=xdg-open
image-viewer=xdg-open
# Open the image viewer in the same terminal as toot. Only for terminal based
# viewers.
# default=false
image-terminal=false
# If images should open one by one e.g. "imv image.png" multiple times. If set
# to false all images will open at the same time like this "imv image1.png
# image2.png image3.png". Not all image viewers support this, so try it first.
# default=true
image-single=true
# If you want to open the images in reverse order. In some image viewers this
# will display the images in the "right" order.
# default=false
image-reverse=false
# Your video viewer.
# default=xdg-open
video-viewer=xdg-open
# Open the video viewer in the same terminal as toot. Only for terminal based
# viewers.
# default=false
video-terminal=false
# If videos should open one by one. See image-single.
# default=true
video-single=true
# If you want your videos in reverse order. In some video apps this will play
# the files in the "right" order.
# default=false
video-reverse=false
# Your audio viewer.
# default=xdg-open
audio-viewer=xdg-open
# Open the audio viewer in the same terminal as toot. Only for terminal based
# viewers.
# default=false
audio-terminal=false
# If audio should open one by one. See image-single.
# default=true
audio-single=true
# If you want to play the audio files in reverse order. In some audio apps this
# will play the files in the "right" order.
# default=false
audio-reverse=false
# Your web browser.
# default=xdg-open
link-viewer=xdg-open
# Open the browser in the same terminal as toot. Only for terminal based
# browsers.
# default=false
link-terminal=false
[open-custom]
# This sections allows you to set up to five custom programs to open URLs with.
# If the url points to an image, you can set c1-name to img and c1-use to imv.
# If the program runs in a terminal and you want to run it in the same terminal
# as tut. Set cX-terminal to true. The name will show up in the UI, so keep it
# short so all five fits.
#
# c1-name=name
# c1-use=program
# c1-terminal=false
#
# c2-name=name
# c2-use=program
# c2-terminal=false
#
# c3-name=name
# c3-use=program
# c3-terminal=false
#
# c4-name=name
# c4-use=program
# c4-terminal=false
#
# c5-name=name
# c5-use=program
# c5-terminal=false
[open-pattern]
# Here you can set your own glob patterns for opening matching URLs in the
# program you want them to open up in. You could for example open Youtube videos
# in your video player instead of your default browser.
#
# You must name the keys foo-pattern, foo-use and foo-terminal, where use is the
# program that will open up the URL. To see the syntax for glob pattern you can
# follow this URL https://github.com/gobwas/glob#syntax. foo-terminal is if the
# program runs in the terminal and should open in the same terminal as tut
# itself.
#
# Example for youtube.com and youtu.be to open up in mpv instead of the browser.
#
# y1-pattern=*youtube.com/watch*
# y1-use=mpv
# y1-terminal=false
#
# y2-pattern=*youtu.be/*
# y2-use=mpv
# y2-terminal=false
[desktop-notification]
# Notification when someone follows you.
# default=false
followers=false
# Notification when someone favorites one of your toots.
# default=false
favorite=false
# Notification when someone mentions you.
# default=false
mention=false
# Notification when someone edits their toot.
# default=false
update=false
# Notification when someone boosts one of your toots.
# default=false
boost=false
# Notification of poll results.
# default=false
poll=true
# Notification when there is new posts in current timeline.
# default=false
posts=false
[style]
# All styles can be represented in their HEX value like #ffffff or with their
# name, so in this case white. The only special value is "default" which equals
# to transparent, so it will be the same color as your terminal.
#
# You can also use xrdb colors like this xrdb:color1 The program will use colors
# prefixed with an * first then look for URxvt or XTerm if it can't find any
# color prefixed with an asterisk. If you don't want tut to guess the prefix you
# can set the prefix yourself. If the xrdb color can't be found a preset color
# will be used. You'll have to set theme=none for this to work.
# The xrdb prefix used for colors in .Xresources.
# default=guess
xrdb-prefix=guess
# You can use some themes that comes bundled with tut. Check out the themes
# available on the URL below. If a theme is named "nord.ini" you just write
# theme=nord
#
# https://github.com/RasmusLindroth/tut/tree/master/config/themes
#
# You can also create a theme file in your config directory e.g.
# ~/.config/tut/themes/foo.ini and then set theme=foo.
#
# If you want to use your own theme but don't want to create a new file, set
# theme=none and then you can create your own theme below.
# default=default
theme=default
# The background color used on most elements.
# default=
background=
# The text color used on most of the text.
# default=
text=
# The color to display subtle elements or subtle text. Like lines and help text.
# default=
subtle=
# The color for errors or warnings
# default=
warning-text=
# This color is used to display username.
# default=
text-special-one=
# This color is used to display username and key hints.
# default=
text-special-two=
# The color of the bar at the top
# default=
top-bar-background=
# The color of the text in the bar at the top.
# default=
top-bar-text=
# The color of the bar at the bottom
# default=
status-bar-background=
# The color of the text in the bar at the bottom.
# default=
status-bar-text=
# The color of the bar at the bottom in view mode.
# default=
status-bar-view-background=
# The color of the text in the bar at the bottom in view mode.
# default=
status-bar-view-text=
# The color of the text in the command bar at the bottom.
# default=
command-text=
# Background of selected list items.
# default=
list-selected-background=
# The text color of selected list items.
# default=
list-selected-text=
# The background color of selected list items that are out of focus.
# default=
list-selected-inactive-background=
# The text color of selected list items that are out of focus.
# default=
list-selected-inactive-text=
# The main color of the text for key hints
# default=
controls-text=
# The highlight color of for key hints
# default=
controls-highlight=
# The background color in dropdowns and autocompletions
# default=
autocomplete-background=
# The text color in dropdowns at autocompletions
# default=
autocomplete-text=
# The background color for selected value in dropdowns and autocompletions
# default=
autocomplete-selected-background=
# The text color for selected value in dropdowns and autocompletions
# default=
autocomplete-selected-text=
# The background color on selected button and the text color of unselected
# buttons
# default=
button-color-one=
# The text color on selected button and the background color of unselected
# buttons
# default=
button-color-two=
# The background on named timelines.
# default=
timeline-name-background=
# The text color on named timelines
# default=
timeline-name-text=
[input]
# You can edit the keys for tut below.
#
# The syntax is a bit weird, but it works. And I'll try to explain it as well as
# I can.
#
# Example:
# status-favorite="[F]avorite","Un[F]avorite",'f','F'
# status-delete="[D]elete",'d','D'
#
# status-favorite and status-delete differs because favorite can be in two
# states, so you will have to add two key hints.
# Most keys will only have on key hint. Look at the default value for reference.
#
# Key hints must be in some of the following formats. Remember the quotation
# marks.
# "" = empty
# "[D]elete" = Delete with a highlighted D
# "Un[F]ollow" = UnFollow with a highlighted F
# "[Enter]" = Enter where everything is highlighted
# "Yan[K]" = YanK with a highlighted K
#
# After the hint (or hints) you must set the keys. You can do this in two ways,
# with single quotation marks or double ones.
#
# The single ones are for single chars like 'a', 'b', 'c' and double marks are
# for special keys like "Enter". Remember that they are case sensitive.
#
# To find the names of special keys you have to go to the following site and
# look for "var KeyNames = map[Key]string{"
#
# https://github.com/gdamore/tcell/blob/master/key.go
# Keys for moving down
# default="",'j','J',"Down"
global-down="",'j','J',"Down"
# Keys for moving up
# default="",'k','K',"Up"
global-up="",'k','K',"Up"
# To select items
# default="","Enter"
global-enter="","Enter"
# To go back
# default="[Esc]","Esc"
global-back="[Backspace]","Backspace2"
# To go back and exit Tut
# default="[Q]uit",'q','Q'
global-exit="[Q]uit",'q','Q'
# Move to the top
# default="",'g',"Home"
main-home="",'g',"Home"
# Move to the bottom
# default="",'G',"End"
main-end="",'G',"End"
# Go to previous feed
# default="",'h','H',"Left"
main-prev-feed="",'h','H',"Left"
# Go to next feed
# default="",'l','L',"Right"
main-next-feed="",'l','L',"Right"
# Focus on the previous feed window
# default="","Backtab"
main-prev-window="","Backtab"
# Focus on the next feed window
# default="","Tab"
main-next-window="","Tab"
# Focus on the notification list
# default="[N]otifications",'n','N'
main-notification-focus="[N]otifications",'n','N'
# Compose a new toot
# default="",'c','C'
main-compose="",'c','C'
# Open avatar
# default="[A]vatar",'a','A'
status-avatar="[A]vatar",'a','A'
# Boost a toot
# default="[B]oost","Un[B]oost",'b','B'
status-boost="[B]oost","Un[B]oost",'b','B'
# Edit a toot
# default="[E]dit",'e','E'
status-edit="[E]dit",'E'
# Delete a toot
# default="[D]elete",'d','D'
status-delete="[D]elete",'d','D'
# Favorite a toot
# default="[F]avorite","Un[F]avorite",'f','F'
status-favorite="[F]avorite","Un[F]avorite",'f','F'
# Open toots media files
# default="[M]edia",'m','M'
status-media="M[e]dia",'e'
# Open links
# default="[O]pen",'o','O'
status-links="[O]pen",'o','O'
# Open poll
# default="[P]oll",'p','P'
status-poll="Pol[l]",'l'
# Reply to toot
# default="[R]eply",'r','R'
status-reply="[R]eply",'r','R'
# Save/bookmark a toot
# default="[S]ave","Un[S]ave",'s','S'
status-bookmark="[S]ave","Un[S]ave",'s','S'
# View thread
# default="[T]hread",'t','T'
status-thread="[T]hread",'t','T'
# Open user profile
# default="[U]ser",'u','U'
status-user="[P]rofile",'p','P'
# Open the view mode
# default="[V]iew",'v','V'
status-view-focus="[V]iew",'v','V'
# Yank the url of the toot
# default="[Y]ank",'y','Y'
status-yank="[Y]ank",'y','Y'
# Show the content in a content warning
# default="Press [Z] to toggle cw",'z','Z'
status-toggle-cw="Press [x] to toggle cw",'x','X'
# Show the content of a filtered toot
# default="Press [Z] to view filtered toot",'z','Z'
status-show-filtered="Press [x] to view filtered toot",'x','X'
# View avatar
# default="[A]vatar",'a','A'
user-avatar="[A]vatar",'a','A'
# Block the user
# default="[B]lock","Un[B]lock",'b','B'
user-block="[B]lock","Un[B]lock",'b','B'
# Follow user
# default="[F]ollow","Un[F]ollow",'f','F'
user-follow="Follo[w]","UnFollo[w]",'w','W'
# Follow user
# default="Follow [R]equest","Follow [R]equest",'r','R'
user-follow-request-decide="Follow [R]equest","Follow [R]equest",'r','R'
# Mute user
# default="[M]ute","Un[M]ute",'m','M'
user-mute="[M]ute","Un[M]ute",'m','M'
# Open links
# default="[O]pen",'o','O'
user-links="[O]pen",'o','O'
# View user profile
# default="[U]ser",'u','U'
user-user="[P]rofile",'p','P'
# Open view mode
# default="[V]iew",'v','V'
user-view-focus="[V]iew",'v','V'
# Yank the user URL
# default="[Y]ank",'y','Y'
user-yank="[Y]ank",'y','Y'
# Open list
# default="[O]pen",'o','O'
list-open-feed="[O]pen",'o','O'
# List all users in a list
# default="[U]sers",'u','U'
list-user-list="[U]sers",'u','U'
# Add user to list
# default="[A]dd",'a','A'
list-user-add="[A]dd",'a','A'
# Delete user from list
# default="[D]elete",'d','D'
list-user-delete="[D]elete",'d','D'
# Open URL
# default="[O]pen",'o','O'
link-open="[O]pen",'o','O'
# Yank the URL
# default="[Y]ank",'y','Y'
link-yank="[Y]ank",'y','Y'
# Open tag feed
# default="[O]pen",'o','O'
tag-open-feed="[O]pen",'o','O'
# Toggle follow on tag
# default="[F]ollow","Un[F]ollow",'f','F'
tag-follow="[F]ollow","Un[F]ollow",'f','F'
# Edit content warning text on new toot
# default="[C]W text",'c','C'
compose-edit-cw="[C]W text",'c','C'
# Edit the text on new toot
# default="[E]dit text",'e','E'
compose-edit-text="[E]dit text",'e','E'
# Include a quote when replying
# default="[I]nclude quote",'i','I'
compose-include-quote="[I]nclude quote",'i','I'
# Focus on adding media to toot
# default="[M]edia",'m','M'
compose-media-focus="[M]edia",'m','M'
# Post the new toot
# default="[P]ost",'p','P'
compose-post="[P]ost",'p','P'
# Toggle content warning on toot
# default="[T]oggle CW",'t','T'
compose-toggle-content-warning="[T]oggle CW",'t','T'
# Edit the visibility on new toot
# default="[V]isibility",'v','V'
compose-visibility="[V]isibility",'v','V'
# Edit the language of a toot
# default="[L]ang",'l','L'
compose-language="[L]ang",'L'
# Switch to creating a poll
# default="P[O]ll",'o','O'
compose-poll="Pol[l]",'l'
# Delete media file
# default="[D]elete",'d','D'
media-delete="[D]elete",'d','D'
# Edit the description on media file
# default="[E]dit desc",'e','E'
media-edit-desc="[E]dit desc",'e','E'
# Add a new media file
# default="[A]dd",'a','A'
media-add="[A]dd",'a','A'
# Vote on poll
# default="[V]ote",'v','V'
vote-vote="[V]ote",'v','V'
# Select item to vote on
# default="[Enter] to select",' ', "Enter"
vote-select="[Enter] to select",' ', "Enter"
# Add a new poll option
# default="[A]dd",'a','A'
poll-add="[A]dd",'a','A'
# Edit a poll option
# default="[E]dit",'e','E'
poll-edit="[E]dit",'e','E'
# Delete a poll option
# default="[D]elete",'d','D'
poll-delete="[D]elete",'d','D'
# Toggle voting on multiple options
# default="Toggle [M]ultiple",'m','M'
poll-multi-toggle="Toggle [M]ultiple",'m','M'
# Change the expiration of poll
# default="E[X]pires",'x','X'
poll-expiration="E[X]pires",'x','X'
# Change display name
# default="[N]ame",'n','N'
preference-name="[N]ame",'n','N'
# Change default visibility of toots
# default="[V]isibility",'v','V'
preference-visibility="[V]isibility",'v','V'
# Change bio in profile
# default="[B]io",'b','B'
preference-bio="[B]io",'b','B'
# Save your preferences
# default="[S]ave",'s','S'
preference-save="[S]ave",'s','S'
# Edit profile fields
# default="[F]ields",'f','F'
preference-fields="[F]ields",'f','F'
# Add new field
# default="[A]dd",'a','A'
preference-fields-add="[A]dd",'a','A'
# Edit current field
# default="[E]dit",'e','E'
preference-fields-edit="[E]dit",'e','E'
# Delete current field
# default="[D]elete",'d','D'
preference-fields-delete="[D]elete",'d','D'

File diff suppressed because it is too large Load Diff

View File

@ -27,19 +27,18 @@
"" #region G General "" #region G General
" set vicmd=elvis\ -G\ termcap | " set vicmd=vile " set vicmd=elvis\ -G\ termcap | " set vicmd=vile
set vicmd=vim set vicmd=vim
"set vimhelp
command! README :!vim ~/Dokumenty/GitHub/dotfiles/vifm/README.md command! README :!vim ~/Dokumenty/GitHub/dotfiles/vifm/README.md
command! Help :!vim ~/.config/vifm/vifm-help.txt command! Help :!vim ~/.config/vifm/vifm-help.txt
map <f1> :Help<cr> map <f1> :Help<cr>
cabbrev help Help " cabbrev help Help
set vimhelp
if !has('win') if !has('win')
set fusehome=/tmp/vifm_FUSE set fusehome=/tmp/vifm_FUSE
set slowfs=curlftpfs set slowfs=curlftpfs
endif endif
set syscalls norunexec set syscalls norunexec
" Automatically resolve symbolic links on l or Enter. " Automatically resolve symbolic links on l or Enter.
set nofollowlinks set notrash
set trash
nmap dd :!trash %"f<cr> nmap dd :!trash %"f<cr>
nmap d? :exe "!clear && echo 'Native system trash (`trash-cli`): use `trash`|`trash-empty`|`trash-list`|`trash-put`|`trash-restore`|`trash-rm`' && trash-list | sort -r" | shell<cr> nmap d? :exe "!clear && echo 'Native system trash (`trash-cli`): use `trash`|`trash-empty`|`trash-list`|`trash-put`|`trash-restore`|`trash-rm`' && trash-list | sort -r" | shell<cr>
set history=100 undolevels=100 set history=100 undolevels=100
@ -280,7 +279,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
@ -291,15 +290,15 @@
fileviewer <video/*>,<audio/*> mediainfo %c fileviewer <video/*>,<audio/*> mediainfo %c
endif endif
" #endregion FmediaBin " #endregion FmediaBin
fileviewer .*/,*/ tree %c -L 3 & fileviewer .*/,*/ tree %c -L 3 -C &
fileviewer ../ tree %c -L 1 & fileviewer ../ tree %c -L 1 -C &
fileviewer *.js,*.mjs,*.ts,*.sh, fileviewer *.js,*.mjs,*.ts,*.sh,
\*.css,*.scss, \*.css,*.scss,
\*.php, \*.php,
\*.md,*.html, \*.md,*.html,
\*.json,*.xml \*.json,*.xml
\ env -uCOLORTERM bat --color always --theme 'Visual Studio Dark+' --wrap never --pager never --tabs 2 %c -p \ env -uCOLORTERM batcat --color always --theme 'Visual Studio Dark+' --wrap never --pager never --tabs 2 %c -p
fileviewer <text/x-*>,<application/*> env -uCOLORTERM bat --color always --theme 'Visual Studio Dark+' --wrap never --pager never --tabs 2 %c -p fileviewer <text/x-*>,<application/*> env -uCOLORTERM batcat --color always --theme 'Visual Studio Dark+' --wrap never --pager never --tabs 2 %c -p
" #endregion F " #endregion F
" #region S sS keys " #region S sS keys
nnoremap sf :file & nnoremap sf :file &

50
.ctags
View File

@ -1,5 +1,51 @@
--exclude=node_modules --exclude="*/node_modules/*"
--exclude=gulp --exclude=*.min.js
--exclude=*.min.css
--exclude=*.map
--exclude=.backup
--exclude=.sass-cache
--exclude=vendors
--exclude=.git
--langdef=css
--langmap=css:.css
--langmap=css:+.styl
--langmap=css:+.less
--regex-css=/^[ \t]*\.([A-Za-z0-9_-]+)/\1/c,class,classes/
--regex-css=/^[ \t]*#([A-Za-z0-9_-]+)/\1/i,id,ids/
--regex-css=/^[ \t]*(([A-Za-z0-9_-]+[ \t\n,]+)+)\{/\1/t,tag,tags/
--regex-css=/^[ \t]*@media\s+([A-Za-z0-9_-]+)/\1/m,media,medias/
--langdef=scss
--langmap=scss:.sass
--langmap=scss:+.scss
--regex-scss=/^[ \t]*@mixin ([A-Za-z0-9_-]+)/\1/m,mixin,mixins/
--regex-scss=/^[ \t]*@function ([A-Za-z0-9_-]+)/\1/f,function,functions/
--regex-scss=/^[ \t]*\$([A-Za-z0-9_-]+)/\1/v,variable,variables/
--regex-scss=/^([A-Za-z0-9_-]*)*\.([A-Za-z0-9_-]+) *[,{]/\2/c,class,classes/
--regex-scss=/^[ \t]+\.([A-Za-z0-9_-]+) *[,{]/\1/c,class,classes/
--regex-scss=/^(.*)*\#([A-Za-z0-9_-]+) *[,{]/\2/i,id,ids/
--regex-scss=/^[ \t]*#([A-Za-z0-9_-]+)/\1/i,id,ids/
--regex-scss=/(^([A-Za-z0-9_-])*([A-Za-z0-9_-]+)) *[,|\{]/\1/t,tag,tags/
--regex-scss=/(^([^\/\/])*)[ \t]+([A-Za-z0-9_-]+)) *[,|\{]/\3/t,tag,tags/
--regex-scss=/(^(.*, *)([A-Za-z0-9_-]+)) *[,|\{]/\3/t,tag,tags/
--regex-scss=/(^[ \t]+([A-Za-z0-9_-]+)) *[,|\{]/\1/t,tag,tags/
--regex-scss=/^[ \t]*@media\s+([A-Za-z0-9_-]+)/\1/d,media,media/
--langdef=stylus
--langmap=stylus:.styl
--regex-stylus=/^[ \t]*\.([A-Za-z0-9_-]+)/\1/c,class,classes/
--regex-stylus=/^[ \t]*#([A-Za-z0-9_-]+)/\1/i,id,ids/
--regex-stylus=/^[ \t]*(([A-Za-z0-9_-]+[ \t\n,]+)+)\{/\1/t,tag,tags/
--regex-stylus=/^[ \t]*@media\s+([A-Za-z0-9_-]+)/\1/m,media,medias/
--langdef=markdown
--langmap=markdown:.md
--regex-markdown=/^# (<.*>)?(.+)/\2/i,h1/
--regex-markdown=/^## (<.*>)?(.+)/\2/i,h2/
--regex-markdown=/^### (<.*>)?(.+)/\2/i,h3/
--langdef=js
--langmap=javascript:.js.es6.es.jsx.mjs --langmap=javascript:.js.es6.es.jsx.mjs
--javascript-kinds=-c-f-m-p-v --javascript-kinds=-c-f-m-p-v

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
@ -14,3 +14,6 @@ Parent=FALLBACK/
[Scrolling] [Scrolling]
HistoryMode=2 HistoryMode=2
ScrollBarPosition=2 ScrollBarPosition=2
[Terminal Features]
BellMode=1

View File

@ -1,5 +0,0 @@
# Newsboat
[newsboat/newsboat: An RSS/Atom feed reader for text terminals](https://github.com/newsboat/newsboat)
## Related files
- [./\*](./)

View File

@ -1,60 +0,0 @@
# for inspiration https://github.com/gpakosz/.newsboat/blob/master/config
auto-reload yes
reload-time 90
reload-threads 11
always-display-description true
error-log "~/.newsboat/error.log"
keep-articles-days 30
prepopulate-query-feeds yes
# confirm-mark-all-feeds-read no
player vlc
browser "xdg-open"
macro p set browser "vlc %u" ; open-in-browser ; set browser "xdg-open"
macro e set browser "vim ~/.newsboat/config" ; open-in-browser ; set browser "xdg-open"
color background color8 default bold
color info default color234
color listnormal default default
color listfocus color188 color234
color listnormal_unread color187 default
color listfocus_unread color179 default
search-highlight-colors color179 default
highlight article "^(Feed|Author|Title|Date|Link): .*$" color117 default
highlight articlelist "/date .\{4\}-.\{2\}-.\{2\} .\{2\}:.\{2\}" color43 default
highlight articlelist "/size \[^ \]*" color64 default
highlight articlelist "/feed .*$" color151 default
highlight-article "age > 1 and unread == \"no\"" color245 default
feedlist-format ":%-4i %-5U %?T?↓ &?%t"
articlelist-format ":%-4i %f %?T?%-3T|?%t /date %D /size %-4L %?T?/feed %T?%"
text-width 90
datetime-format "%Y-%m-%d %H:%M"
bind-key ; cmdline
unbind-key q
bind-key j down
bind-key k up
bind-key J next-feed articlelist
bind-key K prev-feed articlelist
bind-key h quit
bind-key LEFT quit
bind-key l open
bind-key RIGHT open
bind-key g home
bind-key G end
bind-key a toggle-article-read
bind-key n next-unread
unbind-key p
bind-key N prev-unread
bind-key s sort
bind-key S rev-sort
bind-key U show-urls
unbind-key ^B
bind-key m bookmark
# TODO: replace with nocodb
bookmark-cmd "~/bin/pocket-sh-add.sh"
bookmark-autopilot yes
# vim: ft=apachestyle cms=#\ %s :

View File

@ -1,22 +0,0 @@
#!/usr/bin/env nodejsscript
/* jshint esversion: 11,-W097, -W040, module: true, node: true, expr: true, undef: true *//* global echo, $, pipe, s, fetch, cyclicLoop */
import { html2rss } from './html2rss.mjs';
/** @typedef {import('./html2rss.mjs').T_RSSITEM} T_RSSITEM */
html2rss($[1], $[2], articles)
.then(pipe( echo, $.exit.bind(null, 0)));
/**
* @param {string} response
* @returns {T_RSSITEM[]}
* */
function articles(response){
const links= Array.from(response.matchAll(/vcard__link" href="([^"]*)"/g)).map(pluckFound);
const dates= Array.from(response.matchAll(/vcard__publish[^>]*>([^<]*)</g)).map(pluckFound).map(toISO);
return Array.from(response.matchAll(/<h3[^>]*>([^<]*)</g))
.map(pluckFound)
.filter(Boolean)
.map(function(title, i){ return { title, link: links[i], date: dates[i] }; });
/** @param {string} date */
function toISO(date){ return date.split(". ").reverse().map(d=> d.padStart(2, "0")).join("-")+"T00:00:00.000Z"; }
function pluckFound([ _, found]){ return found; }
}

View File

@ -1,39 +0,0 @@
#!/usr/bin/env nodejsscript
/* jshint esversion: 11,-W097, -W040, module: true, node: true, expr: true, undef: true *//* global echo, $, pipe, s, fetch, cyclicLoop */
/**
* @typedef T_RSSITEM
* @type {{ title: string, link: string, date: string }}
* */
/**
* @param {string} title
* @param {string} url
* @param {(response: string)=> T_RSSITEM[]} parseItems
* @returns {Promise<string>}
* */
export function html2rss(title, url, parseItems){
return fetch(url)
.then(response=> response.text())
.then(pipe( parseItems, toRSS ));
function toRSS(items){
const articles_rss= items.map(function({ title, date, link }){
return [
"<item>",
"<title>"+title+"</title>",
"<link>"+link+"</link>",
"<updated>"+date+"</updated>",
"</item>"
].join("\n");
});
return [
`<?xml version="1.0" encoding="UTF-8" ?>`,
`<rss version="2.0">`,
"<channel>",
`<title>${title}</title>`,
`<link>${url}</link>`,
...articles_rss,
"</channel>",
"</rss>"
].join("\n");
}
}

View File

@ -1,222 +0,0 @@
https://www.youtube.com/feeds/videos.xml?channel_id=UCMiyV_Ib77XLpzHPQH_q0qQ video
https://www.youtube.com/feeds/videos.xml?channel_id=UCVls1GmFKf6WlTraIb_IaJg video
https://www.youtube.com/feeds/videos.xml?channel_id=UCACJQqtYw6sASWAHXWkBWpw ! video
https://www.youtube.com/feeds/videos.xml?channel_id=UC0398rTdnjLI1V_QypTEP4g ! video
https://www.youtube.com/feeds/videos.xml?playlist_id=PLCKZKxlikAKzhux_uS3BZgejHhYk8yOYO ! video
https://www.youtube.com/feeds/videos.xml?channel_id=UCPeHT7xKjaw_-8hHW0GEXLg ! video
https://www.youtube.com/feeds/videos.xml?channel_id=UCD9L1HvpYpmZ8rrXABARCRQ ! video
https://www.youtube.com/feeds/videos.xml?channel_id=UCONH73CdRXUjlh3-DdLGCPw ! video
"exec:~/.newsboat/html2rss-streamCZ.mjs 'Kokoti na neděli' 'https://www.stream.cz/kokoti-na-nedeli'" ! video
"exec:~/.newsboat/html2rss-streamCZ.mjs 'Šťastné pondělí' 'https://www.stream.cz/stastne-pondeli'" !
"query:Šťastné pondělí:title =~ \"Šťastné pondělí\" and feedtitle == \"Šťastné pondělí\"" video
"query:📹:tags # \"video\""
https://www.mfcr.cz/cs/rss/vydali-jsme-k-hospodareni-statu ! stát
https://www.sporicidluhopisycr.cz/cs/rss/aktuality ! stát
http://www.vlada.cz/cs/urad/RSS/rss.xml ! stát
https://mastodonczech.cz/@SpravedlnostCZ.rss ! stát
https://zpravobot.news/@NUKIB_CZ.rss ! stát
https://www.ceskezajmy.eu/feed/ ! stát
https://poladprahu.cz/category/novinky/feed/ ! stát
https://sdilenedomy.cz/feed/ ! stát
"query:📒:tags # \"stát\""
https://www.irozhlas.cz/rss/irozhlas ! news
https://denikn.cz/feed?ref=inc ! news
# Voxpot Klub
https://kill-the-newsletter.com/feeds/qghk07pleeqa2hiy6054.xml ! news
https://www.voxpot.cz/feed/ ! news
https://www.investigace.cz/feed/ ! news
# PageNotFound.CZ
https://kill-the-newsletter.com/feeds/rblo6you9l4fpbgs3i53.xml ! news
https://gitea.jaandrle.cz/jaandrle/pagenotfound-cli/raw/branch/main/rss.xml
"query:📰👋:tags # \"news\""
https://denikn.cz/veda/feed?ref=inc ! news/science
"query:Petr Koubský:author = \"Petr Koubský\"" news/science
https://vedator.org/feed/ ! news/science
# TODO: https://www.threads.net/@vedator_cz
http://feeds.feedburner.com/Backreaction ! news/science
https://www.osel.cz/rss/rss.php ! news/science
https://news.mit.edu/rss/feed ! news/science
https://news.mit.edu/rss/research ! news/science
https://nautil.us/feed/ ! news/science
# ? tw PatrikKorenar → patreon, https://www.instagram.com/patrikkorenar
"query:📰🔬:tags # \"news/science\""
https://www.lupa.cz/rss/clanky/ ! news/tech
https://www.root.cz/rss/zpravicky/ ! news/tech
https://www.root.cz/rss/clanky/ ! news/tech
"query: Root Softwarová sklizeň:title =~ \"^Softwarová sklizeň\" and rssurl == \"https://www.root.cz/rss/clanky/\"" news/tech
https://zdrojak.cz/feed/ ! news/tech
https://www.vzhurudolu.cz/rss ! news/tech
https://anuradha.hashnode.dev/rss.xml ! news/tech
https://lea.verou.me/feed.xml ! news/tech
https://developer.mozilla.org/en-US/blog/rss.xml ! news/tech
# mozilla.ai
https://kill-the-newsletter.com/feeds/9a4r1e63xui0n5ozxs3j.xml ! news/tech
https://www.omgubuntu.co.uk/feed ! news/tech
https://servis.idnes.cz/rss.aspx?c=technet ! news/tech
"query:📰💻💡:tags # \"news/tech\""
https://news.ycombinator.com/rss "~📰👋💻💡 Hackernews"
https://lemmy.kde.social/feeds/c/kde.xml?sort=Active ! lemmy
https://beehaw.org/feeds/c/science.xml?sort=Active ! lemmy
https://lemmy.ml/feeds/c/firefox.xml?sort=Active ! lemmy
https://lemmy.ml/feeds/c/vim.xml?sort=Active ! lemmy
https://lemmy.ml/feeds/c/css.xml?sort=Active ! lemmy
https://lemmy.ml/feeds/c/javascript.xml?sort=Active ! lemmy
https://lemmy.ml/feeds/c/kde.xml?sort=Active ! lemmy
"query:📰👋💻💡 Lemmy:tags # \"lemmy\""
https://github.com/jordwalke.atom ! twitter/α
https://gts.eilhart.cz/@kayla/feed.rss ! twitter/α
# TODO: https://www.threads.net/@annie.tumova
# TODO: https://www.threads.net/@filip.titlbach
https://www.youtube.com/feeds/videos.xml?channel_id=UCVHFbqXqoYvEWM1Ddxl0QDg ! twitter/α_hide
"query:#TheAndroidShow:title =~ \"^#TheAndroidShow\" and rssurl == \"https://www.youtube.com/feeds/videos.xml?channel_id=UCVHFbqXqoYvEWM1Ddxl0QDg\"" twitter/α
# TODO: https://ubuntuunity.org/blog/
https://blog.neon.kde.org/feed/ ! twitter/α
https://undinealmani.com/feed/ ! twitter/α
https://techhub.social/@erikengheim.rss ! twitter/α
https://github.com/justin-schroeder.atom ! twitter/α
# TODO: @jpschroeder@fosstodon.org
https://mastodon.social/@firt.rss ! twitter/α
https://princiya.com/feed/ ! twitter/α
https://davidwalsh.name/feed ! twitter/α
https://jecas.cz/rss ! twitter/α
# JanKoWeb geekovo zdrojak
"query:📰👋💻💡 Twitter/α:tags # \"twitter/α\""
# TODO: https://www.threads.net/@Zeptej_se_vedce
# TODO: https://www.threads.net/@oliniumchemistry
# TODO: https://www.threads.net/@narodnitymzen
https://mindly.social/@adrianacerna.rss ! twitter/mixed
https://olgarichterova.cz/feed/ ! twitter/mixed
https://faktaoklimatu.cz/feed.xml ! twitter/mixed
https://www.youtube.com/feeds/videos.xml?channel_id=UCtYxnvekc2-3P74TdLx0srQ ! twitter/mixed
# https://genderaveda.cz/
https://kill-the-newsletter.com/feeds/c6e1z94wpw0eds67.xml ! twitter/mixed
# FZU_AVCR
https://kill-the-newsletter.com/feeds/39xfn7p1cvf8dif4.xml ! twitter/mixed
# AVCR
https://kill-the-newsletter.com/feeds/5tww0ecg9y4twnxz.xml ! twitter/mixed
https://mastodonczech.cz/@ewajelinek.rss ! twitter/mixed
# TODO: https://www.threads.net/@claireklingenberg
# TODO: https://www.threads.net/@pavlahubalkova
# TODO: https://www.threads.net/@popdetective
https://zpravobot.news/@dan_prokop.rss ! twitter/mixed
https://www.paqresearch.cz/studie-a-clanky/rss/ ! twitter/mixed
https://archetypal.cz/feed/ ! twitter/mixed
# TODO: https://www.threads.net/@mariehermanova
# Sociologicky
https://kill-the-newsletter.com/feeds/xmub9gn72ecekvbi.xml ! twitter/mixed
https://www.mimoagendu.cz/rss/ ! twitter/mixed
# TODO: https://www.threads.net/@barasoukup
# PulseofEuropeCZ KohoVolitEU
"query:📰👋💻💡 Twitter/mixed:tags # \"twitter/mixed\""
https://us8.campaign-archive.com/feed?u=5ec4c91d59d1b26aefb919e61&id=2ebe3120ac ! newsletters
# UX that actually works in 3 minutes or less
https://kill-the-newsletter.com/feeds/mx8wi1fifxu6scj8.xml ! newsletters
# Lékaři bez hranic
https://kill-the-newsletter.com/feeds/9l096daq56dxjw3z.xml ! newsletters
https://denikn.cz/autor/toman/feed/ ! newsletters
https://denikn.cz/tag/vylety-n/feed/ ! newsletters
https://denikn.cz/tag/evropska-unie/feed/ ! newsletters
"query:🗞️📰💡 Newsletters:tags # \"newsletters\""
https://botsin.space/@randomMDN.rss dev/servises
https://github.com/evanw/esbuild/releases.atom ! dev/servises
https://bun.sh/rss.xml ! dev/servises
https://www.githubstatus.com/history.rss ! dev/servises
https://developer.apple.com/news/rss/news.rss "~Apple Dev News" dev/servises
https://cordova.apache.org/feed.xml ! twitter/α
https://www.mozilla.cz/feed/ ! twitter/α
# https://www.githubstatus.com/history.rss ! dev/servises
"query:⌨🖱:tags # \"dev/servises\""
https://github.com/mdn.atom ! dev/github
# Charles Games
https://kill-the-newsletter.com/feeds/spatxxuabdy4yboqeenu.xml ! dev/github
https://github.com/LeaVerou.atom ! dev/github
https://github.com/susieward/witchly-js/commits/main.atom ! dev/github
https://github.com/staltz.atom ! dev/github
https://github.com/jensimmons.atom ! dev/github
https://github.com/mirisuzanne.atom ! dev/github
# https://www.smashingmagazine.com/feed/
"query:⌨🖱:tags # \"dev/github\""
https://www.informacnigramotnost.cz/feed/ ! desinfo
https://demagog.cz/rss/index.atom ! desinfo
https://www.fakticke.info/feed/ ! desinfo
https://manipulatori.cz/feed/ ! desinfo
"query:🤔:tags # \"desinfo\""
https://n3wjack.net/feed/ ! blogs
https://boundedlyrational.substack.com/feed ! blogs
https://blog.eischmann.cz/feed/ ! blogs
https://blog.zvestov.cz/feed.xml ! blogs
https://www.pirati.cz/feed.xml ! blogs
https://www.kdu.cz/system/rss ! blogs
https://80000hours.org/feed/ ! glogs
http://tapolitika.cz/feed/ ! glogs
"query:🤓:tags # \"blogs\""
https://mobilmania.zive.cz/rss/sc-47/default.aspx ! news/info
https://feeds.feedburner.com/penize?format=xml ! news/info
https://www.mesec.cz/rss/clanky/ ! news/info
https://www.mesec.cz/rss/aktuality/ ! news/info
https://www.edna.cz/doctor-who/rss/ ! news/info
"query:🗞 💰📱:tags # \"news/info\""
http://feeds.bbci.co.uk/news/world/rss.xml ! news/rest
https://domaci.hn.cz/?m=rss ! news/rest
https://ekonom.cz/?m=rss ! news/rest
https://vikend.hn.cz/?m=rss ! news/rest
https://procne.hn.cz/?m=rss ! news/rest
http://casopisargument.cz/?feed=rss2 ! news/rest
"query:🗞 🌐⏩:tags # \"news/rest\""
https://www.seznamzpravy.cz/rss ! rest
"query:🗞 💤:tags # \"rest\""
# TODO: https://www.threads.net/@pirativanbartos
https://mastodonczech.cz/@jantvrdon.rss ! mastodon/neak
https://mastodonczech.cz/@eliska.rss ! mastodon/neak
https://mastodon.rozhlas.cz/@kristinarohackova.rss ! mastodon/neak
https://mastodon.social/@Prof_Mirya.rss ! mastodon/neak
https://mastodonczech.cz/@NAKIT.rss ! mastodon/neak
https://mastodonczech.cz/@strakovka.rss ! mastodon/neak
https://mastodonczech.cz/@SpravedlnostCZ.rss ! mastodon/neak
https://witter.cz/@petrinfinite.rss ! mastodon/neak
https://mastodonczech.cz/@danusenerudova.rss ! mastodon/neak
# TODO: https://www.threads.net/@danusenerudova
https://witter.cz/@Apolenarychlikova.rss ! mastodon/neak
# TODO: https://www.threads.net/@apolenarychlikova
https://mastodonczech.cz/@marekl.rss ! mastodon/neak
https://mastodon.social/@spreadmastodon.rss ! mastodon/neak
https://mastodon.pirati.cz/@OlgaRichterova.rss ! mastodon/neak
# TODO: https://www.threads.net/@olga_piratka_richterova
https://witter.cz/@zeleni.rss ! mastodon/neak
https://mastodonczech.cz/@Lenislavka.rss ! mastodon/neak
https://witter.cz/@guth.rss ! mastodon/neak
# TODO: https://www.threads.net/@tgjarkovsky
https://mastodonczech.cz/@madla.rss ! mastodon/neak
# TODO: https://www.threads.net/@madla__g
https://witter.cz/@malyvedec.rss ! mastodon/neak
# TODO: https://www.threads.net/@malyvedec
"query:🗞 🐘:tags # \"mastodon/neak\""
# TW bez náhrady:
# fieldsofmoab, machal, devgirlFL,
# jakubvrana, _Case, eicul,
# CO2IN, Iluminator_cz, DearAbbyHansen,
# _A_d_e_l_k_a_, ClaireAccendit, laurencikova_k,
# PopDetective, dan_prokop, danusenerudova,
# glacier_ecology, MarieHermanova, lkristoufek,
# matfyz, Mitokochan, kasikp,
# CERN, josefslerka, traintravels42,
# JulieMontek, bara_soukup, janovsky

View File

@ -30,13 +30,7 @@ export GTK_MODULES
export UBUNTU_MENUPROXY export UBUNTU_MENUPROXY
export JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64/" export JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64/"
# Ubuntu make installation of Ubuntu Make binary symlink
PATH=/home/jaandrle/.local/share/umake/bin:$PATH
[ -f /home/jaandrle/.bash/.profile_androidsdk ] && . /home/jaandrle/.bash/.profile_androidsdk [ -f /home/jaandrle/.bash/.profile_androidsdk ] && . /home/jaandrle/.bash/.profile_androidsdk
# Added by Toolbox App # Added by Toolbox App
export PATH="$PATH:/home/jaandrle/.local/share/JetBrains/Toolbox/scripts" export PATH="$PATH:/home/jaandrle/.local/share/JetBrains/Toolbox/scripts"

View File

@ -1,3 +1,5 @@
Include /home/jaandrle/.config/colima/ssh_config
Host vpsfree Host vpsfree
HostName 37.205.11.208 HostName 37.205.11.208
IdentityFile ~/.ssh/vpsfree IdentityFile ~/.ssh/vpsfree

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)

View File

@ -1,6 +0,0 @@
nmap <leader>vd /diff --git<cr> 0vG$
command! AIcommit ALTredir !§ai-commit.mjs
command! AIcommitConventional ALTredir !§ai-commit.mjs --format conventional
command! AIcommitGitmoji ALTredir !§ai-commit.mjs --format gitmoji
command! AIcommitGit3moji ALTredir !§ai-commit.mjs --format git3moji
nmap <leader><f1> :AIcommitOP

View File

@ -26,5 +26,6 @@
"complexity": ["error", 15] "complexity": ["error", 15]
} }
} }
} },
"snippets.ultisnips.pythonPrompt": false
} }

222
.vimrc
View File

@ -1,14 +1,18 @@
""" VIM config file | Jan Andrle | 2024-07-10 (VIM >=8.1) """ VIM config file | Jan Andrle | 2025-04-05 (VIM >=9.1 AppImage)
"" #region B Base "" #region B Base
scriptencoding utf-8 | set encoding=utf-8 scriptencoding utf-8 | set encoding=utf-8
set pythonthreedll=/lib/x86_64-linux-gnu/libpython3.12.so.1.0
let $BASH_ENV = "~/.bashrc" let $BASH_ENV = "~/.bashrc"
set runtimepath^=~/.vim/bundle/* set runtimepath^=~/.vim/bundle/*
packadd! matchit packadd! matchit
packadd! cfilter
let g:ft_man_folding_enable = 1
runtime! ftplugin/man.vim
" set hidden " set hidden
set title set title
colorscheme codedark colorscheme codedark
set updatetime=300 lazyredraw ttyfast " Having longer updatetime (default is 4s) leads to noticeable delays and poor user experience. Also reduce redraw frequency and fast terminal typing set updatetime=300 "TODO DEL lazyredraw
set noerrorbells novisualbell set noerrorbells novisualbell
set belloff=esc set belloff=esc
set confirm set confirm
@ -50,14 +54,12 @@
""" #endregion BB """ #endregion BB
"" #endregion B "" #endregion B
"" #region H Helpers "" #region H Helpers
" TODO DEL
command! -nargs=? CLscratch 10split | enew | setlocal buftype=nofile bufhidden=wipe noswapfile nobuflisted | if <q-args>!='' | execute 'normal "'.<q-args>.'p' | endif | nnoremap <buffer> ;q :q<cr> command! -nargs=? CLscratch 10split | enew | setlocal buftype=nofile bufhidden=wipe noswapfile nobuflisted | if <q-args>!='' | execute 'normal "'.<q-args>.'p' | endif | nnoremap <buffer> ;q :q<cr>
cabbrev ALTR ALTredrawSyntax cabbrev ALTR ALTredrawSyntax
set grepprg=LC_ALL=C\ grep\ -nrsH
command! -nargs=0 command! -nargs=0
\ ALTredrawSyntax edit | exec 'normal `"' | exec 'set ft='.&ft \ ALTredrawSyntax edit | exec 'normal `"' | exec 'set ft='.&ft
command! -complete=command -bar -range -nargs=+
\ ALTredir call jaandrle_utils#redir(0, <q-args>, <range>, <line1>, <line2>)
let g:quickfix_len= 0 let g:quickfix_len= 0
function! QuickFixStatus() abort function! QuickFixStatus() abort
@ -76,16 +78,6 @@
augroup quickfix augroup quickfix
autocmd! autocmd!
autocmd QuickFixCmdPost * call <sid>QuickFixCmdPost() autocmd QuickFixCmdPost * call <sid>QuickFixCmdPost()
autocmd filetype qf
\ if filter(getwininfo(), {i,v -> v.winnr == winnr()})[0].loclist
\| nnoremap <buffer> ;q :lclose<cr>
\| nnoremap <buffer> ;w :lgetbuffer<CR>:lclose<CR>:lopen<CR>
\| nnoremap <buffer> ;s :ldo s///gc \| update<c-left><c-left><c-left><right><right>
\| else
\| nnoremap <buffer> ;q :cclose<cr>
\| nnoremap <buffer> ;w :cgetbuffer<CR>:cclose<CR>:copen<CR>
\| nnoremap <buffer> ;s :cdo s///gc \| update<c-left><c-left><c-left><right><right>
\| endif
augroup END augroup END
"" #endregion H "" #endregion H
"" #region SLH Status Line + Command Line + History (general) + Sessions + File Update, … "" #region SLH Status Line + Command Line + History (general) + Sessions + File Update, …
@ -96,20 +88,15 @@
cabbrev wbw w<bar>bw cabbrev wbw w<bar>bw
set sessionoptions-=options set sessionoptions-=options
command! -nargs=1
\ CLSESSIONcreate :call mini_sessions#create(<f-args>)
command! -nargs=0
\ CLSESSIONconfig :call mini_sessions#sessionConfig()
command! -nargs=1 -complete=customlist,mini_sessions#complete
\ CLSESSIONload :call mini_sessions#load(<f-args>)
command! -nargs=0
\ Scd :call mini_sessions#recoverPwd()
if !has("gui_running") function! NumberOfBuffers()
execute 'hi! User2 ctermbg='.synIDattr(synIDtrans(hlID('StatusLine')), 'bg').' ctermfg=grey' | endif return len(filter(range(1, bufnr('$')), 'buflisted(v:val)'))
endfunction
set laststatus=2 " Show status line on startup set laststatus=2 " Show status line on startup
set statusline+=··%1*≡·%{QuickFixStatus()}%*··%2*»·%{user_tips#current()}%*··%= set statusline+=··≡·%{QuickFixStatus()}%*··»·%{user_tips#current()}%*··%=
set statusline+=%<%f%R\%M··▶·%{&fileformat}·%{&fileencoding?&fileencoding:&encoding}·%{&filetype}··∷·%{mini_sessions#name('')}··  set statusline+=(%{NumberOfBuffers()})··%<%f%R\%M··▶·%{&fileformat}·%{&fileencoding?&fileencoding:&encoding}·%{&filetype}
set statusline+=··
" set statusline+=··∷·%{mini_sessions#name('')}·· 
set history=500 " How many lines of (cmd) history has to remember set history=500 " How many lines of (cmd) history has to remember
set nobackup nowritebackup noswapfile " …there is issue #649 (for servers) and Im using git/system backups set nobackup nowritebackup noswapfile " …there is issue #649 (for servers) and Im using git/system backups
@ -119,11 +106,11 @@
command! SETundoClear let old_undolevels=&undolevels | set undolevels=-1 | exe "normal a \<BS>\<Esc>" | let &undolevels=old_undolevels | unlet old_undolevels | write command! SETundoClear let old_undolevels=&undolevels | set undolevels=-1 | exe "normal a \<BS>\<Esc>" | let &undolevels=old_undolevels | unlet old_undolevels | write
"" #endregion SLH "" #endregion SLH
"" #region LLW Left Column + Line + Wrap + Scrolling "" #region LLW Left Column + Line + Wrap + Scrolling
if has("nvim-0.5.0") || has("patch-8.1.1564") " Recently vim can merge signcolumn and number column into one set signcolumn=yes
set signcolumn=number | else | set signcolumn=yes | endif " show always to prevent shifting when diagnosticappears
set cursorline cursorcolumn " Always show current position set cursorline cursorcolumn " Always show current position
set number foldcolumn=2 " enable line numbers and add a bit extra margin to the left set number foldcolumn=2 " enable line numbers and add a bit extra margin to the left
set colorcolumn=+1 " …marker visual set colorcolumn=+1 " …marker visual
" TODO DEL
command -nargs=? SETtextwidth if <q-args> | let &textwidth=<q-args> | let &colorcolumn='<args>,120,240' | else | let &textwidth=250 | let &colorcolumn='120,240' | endif command -nargs=? SETtextwidth if <q-args> | let &textwidth=<q-args> | let &colorcolumn='<args>,120,240' | else | let &textwidth=250 | let &colorcolumn='120,240' | endif
SETtextwidth " wraping lines and show two lines SETtextwidth " wraping lines and show two lines
set nowrap " Don't wrap long lines by default set nowrap " Don't wrap long lines by default
@ -133,26 +120,53 @@
"" #endregion LLW "" #endregion LLW
"" #region CN Clipboard + Navigation throught Buffers + Windows + … (CtrlP) "" #region CN Clipboard + Navigation throught Buffers + Windows + … (CtrlP)
set pastetoggle=<F2> | nnoremap <F2> :set invpaste paste?<CR> set pastetoggle=<F2> | nnoremap <F2> :set invpaste paste?<CR>
nnoremap <silent> <leader>" :call jaandrle_utils#copyRegister()<cr> function! JaaCopyRegister()
echo "Copy content of the register: "
let sourceReg = nr2char(getchar())
if sourceReg !~# '\v^[a-z0-9"*+]'
echon sourceReg." invalid register"
return
endif
echon sourceReg."\ninto the register: "
let destinationReg = nr2char(getchar())
if destinationReg !~# '\v^[a-z0-9"*+]'
echon destinationReg." invalid register"
return
endif
call setreg(destinationReg, getreg(sourceReg, 1))
echon destinationReg
endfunction
nnoremap <silent> <leader>" :call JaaCopyRegister()<cr>
nmap <expr> š buffer_number("#")==-1 ? "\<leader>š<cr>" : "\<c-^>" " CtrlP previously
nmap <expr> š buffer_number("#")==-1 ? ":CocList --normal buffers\<cr>" : "\<c-^>"
nmap ě :CocList
nmap <leader>3 :buffers<cr>:b<space> nmap <leader>3 :buffers<cr>:b<space>
nmap <leader>š :CtrlPBuffer<cr> nmap <leader>š :CocList buffers<cr> | :syntax on<cr>
nmap č <leader>š nmap č <leader>š
let g:ctrlp_map = 'ě'
command! -nargs=? SETctrlp execute 'nnoremap '.g:ctrlp_map.' :CtrlP <args><cr>'
let g:ctrlp_clear_cache_on_exit = 0
let g:ctrlp_prompt_mappings= {
\ 'ToggleType(1)': ['<c-up>'],
\ 'ToggleType(-1)': ['<c-down>'],
\ 'PrtCurStart()': ['<c-b>'],
\}
"" #endregion CN "" #endregion CN
"" #region FOS File(s) + Openning + Saving "" #region FOS File(s) + Openning + Saving
set autowrite autoread | autocmd FocusGained,BufEnter *.* checktime set autowrite autoread | autocmd FocusGained,BufEnter *.* checktime
set modeline set modeline
command! -nargs=? function! JaaAppendModeline(additional= 0)
\ CLmodeline :call jaandrle_utils#AppendModeline(<q-args>=='basic' ? 0 : 1) let l:modeline= printf(" vim: set tabstop=%d shiftwidth=%d textwidth=%d %sexpandtab :",
\ &tabstop, &shiftwidth, &textwidth, &expandtab ? '' : 'no')
let l:modeline= substitute(&commentstring, "%s", l:modeline, "")
call append(line("$"), l:modeline)
if !a:additional | return 0 | endif
if &foldmethod=="marker"
let l:modeline= printf(" vim>60: set foldmethod=marker foldmarker=%s :",
\ &foldmarker)
elseif &foldmethod=="indent"
let l:modeline= printf(" vim>60: set foldmethod=indent foldlevel=%d foldnestmax=%d:",
\ &foldlevel, &foldnestmax)
else
return 0
endif
let l:modeline= substitute(&commentstring, "%s", l:modeline, "")
call append(line("$"), l:modeline)
endfunction
set path+=src/**,app/**,build/** " File matching for `:find` set path+=src/**,app/**,build/** " File matching for `:find`
for ignore in [ '.git', '.npm', 'node_modules' ] for ignore in [ '.git', '.npm', 'node_modules' ]
@ -167,9 +181,10 @@
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 " TODO? <bar>syntax sync fromstart
let g:markbar_persist_mark_names = v:false 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 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
@ -179,7 +194,6 @@
" use <c-v>§ for § " use <c-v>§ for §
inoremap § <esc> inoremap § <esc>
set nrformats-=octal set nrformats-=octal
command! -nargs=1 SETTOGGLEnrformats if &nf=~<q-args> | set nf-=<args> | else | set nf+=<args> | endif
let g:htl_css_templates=1 let g:htl_css_templates=1
let g:markdown_fenced_languages= [ 'javascript', 'js=javascript', 'json', 'html', 'php', 'bash', 'vim', 'vimscript=javascript', 'sass' ] let g:markdown_fenced_languages= [ 'javascript', 'js=javascript', 'json', 'html', 'php', 'bash', 'vim', 'vimscript=javascript', 'sass' ]
@ -200,15 +214,16 @@
let g:rainbow#blacklist = [203,9] let g:rainbow#blacklist = [203,9]
autocmd VimEnter * try autocmd VimEnter * try
\| call rainbow_parentheses#toggle() | catch | endtry \| call rainbow_parentheses#toggle() | catch | endtry
command! SETTOGGLErainbowParentheses call rainbow_parentheses#toggle() " HIGHLIGHT&YANK plugins (buildin) hlyank & cwordhi.vim
" HIGHLIGHT&YANK plugins machakann/vim-highlightedyank & cwordhi.vim packadd hlyank
let g:highlightedyank_highlight_duration= 250 let g:hlyank_duration= 250
let g:cwordhi#autoload= 1 let g:cwordhi#autoload= 1
set showmatch " Quick highlight oppening bracket/… for currently writted set showmatch " Quick highlight oppening bracket/… for currently writted
set timeoutlen=1000 ttimeoutlen=0 " Remove timeout when hitting escape TAB set timeoutlen=1000 ttimeoutlen=0 " Remove timeout when hitting escape TAB
if v:version > 703 || v:version == 703 && has("patch541") if v:version > 703 || v:version == 703 && has("patch541")
set formatoptions+=j | endif " Delete comment character when joining commented lines set formatoptions+=j | endif " Delete comment character when joining commented lines
set smarttab set smarttab
" TODO DEL
command! -nargs=1 SETtab let &shiftwidth=<q-args> | let &tabstop=<q-args> | let &softtabstop=<q-args> command! -nargs=1 SETtab let &shiftwidth=<q-args> | let &tabstop=<q-args> | let &softtabstop=<q-args>
SETtab 4 SETtab 4
set backspace=indent,eol,start " Allow cursor keys in insert mode: http://vi.stackexchange.com/a/2163 set backspace=indent,eol,start " Allow cursor keys in insert mode: http://vi.stackexchange.com/a/2163
@ -218,11 +233,12 @@
if ($TERM =~ '256' && has("termguicolors")) if ($TERM =~ '256' && has("termguicolors"))
set termguicolors | endif set termguicolors | endif
if (&t_Co > 2 || has("gui_running")) && !exists("syntax_on") if (&t_Co > 2 || has("gui_running")) && !exists("syntax_on")
syntax on | endif syntax enable | endif
set list listchars=tab:»·,trail,extends:#,nbsp:~,space" Highlight spec. chars / Display extra whitespace set list listchars=tab:»·,trail,extends:#,nbsp:~,space" Highlight spec. chars / Display extra whitespace
set redrawtime=10000
augroup syntax_sync_min_lines augroup syntax_sync_min_lines
autocmd! autocmd!
autocmd Syntax * syn sync minlines=2000 autocmd BufEnter * syntax sync fromstart "TODO DEL syn sync minlines=2000
augroup END augroup END
let g:vim_vue_plugin_config = { 'foldexpr': 1, 'attribute': 1, 'keyword': 1 } let g:vim_vue_plugin_config = { 'foldexpr': 1, 'attribute': 1, 'keyword': 1 }
" SPELL " SPELL
@ -234,7 +250,7 @@
nnoremap <leader>O O<space><bs><esc> nnoremap <leader>O O<space><bs><esc>
nnoremap <s-k> a<cr><esc> nnoremap <s-k> a<cr><esc>
for l in [ 'y', 'p', 'P', 'd' ] | for m in [ 'n', 'v' ] for l in [ 'y', 'p', 'P', 'd' ] | for m in [ 'n', 'v' ]
execute m.'noremap <leader>'.l.' "+'.l | endfor | endfor execute m.'map <leader>'.l.' "+'.l | endfor | endfor " no noremap ⇐ https://github.com/jasonccox/vim-wayland-clipboard?tab=readme-ov-file#non-recursive-mappings
" TODO DEL: FOLDS " TODO DEL: FOLDS
" TODO DEL: command! -nargs=0 SETFOLDregions set foldmethod=marker " TODO DEL: command! -nargs=0 SETFOLDregions set foldmethod=marker
" TODO DEL: command! -nargs=1 SETFOLDindent set foldmethod=indent | let &foldlevel=<q-args> | let &foldnestmax=<q-args>+1 " TODO DEL: command! -nargs=1 SETFOLDindent set foldmethod=indent | let &foldlevel=<q-args> | let &foldnestmax=<q-args>+1
@ -248,45 +264,18 @@
autocmd BufWinEnter *.* silent! loadview autocmd BufWinEnter *.* silent! loadview
augroup END augroup END
"" #endregion EA "" #endregion EA
"" #region GIT "" #region AI
function s:gitCompletion(_, CmdLine, __) let g:codeium_disable_bindings = 1
let l:cmd= a:CmdLine->split() imap <script><silent><nowait><expr> <f3><f3> codeium#Accept()
let l:cmd_start= l:cmd[0] imap <script><silent><nowait><expr> <f3><w> codeium#AcceptNextWord()
\ ->substitute('GIThub', 'gh', '') imap <script><silent><nowait><expr> <f3><j> codeium#AcceptLine()
\ ->substitute('GIT', 'git ', '')->trim()->split(' ') imap <f3>n <Cmd>call codeium#CycleCompletions(1)<CR>
return bash#complete((l:cmd_start+l:cmd[1:])->join()) imap <f3>N <Cmd>call codeium#CycleCompletions(-1)<CR>
endfunction imap <f3>d <Cmd>call codeium#Clear()<CR>
function s:gitCmd(candidate) imap <f3>! <Cmd>call codeium#Complete()<CR>
execute '!clear && echo ":: git '.a:candidate->escape('"').' ::" && git '.a:candidate "" #endregion AI
endfunction
command! -nargs=* -complete=customlist,<sid>gitCompletion
\ GIT call <sid>gitCmd(<q-args>)
command! -nargs=* -complete=customlist,<sid>gitCompletion
\ GITstatus !git status-- <args>
command! -nargs=* -complete=customlist,<sid>gitCompletion
\ GITcommit !git commit-- <args>
command! -nargs=* -complete=customlist,<sid>gitCompletion
\ GITpush !git push <args>
command! -nargs=* -complete=customlist,<sid>gitCompletion
\ GITdiff if <q-args>=='' | execute '!clear && git diff %:p' | else | silent! execute '!git diff <args>' | endif
command! -nargs=*
\ GITrestore execute '!clear && git status '.(<q-args>=='.' ? '%:p':'<args>').' -bs & git restore '.(<q-args>=='' ? '%:p':'<args>').' --patch'
command! -nargs=* -complete=customlist,<sid>gitCompletion
\ GIThub execute '!clear && echo ":: gh '.<q-args>->escape('"').' ::" && gh '.<q-args>
command! -nargs=?
\ GIThubIssue execute '!clear && gh issue view '.expand('<cword>').' '.<q-args>
let g:git_messenger_no_default_mappings= v:true
let g:git_messenger_date_format= '%Y-%m-%d (%c)'
let g:git_messenger_always_into_popup= v:true
augroup git_messenger_help
autocmd!
autocmd FileType gitmessengerpopup setlocal keywordprg=git\ show
augroup END
command! -nargs=0
\ GITblameThis GitMessenger
"" #endregion GIT
"" #region COC COC and so on, compilers, code/commands completions "" #region COC COC and so on, compilers, code/commands completions
let g:coc_global_extensions= ['coc-css', 'coc-docthis', 'coc-emmet', 'coc-emoji', 'coc-pretty-ts-errors', 'coc-eslint', 'coc-gitmoji', 'coc-html', 'coc-json', 'coc-marketplace', 'coc-phpls', 'coc-sh', 'coc-snippets', 'coc-styled-components', 'coc-svg', 'coc-tabnine', 'coc-tsserver'] let g:coc_global_extensions= ['coc-css', 'coc-docthis', 'coc-emmet', 'coc-emoji', 'coc-git', 'coc-pretty-ts-errors', 'coc-eslint', 'coc-gitmoji', 'coc-html', 'coc-json', 'coc-lists', 'coc-marketplace', 'coc-phpls', 'coc-sh', 'coc-snippets', 'coc-styled-components', 'coc-svg', 'coc-tsserver']
" https://github.com/antonk52/cssmodules-language-server " https://github.com/antonk52/cssmodules-language-server
call coc#config('languageserver.cssmodules', { call coc#config('languageserver.cssmodules', {
\ "command": "cssmodules-language-server", \ "command": "cssmodules-language-server",
@ -296,21 +285,6 @@
\ "settings": {} \ "settings": {}
\ }) \ })
autocmd FileType scss setl iskeyword+=@-@ autocmd FileType scss setl iskeyword+=@-@
command -nargs=? ALTmake if &filetype=='javascript' | compiler jshint | elseif &filetype=='php' | compiler php | endif
\| if <q-args>!='' | silent make <args> | else | silent make '%' | endif | checktime | silent redraw! " …prev line, hotfix (filetype detection doest works)
function <sid>ToggleALTmakeOnWrite()
if exists('#ALTmake_auto#BufWritePost')
augroup ALTmake_auto
autocmd!
augroup END
else
augroup ALTmake_auto
autocmd!
autocmd BufWritePost *.{php,js,mjs} execute 'ALTmake' | call <sid>QuickFixCmdPost()
augroup END
endif
endfunction
command! ALTmakeOnWrite call <sid>ToggleALTmakeOnWrite()
function! CustomKeyWord(word) function! CustomKeyWord(word)
if(a:word=="gulp_place") if(a:word=="gulp_place")
highlight link gulp_place ErrorMsg highlight link gulp_place ErrorMsg
@ -333,9 +307,7 @@
return !col || getline('.')[col - 1] =~# '\s' return !col || getline('.')[col - 1] =~# '\s'
endfunction endfunction
nmap <silent> gd <Plug>(coc-definition) nmap <silent><nowait> gd <Plug>(coc-definition)
nmap <leader>/ :CocSearch
nmap <leader>? <leader>/
command! -nargs=* -complete=customlist,<sid>SCommandCocActionComplete CocAction call CocActionAsync(<f-args>) command! -nargs=* -complete=customlist,<sid>SCommandCocActionComplete CocAction call CocActionAsync(<f-args>)
function s:SCommandCocActionComplete(argLead, cmdLine, cursorPos) function s:SCommandCocActionComplete(argLead, cmdLine, cursorPos)
return readfile(expand('~/.vim/pack/coc/start/coc.nvim/doc/tags'), 'r') return readfile(expand('~/.vim/pack/coc/start/coc.nvim/doc/tags'), 'r')
@ -346,8 +318,8 @@
" navigate diagnostics, use `:CocDiagnostics` to get all diagnostics of current buffer in location list. " navigate diagnostics, use `:CocDiagnostics` to get all diagnostics of current buffer in location list.
nnoremap <silent> gh :call <sid>show_documentation(expand("<cword>"))<cr> nnoremap <silent> gh :call <sid>show_documentation(expand("<cword>"))<cr>
vnoremap <silent> gh :<c-u>call <sid>show_documentation(mini_enhancement#selectedText())<cr> vnoremap <silent> gh :<c-u>call <sid>show_documentation(mini_enhancement#selectedText())<cr>
nnoremap <leader>gf :let g:ctrlp_default_input=expand("<cword>") <bar> execute 'CtrlP' <bar> unlet g:ctrlp_default_input <cr> nnoremap <leader>gf :CocList --interactive --normal --input='<c-r>=expand("<cword>")<cr>' files<cr>
vnoremap <leader>gf :<c-u>let g:ctrlp_default_input=mini_enhancement#selectedText() <bar> execute 'CtrlP' <bar> unlet g:ctrlp_default_input <cr> vnoremap <leader>gf :<c-u>CocList --interactive --normal --input='<c-r>=mini_enhancement#selectedText()<cr>' files<cr>
""" #region COCP Coc popups scroll (Remap <C-f> and <C-b> for scroll float windows/popups.) """ #region COCP Coc popups scroll (Remap <C-f> and <C-b> for scroll float windows/popups.)
if has('nvim-0.4.0') || has('patch-8.2.0750') if has('nvim-0.4.0') || has('patch-8.2.0750')
nnoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? coc#float#scroll(1) : "\<C-f>" nnoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? coc#float#scroll(1) : "\<C-f>"
@ -358,11 +330,10 @@
vnoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? coc#float#scroll(0) : "\<C-b>" vnoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? coc#float#scroll(0) : "\<C-b>"
endif endif
""" #endregion COCP """ #endregion COCP
" TODO DEL: command! -nargs=? SETFOLDcoc :call CocAction('fold', <f-args>)
command! -nargs=? CLhelpMy if <q-args>!='' | exec 'map '.<q-args> | else | call popup_notification([ command! -nargs=? CLhelpMy if <q-args>!='' | exec 'map '.<q-args> | else | call popup_notification([
\ 'Custom mappings starting: '.mapleader.',§, ů, ;, U, ž', \ 'Custom mappings starting: '.mapleader.',§, ů, ;, U, ž',
\ 'Custom commands starting: CL, SET, ALT, CtrlP, Vifm, GIT, Coc', \ 'Custom commands starting: CL, SET, ALT, Vifm, Coc',
\ 'Helpful commands: CocAction, CocCommand, CocList', \ 'Helpful commands: CocAction, CocCommand, CocList',
\], #{ line: &lines-3, pos: 'botleft', moved: 'any', close: 'button', time: 6000 }) | endif \], #{ line: &lines-3, pos: 'botleft', moved: 'any', close: 'button', time: 6000 }) | endif
nnoremap <c-g> :CLwhereami<cr> nnoremap <c-g> :CLwhereami<cr>
@ -398,28 +369,8 @@
\ CLcheat call cheat_copilot#open(<q-args>==''?&filetype:<q-args>) \ CLcheat call cheat_copilot#open(<q-args>==''?&filetype:<q-args>)
function! s:show_documentation(word) function! s:show_documentation(word)
if (index(['vim', 'help'], &filetype) >= 0)
" inspired by https://github.com/tpope/vim-scriptease/blob/74bd5bf46a63b982b100466f9fd47d2d0597fcdd/autoload/scriptease.vim#L737
let syn= get(reverse(map(synstack(line('.'), col('.')), 'synIDattr(v:val,"name")')), 0, '')
if syn ==# 'vimFuncName' | return <sid>show_documentation_vim('h '.a:word.'()')
elseif syn ==# 'vimOption' | return <sid>show_documentation_vim("h '".a:word."'")
elseif syn ==# 'vimUserAttrbKey' | return <sid>show_documentation_vim('h :command-'.a:word)
endif
let col= col('.') - 1
while col && getline('.')[col] =~# '\k' | let col-= 1 | endwhile
let pre= col == 0 ? '' : getline('.')[0 : col]
let col= col('.') - 1
while col && getline('.')[col] =~# '\k' | let col+= 1 | endwhile
if pre =~# '^\s*:\=$' | return <sid>show_documentation_vim('h :'.a:word)
elseif pre =~# '\<v:$' | return <sid>show_documentation_vim('h v:'.a:word)
endif
let post= getline('.')[col : -0]
if a:word ==# 'v' && post =~# ':\w\+' | return <sid>show_documentation_vim('h v'.matchstr(post, ':\w\+')) | endif
return <sid>show_documentation_vim('h '.a:word)
endif
if (!CocAction('hasProvider', 'hover')) if (!CocAction('hasProvider', 'hover'))
if &filetype=='man' | call dist#man#PreGetPage(0) | return 0 | endif
return feedkeys('K', 'in') return feedkeys('K', 'in')
endif endif
if &filetype=='html' && coc#source#custom_elements#hover(a:word)!=0 if &filetype=='html' && coc#source#custom_elements#hover(a:word)!=0
@ -428,16 +379,7 @@
return CocActionAsync('doHover') return CocActionAsync('doHover')
endfunction endfunction
function! s:show_documentation_vim(cmd)
call execute(a:cmd) | call histadd("cmd", a:cmd)
endfunction
"" #endregion COC "" #endregion COC
let g:codeium_disable_bindings = 1
imap <script><silent><nowait><expr> <f3><f3> codeium#Accept()
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>! <Cmd>call codeium#Complete()<CR>
" vim: set textwidth=250 : " vim: set textwidth=250 :
" vim>60: set foldmethod=marker foldmarker=#region,#endregion : " vim>60: set foldmethod=marker foldmarker=#region,#endregion :

File diff suppressed because it is too large Load Diff

39
bin/git-identity Executable file
View File

@ -0,0 +1,39 @@
#!/usr/bin/env bash
set -euo pipefail
config="$HOME/.config/git/identities"
input="${1:-}"
usage="Usage
git identity [<name>|help|-]
git-identity --help
"
[ -z "$input" ] \
&& echo "$usage"\
&& echo -e "$config/current.conf … current identity:" \
&& cat "$config/current.conf" \
&& exit 0
[ "$input" = --help ] \
&& input="help"
[ "$input" = help ] \
&& echo "$usage"\
&& echo '- _empty_: shows usage and current identity' \
&& echo '- <name>: set identity' \
&& echo '- -: show path to identities directory' \
&& echo '- help: shows this help' \
&& echo -e '\n\nExamples' \
&& echo '- git identity' \
&& echo '- git identity user' \
&& echo '- ls $(git identity -)' \
&& echo -e '\n\nGit config' \
&& echo "- git config --global include.path '$config/current.conf'" \
&& exit 0
[ "$input" = - ] \
&& echo "$config" \
&& exit 0
identity="$config/$input.conf"
[ ! -e "$identity" ] \
&& echo "No such identity: $input" >&2 \
&& echo "$identity" >&2 \
&& exit 1
ln --verbose --force "$identity" "$config/current.conf"

View File

@ -1,418 +0,0 @@
#!/usr/bin/env node
/* jshint esversion: 8,-W097, -W040, node: true, expr: true, undef: true */
const /* dependencies */
[ fs, readline, https, { spawn } ]= [ "fs", "readline", "https", "child_process" ].map(p=> require(p));
const /* helper for coloring console | main program params */
colors= { e: "\x1b[38;2;252;76;76m", s: "\x1b[38;2;76;252;125m", w: "\x1b[33m", R: "\x1b[0m", y: "\x1b[38;2;200;190;90m", g: "\x1b[38;2;150;150;150m" },
info= {
name: __filename.slice(__filename.lastIndexOf("/")+1, __filename.lastIndexOf(".")),
version: "1.2.1",
description: "Helper for working with “packages” stored in GitHub releases.",
config: `${__filename.slice(0, __filename.lastIndexOf("."))}.json`,
folder: __filename.slice(0, __filename.lastIndexOf("/")+1),
commands: [
{
cmd: "help", args: [ "--help", "-h" ],
desc: "Shows this text"
},
{
cmd: "config", args: [ "--config" ],
desc: "Opens config file in terminal editor (defaults to vim)"
},
{
cmd: "check", args: [ "--check", "-c" ],
desc: "Shows/checks updates for registered packages"
},
{
cmd: "update", args: [ "--update", "-u" ], param: "group",
desc: "Installs lates versions of registered packages"
},
{
cmd: "uninstall", args: [ "--uninstall", "-u" ], param: "package",
desc: "Deletes downloaded file and moves package to the 'skip' group"
},
{
cmd: "register", args: [ "--register", "--change" ], param: "package",
desc: "Add package infos to internal list to be able installing/updating"
},
{
cmd: "remove", args: [ "--remove" ], param: "package",
desc: ([
"Uninstall package if needed (see `-u`)",
"And remove it from internal list (see `--config`)"
]).join(". ")
}
],
params: {
group: ([
"You can label each package to update only choosen one",
"There are sereved options:",
" - '' (empty): these packages are includes in all groups",
" - 'all': in case of `--update` process all packages (except skipped)",
" - 'skip': these packages are “uninstalled”",
" No updates will be downloaded",
"Group can be setted via '--register'"
]).join(". "),
package: ([
"Represents package identificator, it is in fact GitHub repository path",
"So, it schould be in the form `username/repository`"
]).join(". ")
}
};
printMain();
const current= getCurrent(process.argv.slice(2));
(function main_(){
const { cmd }= current.command;
if(!cmd) return Promise.resolve("No arguments (use `--help` for showing all oprions).");
switch(cmd){
case "help": return Promise.resolve(printHelp());
case "config": return vim_(info.config);
}
const config= getConfig();
switch(cmd){
case "register": return register_(config);
}
if(!config.packages) return Promise.resolve("No packages yet!");
switch(cmd){
case "check": return check_(config);
case "update": return update_(config);
case "uninstall":
case "remove":
return uninstall_(cmd, config);
}
})()
.then(function(message){
if(message)
log(1, `Operation '${current.command.cmd}' successfull: @s_${message}`);
process.exit();
})
.catch(error);
async function uninstall_(cmd, config){
const progress= [
[ "Deleting file", "not needed" ],
[ "Check out from updates", "yes" ],
[ "Remove from packages list", "no" ]
];
const pkg_name= current.param;
const pkg_index= config.packages.findIndex(({ repository })=> repository===pkg_name);
if(pkg_index===-1) return "nothing to do (maybe typo)";
const pkg= config.packages[pkg_index];
const { downloads }= pkg;
if(downloads&&fs.existsSync(downloads)){
try{ fs.unlinkSync(downloads); progress[0][1]= "done"; }
catch (_){ progress[0][1]= colors.e+"error, try manually "+downloads; }
}
Reflect.deleteProperty(pkg, "last_update");
Reflect.set(pkg, "group", "skip");
progress[1][1]= "done";
if(cmd!=="remove") return gotoEnd();
const y= await promt_(`Are you realy want to remove package ${pkg.repository} (yes/no)`, "no");
if(y!=="yes") return gotoEnd();
config.packages.splice(pkg_index, 1);
progress[2][1]= "done";
return gotoEnd();
function gotoEnd(){
const o= progress.reduce((o, [ k, v ])=> Reflect.set(o, k, v)&&o, {});
logSection(" ", pkg_name, o);
save(config);
}
}
function vim_(file){ return new Promise(function(resolve, reject){
const cmd= spawn((process.env.EDITOR||"vim")+(process.platform==="win32"?".bat":""), [ file ], { stdio: 'inherit' });
cmd.on('exit', e=> e ? reject("Editor error, try manually: "+file) : resolve("OK"));
});}
async function update_(config){
const filter= current.param;
const is_all= filter==="all";
let updates= [];
log(1, "Collecting packages to download:");
for(const [
i, { repository, last_update, group, file_name, exec, downloaded, tag_name_regex }
] of Object.entries(config.packages)){
if(group==="skip") continue;
if(!is_all&&group&&filter!==group) continue;
const { tag_name, published_at, html_url, assets_url }= await githubRelease_(repository, tag_name_regex);
const status= packageStatus(last_update, published_at);
if(status!==3) continue;
const assets= await downloadJSON_(repository, assets_url);
if(!assets.length){
console.log(" Nothing to download: Visit "+html_url);
continue;
}
const options= assets.map(({ name, download_count, size })=>
`${name} | size: ${Math.round(size/1048576)}MB | downloads: ${download_count}`);
logSection(" ", " "+repository, {
"Version": tag_name,
"Url": html_url
});
logSection(" ", " Available assets:", options);
const choose= await promt_(" Choose (empty for skip)", "");
if(choose==="") continue;
const { browser_download_url: url, name: remote_name, size }= assets[choose];
updates.push({
index: i,
file_name, exec, downloaded,
repository, version: tag_name, last_update: published_at,
url, remote_name, size
});
}
if(!updates.length){
log(2, "No packages in "+`group ${filter} needs updates.`);
return Promise.resolve("nothing to update");
}
log(1, "Downloading:");
return applySequentially_(updates, async function(todo){
const to= todo.file_name ? info.folder+todo.file_name : (
todo.downloaded ? todo.downloaded : info.folder+todo.remote_name);
const d= await downloadFile_(to, todo);
return Object.assign(todo, d);
})
.then(function(dones){
log(1, "Finalizing:");
let e= 0;
for(const nth of dones){
if(!nth.success){
e+= 1;
log(2, `${nth.repository}: @e_${nth.message}`);
continue;
}
Object.assign(config.packages[nth.index], registerDownloads(nth));
}
save(config);
const { length }= dones;
const msg= `updated ${length-e} of ${length} packages.`;
return e ? Promise.reject(msg) : Promise.resolve(msg);
});
}
function registerDownloads({ repository, last_update, message: downloads, exec, version }){
let msg= colors.s+"OK";
if(exec==="yes"){
try{ fs.chmodSync(downloads, 0o755); }
catch(e){ msg= colors.e+"try manual `chmod+x` for '"+downloads+"'"; }
}
log(2, `${repository}: ${msg}`);
return { last_update, downloads, version };
}
async function check_({ packages }){
let updates= 0, skipped= 0;
for(const { repository, name, version, last_update, group, tag_name_regex } of packages){
const { tag_name, published_at }= await githubRelease_(repository, tag_name_regex);
const status= packageStatus(last_update, published_at);
updates+= status===3;
const skip= group==="skip";
skipped+= skip;
log(2, `@g_${repository} [${group}]: `+( !version ? "not installed" : packageStatusText(status, skip) ));
}
const u= updates-skipped;
const s= skipped ? ` (inc. skipped: ${updates})` : "";
return (!u ? "" : colors.w)+u+" update(s) available"+s;
}
async function register_(config){
const { param: repository }= current;
if(!Reflect.has(config, "packages")) Reflect.set(config, "packages", []);
const packages= Reflect.get(config, "packages");
let local_id= packages.findIndex(p=> p.repository===repository);
if(local_id===-1)
local_id= packages.push({ repository })-1;
const local= config.packages[local_id];
const remote= await githubRepo_(repository) || {};
log(1, "Registering: "+repository);
const spaces= " ";
local.name= await promt_(spaces+"Name", local.name || remote.name || "");
if(!local.description) local.description= remote.description;
logLines(2, [
"@g_Group info:",
"- you can update specific packages by using their group name",
"- There some reserved options:",
" - '' (empty): will be included in all groups",
" - 'skip': will be always skipped"
]);
local.group= await promt_(spaces+"Group", local.group || "");
local.file_name= await promt_(spaces+"File Name", local.file_name || local.name.toLowerCase().replace(/\s/g, "-") || "");
local.exec= await promt_(spaces+"Make executable (yes/no)", local.exec || "no");
save(config);
return `${repository}: saved`;
}
function packageStatusText(status, skip){
const s= skip ? colors.R+"skipped "+colors.g : "";
switch(status){
case 0: return s+"nothing to compare";
case 1: return s+"@s_up-to-date";
case 2: return s+"newer";
case 3: return s+"@e_outdated/not instaled";
}
}
function packageStatus(local, remote){
if(!remote) return 0;
if(!local) return 3;
if(remote===local) return 1;
return 2+(local<remote);
}
function logSection(spaces, name, data){
console.log(spaces+name);
for(const [ key, value ] of Object.entries(data))
console.log(spaces.repeat(2)+colors.g+key+": "+value.replace(/@(\w)_/g, (_, m)=> colors[m])+colors.R);
}
function githubRelease_(repository, tag_name_regex= ""){
return downloadJSON_(repository, "https://api.github.com/repos/"+repository+"/releases")
.then(data=> data.find(function find({ 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);
})||{});
}
function githubRepo_(repository){ return downloadJSON_(repository, "https://api.github.com/repos/"+repository); }
function promt_(q, def){
const rl= readline.createInterface({ input: process.stdin, output: process.stdout });
return new Promise(function(resolve){
rl.question(q+": ", a=> { rl.close(); resolve(a); });
rl.write(def);
});
}
function getConfig(){
let config;
try{ config= JSON.parse(fs.readFileSync(info.config)); }
catch(e){ config= {}; log(1, "@w_Missing or corrupted config file. Creates empty one."); }
return config;
}
function save(config){
return fs.writeFileSync(info.config, JSON.stringify(config, null, " "));
}
function getCurrent(args){
let command, command_arg, param;
const hasArg= arg=> ({ args })=> args.includes(arg);
for(let i=0, { length }= args, arg; i<length; i++){
arg= args[i];
if(!command){
command= info.commands.find(hasArg(arg));
command_arg= arg;
continue;
}
if(!command.param||typeof param!=="undefined")
break;
param= arg;
}
if(!command)
command= { cmd: "" };
if(command.param&&typeof param==="undefined")
return error(`Missign arguments for '${command_arg}'.`);
return { command, param };
}
function downloadJSON_(repository, url){
return downloadText_(url)
.then(function(data){
try{
const response= JSON.parse(data);
if(Reflect.has(response, "message")) throw new Error(response.message);
return Promise.resolve(JSON.parse(data));
} catch(e){
log(1, "Received data: "+data);
log(1, "@e_"+e);
return Promise.reject(`JSON from '${repository}' failed.`);
}
});
}
function downloadText_(url){
return get_(url)
.then(function(response){ return new Promise(function(resolve){
let data= "";
response.on("data", chunk=> data+= chunk);
response.on("end", ()=> resolve(data));
}); });
}
function downloadFile_(to, { url, repository, size }){
const file= fs.createWriteStream(to);
return get_(url)
.then(r=> get_(r.headers.location))
.then(function(response){ return new Promise(function(resolve){
let progress= 0, pc_prev= 0, avg= 0;
const start= new Date();
const i= setInterval(function(){
readline.clearLine(process.stdout);
const pc= (100*progress/size).toFixed(2);
if(!pc_prev) pc_prev= pc;
else {
avg= ((100-pc)/(60*(pc-pc_prev))).toFixed(2);
pc_prev= 0;
}
const running= ((new Date()-start)/60000).toFixed(2);
log(2, repository+": "+pc+"%"+` (end in ~${avg} mins, running ${running} mins)`);
readline.moveCursor(process.stdout, 0, -1);
}, 500);
response.on('data', function(chunk){
file.write(chunk);
progress+= chunk.length;
});
response.on('end', function(){
clearInterval(i);
readline.clearLine(process.stdout);
log(2, repository+": @s_OK");
file.close(()=> resolve({ success: 1, message: to })); /* close() is async, call cb after close completes. */
});
}); })
.catch(({ message })=> {
fs.unlink(to); // Delete the file async. (But we don't check the result)
return { success: 0, message };
});
}
function get_(url){ return new Promise(function(resolve, reject){
https.get(
url,
{ headers: { 'Cache-Control': 'no-cache', 'User-Agent': 'node' } },
resolve
).on("error", reject);
});}
function applySequentially_(input, pF){
const data= [];
let p= pF(input[0]);
const tie= nth=> result_mth=> ( data.push(result_mth), pF(input[nth]) );
for(let i= 1, { length }= input; i<length; i++)
p= p.then(tie(i));
return p.then(o=> (data.push(o), data));
}
function error(message){
const help_text= `@w_See help using '${info.commands[0].args[0]}'.`;
log(1, `@e_Error: ${message} ${help_text}`);
return process.exit(1);
}
function printMain(){
const { name, version, description }= info;
log(1, `@w_${name}@${version}`);
log(1, description);
const cmds= info.commands.map(({args})=> args[0].replace("--", "")).join(", ");
log(1, `@w_Usage: ${name} --[cmd] [param]`);
log(2, `…cmd: ${cmds}`);
log(2, "…param: Based on cmd\n");
}
function printHelp(){
log(1, "@s_Help:");
log(2, "Commands:");
info.commands.forEach(({ args, param, desc })=> {
const args_text= args.join("|");
param= param ? " "+param : "";
log(3, `@g_${args_text}@R_${param}`);
logLines(4, desc);
});
log(2, "Params:");
for(const [ param, desc ] of Object.entries(info.params)){
log(3, `@g_${param}`);
logLines(4, desc);
}
}
function log(tab, text){
return console.log(" ".repeat(tab)+text.replace(/@(\w)_/g, (_, m)=> colors[m])+colors.R);
}
function logLines(tab, multiline_text){
if(!Array.isArray(multiline_text)) multiline_text= multiline_text.split(/(?<=\.) /g);
return log(tab, multiline_text.join("\n"+" ".repeat(tab)));
}

View File

@ -1,238 +0,0 @@
{
"packages": [
{
"repository": "shiftkey/desktop",
"name": "GitHub Desktop",
"group": "dev",
"file_name": "github-desktop",
"exec": "yes",
"description": "Fork of GitHub Desktop to support various Linux distributions",
"last_update": "2024-03-31T17:49:36Z",
"downloads": "/home/jaandrle/bin/github-desktop",
"version": "release-3.3.12-linux2"
},
{
"repository": "jaandrle/jaaCSS-cli",
"name": "jaaCSS",
"description": "EXPERIMENT Helper for managing functional CSS classes",
"group": "dev",
"file_name": "jaaCSS.js",
"exec": "yes",
"downloads": "/home/jaandrle/bin/jaaCSS.js",
"version": "v1.3.2",
"last_update": "2022-09-02T13:33:16Z"
},
{
"repository": "th-ch/youtube-music",
"name": "youtube-music",
"description": "YouTube Music Desktop App bundled with custom plugins (and built-in ad blocker / downloader)",
"group": "nondev",
"file_name": "youtube-music",
"exec": "yes",
"last_update": "2024-03-26T10:58:44Z",
"downloads": "/home/jaandrle/bin/youtube-music",
"version": "v3.3.5"
},
{
"repository": "ArchGPT/insomnium",
"name": "insomnium",
"description": "Insomnium is a fast local API testing tool that is privacy-focused and 100% local. For testing GraphQL, REST, WebSockets and gRPC. This is a fork of Kong/insomnia",
"group": "dev",
"file_name": "insomnium",
"exec": "yes",
"last_update": "2023-11-13T10:03:28Z",
"downloads": "/home/jaandrle/bin/insomnium",
"tag_name_regex": "core@.*",
"version": "core@0.2.3-a"
},
{
"repository": "Kong/insomnia",
"name": "insomnia",
"description": "The open-source, cross-platform API client for GraphQL, REST, and gRPC.",
"group": "skip",
"file_name": "insomnia",
"exec": "yes",
"last_update": "2023-10-16T10:03:28Z",
"downloads": "/home/jaandrle/bin/insomnia",
"tag_name_regex": "core@.*",
"version": "core@8.3.0"
},
{
"repository": "rvpanoz/luna",
"name": "luna",
"description": "Manage npm dependencies through a modern UI.",
"group": "skip",
"file_name": "luna",
"exec": "yes"
},
{
"repository": "angela-d/wifi-channel-watcher",
"name": "wifi-channel-watcher",
"group": "skip",
"file_name": "wifi-channel-watcher",
"exec": "no",
"description": "Monitor channel usage of neighboring routers & get an alert if your active channel is not optimal.\tTroubleshoot wifi without lifting a finger!"
},
{
"repository": "vinceliuice/Tela-circle-icon-theme",
"name": "Tela-circle-icon-theme",
"description": "Tela-circle-icon-theme",
"group": "themes",
"file_name": "tela-circle-icon-theme.zip",
"last_update": "2021-07-19T14:12:05Z",
"exec": "no"
},
{
"repository": "AppImage/AppImageKit",
"name": "AppImageKit",
"group": "skip",
"file_name": "appimagekit",
"exec": "yes",
"description": "Package desktop applications as AppImages that run on common Linux-based operating systems, such as RHEL, CentOS, openSUSE, SLED, Ubuntu, Fedora, debian and derivatives. Join #AppImage on irc.freenode.net"
},
{
"repository": "dynobo/normcap",
"name": "NormCap",
"description": "Switched to flatpak version | OCR powered screen-capture tool to capture information instead of images",
"group": "skip",
"file_name": "normcap",
"exec": "yes",
"last_update": "2023-12-12T22:23:37Z",
"downloads": "/home/jaandrle/bin/normcap",
"version": "v0.5.2"
},
{
"repository": "upscayl/upscayl",
"name": "upscayl",
"description": "🆙 Upscayl - Free and Open Source AI Image Upscaler for Linux, MacOS and Windows built with Linux-First philosophy.",
"group": "nondev",
"file_name": "upscayl",
"exec": "yes",
"last_update": "2024-02-29T16:31:09Z",
"downloads": "/home/jaandrle/bin/upscayl",
"version": "v2.10.0"
},
{
"repository": "RasmusLindroth/tut",
"name": "tut",
"description": "TUI for Mastodon with vim inspired keys",
"group": "nondev",
"file_name": "tut",
"exec": "yes",
"last_update": "2023-01-26T17:48:00Z",
"downloads": "/home/jaandrle/bin/tut",
"version": "2.0.1"
},
{
"repository": "sunner/ChatALL",
"name": "ChatALL",
"description": " Concurrently chat with ChatGPT, Bing Chat, bard, Alpaca, Vincuna, Claude, ChatGLM, MOSS, iFlytek Spark, ERNIE and more, discover the best answers",
"group": "skip",
"file_name": "chatall",
"exec": "yes",
"last_update": "2023-09-30T14:08:00Z",
"downloads": "/home/jaandrle/bin/chatall",
"version": "v1.50.73"
},
{
"repository": "jaandrle/bs",
"name": "bs",
"description": "The simplest possible build system using executables",
"group": "dev",
"file_name": "bs",
"exec": "yes",
"last_update": "2024-03-28T13:16:41Z",
"downloads": "/home/jaandrle/bin/bs",
"version": "v0.7.4"
},
{
"repository": "h3poteto/fedistar",
"name": "Fedistar",
"description": "Multi-column Mastodon, Pleroma, and Friendica client for desktop",
"group": "nondev",
"file_name": "fedistar",
"exec": "yes",
"last_update": "2024-03-29T15:39:36Z",
"downloads": "/home/jaandrle/bin/fedistar",
"version": "v1.9.2"
},
{
"repository": "ollama/ollama",
"name": "ollama",
"description": "Get up and running with Llama 2 and other large language models locally",
"group": "ai",
"file_name": "ollama",
"exec": "yes",
"last_update": "2024-03-10T02:24:04Z",
"downloads": "/home/jaandrle/bin/ollama",
"version": "v0.1.29"
},
{
"repository": "neovim/neovim",
"name": "neovim",
"tag_name_regex": "v.*",
"description": "Vim-fork focused on extensibility and usability",
"group": "dev-test",
"file_name": "nvim",
"exec": "yes",
"downloads": "/home/jaandrle/bin/nvim",
"version": "v0.9.5",
"last_update": "2023-12-30T13:31:47Z"
},
{
"repository": "viarotel-org/escrcpy",
"name": "Escrcpy",
"description": "📱 Graphical Scrcpy to display and control Android, devices powered by Electron. | 使用图形化的 Scrcpy 显示和控制您的 Android 设备,由 Electron 驱动。",
"group": "dev",
"file_name": "escrcpy",
"exec": "yes",
"last_update": "2024-03-29T03:30:14Z",
"downloads": "/home/jaandrle/bin/escrcpy",
"version": "v1.17.8"
},
{
"repository": "drovp/drovp",
"name": "drovp",
"description": "Desktop app for encoding, converting, upscaling, and much more.",
"group": "dev-test",
"file_name": "drovp",
"exec": "yes",
"last_update": "2023-12-06T11:30:02Z",
"downloads": "/home/jaandrle/bin/drovp",
"version": "0.8.0"
},
{
"repository": "janhq/jan",
"name": "Jan",
"description": "Jan is an open source alternative to ChatGPT that runs 100% offline on your computer",
"group": "ai",
"file_name": "jan",
"exec": "yes",
"last_update": "2024-03-11T06:34:40Z",
"downloads": "/home/jaandrle/bin/jan",
"version": "v0.4.8"
},
{
"repository": "Bin-Huang/chatbox",
"name": "Chatbox",
"description": "Chatbox is a desktop client for ChatGPT, Claude and other LLMs, available on Windows, Mac, Linux",
"group": "ai",
"file_name": "Chatbox",
"exec": "yes",
"last_update": "2024-03-15T15:58:59Z",
"downloads": "/home/jaandrle/bin/Chatbox",
"version": "v1.3.1"
},
{
"repository": "Helium314/HeliBoard",
"name": "HeliBoard",
"description": "Customizable and privacy-conscious open-source keyboard",
"group": "android",
"file_name": "heliboard.apk",
"exec": "no",
"last_update": "2024-03-31T20:11:03Z",
"downloads": "/home/jaandrle/bin/heliboard.apk",
"version": "v1.0"
}
]
}

View File

@ -34,10 +34,16 @@
*/ */
import { join } from "node:path"; import { join } from "node:path";
const path_config= $.xdg.config`github-releases`; const path_config= $.xdg.config`github-releases`;
const path_config_json= join(path_config, "config.json"); const paths= {
const path_config_lock= join(path_config, "lock"); /** config file path — JSON stringify of {@link Config} */ config: join(path_config, "config.json"),
/** path to lock file to prevent multiple instances */ lock: join(path_config, "lock"),
};
const path_temp= $.xdg.temp`github-releases.json`; const path_temp= $.xdg.temp`github-releases.json`;
const url_api= "https://api.github.com/repos/"; // "https://ungh.cc/repos/"; let url_api= "github";
const urls_api= {
github: "https://api.github.com/repos/",
ungh: "https://ungh.cc/repos/"
};
const url_download= "https://glare.now.sh/"; // https://github.com/Contextualist/glare const url_download= "https://glare.now.sh/"; // https://github.com/Contextualist/glare
const css= echo.css` const css= echo.css`
.pkg { color: lightcyan; } .pkg { color: lightcyan; }
@ -48,43 +54,95 @@ const css= echo.css`
`; `;
$.api() $.api()
.version("2.0.0") .version("2.2.0")
.describe("Helper for working with “packages” stored in GitHub releases.") .describe("Helper for working with “packages” stored in GitHub releases.")
.command("config [mode]", [ "Config (file), use `mode` with these options:", .option("--verbose", "Verbose output (WIP)")
.option("--group, -G", "Filter by group (not awaiable for noGRA)")
.option("--repository, -R", "Filter by repository (not awaiable for noGRA)")
.option("--api", [ "Choose API URL",
"- GitHub (default): https://api.github.com/repos/",
"- Ungh: https://ungh.cc/repos/", "(not awaiable for noGRA)" ], "github")
.command("unlock", "[noGRA] DANGER: Removes lock file. Use only if you know what you are doing!")
.action(function(){
s.rm(paths.lock);
})
.command("config [mode]", [ "[noGRA] Config (file), use `mode` with these options:",
"- `edit`: opens config file in terminal editor using `$EDITOR` (defaults to vim)", "- `edit`: opens config file in terminal editor using `$EDITOR` (defaults to vim)",
"- `path`: prints path to config file" "- `path`: prints path to config file"
]) ])
.action(async function(mode= "path"){ .action(async function(mode= "path"){
switch(mode){ switch(mode){
case "path": echo(path_config_json); break; case "path": echo(paths.config); break;
case "edit": case "edit":
const editor= $.env.EDITOR || "vim"; const editor= $.env.EDITOR || "vim";
await s.runA`${editor} ${path_config_json}`.pipe(process.stdout); await s.runA`${editor} ${paths.config}`.pipe(process.stdout);
break; break;
default: default:
echo(`Unknown mode: '${mode}'. See '--help' for details.`); echo(`Unknown mode: '${mode}'. See '--help' for details.`);
} }
$.exit(0); $.exit(0);
}) })
.command("edit <repository>", "Edit “package” information")
.alias("add")
.action(async function(repository){
if(!repository || !repository.includes("/"))
$.error(`Invalid repository: '${repository}'. Repository must be in the form '<owner>/<repo>'.`);
const config= /** @type {Config} */ ( readConfig() );
const i= config.packages.findIndex(r=> r.repository===repository);
echo(repository + `${i==-1 ? "New" : "Edit"} package:`);
echo(`Use <tab> to autocomplete${i===-1 ? "" : " and empty to keep current value"}.`);
echo("");
const pkg= config.packages[i] || { repository, group: "" };
const groups= [ ...new Set(config.packages.map(r=> r.group)) ];
const q= (question, initial, ...c)=> {
const completions= [ ...new Set([initial, ...c.flat()]) ].filter(Boolean);
if(initial) question+= ` (current \`${initial}\`)`;
question= echo.format("%c"+question, css.pkg);
return s.read({ "-p": question+": ", completions }).then(pipe(
value=> value || initial,
value=> value ? value : $.error(`Missing '${question}'.`)
));
};
try{
const name= await q("Name", pkg.name);
echo("(i) use `skip` as part of the group to skip it during checking/updating (“just register package”).");
const group= await q("Group", pkg.group, groups);
const { description: description_remote }= await fetch(urls_api[url_api]+repository).then(r=> r.json()).catch(_=> ({}));
const description= await q("Description", pkg.description, description_remote);
const file_name= await q("File name", pkg.file_name, repository.split("/"));
const downloads= config.target+file_name;
const exec= await q("Is executable", pkg.exec, [ "yes", "no" ]);
echo("(i) The glare is used to determine the right file to download. It is regular expression.");
const glare= await q("Glare", pkg.glare);
const pkg_edit= Object.assign({}, pkg,
{ repository, name, description, group, file_name, exec, downloads, glare });
config.packages[i===-1 ? config.packages.length : i]= pkg_edit;
s.echo(JSON.stringify(config, null, "\t")).to(paths.config);
echo(`%cSaved into config file '${paths.config}'.`, css.ok);
$.exit(0);
} catch(e){
if(e instanceof $.Error) echo("%c"+e, css.err);
else echo();
$.exit(1);
}
})
.command("ls", [ "Lists registered packages", .command("ls", [ "Lists registered packages",
"Repositories marked with `-` signifies that the package is in the 'skip' group.", "Repositories marked with `-` signifies that the package is in the 'skip' group.",
"These are registered by this script but not managed by it (updates, etc).", "These are registered by this script but not managed by it (updates, etc).",
"Repositories marked with `+` signify that updates of the package are checked." "Repositories marked with `+` signify that updates of the package are checked."
]) ])
.option("--group, -G", "Filter by group")
.option("--repository, -R", "Filter by repository")
.action(function(filter){ .action(function(filter){
const config = readConfig(); const config = readConfig();
for(const { repository, version, description, group } of grepPackages(config, filter)) for(const { repository, version, description, group } of grepPackages(config, filter))
if(group!=="skip") if(group && !group.includes("skip"))
echo(`+ %c${repository}%c@${version ? version : "—"}: %c${description}`, css.pkg, css.unset, css.skip); echo(`+ %c${repository}%c@${version ? version : "—"}: %c${description}`, css.pkg, css.unset, css.skip);
else else
echo(`- %c${repository}: ${description}`, css.skip); echo(`- %c${repository}: ${description}`, css.skip);
$.exit(0); $.exit(0);
}) })
.command("check", "Shows/checks updates for registered packages") .command("check", "Shows/checks updates for registered packages")
.option("--group, -G", "Filter by group")
.option("--repository, -R", "Filter by repository")
.option("--cache", "Use cache [yes, no]", "yes") .option("--cache", "Use cache [yes, no]", "yes")
.action(async function({ cache, ...filter }){ .action(async function({ cache, ...filter }){
const config = readConfig(); const config = readConfig();
@ -95,20 +153,17 @@ $.api()
$.exit(0); $.exit(0);
}) })
.command("update", "Updates registered packages") .command("update", "Updates registered packages")
.option("--group, -G", "Filter by group")
.option("--repository, -R", "Filter by repository")
.action(async function(filter){ .action(async function(filter){
if(s.test("-f", path_config_lock)) if(s.test("-f", paths.lock))
return $.error(`The lock file '${path_config_lock}' already exists! Check if some other instance is running.`); return $.error(`The lock file '${paths.lock}' already exists! Check if some other instance is running.`);
s.touch(path_config_lock); s.touch(paths.lock);
const config = readConfig(); const config = readConfig();
const results= await check(grepPackages(config, filter)); const results= await check(grepPackages(config, filter));
const start= Date.now();
let done= 0; let done= 0;
let todo= []; let todo= [];
echo("Collecting packages to update…"); echo("Collecting packages to update…");
for(const { status, value } of results){ for(const { status, value } of results){
if(status!==3 || value.local.group==="skip") continue; if(status!==3 || (value.local.group || "skip").includes("skip")) continue;
echo("%c"+value.local.repository, css.pkg); echo("%c"+value.local.repository, css.pkg);
todo.push(download( todo.push(download(
value, value,
@ -127,15 +182,15 @@ $.api()
echo("Updating packages completed:"); echo("Updating packages completed:");
for (const { status, value, reason } of updates) { for (const { status, value, reason } of updates) {
if(status==="rejected"){ if(status==="rejected"){
echo("%c✗ "+reason.local.repository+": %c"+reason.err, css.err); echo("%c✗ TBD reason.local.repository: %c"+reason.err, css.err);
continue; continue;
} }
const { local, remote }= value; const { local, remote }= value;
echo("%c✓ "+local.repository+"%c@"+remote.tag_name, css.ok, css.skip); echo("%c✓ "+local.repository+"%c@"+remote.tag_name, css.ok, css.skip);
} }
s.echo(JSON.stringify(config, null, "\t")).to(path_config_json); s.echo(JSON.stringify(config, null, "\t")).to(paths.config);
} }
s.rm(path_config_lock); s.rm(paths.lock);
$.exit(0); $.exit(0);
}) })
.parse(); .parse();
@ -162,17 +217,23 @@ async function download(value, onprogress, target){
return value; return value;
} }
function grepPackages({ packages }, { group, repository }){ function grepPackages({ packages }, { group, repository, api, verbose }){
if(api && api!==url_api && urls_api.hasOwnProperty(api))
url_api= api;
if(verbose)
echo(`Using API: ${url_api} (${urls_api[url_api]})`);
const f= {}; const f= {};
let is_filter= false; let is_filter= false;
if(group){ is_filter= true; f.group= group; } if(group){ is_filter= true; f.group= group; }
if(repository){ is_filter= true; f.repository= repository; } if(repository){ is_filter= true; f.repository= repository; }
if(verbose)
echo("Filter:", f);
if(!is_filter) return packages; if(!is_filter) return packages;
return packages.filter(r=> Object.keys(f).every(k=> r[k]===f[k])); return packages.filter(r=> Object.keys(f).every(k=> r[k]===f[k]));
} }
function echoPkgStatus(status, { local, remote }){ function echoPkgStatus(status, { local, remote }){
let status_css, status_text; let status_css, status_text;
if(local.group==="skip"){ if(local.group && local.group.includes("skip")){
status_text= "skipped"; status_text= "skipped";
status_css= "skip"; status_css= "skip";
} else { } else {
@ -184,7 +245,7 @@ function echoPkgStatus(status, { local, remote }){
} }
/** /**
* @param {Config.packages} packages * @param {Config.packages} packages
* @return {{ status: 0|1|2|3, value: { remote: GitHubRelease, local: ConfigPackage } }} * @return {Promise<{ status: 0|1|2|3, value: { remote: GitHubRelease, local: ConfigPackage } }>}
* */ * */
async function check(packages, cache){ async function check(packages, cache){
return (await pipe( return (await pipe(
@ -211,7 +272,7 @@ function packageStatus({ last_update: local }, { published_at: remote }){
async function fetchRelease({ repository, tag_name_regex }, cache){ async function fetchRelease({ repository, tag_name_regex }, cache){
const headers= { 'User-Agent': 'node' }; const headers= { 'User-Agent': 'node' };
if(cache==="no") headers['Cache-Control'] = 'no-cache'; if(cache==="no") headers['Cache-Control'] = 'no-cache';
const url= url_api+repository+"/releases"; const url= urls_api[url_api]+repository+"/releases";
const releases= await fetch(url, { headers }).then(res=> res.json()); const releases= await fetch(url, { headers }).then(res=> res.json());
if(releases.message) return $.error(url+": "+releases.message); if(releases.message) return $.error(url+": "+releases.message);
@ -231,9 +292,9 @@ async function fetchRelease({ repository, tag_name_regex }, cache){
} }
function readConfig(){ function readConfig(){
if(!s.test("-f", path_config_json)) return { packages: [] }; if(!s.test("-f", paths.config)) return { packages: [] };
const out= Object.assign({ target: "~/bin/" }, const out= Object.assign({ target: "~/bin/" },
s.cat(path_config_json).xargs(JSON.parse)); s.cat(paths.config).xargs(JSON.parse));
if(out.target.startsWith("~/")) out.target= $.xdg.home(out.target.slice(2)); if(out.target.startsWith("~/")) out.target= $.xdg.home(out.target.slice(2));
return out; return out;
} }

View File

@ -1,9 +0,0 @@
#!/bin/bash
if [[ $(mount | grep OneDrive) ]]; then
fusermount -uz ~/Vzdálené/OneDrive
notify-send -i system-file-manager "OneDrive disk ODPOJEN"
else
rclone --vfs-cache-mode full mount "onedrive": ~/Vzdálené/OneDrive &
dolphin ~/Vzdálené/OneDrive/ &
notify-send -i system-file-manager "OneDrive disk PŘIPOJEN"
fi

View File

@ -1,10 +0,0 @@
[ ! -r ~/.config/pocketshaddrc ] && echo "\`~/.config/pocketshaddrc\` not found" && exit 1
. ~/.config/pocketshaddrc
curl -sS -X POST \
-F "url=$1" \
-F "title=$2" \
-F "consumer_key=$CONSUMER_KEY" \
-F "access_token=$ACCESS_TOKEN" \
https://getpocket.com/v3/add \
> /dev/null

View File

@ -2,8 +2,8 @@
/* jshint esversion: 11,-W097, -W040, module: true, node: true, expr: true, undef: true *//* global echo, $, pipe, s, fetch, cyclicLoop */ /* jshint esversion: 11,-W097, -W040, module: true, node: true, expr: true, undef: true *//* global echo, $, pipe, s, fetch, cyclicLoop */
$.api("") $.api("")
.version("2024-03-18") .version("2024-09-05")
.command("silicon [file]", [ .command("silicon <file>", [
"Generovat obrázek s kódem pro sdílení na sociálních sítích. (alternativa k Carbon)", "Generovat obrázek s kódem pro sdílení na sociálních sítích. (alternativa k Carbon)",
"Toto je jen drobný wrapper s mými defaultními parametry.", "Toto je jen drobný wrapper s mými defaultními parametry.",
"Další nápověda viz `silicon --help`.", "Další nápověda viz `silicon --help`.",

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("2025-04-02")
.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,21 @@ $.api()
}; };
const paths= await downloadImages(images); const paths= await downloadImages(images);
updateHTML(images); updateHTML(images);
convert(paths); const images_save= Object.entries(images)
pipe( .reduce((acc, [ key, { caption } ])=>
images=> Object.entries(images) Reflect.set(acc, key, caption) && acc,
.reduce((acc, [ key, { caption } ])=> {});
Reflect.set(acc, key, caption) && acc, convert(paths, images_save);
{}), s.echo(JSON.stringify(images_save, null, "\t")).to(path_info);
images=> JSON.stringify(images, null, "\t"), newPanel(images_save.now);
s.echo $.exit(0);
)(images).to(path_info); })
.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);
newPanel(images.now);
$.exit(0); $.exit(0);
}) })
.command("status") .command("status")
@ -37,16 +43,42 @@ $.api()
$.exit(0); $.exit(0);
}) })
.parse(); .parse();
function newPanel(caption){
const link= `<a href="https://commons.wikimedia.org/wiki/Template:Potd/${dateISO(0)} (cs)">(i)</a>`;
s.sed("-i", /\<aside\>.*?\<\/aside\>/, `<aside>${link} ${caption}</aside>`, join(path_home, "Nový panel.html"));
}
/** @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 */
@ -70,8 +102,15 @@ async function getImagePath(shift= 0){
prop: "wikitext", prop: "wikitext",
text: `{{Potd/${date}}}`, text: `{{Potd/${date}}}`,
}); });
const pluckCaption= response=> response.expandtemplates.wikitext;
const caption_fallback= await fetchGet({
action: "expandtemplates",
prop: "wikitext",
text: `{{Potd/${date} (en)}}`,
}).then(pluckCaption);
const caption= pipe( const caption= pipe(
response=> response.expandtemplates.wikitext, pluckCaption,
caption=> caption !== `[[:Template:Potd/${date} (cs)]]` ? caption : caption_fallback,
caption=> caption.replace(/\[\[.*?\]\]/g, m=> m.slice(2, -2).split("|").reverse()[0]), caption=> caption.replace(/\[\[.*?\]\]/g, m=> m.slice(2, -2).split("|").reverse()[0]),
caption=> caption.replace(/''(.*?)''/g, "„$1”"), caption=> caption.replace(/''(.*?)''/g, "„$1”"),
)(await fetchGet({ )(await fetchGet({