Code Monkey home page Code Monkey logo

zhiyin-zsh-theme's Introduction

Zhiyin-zsh-theme

Inspired by Zhiyin, emoji-ps1 and built on ys-zsh-theme

Installation

  1. Install Zhiyin.otf font, select it in your iTerm2 (under Non-ASCII font) and add it to your VS Code's font family.
  2. cp zhiyin.zsh-theme ~/.oh-my-zsh/themes/, or just add this code snippet to your favourite zsh theme.

For Windows WSL users, install Zhiyin.otf and configure your VSCode by adding this to the settings.json "terminal.integrated.fontFamily": " 'Cascadia Mono',Menlo, Monaco, 'Courier New', monospace, Zhiyin".

Zhiyin Sing

Sing upon ERR signal. Enable by adding below to zhiyin.zsh-theme, and copy niganma.mp3 somewhere you like.

function zhiyin_sing {
    afplay ~/Downloads/niganma.mp3
}

trap zhiyin_sing ERR

zhiyin-zsh-theme's People

Contributors

amyangxyz avatar

Stargazers

 avatar  avatar levon avatar 14em avatar li shenjie avatar arttnba3 avatar ForestL avatar im-oss avatar beldon avatar 诺墨 avatar  avatar ... avatar  avatar AN Long avatar kepresidenan avatar  avatar Ha Ska avatar Hai Zhu avatar Steve Yu avatar  avatar  avatar Wizyoung avatar Shaohao Zeng avatar  avatar ⛵ avatar xuty avatar  avatar Meng avatar wanquanyou avatar Zzde avatar Lockey avatar  avatar 刘志聪 avatar Anjhon avatar 0ops avatar Jerry Ma avatar YiHong avatar saeed avatar zhouzhilong avatar  avatar 狗娃子 avatar wisPengrada avatar jie wang avatar jxfffff avatar 墨坊丶 avatar  avatar Zhu avatar  avatar Yiwei Zhang avatar  avatar CraneL avatar tingyun avatar Rea avatar  avatar  avatar  avatar  avatar oxygen avatar JXianSheng avatar  avatar Yieldone avatar 东方未白 avatar joestar avatar 沚水 avatar  avatar  avatar Skewcy avatar

Watchers

 avatar  avatar

zhiyin-zsh-theme's Issues

通过设置preexec和precmd钩子,来实现执行命令前停止动画,执行命令后恢复动画

我在实际使用过程中,不仅仅是vim会受到动画影响,而且还包括mysql的前两个字母会被动画替代,ssh远程时的开头部分会被动画替代,复制粘贴多行命令的时候,最后一行命令的开头会被动画替代。
我的系统相关信息:

OS: Kubuntu 22.04.2 LTS x86_64
Kernel: 5.19.0-41-generic
Shell: zsh 5.8.1 
DE: Plasma 5.24.7
Terminal: terminator

我现在是通过设置preexec和precmd钩子,来实现执行命令前停止动画,执行命令后恢复动画,我测试我常用的一些命令,目前多行命令粘贴的时候开头还是会被动画替换,不过不影响命令的执行
代码由GPT4提供(

# zhiyin theme option 
psanimate 0.08

# 设置 zsh 的 preexec 和 precmd 钩子
autoload -Uz add-zsh-hook

# 在执行命令之前停止动画
preexec() {
  psanimate_stop
}

# 在命令完成后重新启动动画
precmd() {
  psanimate 0.08
}

add-zsh-hook -Uz preexec preexec
add-zsh-hook -Uz precmd precmd

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.