{"id":25872166,"url":"https://github.com/anki-code/shell-prompt-theme-bar","last_synced_at":"2025-03-02T07:44:46.633Z","repository":{"id":103638813,"uuid":"210327824","full_name":"anki-code/shell-prompt-theme-bar","owner":"anki-code","description":"The shell prompt appearance conception called Bar.","archived":false,"fork":false,"pushed_at":"2025-02-17T14:21:34.000Z","size":105,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-02T07:44:40.880Z","etag":null,"topics":["bash","fish","ohmyzsh","omz-plugin","prompt","shell","shell-pro","zsh"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/anki-code.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null},"funding":{"custom":["https://github.com/anki-code","https://www.buymeacoffee.com/xxh"]}},"created_at":"2019-09-23T10:29:58.000Z","updated_at":"2025-02-17T14:21:38.000Z","dependencies_parsed_at":"2023-05-24T04:15:39.686Z","dependency_job_id":null,"html_url":"https://github.com/anki-code/shell-prompt-theme-bar","commit_stats":null,"previous_names":["anki-code/shell-prompt-theme-bar"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anki-code%2Fshell-prompt-theme-bar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anki-code%2Fshell-prompt-theme-bar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anki-code%2Fshell-prompt-theme-bar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anki-code%2Fshell-prompt-theme-bar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anki-code","download_url":"https://codeload.github.com/anki-code/shell-prompt-theme-bar/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241476437,"owners_count":19968916,"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":["bash","fish","ohmyzsh","omz-plugin","prompt","shell","shell-pro","zsh"],"created_at":"2025-03-02T07:44:45.827Z","updated_at":"2025-03-02T07:44:46.614Z","avatar_url":"https://github.com/anki-code.png","language":"Shell","readme":"## Bar theme\n\nFeatures:\n\n* It looks not like Christmas tree. Most of themes ([omz examples](https://github.com/robbyrussell/oh-my-zsh/wiki/Themes)) look like Christmas garland and frustrate attention 🎄 💈. But terminal is most for write commands and get output, not for color juggling 🖥 \n\n* It has three attention aspects by priority: first - command and path, second - output, third - pills/sections 👓 \n\n* It has a bar along all space and it is a great separator ⬛️ \n\n* The command beginning has fixed position and command has color with intensity. It's great for reading and typing 💚 \n\n* The pills/sections placed to right but not in RPROMPT and it allows you to secure copy the command and output without environmental disclosure 🔒 \n\n* The pills/sections can have additional background or color accent if you need 💊 \n\n## Appearance\n\n![zsh bar theme](zsh-bar-theme-example.png)\n\nScreeshot from [Hyper](https://hyper.is) with [Fira Code](https://github.com/tonsky/FiraCode) or something like this.\n\n## [xonsh](https://github.com/xonsh/xonsh)\n\nUse [xontrib-prompt-bar](https://github.com/anki-code/xontrib-prompt-bar)\n\n\n## [Starship](https://github.com/starship/starship)\n\nTake a look https://github.com/starship/starship/issues/5059#issuecomment-2663192011\n\n## [Oh-my-zsh](https://github.com/robbyrussell/oh-my-zsh/)\n```\ngit clone https://github.com/anki-code/zsh-bar-theme ~/.oh-my-zsh/custom/themes/zsh-bar-theme\nln -s ~/.oh-my-zsh/custom/themes/zsh-bar-theme/bar.zsh-theme ~/.oh-my-zsh/custom/themes/bar.zsh-theme\nsed -i  's/^ZSH_THEME=/ZSH_THEME=\"bar\"\\n#ZSH_THEME=/g' ~/.zshrc\nzsh\n```\n\n## [Powerlevel10k](https://github.com/romkatv/powerlevel10k)\n1. `.zshrc` settings:\n```\nPOWERLEVEL9K_VISUAL_IDENTIFIER_EXPANSION=\nPOWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(user host dir newline prompt_char)\nPOWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(vcs command_execution_time background_jobs virtualenv anaconda pyenv nodenv nvm nodeenv rbenv rvm kubecontext terraform nordvpn ranger time newline)\nPOWERLEVEL9K_TIME_FORMAT='%D{%y-%m-%d %H:%M:%S%z}'\nPOWERLEVEL9K_BACKGROUND=234\nPOWERLEVEL9K_PROMPT_CHAR_BACKGROUND=\nPOWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_BACKGROUND=234\nPOWERLEVEL9K_USER_FOREGROUND=244\nPOWERLEVEL9K_HOST_FOREGROUND=244\nPOWERLEVEL9K_ANACONDA_FOREGROUND=244\nPOWERLEVEL9K_VCS_FOREGROUND=244\nPOWERLEVEL9K_TIME_FOREGROUND=244\nzle_highlight=( default:fg=green,bold )\n```\n2. Also you can try the proof of concept config [p10k-bar.zsh](https://gist.github.com/romkatv/7f48d0deae7a3449f34a4870feaba0f5). It work but not recommended because it disable many `p10k` features.\n\n## bash PoC\n```\ntrap 'echo -ne \"\\e[0m\"' DEBUG\nfunction prompt_command {\n        local l=\"`hostname` `whoami` `pwd`\"\n        local r=\"`date --rfc-3339=sec`\"\n        local ls=${#l}\n        local rs=${#r}\n        let ss=$COLUMNS-$ls-$rs-2\n        local sp=\"`printf %${ss}s | tr ' ' ' '`\"\n        echo -e \"\\n\\e[48;5;234m$l $sp $r\\e[0m\"\n}\n\nexport PROMPT_COMMAND=\"${PROMPT_COMMAND:+$PROMPT_COMMAND ;} prompt_command\"\nexport PS1='\\$ \\[\\033[01;32m\\]' \n```\n","funding_links":["https://github.com/anki-code","https://www.buymeacoffee.com/xxh"],"categories":["Themes","Recently Updated"],"sub_categories":["ZSH on Windows","[Mar 21, 2025](/content/2025/03/21/README.md)"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanki-code%2Fshell-prompt-theme-bar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanki-code%2Fshell-prompt-theme-bar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanki-code%2Fshell-prompt-theme-bar/lists"}