Compare commits
17 Commits
main-termu
...
9737f6cdab
Author | SHA1 | Date | |
---|---|---|---|
9737f6cdab
|
|||
4f578e0bb0
|
|||
9051f04328
|
|||
98073783bf
|
|||
08ee9f8b0e
|
|||
068db0c3c8
|
|||
7f4d93f4d2
|
|||
621832506c
|
|||
36376a2e34
|
|||
6269463d7b
|
|||
34dd9f4b01
|
|||
5c4a9851e6
|
|||
3495c81c49
|
|||
5dd77c49a0
|
|||
15be72893c
|
|||
43d220be01
|
|||
8210faf9ce
|
@ -42,7 +42,7 @@ history_most_used(){ LC_ALL=C cat ~/.bash_history | cut -d ';' -f 2- | §awk 1 |
|
||||
ls ~/bin | grep -P "^§" | sed 's/^§/~\/bin\/ §/'
|
||||
}
|
||||
|
||||
alias §ls='ls -pQFh --group-directories-first'
|
||||
alias ls='ls -pQFh --group-directories-first'
|
||||
alias §less='less -R -S'
|
||||
|
||||
alias §cd.='clear;§ls'
|
||||
@ -64,7 +64,8 @@ alias §find.='find . -maxdepth 1'
|
||||
alias pdftk='java -jar $HOME/bin/pdftk-all.jar'
|
||||
bw-session(){
|
||||
bw logout
|
||||
login=`kwallet-query kdewallet -f accounts -r Bitwarden 2> /dev/null`
|
||||
# login=`kwallet-query kdewallet -f accounts -r Bitwarden 2> /dev/null`
|
||||
login=$(§kwallet.mjs --wallet kdewallet readPassword accounts bw-json)
|
||||
export BW_CLIENTSECRET=`echo "$login" | jq -r .secret`
|
||||
export BW_CLIENTID=`echo "$login" | jq -r .id`
|
||||
bw login --apikey --raw
|
||||
|
@ -16,6 +16,7 @@ function setPromt {
|
||||
}
|
||||
function updatePromt {
|
||||
local prev_exit="$?"
|
||||
# history -n; history -w; history -c; history -r;
|
||||
# color_helper_>>color<< (Note: \[\]= escaping)
|
||||
local chR="\[\e[1;91m\]" #red
|
||||
local chW="\[\033[00m\]" #white
|
||||
|
@ -1,16 +0,0 @@
|
||||
[Behavior]
|
||||
hideDockIcon=false
|
||||
hideMainWindowWhenStarted=true
|
||||
|
||||
[MainWindow]
|
||||
pos=@Point(0 0)
|
||||
size=@Size(640 480)
|
||||
|
||||
[RepoTreeView]
|
||||
expandedCategories-e77d1fb=Moje knihovny\tNed\xe1vno aktualizovan\xe9\tSd\xedleno se skupinama
|
||||
|
||||
[Settings]
|
||||
computerName=TUXEDO-InfinityBook-s15gen6
|
||||
|
||||
[UsedServerAddresses]
|
||||
main=https://seafile.jaandrle.cz/
|
@ -32,7 +32,7 @@
|
||||
"model_hash_override": null,
|
||||
"local_indexing": null,
|
||||
"heartbeat_interval_seconds": null,
|
||||
"last_service_level": "Cloud",
|
||||
"last_service_level": "FreeCloudRegistered",
|
||||
"override_beams": null,
|
||||
"override_context_length": null,
|
||||
"onboarding": null,
|
||||
|
@ -1,28 +1,3 @@
|
||||
# A valid snippet should starts with:
|
||||
#
|
||||
# snippet trigger_word [ "description" [ options ] ]
|
||||
#
|
||||
# and end with:
|
||||
#
|
||||
# endsnippet
|
||||
#
|
||||
# Snippet options:
|
||||
#
|
||||
# b - Beginning of line.
|
||||
# i - In-word expansion.
|
||||
# w - Word boundary.
|
||||
# r - Regular expression
|
||||
# e - Custom context snippet
|
||||
# A - Snippet will be triggered automatically, when condition matches.
|
||||
#
|
||||
# Basic example:
|
||||
#
|
||||
# snippet emitter "emitter properties" b
|
||||
# private readonly ${1} = new Emitter<$2>()
|
||||
# public readonly ${1/^_(.*)/$1/}: Event<$2> = this.$1.event
|
||||
# endsnippet
|
||||
#
|
||||
# Online reference: https://github.com/SirVer/ultisnips/blob/master/doc/UltiSnips.txt
|
||||
snippet sceleton "HTML5" b
|
||||
<!DOCTYPE html>
|
||||
<!-- ${0}DEL IE https://www.paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
|
||||
@ -50,6 +25,9 @@ endsnippet
|
||||
snippet cmt "comment"
|
||||
<!-- ${0} -->
|
||||
endsnippet
|
||||
snippet cmt.js "comment"
|
||||
/* ${0} */
|
||||
endsnippet
|
||||
|
||||
snippet viewport_cordova "viewport used in cordova apps"
|
||||
<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1"/>
|
||||
|
@ -1,25 +1,37 @@
|
||||
# A valid snippet should starts with:
|
||||
#
|
||||
# snippet trigger_word [ "description" [ options ] ]
|
||||
#
|
||||
# and end with:
|
||||
#
|
||||
# endsnippet
|
||||
#
|
||||
# Snippet options:
|
||||
#
|
||||
# b - Beginning of line.
|
||||
# i - In-word expansion.
|
||||
# w - Word boundary.
|
||||
# r - Regular expression
|
||||
# e - Custom context snippet
|
||||
# A - Snippet will be triggered automatically, when condition matches.
|
||||
#
|
||||
# Basic example:
|
||||
#
|
||||
# snippet emitter "emitter properties" b
|
||||
# private readonly ${1} = new Emitter<$2>()
|
||||
# public readonly ${1/^_(.*)/$1/}: Event<$2> = this.$1.event
|
||||
# endsnippet
|
||||
#
|
||||
# Online reference: https://github.com/SirVer/ultisnips/blob/master/doc/UltiSnips.txt
|
||||
extends html
|
||||
snippet sceleton "HTML5" b
|
||||
<!DOCTYPE html>
|
||||
<!-- ${0}DEL IE https://www.paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
|
||||
<html class="no-js" lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<!-- DEL IE https://stackoverflow.com/questions/6771258/what-does-meta-http-equiv-x-ua-compatible-content-ie-edge-do -->
|
||||
<!-- DEL https://www.vzhurudolu.cz/prirucka/viewport-meta -->
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<!-- DEL CSP https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP | https://github.com/Prinzhorn/minimal-csp -->
|
||||
<!-- DEL https://github.com/jensimmons/cssremedy -->
|
||||
|
||||
<!-- DEL meta značky obecně https://www.vzhurudolu.cz/prirucka/meta-open-graph -->
|
||||
<title></title>
|
||||
<meta name="description" content="">
|
||||
<!-- DEL IE https://www.sitepoint.com/html5-older-browsers-and-the-shiv/ -->
|
||||
<!-- DEL https://www.vzhurudolu.cz/prirucka/checklist -->
|
||||
</head>
|
||||
<body>
|
||||
<!-- DEL -->
|
||||
</body>
|
||||
</html>
|
||||
endsnippet
|
||||
|
||||
snippet cmt "comment"
|
||||
<!-- ${0} -->
|
||||
endsnippet
|
||||
|
||||
snippet viewport_cordova "viewport used in cordova apps"
|
||||
<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1"/>
|
||||
endsnippet
|
||||
snippet csp_cordova "CSP used in cordova"
|
||||
<meta http-equiv="Content-Security-Policy" content="default-src * gap://ready file: gulp_place('app.url_scheme', 'variable'):; style-src 'self' 'unsafe-inline'; img-src * data: *; script-src 'self' 'unsafe-inline' 'unsafe-eval'"/>
|
||||
<meta http-equiv="Content-Security-Policy" content="default-src *; style-src 'self' 'unsafe-inline'; img-src 'self' data: android-webview-video-poster:; script-src 'self' 'unsafe-inline' 'unsafe-eval'">
|
||||
endsnippet
|
||||
#endextends
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1 +1,124 @@
|
||||
extends javascript, html
|
||||
snippet sceleton_node "nodejs" b
|
||||
#!/usr/bin/env node
|
||||
/* jshint esversion: 8,-W097, -W040, node: true, expr: true, undef: true */
|
||||
${0}
|
||||
endsnippet
|
||||
snippet sceleton_cli "nodejsscript" b
|
||||
#!/usr/bin/env nodejsscript
|
||||
/* jshint esversion: 11,-W097, -W040, module: true, node: true, expr: true, undef: true *//* global echo, $, pipe, s, fetch, cyclicLoop */
|
||||
${0}
|
||||
endsnippet
|
||||
snippet sceleton_zx "zx" b
|
||||
#!/usr/bin/env zx
|
||||
/* jshint esversion: 8,-W097, -W040, node: true, expr: true, undef: true */
|
||||
${0}
|
||||
endsnippet
|
||||
snippet jshint "JSHint header" b
|
||||
/* jshint esversion: 6,-W097, -W040, browser: true, expr: true, undef: true */
|
||||
/* global ${0} */
|
||||
endsnippet
|
||||
snippet global "JSHint global"
|
||||
/* global ${0} */
|
||||
endsnippet
|
||||
snippet global_ns "JSHint global"
|
||||
/* ${1} *//* global ${0} */
|
||||
endsnippet
|
||||
snippet devel "JSHint devel"
|
||||
${1}/* jshint devel: true *///gulp.keep.line${0}
|
||||
endsnippet
|
||||
|
||||
snippet log "console.log"
|
||||
${1}console.log('${0}');
|
||||
endsnippet
|
||||
snippet stor "localStorage"
|
||||
${1}localStorage.${2:g}etItem("${0}");
|
||||
endsnippet
|
||||
|
||||
snippet import "import with backward order"
|
||||
import ${2:values} from "${1:specifier}";$0
|
||||
endsnippet
|
||||
snippet promise "return? new Promise"
|
||||
${1:return }new Promise(function(resolve, reject){
|
||||
${0:/* async code */}
|
||||
});
|
||||
endsnippet
|
||||
snippet for "classical loop"
|
||||
for(${1:let} ${2:i}= 0, ${2}_length= ${3:ITERABLE}.length; ${2}<${2}_length; ${2}++){
|
||||
${0:/* statement */}
|
||||
}
|
||||
endsnippet
|
||||
snippet foreach "PHP-like name" b
|
||||
for(${2:const} ${3:element} of ${1:iterable}){
|
||||
${0:/* statement */}
|
||||
}
|
||||
endsnippet
|
||||
snippet switch "classical switch"
|
||||
switch (${1}){
|
||||
case ${2}:
|
||||
${0}
|
||||
break;
|
||||
default:
|
||||
}
|
||||
endsnippet
|
||||
snippet desctr "object destructure"
|
||||
${1:const} { $0 }= ${2:def};
|
||||
endsnippet
|
||||
snippet ready "document ready"
|
||||
${1}document.addEventListener('DOMContentLoaded', ${0}, false)
|
||||
endsnippet
|
||||
snippet readyEvent "vanilla JS content ready event name"
|
||||
${1}DOMContentLoaded${0}
|
||||
endsnippet
|
||||
|
||||
snippet selid
|
||||
${1}document.getElementById('${0}')
|
||||
endsnippet
|
||||
snippet seltag
|
||||
${1}getElementsByTagName('${0}')
|
||||
endsnippet
|
||||
snippet selclass
|
||||
${1}getElementsByClassName('${0}')
|
||||
endsnippet
|
||||
snippet sel
|
||||
${1}querySelector('${0}')
|
||||
endsnippet
|
||||
snippet selall
|
||||
${1}querySelectorAll('${0}')
|
||||
endsnippet
|
||||
snippet sceleton "HTML5" b
|
||||
<!DOCTYPE html>
|
||||
<!-- ${0}DEL IE https://www.paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
|
||||
<html class="no-js" lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<!-- DEL IE https://stackoverflow.com/questions/6771258/what-does-meta-http-equiv-x-ua-compatible-content-ie-edge-do -->
|
||||
<!-- DEL https://www.vzhurudolu.cz/prirucka/viewport-meta -->
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<!-- DEL CSP https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP | https://github.com/Prinzhorn/minimal-csp -->
|
||||
<!-- DEL https://github.com/jensimmons/cssremedy -->
|
||||
|
||||
<!-- DEL meta značky obecně https://www.vzhurudolu.cz/prirucka/meta-open-graph -->
|
||||
<title></title>
|
||||
<meta name="description" content="">
|
||||
<!-- DEL IE https://www.sitepoint.com/html5-older-browsers-and-the-shiv/ -->
|
||||
<!-- DEL https://www.vzhurudolu.cz/prirucka/checklist -->
|
||||
</head>
|
||||
<body>
|
||||
<!-- DEL -->
|
||||
</body>
|
||||
</html>
|
||||
endsnippet
|
||||
|
||||
snippet cmt "comment"
|
||||
<!-- ${0} -->
|
||||
endsnippet
|
||||
|
||||
snippet viewport_cordova "viewport used in cordova apps"
|
||||
<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1"/>
|
||||
endsnippet
|
||||
snippet csp_cordova "CSP used in cordova"
|
||||
<meta http-equiv="Content-Security-Policy" content="default-src * gap://ready file: gulp_place('app.url_scheme', 'variable'):; style-src 'self' 'unsafe-inline'; img-src * data: *; script-src 'self' 'unsafe-inline' 'unsafe-eval'"/>
|
||||
<meta http-equiv="Content-Security-Policy" content="default-src *; style-src 'self' 'unsafe-inline'; img-src 'self' data: android-webview-video-poster:; script-src 'self' 'unsafe-inline' 'unsafe-eval'">
|
||||
endsnippet
|
||||
#endextends
|
@ -1,8 +1,3 @@
|
||||
[TabBox]
|
||||
DesktopLayout=org.kde.breeze.desktop
|
||||
DesktopListLayout=org.kde.breeze.desktop
|
||||
LayoutName=org.kde.breeze.desktop
|
||||
|
||||
[Windows]
|
||||
Placement=Centered
|
||||
|
||||
|
@ -1,8 +1,3 @@
|
||||
/* --print/--echo aliases */
|
||||
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([]); }, });
|
||||
|
||||
/* deprecated/fallback */
|
||||
globalThis.cyclicLoop= function*(items){
|
||||
if(!items) items= 'win32'===process.platform ? '|/-\\' : "⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏";
|
||||
@ -16,3 +11,18 @@ globalThis.cyclicLoop= function*(items){
|
||||
Reflect.defineProperty($, "clipboard", {
|
||||
get(){ return s.$().run`xclip -o -selection clipboard`; }
|
||||
})
|
||||
|
||||
// /** Custom uncaughtException function */
|
||||
// export const uncaughtException= console.log;
|
||||
// /** Place for custom code when script starts */
|
||||
// export function onscript(){}
|
||||
/** Place for custom code when REPL starts (`--interactive`) */
|
||||
export function onrepl(){
|
||||
Reflect.defineProperty(s, "jq", { get(){ return file=> s.cat(file).xargs(JSON.parse); } });
|
||||
}
|
||||
/** Place for custom code when eval starts (`--eval`/`--print`) */
|
||||
export function oneval(){ /* --print/--echo aliases */
|
||||
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([]); }, });
|
||||
}
|
||||
|
4
.config/xremap.yml
Normal file
4
.config/xremap.yml
Normal file
@ -0,0 +1,4 @@
|
||||
keymap:
|
||||
- name: Ctrl+tab alias
|
||||
remap:
|
||||
C-KEY_KPSLASH: C-KEY_TAB
|
@ -3,7 +3,7 @@ AntiAliasFonts=true
|
||||
BoldIntense=true
|
||||
ColorScheme=DarkPastels
|
||||
DimmValue=54
|
||||
Font=Ubuntu Mono,9,-1,5,75,0,0,0,0,0,Bold
|
||||
Font=Ubuntu Mono,9,-1,5,700,0,0,0,0,0,0,0,0,0,0,1,Bold
|
||||
UseFontLineChararacters=false
|
||||
|
||||
[General]
|
||||
@ -12,4 +12,5 @@ Name=Můj
|
||||
Parent=FALLBACK/
|
||||
|
||||
[Scrolling]
|
||||
HistoryMode=2
|
||||
ScrollBarPosition=2
|
||||
|
@ -12,6 +12,7 @@ let g:user_tips_list= [
|
||||
\ 'packadd cfilter',
|
||||
\ 'Next word location → ]I [I ]<c-I> [<c-I> … <leader>]I <leader>[I',
|
||||
\ ':w !sudo tee > /dev/null %',
|
||||
\ 'v`]o`[ visual last change — https://www.reddit.com/r/vim/comments/ypt6uf/comment/ivl68xu/?utm_source=share&utm_medium=web2x&context=3',
|
||||
\ '`0·`"·`.·`` … last exit·edit·change·pre-jump … also g''*',
|
||||
\ 'q: q? q/ … @: ?<cr> /<cr> :&<cr> , ;',
|
||||
\ '<c-n><c-p> <c-x><c-l> <c-x><c-f> … :h ins-completion',
|
||||
|
4
.vimrc
4
.vimrc
@ -250,10 +250,6 @@
|
||||
nnoremap <s-k> a<cr><esc>
|
||||
for l in [ 'y', 'p', 'P', 'd' ] | for m in [ 'n', 'v' ]
|
||||
execute m.'noremap <leader>'.l.' "+'.l | endfor | endfor
|
||||
" ik ak (last change pseudo-text objects) – src: https://www.reddit.com/r/vim/comments/ypt6uf/comment/ivl68xu/?utm_source=share&utm_medium=web2x&context=3
|
||||
xnoremap ik `]o`[
|
||||
onoremap ik :<C-u>normal vik<cr>
|
||||
onoremap ak :<C-u>normal vikV<cr>
|
||||
" FOLDS
|
||||
command! -nargs=0 SETFOLDregions set foldmethod=marker
|
||||
command! -nargs=1 SETFOLDindent set foldmethod=indent | let &foldlevel=<q-args> | let &foldnestmax=<q-args>+1
|
||||
|
67
README.md
67
README.md
@ -25,7 +25,7 @@ see for example [How to Store Dotfiles - A Bare Git Repository \| Atlassian Git
|
||||
## On a new machine
|
||||
1. install git
|
||||
1. `cd ~`
|
||||
1. `gd_branch=main`
|
||||
1. `gd_branch=main` (see also variants `main-termux`)
|
||||
1. `git clone --bare --branch $gd_branch --depth 1 --recurse-submodules --shallow-submodules git@jaandrle.cz:jaandrle/dotfiles.git ~/.dotfiles`
|
||||
1. `alias gitdotfiles='/usr/bin/git --git-dir="$HOME/.dotfiles/" --work-tree="$HOME"'`
|
||||
1. `gitdotfiles config --local status.showUntrackedFiles no`
|
||||
@ -34,23 +34,45 @@ see for example [How to Store Dotfiles - A Bare Git Repository \| Atlassian Git
|
||||
1. `gitdotfiles checkout -f`
|
||||
1. `gitdotfiles submodule update --init --recursive`
|
||||
|
||||
## KDE Neon
|
||||
- [KDE Plasma5 Fixes](https://zren.github.io/kde/)
|
||||
- Using ‘HTML Wallpaper’ (wip)
|
||||
- [Bing Image Of The Day](./Obrázky/Bing Image Of The Day/index_template.html)
|
||||
- [GNOME Keyring in KDE Plasma - JWillikers](https://www.jwillikers.com/gnome-keyring-in-kde-plasma)
|
||||
- `sudo apt install $(check-language-support)`, see [Popup Language support is incomplete](http://unix.stackexchange.com/questions/421066/ddg#421079)
|
||||
- [KDE Neon does not have an hibernation option? : kde](https://www.reddit.com/r/kde/comments/6n5m49/kde_neon_does_not_have_an_hibernation_option/dk7hd8v/)
|
||||
- [kde plasma 5 - How to use miracast as an extended desktop on Linux? - Super User](https://superuser.com/questions/1160078/how-to-use-miracast-as-an-extended-desktop-on-linux)
|
||||
- [Best tiling extensions for kwin? : kde](https://www.reddit.com/r/kde/comments/qgsv2u/best_tiling_extensions_for_kwin/?sort=new)
|
||||
- [KDE Plasma5 Fixes](https://zren.github.io/kde/)
|
||||
- [Setup git on the CLI to use 2FA with GitHub](https://gist.github.com/ateucher/4634038875263d10fb4817e5ad3d332f)
|
||||
- [G'MIC - GREYC's Magic for Image Computing: A Full-Featured Open-Source Framework for Image Processing - Main](https://gmic.eu/)
|
||||
|
||||
|
||||
## PC log (cs)
|
||||
Sekce obsahuje log změn v Tuxedo laptopu s KDE Neon.
|
||||
|
||||
- [Aloxaf/silicon: Create beautiful image of your source code.](https://github.com/Aloxaf/silicon) {DONE <2024-03-07> *utils* agenda}$
|
||||
|
||||
### KDE Neon 6.0 (22.04)
|
||||
{NEXT <2024-03-20> *tilling* *hud* *html-wallpaper* *virtual-desktop* *klipper* agenda}$
|
||||
|
||||
- mostly OK
|
||||
- [ ] Wayland go to sleep even the external monitor is connected (HDMI) *→ seems to be this issue [438716 – Lid close leads to suspend even when external monitor is attached](https://bugs.kde.org/show_bug.cgi?id=438716)*
|
||||
- [ ] Kup is missing in Settings (only restore files option is available): *investigation → report a bug*
|
||||
- [ ] !!! Event calendar widget (in progress [ALikesToCode/plasma-applet-eventcalendar at plasma-6](https://github.com/ALikesToCode/plasma-applet-eventcalendar/tree/plasma-6))
|
||||
- [ ] tilling → try to use native, try to use [zeroxoneafour/polonium: Tiling window manager for KWin 5.27](https://github.com/zeroxoneafour/polonium) (when there will be a new release)
|
||||
- [ ] WIP: hud ([Zren/plasma-hud](https://github.com/Zren/plasma-hud) still works on X11), but maybe Ctrl+Alt+i and so on is OK?
|
||||
- testing to use command palletes in programs and sets shortcuts to `ctr+;` (✓ kde programs, ✓ gimp, ✓ libreoffice, ✓ inkscape, ✓ vscode)
|
||||
- [ ] [Fingerprint reader support : r/tuxedocomputers](https://www.reddit.com/r/tuxedocomputers/comments/176fscp/fingerprint_reader_support/), still receiving “no match”
|
||||
- [ ] [Clipboard support in Wayland · Issue #5157 · vim/vim](https://github.com/vim/vim/issues/5157#issuecomment-776008833)
|
||||
- [x] FIXED by update: ~desktop exceptionally freeze for less than a second: *investigation → report a bug*~
|
||||
- [x] FIXED by update: ~logout/poweroff dialog not showing and not working: *investigation → report a bug* … see below~
|
||||
- [x] krunner not launching → created `/usr/share/dbus-1/services/org.kde.krunner.service` (see below)
|
||||
- [x] meta+tab (last virtual desktop) → workaround [./bin/kde6-workarounds.mjs](./bin/kde6-workarounds.mjs)
|
||||
- [x] klipper (edit last item) → workaround [./bin/kde6-workarounds.mjs](./bin/kde6-workarounds.mjs)
|
||||
- [x] Active Window Control replaced with Window Title widget and its better
|
||||
- [x] FIXED by widget update: ~html wallpaper → workaround just concat images (see [./bin/§wallpaper\_BIOTD](./bin/§wallpaper_BIOTD))~
|
||||
- [x] ctrl+tab using [k0kubun/xremap: Key remapper for X11 and Wayland](https://github.com/k0kubun/xremap) and `sudo crontab -e`+`@reboot` and [./.config/xremap.yml](./.config/xremap.yml)
|
||||
|
||||
- [ ] [`npx npmkill` — Why are node_modules SO BIG 🤦♂️ #javascript #software #technology #code #webdev - YouTube](https://www.youtube.com/shorts/VgPNtow7fNM?app=desktop&si=Kl7CH3vCoyH7tqFU)
|
||||
|
||||
```bash
|
||||
qdbus org.kde.ksmserver /KSMServer org.kde.KSMServerInterface.logout 1
|
||||
Cannot find 'org.kde.KSMServerInterface.logout' in object /KSMServer at org.kde.ksmserver
|
||||
```
|
||||
[KDE Bugtracking System Main Page](https://bugs.kde.org/)
|
||||
```ini
|
||||
[D-BUS Service]
|
||||
Name=org.kde.krunner
|
||||
Exec=/usr/bin/krunner
|
||||
```
|
||||
|
||||
### KDE neon 5.26 (22.04)
|
||||
{DONE <2022-10-25 17:21> *mail* *hud* *klíčenka* agenda}$
|
||||
|
||||
@ -80,9 +102,18 @@ Sekce obsahuje log změn v Tuxedo laptopu s KDE Neon.
|
||||
|
||||
Postupováno podle návodu [Rename the `~/.local/lib/python3.8/site-packages/pkg_resources` folder to `pkg_resources_back`](https://askubuntu.com/a/1398073).
|
||||
|
||||
### kwin-tiling
|
||||
- https://gitlab.com/faho/kwin-tiling/
|
||||
|
||||
### KDE Neon
|
||||
- [KDE Plasma5 Fixes](https://zren.github.io/kde/)
|
||||
- Using ‘HTML Wallpaper’ (wip)
|
||||
- [Bing Image Of The Day](./Obrázky/Bing Image Of The Day/index_template.html)
|
||||
- [GNOME Keyring in KDE Plasma - JWillikers](https://www.jwillikers.com/gnome-keyring-in-kde-plasma)
|
||||
- `sudo apt install $(check-language-support)`, see [Popup Language support is incomplete](http://unix.stackexchange.com/questions/421066/ddg#421079)
|
||||
- [KDE Neon does not have an hibernation option? : kde](https://www.reddit.com/r/kde/comments/6n5m49/kde_neon_does_not_have_an_hibernation_option/dk7hd8v/)
|
||||
- [kde plasma 5 - How to use miracast as an extended desktop on Linux? - Super User](https://superuser.com/questions/1160078/how-to-use-miracast-as-an-extended-desktop-on-linux)
|
||||
- [Best tiling extensions for kwin? : kde](https://www.reddit.com/r/kde/comments/qgsv2u/best_tiling_extensions_for_kwin/?sort=new), https://gitlab.com/faho/kwin-tiling/
|
||||
- [KDE Plasma5 Fixes](https://zren.github.io/kde/)
|
||||
- [Setup git on the CLI to use 2FA with GitHub](https://gist.github.com/ateucher/4634038875263d10fb4817e5ad3d332f)
|
||||
- [G'MIC - GREYC's Magic for Image Computing: A Full-Featured Open-Source Framework for Image Processing - Main](https://gmic.eu/)
|
||||
|
||||
<details>
|
||||
<summary>`{… cmd}$` explanation</summary>
|
||||
|
@ -7,9 +7,9 @@
|
||||
"file_name": "github-desktop",
|
||||
"exec": "yes",
|
||||
"description": "Fork of GitHub Desktop to support various Linux distributions",
|
||||
"last_update": "2023-12-20T15:25:06Z",
|
||||
"last_update": "2024-02-04T22:31:22Z",
|
||||
"downloads": "/home/jaandrle/bin/github-desktop",
|
||||
"version": "release-3.3.6-linux3"
|
||||
"version": "release-3.3.8-linux2"
|
||||
},
|
||||
{
|
||||
"repository": "jaandrle/jaaCSS-cli",
|
||||
@ -29,9 +29,9 @@
|
||||
"group": "nondev",
|
||||
"file_name": "youtube-music",
|
||||
"exec": "yes",
|
||||
"last_update": "2024-01-05T14:44:27Z",
|
||||
"last_update": "2024-02-20T12:07:29Z",
|
||||
"downloads": "/home/jaandrle/bin/youtube-music",
|
||||
"version": "v3.2.2"
|
||||
"version": "v3.3.2"
|
||||
},
|
||||
{
|
||||
"repository": "ArchGPT/insomnium",
|
||||
@ -93,8 +93,8 @@
|
||||
{
|
||||
"repository": "dynobo/normcap",
|
||||
"name": "NormCap",
|
||||
"description": "OCR powered screen-capture tool to capture information instead of images",
|
||||
"group": "nondev",
|
||||
"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",
|
||||
@ -108,9 +108,9 @@
|
||||
"group": "nondev",
|
||||
"file_name": "upscayl",
|
||||
"exec": "yes",
|
||||
"last_update": "2024-01-16T09:54:25Z",
|
||||
"last_update": "2024-02-29T16:31:09Z",
|
||||
"downloads": "/home/jaandrle/bin/upscayl",
|
||||
"version": "v2.9.8"
|
||||
"version": "v2.10.0"
|
||||
},
|
||||
{
|
||||
"repository": "RasmusLindroth/tut",
|
||||
@ -152,9 +152,9 @@
|
||||
"group": "nondev",
|
||||
"file_name": "fedistar",
|
||||
"exec": "yes",
|
||||
"last_update": "2024-01-29T10:29:58Z",
|
||||
"last_update": "2024-02-29T11:08:37Z",
|
||||
"downloads": "/home/jaandrle/bin/fedistar",
|
||||
"version": "v1.8.3"
|
||||
"version": "v1.9.0"
|
||||
},
|
||||
{
|
||||
"repository": "ollama/ollama",
|
||||
@ -163,9 +163,9 @@
|
||||
"group": "ai",
|
||||
"file_name": "ollama",
|
||||
"exec": "yes",
|
||||
"last_update": "2024-01-26T18:19:36Z",
|
||||
"last_update": "2024-03-10T02:24:04Z",
|
||||
"downloads": "/home/jaandrle/bin/ollama",
|
||||
"version": "v0.1.22"
|
||||
"version": "v0.1.29"
|
||||
},
|
||||
{
|
||||
"repository": "neovim/neovim",
|
||||
@ -186,9 +186,9 @@
|
||||
"group": "dev",
|
||||
"file_name": "escrcpy",
|
||||
"exec": "yes",
|
||||
"last_update": "2023-12-27T01:18:21Z",
|
||||
"last_update": "2024-03-13T03:05:48Z",
|
||||
"downloads": "/home/jaandrle/bin/escrcpy",
|
||||
"version": "v1.16.8"
|
||||
"version": "v1.17.3"
|
||||
},
|
||||
{
|
||||
"repository": "drovp/drovp",
|
||||
@ -208,9 +208,9 @@
|
||||
"group": "ai",
|
||||
"file_name": "jan",
|
||||
"exec": "yes",
|
||||
"last_update": "2024-01-29T05:19:22Z",
|
||||
"last_update": "2024-03-11T06:34:40Z",
|
||||
"downloads": "/home/jaandrle/bin/jan",
|
||||
"version": "v0.4.5"
|
||||
"version": "v0.4.8"
|
||||
}
|
||||
]
|
||||
}
|
78
bin/kde6-workarounds.mjs
Executable file
78
bin/kde6-workarounds.mjs
Executable file
@ -0,0 +1,78 @@
|
||||
#!/usr/bin/env nodejsscript
|
||||
/* jshint esversion: 11,-W097, -W040, module: true, node: true, expr: true, undef: true *//* global echo, $, pipe, s, fetch, cyclicLoop */
|
||||
|
||||
const pathLastDesktop= ()=> $.xdg.temp`kde6-workarounds-last-desktop.txt`;
|
||||
const css= echo.css`
|
||||
.code { color: gray; }
|
||||
`;
|
||||
|
||||
$.api()
|
||||
.version("2024-02-29")
|
||||
.describe("Workarounds for KDE6.")
|
||||
.command("logout")
|
||||
.action(function(){
|
||||
$.is_silent= true;
|
||||
const res= s.run([
|
||||
"echo ::options::",
|
||||
"|",
|
||||
"rofi -dmenu -p 'Logout' -l 4 -theme-str 'window { width: 25ch; }' -normal-window"
|
||||
].join(" "), {
|
||||
options: [ "-", "poweroff", "reboot" ].join("\n")
|
||||
}).trim();
|
||||
if(res && res!=="-") s.run(res);
|
||||
$.exit(0);
|
||||
})
|
||||
.command("klipper-edit", "Edit last item in klipper.")
|
||||
.action(async function(){
|
||||
$.is_silent= true;
|
||||
const qdbus= "qdbus org.kde.klipper /klipper org.kde.klipper.klipper.";
|
||||
try{
|
||||
const candidate= s.run(`${qdbus}getClipboardContents`).trim();
|
||||
const content= await $.read({ "-p": "Edit", completions: [ candidate ] });
|
||||
s.run(`${qdbus}setClipboardContents "${content}"`);
|
||||
$.exit(0);
|
||||
} catch (_){
|
||||
$.exit(1);
|
||||
}
|
||||
})
|
||||
.command("desktops-alttab", "Workaround for KDE6 alt-tab between virtual desktops.")
|
||||
.action(function(){
|
||||
const path= pathLastDesktop();
|
||||
// Regarding ★ : this is a workaround for diagonal switching (it duplicates desktop index)
|
||||
let desktop= s.cat(path).trim() || "1";
|
||||
if(desktop.length>3){ // ★
|
||||
const [ _1, _2, ..._3 ]= desktop.slice(-4, desktop.length);
|
||||
if(_1===_2)
|
||||
desktop= desktop.slice(0, -4).concat(_1, ..._3);
|
||||
}
|
||||
if(desktop.length>2){ // ★
|
||||
const [ _1, _2 ]= desktop.slice(-2, desktop.length);
|
||||
if(_1===_2)
|
||||
desktop= desktop.slice(0, -1);
|
||||
}
|
||||
if(desktop.length>2){
|
||||
desktop= desktop.slice(-2, desktop.length);
|
||||
s.echo(desktop).to(path);
|
||||
}
|
||||
echo(desktop);
|
||||
s.run`qdbus org.kde.KWin /KWin org.kde.KWin.setCurrentDesktop ${desktop[0]}`;
|
||||
$.exit(0);
|
||||
})
|
||||
.command("desktops-last-dbus")
|
||||
.action(function(){
|
||||
echo([
|
||||
"dbus-monitor",
|
||||
'"interface=org.kde.KWin.VirtualDesktopManager" "member=currentChanged"',
|
||||
"|",
|
||||
'xargs -e -I {} kde6-workarounds.mjs desktops-last-save {}'
|
||||
].join(" "));
|
||||
$.exit(0);
|
||||
})
|
||||
.command("desktops-last-save <dbus>", "Workaround for KDE6 alt-tab between virtual desktops.")
|
||||
.action(function(dbus){
|
||||
if(-1===dbus.indexOf("path=/VirtualDesktopManager; interface=org.kde.KWin.VirtualDesktopManager; member=currentChanged"))
|
||||
return $.exit(1);
|
||||
const desktop= s.run`qdbus org.kde.KWin /KWin org.kde.KWin.currentDesktop`.trim();
|
||||
s.echo(desktop).toEnd(pathLastDesktop());
|
||||
})
|
||||
.parse();
|
@ -1,5 +1,6 @@
|
||||
#!/usr/bin/env nodejsscript
|
||||
/* jshint esversion: 11,-W097, -W040, module: true, node: true, expr: true, undef: true *//* global echo, $, pipe, s, fetch, cyclicLoop */
|
||||
import { kwallet } from "./§kwallet.mjs";
|
||||
const url_api= "https://nocodb.jaandrle.cz/api/v1/db/data/v1/Linky/Linky";
|
||||
$.api()
|
||||
.command("add-md")
|
||||
@ -9,7 +10,7 @@ $.api()
|
||||
|
||||
const res= await fetch(url_api, {
|
||||
body: JSON.stringify({ Popis: title.slice(1), Url: url.slice(0, -1) }),
|
||||
headers: { "xc-token": "Js7Qu0oT_wTmGJDFKlIZEBhwk87WF0L1wLmQO01F",
|
||||
headers: { "xc-token": kwallet([ "readPassword", "Passwords", "nocodb-linky" ])[0].toString(),
|
||||
"accept": "application/json", "Content-Type": "application/json"
|
||||
},
|
||||
method: "post"
|
||||
|
@ -2,7 +2,37 @@
|
||||
/* jshint esversion: 11,-W097, -W040, module: true, node: true, expr: true, undef: true *//* global echo, $, pipe, s, fetch, cyclicLoop */
|
||||
|
||||
$.api("")
|
||||
.version("2023-08-11")
|
||||
.version("2024-03-18")
|
||||
.command("silicon [file]", [
|
||||
"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.",
|
||||
"Další nápověda viz `silicon --help`.",
|
||||
])
|
||||
.option("--title", "Set window title (default: file name).")
|
||||
.option("--range", "Select lines from file in the form `start:end`")
|
||||
.option("--font-size, --fs", "Font size", 25)
|
||||
.action(function silicon(file, { title= file, range, fs, ["font-size"]: _fs, _, ...args }){
|
||||
args= Object.assign({
|
||||
theme: "OneHalfDark",
|
||||
font: `Ubuntu Mono =${fs}`,
|
||||
background: "#f06d78",
|
||||
["shadow-blur-radius"]: 30,
|
||||
["tab-width"]: 2
|
||||
}, args);
|
||||
args= Object.keys(args).flatMap(key=> [ "--"+key, args[key] ]);
|
||||
let from= file;
|
||||
const index_ext= file.lastIndexOf(".");
|
||||
const output= !file ? "silicon.png" : file.slice(0, index_ext+1)+"png";
|
||||
if(range && typeof range=== "string" && range.includes(":")){
|
||||
from= $.xdg.temp`silicon-range${file.slice(index_ext)}`;
|
||||
const content= s.$().cat(file).toString().split(/\r?\n/).slice(...range.split(":").map(n=> parseInt(n)+1));
|
||||
s.echo(content.join("\n")).to(from);
|
||||
}
|
||||
s.run`silicon ${from} --output ${output} --window-title ${title} ${args}`;
|
||||
echo(`Generated ${output}`);
|
||||
if(from!== file) s.rm(from);
|
||||
$.exit(0);
|
||||
})
|
||||
.command("textInImage [file]", "Generovat obrázek s textem pro sdílení na sociálních sítích.")
|
||||
.alias("tii")
|
||||
.option("--pointsize", "Text size", "62")
|
||||
|
@ -68,7 +68,6 @@ $.api("", true)
|
||||
.map(pipe(
|
||||
j=> j.choices[0].text.trim(),
|
||||
convertToArray,
|
||||
j=> (console.log(j), j),
|
||||
format==="regular" ? i=> i : i=> gitmoji(i, format==="git3moji"),
|
||||
a=> a.join("\n")
|
||||
))
|
||||
|
157
bin/§kwallet.mjs
Executable file
157
bin/§kwallet.mjs
Executable file
@ -0,0 +1,157 @@
|
||||
#!/usr/bin/env nodejsscript
|
||||
/* jshint esversion: 11,-W097, -W040, module: true, node: true, expr: true, undef: true *//* global echo, $, pipe, s, fetch, cyclicLoop */
|
||||
const css= echo.css`
|
||||
.error{ color: lightred; }
|
||||
.code, .method{ color: lightblue; }
|
||||
.code::before, .code::after{ content: "\`"; }
|
||||
.li{ padding-left: 2ch; }
|
||||
`;
|
||||
const default_wallet= "kdewallet";
|
||||
const cmd= "qdbus";
|
||||
if(!s.which(cmd))
|
||||
$.exit(1, echo([
|
||||
`%cError: ${cmd} not found.`,
|
||||
`%cInstall it with: %csudo apt install ${cmd}`,
|
||||
].join("\n"), css.error, css.unset, css.code));
|
||||
|
||||
import { EventEmitter } from "node:events";
|
||||
const events= new EventEmitter();
|
||||
const exit_event= "exit";
|
||||
|
||||
if($.isMain(import.meta)){
|
||||
events.on(exit_event, $.exit);
|
||||
|
||||
$.api("", true)
|
||||
.version("2024-03-05")
|
||||
.describe([
|
||||
`KWallet CLI using ${cmd}.`,
|
||||
"Call with no arguments to list all methods.",
|
||||
])
|
||||
.example("--wallet kdewallet folderList")
|
||||
.example("--wallet kdewallet readPassword folder entry")
|
||||
.option("--wallet, -w", "Wallet name", default_wallet)
|
||||
.action(function main({ _, wallet }){
|
||||
const [ results, is_ls ]= kwallet(_, { wallet });
|
||||
if(is_ls) echoLs(results);
|
||||
else echo(results);
|
||||
events.emit(exit_event);
|
||||
})
|
||||
.parse();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string[]} _ Query/arguments for qdbus
|
||||
* @param {object} [options]
|
||||
* @param {string} [options.wallet] Wallet name
|
||||
* @returns {[ string[], true ]|[ string, false ]}
|
||||
* */
|
||||
export function kwallet(_, { wallet= default_wallet }= {}){
|
||||
const qdbus= qdbusGenerator({
|
||||
service: "org.kde.kwalletd6",
|
||||
methods: "/modules/kwalletd6",
|
||||
wallet,
|
||||
exit_event
|
||||
});
|
||||
if(!_.length)
|
||||
return [ qdbus(), true ];
|
||||
else{
|
||||
//TODO: Map (`--literal` in qdbus and decode the result `echoMap`)
|
||||
const result= qdbus(_);
|
||||
return [ result, false ];
|
||||
}
|
||||
}
|
||||
function qdbusGenerator({ service, methods, wallet, exit_event }){
|
||||
const name= getScriptName();
|
||||
const no_id= [
|
||||
'allWalletsClosed',
|
||||
'applicationDisconnected',
|
||||
'folderListUpdated',
|
||||
'folderUpdated',
|
||||
'walletClosed',
|
||||
'walletCreated',
|
||||
'walletDeleted',
|
||||
'walletListDirty',
|
||||
'walletOpened',
|
||||
'changePassword',
|
||||
'close',
|
||||
'closeAllWallets',
|
||||
'deleteWallet',
|
||||
'disconnectApplication',
|
||||
'folderDoesNotExist',
|
||||
'isEnabled',
|
||||
'isOpen',
|
||||
'keyDoesNotExist',
|
||||
'localWallet',
|
||||
'networkWallet',
|
||||
'open',
|
||||
'openAsync',
|
||||
'openPath',
|
||||
'openPathAsync',
|
||||
'pamOpen',
|
||||
'reconfigure',
|
||||
'users',
|
||||
'wallets'
|
||||
];
|
||||
|
||||
let id;
|
||||
const qdbus= (...args)=> s.$().run`${cmd} ${service} ${methods} ${args}`;
|
||||
events.on(exit_event, ()=>{
|
||||
if(!id) return;
|
||||
qdbus("close", id, false, name);
|
||||
id= null;
|
||||
});
|
||||
return function([ method, ...args ]= []){
|
||||
if(!method) return qdbus();
|
||||
if(no_id.includes(method)) return qdbus(method, ...args);
|
||||
if(!id) open();
|
||||
return qdbus(method, id, ...args, name);
|
||||
};
|
||||
function open(){
|
||||
id= qdbus("open", wallet, 0, name).trim();
|
||||
return id;
|
||||
}
|
||||
}
|
||||
function echoMap(map){
|
||||
map= map.slice(1, -1).split(", ").map(n=> Number.parseInt(n));
|
||||
const ab= new ArrayBuffer(map.length);
|
||||
const view= new Uint8Array(ab);
|
||||
for(let i= 0; i<map.length; i++)
|
||||
view[i]= map[i];
|
||||
|
||||
const words= [];
|
||||
for(let i= 0; i<map.length; i+= 4){
|
||||
words.push(String.fromCharCode.apply(null, view.subarray(i, i+4)));
|
||||
}
|
||||
pipe(
|
||||
echo
|
||||
)(words);
|
||||
}
|
||||
function echoLs(list){
|
||||
const ns= "org.kde.KWallet.";
|
||||
pipe(
|
||||
list=> list.split("\n").filter(l=> l.startsWith("method") && -1!==l.indexOf(ns)),
|
||||
list=> list.map(l=> l.slice(l.indexOf(" ")+1)).map(l=> l.replace(ns, "")),
|
||||
list=> list.reduce((o, l)=> (o[Number(l.indexOf("int handle")!==-1)].push(l), o), [ [], [] ]),
|
||||
([ no_wallet, wallet ])=> [
|
||||
"Methods available without wallet:",
|
||||
...no_wallet.map(formatMethod),
|
||||
"Methods available with wallet (" + echo.format("%c--wallet", css.code) + " option):",
|
||||
...wallet.map(formatMethod)
|
||||
].join("\n"),
|
||||
echo
|
||||
)(list);
|
||||
function formatMethod(line){
|
||||
const ch_type= line.indexOf(" ")+1;
|
||||
const ch_name= line.indexOf("(", ch_type);
|
||||
return echo.format([
|
||||
"",
|
||||
line.slice(0, ch_type),
|
||||
line.slice(ch_type, ch_name),
|
||||
line.slice(ch_name)
|
||||
].join("%c"), css.li, css.method, css.unset);
|
||||
}
|
||||
}
|
||||
function getScriptName(){
|
||||
const { url }= import.meta;
|
||||
return (new URL(url)).href.slice((new URL("./", url).href.length));
|
||||
}
|
14
bin/§ultisnips.mjs
Executable file
14
bin/§ultisnips.mjs
Executable file
@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env nodejsscript
|
||||
/* jshint esversion: 11,-W097, -W040, module: true, node: true, expr: true, undef: true *//* global echo, $, pipe, s, fetch, cyclicLoop */
|
||||
$.is_fatal= true;
|
||||
const root= "~/.config/coc/ultisnips/";
|
||||
const files= Object.fromEntries( s.ls(root).map(fn=> [fn, s.cat(root+fn).trim()]) );
|
||||
Object.keys(files).forEach(fn=> {
|
||||
const file= files[fn];
|
||||
if(!file.startsWith("extends ")) return;
|
||||
const lines= file.split("\n");
|
||||
const line_end= pipe( id=> id===-1 ? lines.length : id )( lines.findIndex(l=> l.startsWith("#endextends")) );
|
||||
const include= lines[0].replace("extends ", "").trim().split(/, ?/g).map(s=> files[s+".snippets"]).join("\n");
|
||||
lines.splice(1, line_end-1, include);
|
||||
s.echo(lines.join("\n").trim()).to(root+fn);
|
||||
})
|
@ -153,7 +153,11 @@ async function actionUpdate(){
|
||||
}).then(f=> s.echo(f).to(dirs.one_files+fileName(url)));
|
||||
}));
|
||||
echo("One-file plugin(s) updated.");
|
||||
try{
|
||||
s.cd(dirs.bundle).$().run`git commit -m "Update"`;
|
||||
} catch(e){
|
||||
echo(e?.message);
|
||||
}
|
||||
updateRepo(dirs.pack, getPack());
|
||||
|
||||
$.exit(0);
|
||||
|
Reference in New Issue
Block a user