Compare commits

..

No commits in common. "98073783bf6eadb25b9bcb608dadb2d614c35da8" and "36376a2e34974aa94bc39aa14451707d4f084b34" have entirely different histories.

12 changed files with 80 additions and 2581 deletions

View File

@ -1,3 +1,28 @@
# 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/ -->
@ -25,9 +50,6 @@ 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"/>

View File

@ -1,37 +1,25 @@
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
# 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

File diff suppressed because it is too large Load Diff

View File

@ -1,124 +1 @@
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

View File

@ -1,3 +1,8 @@
[TabBox]
DesktopLayout=org.kde.breeze.desktop
DesktopListLayout=org.kde.breeze.desktop
LayoutName=org.kde.breeze.desktop
[Windows]
Placement=Centered

View File

@ -1,3 +1,8 @@
/* --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 ? '|/-\\' : "⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏";
@ -11,18 +16,3 @@ 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([]); }, });
}

View File

@ -12,7 +12,6 @@ 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
View File

@ -250,6 +250,10 @@
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

View File

@ -43,7 +43,7 @@ Sekce obsahuje log změn v Tuxedo laptopu s KDE Neon.
{NEXT <2024-03-20> *tilling* *hud* *html-wallpaper* *virtual-desktop* *klipper* agenda}$
- mostly OK
- [x] FIXED by update: ~desktop exceptionally freeze for less than a second: *investigation → report a bug*~
- [ ] 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~
- [ ] Kup is missing in Settings (only restore files option is available): *investigation → report a bug*
- [x] krunner not launching → created `/usr/share/dbus-1/services/org.kde.krunner.service` (see below)
@ -51,7 +51,7 @@ Sekce obsahuje log změn v Tuxedo laptopu s KDE Neon.
- [x] klipper (edit last item) → workaround [./bin/kde6-workarounds.mjs](./bin/kde6-workarounds.mjs)
- [ ] !!! Event calendar widget
- [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))~
- [ ] html wallpaper → workaround just concat images (see [./bin/§wallpaper\_BIOTD](./bin/§wallpaper_BIOTD))
- [ ] 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)
- [ ] hud ([Zren/plasma-hud](https://github.com/Zren/plasma-hud) still works on X11), but maybe Ctrl+Alt+i and so on is OK?
- [ ] [Fingerprint reader support : r/tuxedocomputers](https://www.reddit.com/r/tuxedocomputers/comments/176fscp/fingerprint_reader_support/), still receiving “no match”

View File

@ -108,9 +108,9 @@
"group": "nondev",
"file_name": "upscayl",
"exec": "yes",
"last_update": "2024-02-29T16:31:09Z",
"last_update": "2024-02-10T12:17:10Z",
"downloads": "/home/jaandrle/bin/upscayl",
"version": "v2.10.0"
"version": "v2.9.9"
},
{
"repository": "RasmusLindroth/tut",
@ -152,9 +152,9 @@
"group": "nondev",
"file_name": "fedistar",
"exec": "yes",
"last_update": "2024-02-29T11:08:37Z",
"last_update": "2024-02-09T11:38:02Z",
"downloads": "/home/jaandrle/bin/fedistar",
"version": "v1.9.0"
"version": "v1.8.4"
},
{
"repository": "ollama/ollama",
@ -163,9 +163,9 @@
"group": "ai",
"file_name": "ollama",
"exec": "yes",
"last_update": "2024-03-10T02:24:04Z",
"last_update": "2024-02-22T22:55:46Z",
"downloads": "/home/jaandrle/bin/ollama",
"version": "v0.1.29"
"version": "v0.1.27"
},
{
"repository": "neovim/neovim",
@ -186,9 +186,9 @@
"group": "dev",
"file_name": "escrcpy",
"exec": "yes",
"last_update": "2024-03-13T03:05:48Z",
"last_update": "2023-12-27T01:18:21Z",
"downloads": "/home/jaandrle/bin/escrcpy",
"version": "v1.17.3"
"version": "v1.16.8"
},
{
"repository": "drovp/drovp",
@ -208,9 +208,9 @@
"group": "ai",
"file_name": "jan",
"exec": "yes",
"last_update": "2024-03-11T06:34:40Z",
"last_update": "2024-02-26T03:30:36Z",
"downloads": "/home/jaandrle/bin/jan",
"version": "v0.4.8"
"version": "v0.4.7"
}
]
}
}

View File

@ -2,16 +2,15 @@
/* jshint esversion: 11,-W097, -W040, module: true, node: true, expr: true, undef: true *//* global echo, $, pipe, s, fetch, cyclicLoop */
$.api("")
.version("2024-03-18")
.version("2024-03-07")
.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 }){
.action(function silicon(file, { range, fs, ["font-size"]: _fs, _, ...args }){
args= Object.assign({
theme: "OneHalfDark",
font: `Ubuntu Mono =${fs}`,
@ -28,7 +27,7 @@ $.api("")
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}`;
s.run`silicon ${from} --output ${output} --window-title ${file} ${args}`;
echo(`Generated ${output}`);
if(from!== file) s.rm(from);
$.exit(0);

View File

@ -1,14 +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 */
$.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);
})