diff options
author | romkatv <roman.perepelitsa@gmail.com> | 2020-01-04 21:02:58 +0300 |
---|---|---|
committer | romkatv <roman.perepelitsa@gmail.com> | 2020-01-04 21:02:58 +0300 |
commit | 0be72e33f1fc6e5f5c2430ff78ebe55a115d0e8d (patch) | |
tree | 0342d9e4b86e2a14ac21cf2590cbad32131324f8 | |
parent | 7b77d63e7e29fd81f691c9e43e3a3cadf72880a6 (diff) |
add notes
-rw-r--r-- | notes.txt | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/notes.txt b/notes.txt new file mode 100644 index 00000000..07b88579 --- /dev/null +++ b/notes.txt @@ -0,0 +1,20 @@ +function _p9k_on_widget() { + zle _p9k_orig_$1 "${@:2}" +} + +time ( repeat 1000 ( () { + local tmp=${TMPDIR:-/tmp}/p10k.bindings.$sysparams[pid] + { + bindkey >$tmp + local widget + for widget in ${(u)${${(f)"$(<$tmp)"}:#*\"}##* }; do + functions[_p9k_widget_$widget]='_p9k_on_widget '${(q)widget}' "$@"' + zle -A $widget _p9k_orig_$widget + zle -N $widget _p9k_widget_$widget + done + } always { + zf_rm -f $tmp + } +} ) ) # 2.774s + +time ( repeat 1000 ( () {} ) ) # 0.960s |