{"id":18549044,"url":"https://github.com/typoverflow/chainy-zsh-theme","last_synced_at":"2025-04-09T21:32:30.687Z","repository":{"id":122588785,"uuid":"339642985","full_name":"typoverflow/chainy-zsh-theme","owner":"typoverflow","description":"Chainy Theme for Oh My ZSH","archived":false,"fork":false,"pushed_at":"2024-08-24T06:15:00.000Z","size":2306,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-24T11:56:53.462Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/typoverflow.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-02-17T07:27:08.000Z","updated_at":"2024-08-24T06:15:04.000Z","dependencies_parsed_at":"2024-07-29T08:07:35.128Z","dependency_job_id":null,"html_url":"https://github.com/typoverflow/chainy-zsh-theme","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typoverflow%2Fchainy-zsh-theme","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typoverflow%2Fchainy-zsh-theme/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typoverflow%2Fchainy-zsh-theme/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typoverflow%2Fchainy-zsh-theme/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/typoverflow","download_url":"https://codeload.github.com/typoverflow/chainy-zsh-theme/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248114858,"owners_count":21050130,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T20:37:51.650Z","updated_at":"2025-04-09T21:32:30.096Z","avatar_url":"https://github.com/typoverflow.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Zsh Theme: Chainy\n在af-magic和[astro主题](https://github.com/iplaces/astro-zsh-theme)的基础上，加入了git和conda信息的multiline zsh theme。\n\n## 特性\n+ [x] multiline prompt: 首行由`blocks`构成，显示必要的信息；使用深灰色实线进行分隔\n+ [x] 借助`generate_theme.sh`脚本，可自由选择想要显示的信息块并生成对应的`.zsh-theme`文件\n\n## 兼容性\n需要安装nerd font字体才能正常显示图标。\n\n## 安装与配置\n+ 下载`generate_theme.sh`文件，使用该文件生成`.zsh-theme`。使用方法如下：\n  + `-l`选项可显示当前版本的主题支持显示的信息块。\n    ```bash\n    \u003e zsh generate_theme.sh -l\n    script usage:\n    This is a generator for chainy-zsh-theme. Specify the blocks you wish to present in PS1, and this script will generate corresponding file.\n    Supported blocks are:\n    ip     : ip address\n    path   : current working directory\n    git    : git statues\n    conda  : current conda environment\n    ```\n  + `-d \u003ctarget_dir\u003e`可指定主题文件的生成目录，默认为当前目录。\n  + 在脚本后指定想要加载的信息块，则生成的主题文件中，指定的信息块会按照顺序依次出现在PS1中。\n    ```bash\n    zsh generate_theme.sh git ip path\n    ```\n    上面的命令生成的主题文件为\n    ![](img/img1.png)\n+ (如果你实在不想使用上面的脚本，仓库里也有一个我最喜欢的默认主题文件~)\n+ 生成主题文件后，移动到`~/.oh-my-zsh/themes/`目录下\n```bash\nmv chainy.zsh-theme ~/.oh-my-zsh/themes/\n```\n+ 在`.zshrc`文件中，将`ZSH_THEME`修改为`ZSH_THEME=\"chainy\"`\n\n---\n## 截图\n+ 默认情况下，该主题会在第一行显示目录、时间、用户名主机名等信息，并在第二行开始接收命令\n  \n![](img/img2.png)\n\n+ 存在git repo/ip/conda环境时，会显示当前branch和status\n\n![](img/img3.png)\n\n---\n## TODO\n+ [ ] 增加其他的git信息，例如Head版本号`git_prompt_short_sha`\n+ [ ] 优化配色方案\n+ [x] 增加功能选择脚本\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftypoverflow%2Fchainy-zsh-theme","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftypoverflow%2Fchainy-zsh-theme","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftypoverflow%2Fchainy-zsh-theme/lists"}