Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat]: Possibility to redefine terminal color codes #319

Closed
2 of 3 tasks
RankkaApina opened this issue Sep 12, 2024 · 1 comment
Closed
2 of 3 tasks

[feat]: Possibility to redefine terminal color codes #319

RankkaApina opened this issue Sep 12, 2024 · 1 comment
Assignees
Labels
feature-request 💡 Suggests new feature. stale 👻 No activity for quite some time.

Comments

@RankkaApina
Copy link

Feature description

Have an option to input zi defined colors from a file

Related Code

Terminal color codes.

if [[ -z $SOURCED && ( ${+terminfo} -eq 1 && -n ${terminfo[colors]} ) || ( ${+termcap} -eq 1 && -n ${termcap[Co]} ) ]] {
ZI+=(
col-annex $'\e[38;5;165m' col-info $'\e[38;5;82m' col-p $'\e[38;5;81m'
col-apo $'\e[1;38;5;220m' col-info2 $'\e[38;5;220m' col-pkg $'\e[1;3;38;5;27m'
col-b $'\e[1m' col-info3 $'\e[1m\e[38;5;220m' col-pname $'\e[1;4m\e[32m'
col-aps $'\e[38;5;117m' col-baps $'\e[1;38;5;82m' col-pre $'\e[38;5;93m'
col-bar $'\e[38;5;82m' col-bcmd $'\e[38;5;220m' col-profile $'\e[38;5;201m'
col-bspc $'\b' col-bapo $'\e[1;39;5;220m' col-keyword $'\e[32m'
col-b-lhi $'\e[1m\e[38;5;27m' col-lhi $'\e[38;5;33m' col-slight $'\e[38;5;230m'
col-b-warn $'\e[1;38;5;214m' col-msg $'\e[0m' col-st $'\e[9m'
col-cmd $'\e[38;5;82m' col-msg2 $'\e[38;5;172m' col-tab $' \t '
col-data $'\e[38;5;82m' col-msg3 $'\e[38;5;238m' col-term $'\e[38;5;190m'
col-data2 $'\e[38;5;39m' col-meta $'\e[38;5;50m' col-th-bar $'\e[38;5;82m'
col-dir $'\e[3;38;5;135m' col-meta2 $'\e[38;5;135m' col-txt $'\e[38;5;254m'
col-ehi $'\e[1m\e[38;5;210m' col-nb $'\e[22m' col-u $'\e[4m'
col-error $'\e[1m\e[38;5;204m' col-nit $'\e[23m' col-uname $'\e[1;4m\e[35m'
col-failure $'\e[38;5;204m' col-nl $'\n' col-uninst $'\e[38;5;118m'
col-faint $'\e[38;5;240m' col-note $'\e[38;5;148m' col-url $'\e[38;5;33m'
col-file $'\e[3;38;5;39m' col-nst $'\e[29m' col-u-warn $'\e[4;38;5;214m'
col-func $'\e[38;5;135m' col-nu $'\e[24m' col-var $'\e[38;5;39m'
col-flag $'\e[1;3;38;5;79m' col-it $'\e[3m' col-quo $'\e[1;38;5;33m'
col-glob $'\e[38;5;226m' col-num $'\e[3;38;5;154m' col-version $'\e[3;38;5;46m'
col-happy $'\e[1m\e[38;5;82m' col-obj $'\e[38;5;218m' col-warn $'\e[38;5;214m'
col-hi $'\e[1m\e[38;5;165m' col-obj2 $'\e[38;5;118m' col-dbg $'\e[90m'
col-ice $'\e[38;5;39m' col-ok $'\e[38;5;220m' col-rst $'\e[0m'
col-id-as $'\e[4;38;5;220m' col-opt $'\e[38;5;82m' col-time $'\e[38;5;220m'
col-quos $'\e[1;38;5;160m'
col-mdsh $'\e[1;38;5;220m'"${${${(M)LANG:#UTF-8}:+–}:--}"$'\e[0m'
col-mmdsh $'\e[1;38;5;220m'"${${${(M)LANG:#UTF-8}:+――}:--}"$'\e[0m'
col-↔ ${${${(M)LANG:#UTF-8}:+$'\e[38;5;82m↔\e[0m'}:-$'\e[38;5;82m«-»\e[0m'}
col-… "${${${(M)LANG:#UTF-8}:+…}:-...}" col-ndsh "${${${(M)LANG:#UTF-8}:+–}:-}"
col--… "${${${(M)LANG:#UTF-8}:+⋯⋯}:-···}" col-lr "${${${(M)LANG:#UTF-8}:+↔}:-"«-»"}"
)
if [[ ( ${+terminfo} -eq 1 && ${terminfo[colors]} -ge 256 ) || ( ${+termcap} -eq 1 && ${termcap[Co]} -ge 256 ) ]] {
ZI+=( col-pname $'\e[1;4m\e[38;5;39m' col-uname $'\e[1;4m\e[38;5;207m' )
}
}

Additional Context

Instead of the code I copy-pasted from zi.zsh, if you could have these as a file that could be changed by the user (e.g. export ZI[COLORS]), that would be awesome. I'm kind of particular when it comes to color schemes and the current zi colors clash horribly with my chosen theme. I would like to be able to redefine them easily without changing source code (because then I'll have issues every time there's an update).

Self-service

  • I'd be willing to address this documentation request myself.

Have you read the Contributing Guidelines?

Are you familiar with the Contributor Covenant Code of Conduct?

Contact Details

No response

@RankkaApina RankkaApina added the feature-request 💡 Suggests new feature. label Sep 12, 2024
Copy link

There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be marked as stale.
Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a 👍
Because this issue is marked as stale, it will be closed and locked in 7 days if no further activity occurs.
Thank you for your contributions!

@github-actions github-actions bot added the stale 👻 No activity for quite some time. label Oct 13, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request 💡 Suggests new feature. stale 👻 No activity for quite some time.
Projects
None yet
Development

No branches or pull requests

2 participants