[Feature request]: change colors and minor Manual issue #7

Closed
opened 2020-07-03 11:09:51 +00:00 by BachoSeven · 4 comments
BachoSeven commented 2020-07-03 11:09:51 +00:00 (Migrated from github.com)

Hi, thank you for this, finally an elegant and lightweight typing program that isn't gtypist(although add-gtypist-exercises.sh is very appreciated)!

I think it would be cool to have the possibility to customize colors; i.e. substitute the three color codes for setstatus() with environmental variables, or even better entries in the config file that looks something like [FgNorm,FgCorrect,FgWrong]. If you want, I can try to PR this myself, however I'm just learning bash scripting so that might take a while.

Also, the "modes" table in the manual now covers all of the "DESCRIPTION" section; reading this, I suspect that you just forgot adding .TE after this line.

Hi, thank you for this, finally an elegant and lightweight typing program that isn't gtypist(although `add-gtypist-exercises.sh` is very appreciated)! I think it would be cool to have the possibility to customize colors; i.e. substitute the three color codes for `setstatus()` with environmental variables, or even better entries in the config file that looks something like [FgNorm,FgCorrect,FgWrong]. If you want, I can try to PR this myself, however I'm just learning bash scripting so that might take a while. Also, the "modes" table in the manual now covers all of the "DESCRIPTION" section; reading [this](https://www.systutorials.com/docs/linux/man/1-tbl/), I suspect that you just forgot adding `.TE` after this [line](https://github.com/budlabs/typiskt/blob/next/typiskt.1#L38).
BachoSeven commented 2020-07-03 11:29:31 +00:00 (Migrated from github.com)

About the gtpyist-exercises script, I noticed comparing with the original exercises that the numbering of some sets of exercises is not correct.

For instance, C-series' first lesson is consistently downloaded to file C/4 instead of C/1, which is what I assume to be the intended behavior. Instead, C/0 and C/1 are actually the first two parts of lesson C10 (and now that I wrote this down I think the issue might have something to do with single-digit numbering since it's C10; although I have not understood the awk section of the script quite yet)

About the `gtpyist-exercises` script, I noticed comparing with the original exercises that the numbering of some sets of exercises is not correct. For instance, C-series' first lesson is consistently downloaded to file C/4 instead of C/1, which is what I assume to be the intended behavior. Instead, C/0 and C/1 are actually the first two parts of lesson C10 (and now that I wrote this down I think the issue might have something to do with single-digit numbering since it's C`10`; although I have not understood the `awk` section of the script quite yet)
budRich commented 2020-07-03 12:08:53 +00:00 (Migrated from github.com)

Hello Bacho! Thanks for input. Changing colors in the settings would be a great addition, i will look into how it could be setup, but i think it will be customizable to the extent one can set the color number (0-7) for the colors. Using names or hexadecimal values (#FFF000 etc) have limited cross terminal support.

I will see what's up with the manpage, i use md2man to automatically generate the manpage from markdown, looks like i need to add one more linebreak after the table.

For some reason, the C-series is named in a completely different manner then the other exercises. so i just autonumbered them, i think i can fix it so we get the correct order.

Also, I should mention, that i do development on the 'dev' branch, which you will see have a different filestructure and stuff, and it uses bashbud which is my own crazy templating thing.

Hello Bacho! Thanks for input. Changing colors in the settings would be a great addition, i will look into how it could be setup, but i think it will be customizable to the extent one can set the color number (0-7) for the colors. Using names or hexadecimal values (#FFF000 etc) have limited cross terminal support. I will see what's up with the manpage, i use md2man to automatically generate the manpage from markdown, looks like i need to add one more linebreak after the table. For some reason, the C-series is named in a completely different manner then the other exercises. so i just autonumbered them, i think i can fix it so we get the correct order. Also, I should mention, that i do development on the 'dev' branch, which you will see have a different filestructure and stuff, and it uses **bashbud** which is my own crazy templating thing.
budRich commented 2020-07-03 16:31:23 +00:00 (Migrated from github.com)

Im testing out color options now, feels great, also makes the code more readable. I will add this to the config file (only place to change the colors)

# color of active word depending on status
# value should be an integer 0-15
# in the background tput setaf $status-color-error
# is used to generate the escape code
status-color-error = 1
status-color-correct = 2
status-color-active = 3

the values can be used in the script with the global variables _statuscorrect _statuserror _statusactive. Making it easier to understand then random 1, 2 and 3 which was the case prior.


regarding the manpage it seems to be a bug in go-md2man , i made a pullrequest to them, and guess i will use my fork of it till it gets fixed. https://github.com/cpuguy83/go-md2man/issues/59

Im testing out color options now, feels great, also makes the code more readable. I will add this to the config file (only place to change the colors) ``` text # color of active word depending on status # value should be an integer 0-15 # in the background tput setaf $status-color-error # is used to generate the escape code status-color-error = 1 status-color-correct = 2 status-color-active = 3 ``` the values can be used in the script with the global variables `_statuscorrect` `_statuserror` `_statusactive`. Making it easier to understand then random 1, 2 and 3 which was the case prior. --- regarding the manpage it seems to be a bug in go-md2man , i made a pullrequest to them, and guess i will use my fork of it till it gets fixed. https://github.com/cpuguy83/go-md2man/issues/59
budRich commented 2020-07-03 19:10:05 +00:00 (Migrated from github.com)

reopened as a reminder to look into the gtypist C exercises.

reopened as a reminder to look into the gtypist C exercises.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
bud/typiskt#7
No description provided.