From 6561d03f72b0e97342f13592d4c93895807ec978 Mon Sep 17 00:00:00 2001 From: Lucas F Date: Sun, 20 Nov 2022 11:09:15 -0300 Subject: [PATCH] initial --- README.md | 6 +++- img/photo.png | Bin 0 -> 8531 bytes zsh-prompt.zsh | 80 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 85 insertions(+), 1 deletion(-) create mode 100644 img/photo.png create mode 100644 zsh-prompt.zsh diff --git a/README.md b/README.md index ada1ba1..a46742f 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,7 @@ # zsh-prompt -simple prompt \ No newline at end of file +A simple prompt theme to use with 🎸 Rock plugin manager. + + +![sample_img](./img/photo.png) + diff --git a/img/photo.png b/img/photo.png new file mode 100644 index 0000000000000000000000000000000000000000..a2c3ec29c19529f54c02676f58bd0a280a3610f5 GIT binary patch literal 8531 zcmZvibx>SQ)94q%6C^kU_YfR{yR*pR?jCH>;O@bLE)W(C7J@GBF2UVBxG%vSF3s{`E|hs?`hL1XlfUjIZn`Mh6!srG}V zn>=74=cEJLtizJHqDkO-FukI1aXszwx~0?h2ZDV^$|SM9O5BEN?vl~`Xsx%e!I?|hCh>Gn~-&2`*=qLC%7HOY!qS`!01LQZBsxW zW9spz!o%FdE)DoogQn5!PlsgHX(;e7FQ|k}MSc98beV>E{W5_=;Ctd2(;cr5DXprs zLLcDW+d=2h;=93RaZZvH6}xfB+5`ANs#cJJ zye|~lR}iOf?I+!7m$i-Q&R1Eclh&}9;R~cDXwGp%*9L3dK;rG5nA&Mpc_nLYUPvnw zn^j!;*_0kvHf=Rwv@~U(%_!cMflnS-pez%K-h&)}4-n3}+ zi(^L4?)`Up^pmfa5d7ZejLlCJV#mC1Df&=BH1-s|W;V37Ubt^q7Le#2$-nk(y(@#B z99Q-m>*P4!D5?Qstod|#B@!591I~`i+}_9QWE5>46Qu=lqS*TRu=utHh`v9yIKx)4 zvE~@ODztw|uu#_)@;Nrsmj&-v76&hrEgE2%vkUed^Z`Y=#Vt zi&y^fU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)vH4kkc#iwYMBVAa#iv_QqDI6#!T z10#{}`&}*kbYkQiJVf*bx_R+&yg**~Ladj|x7^4@+;&#s1Kw1-X~+>#(AT<%&&G6A zXb70T_P=K0cbQu->;3ahA&z|^6bu3PO{WV_{HBl9WJD&SZ9^~(5*Pod( zGdZ3+9qBnDbN4_!Z1G9Upd@75pTd)bDn8d7adT5a3^DZn$)U4J0koZ;@!8Y1kz(j^ zd;3mIO$eRx2SLam3v*Ll1MSgp{O`4*%og<`EEuBo>9G?#o(<+)YEZB{S9&~ z%emb!5ia-udxR1yT;T0Ek2!~}T!n(1c>APsIh)+xhEmm+4l>Oz-)LoeZw0X<3sIq4 zk!BdombJnuwFz+nvY)Eg=>-4O`5E_KDPpJr~2sO{_3fR}&o0`%J}C*>tEBEMJB7w!6hyG2M_7ITLu1qs{6#mYwdjET9d{*Pb2 z=SbJ)|C?P3%0JjBcql9s=ybqJFZML-|F83ZG}6~~_G@q;1?E^2dOezjyz%|7mO7@N zuY1|+;pyv|!Mue#@p!F1nU05ceMKRNN50J%Nox!0`_GpOQ;3m`;(rDI@8X{P2|~u> z{!b#q^voVP2Vx%b_P<^KwJqGqLHcU#%#@uvq;Csht?2jhKmT#|?~Ql;mWQa/dev/null 2>&1 || : + fi + ASYNC_PROC=$! +} + +_prompt_vcs_prompt () { + vcs_info + printf "%s" "$vcs_info_msg_0_" > "$(_prompt_temp_file)" + kill -s USR1 $$ +} + +_prompt_exit () { + rm -f "$(_prompt_temp_file)" 2> /dev/null +} + +_display_arrow() { + echo "%(?:%{$fg_bold[green]%}➙ : %{$fg_bold[red]%}➙ %{$reset_color%})" +} + +_prompt_string_width () { + local str=$1 + echo ${#${(S%%)str//(\%([KF1]|)\{*\}|\%[Bbkf])}} +} + +_prompt_temp_file() { + echo "/tmp/$(whoami)_zsh_rprompt.$$" +} + +TRAPUSR1 () { + git_prompt="$(cat $(_prompt_temp_file))" + ASYNC_PROC=0 + zle && zle .reset-prompt +} + + +function clear-scrollback-buffer { + clear + ASYNC_PROC=0 + _prompt_precmd + zle .reset-prompt && zle -R +} + +zle -N clear-scrollback-buffer +bindkey '^L' clear-scrollback-buffer + + +_prompt_setup $@