当前位置: 首页 > Linux

[linux]更改powerline-shell的主题

时间:2023-04-06 22:28:01 Linux

powerline-shell默认的主题有点丑1.点击themes2。可以看到themes3的介绍。启动configuration3.1首先执行这两条命令创建一个config.json文件。mkdir-p~/.config/powerline-shellpowerline-shell--generate-config>~/.config/powerline-shell/config.json3.2下载官方预设模板主题下载地址powerline_shell/themes图中的几个py的文件是主题文件。下载位置随意。我下载到和config.json同级目录下,在~/.config/powerline-shell文件夹下。3.3配置下载的模板主题使其生效3.3.1修改config.json文件编辑config.json文件,添加如下内容,将“default.py”修改为对应主题的py文件{"segments":["virtual_env","username","hostname","ssh","cwd","git","hg","jobs","root"],"theme":"/home/yjc/.config/powerline-shell/default.py"}3.3.2修改生效保存退出,重新打开终端即可看到效果default.pythemebasic.pythemegruvbox.pytheme其他的自己试试最后分享我的主题来自powerline_shell。themes.defaultimportDefaultColorclassColor(DefaultColor):USERNAME_FG=15USERNAME_BG=4USERNAME_ROOT_BG=1HOSTNAME_FG=15HOSTNAME_BG=10HOME_SPECIAL_DISPLAY=FalsePATH_FG=0PATH_BG=7CWD_FG=0SEPARATOR_FG=14READONLY_BG=1READONLY_FG=7REPO_CLEAN_FG=0REPO_CLEAN_BG=DIY_FG_REPOrepo_dirty_bg=15jobs_fg=4jobs_bg=7cmd_passed_fg=15cmd_passed_bg=2cmd_failed_fg=15cmd_failed_bg=1svn_changes_fg=repo_dir_fgsvn_fgsvn_fgsvnire_bgg=repoifirt=repol=riirtual=ruit=rual=rual=rual=rual=rual=rual=