From c34ceb4c0ecede346f9aadaf48e0bf1f48ccfc11 Mon Sep 17 00:00:00 2001 From: arzzen Date: Mon, 16 Jun 2025 08:55:00 +0200 Subject: [PATCH 1/2] _MENU_THEME=none --- README.md | 5 ++++- git-quick-stats | 36 +++++++++++++++++++++++------------- 2 files changed, 27 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 79b57eb..ed24a96 100644 --- a/README.md +++ b/README.md @@ -212,10 +212,13 @@ export _GIT_IGNORE_AUTHORS="(author@examle.com|username)" ### Color themes -You can change to the legacy color scheme by toggling the variable `_MENU_THEME` between `default` and `legacy` +You can change to the legacy color scheme by toggling the variable `_MENU_THEME` between `default` and `legacy`. +You can completely disable the color theme by setting the `_MENU_THEME` variable to `none`. ```bash export _MENU_THEME="legacy" +# or +export _MENU_THEME="none" ``` ![legacyThemeScreenshot](https://github.com/user-attachments/assets/3b319c1a-827f-47b8-bbfa-b8b59a39deef) diff --git a/git-quick-stats b/git-quick-stats index 72bb501..ecfc4a7 100755 --- a/git-quick-stats +++ b/git-quick-stats @@ -292,19 +292,29 @@ function showMenu() { EXIT_TXT="" # Adjustable color menu option - if [[ "${_theme}" == "legacy" ]]; then - TITLES="${BOLD}${RED}" - TEXT="${NORMAL}${CYAN}" - NUMS="${BOLD}${YELLOW}" - HELP_TXT="${NORMAL}${YELLOW}" - EXIT_TXT="${BOLD}${RED}" - else - TITLES="${BOLD}${CYAN}" - TEXT="${NORMAL}${WHITE}" - NUMS="${NORMAL}${BOLD}${WHITE}" - HELP_TXT="${NORMAL}${CYAN}" - EXIT_TXT="${BOLD}${CYAN}" - fi + case "${_theme}" in + "legacy" ) + TITLES="${BOLD}${RED}" + TEXT="${NORMAL}${CYAN}" + NUMS="${BOLD}${YELLOW}" + HELP_TXT="${NORMAL}${YELLOW}" + EXIT_TXT="${BOLD}${RED}" + ;; + "none" ) + TITLES="${BOLD}" + TEXT="${NORMAL}" + NUMS="${BOLD}" + HELP_TXT="${NORMAL}" + EXIT_TXT="${BOLD}" + ;; + *) + TITLES="${BOLD}${CYAN}" + TEXT="${NORMAL}${WHITE}" + NUMS="${NORMAL}${BOLD}${WHITE}" + HELP_TXT="${NORMAL}${CYAN}" + EXIT_TXT="${BOLD}${CYAN}" + ;; + esac printf %b "\\n${TITLES} Generate:${NORMAL}\\n" printf %b "${NUMS} 1)${TEXT} Contribution stats (by author)\\n" From 343351b762dd54026b4e496e570a0cd97cdcf456 Mon Sep 17 00:00:00 2001 From: arzzen Date: Tue, 17 Jun 2025 18:49:38 +0200 Subject: [PATCH 2/2] update manpage --- git-quick-stats | 3 ++- git-quick-stats.1 | 5 ++++- tests/commands_test.sh | 3 ++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/git-quick-stats b/git-quick-stats index ecfc4a7..e40867a 100755 --- a/git-quick-stats +++ b/git-quick-stats @@ -264,7 +264,8 @@ ADDITIONAL USAGE ex: export _GIT_MERGE_VIEW=enable You can also set _GIT_MERGE_VIEW to only show merge commits ex: export _GIT_MERGE_VIEW=exclusive - You can set _MENU_THEME to display the legacy color scheme + You can change to the legacy color scheme by toggling the variable \"_MENU_THEME\" between \"default\" and \"legacy\". + You can completely disable the color theme by setting the \"_MENU_THEME\" variable to \"none\". ex: export _MENU_THEME=legacy You can set _GIT_BRANCH to set the branch of the stats ex: export _GIT_BRANCH=master diff --git a/git-quick-stats.1 b/git-quick-stats.1 index 34dfb51..877172d 100644 --- a/git-quick-stats.1 +++ b/git-quick-stats.1 @@ -165,10 +165,13 @@ You can also set _GIT_MERGE_VIEW to only show merge commits, example: .PP .B export _GIT_MERGE_VIEW="exclusive" .PP -You can switch to the legacy color scheme, example: +You can change to the legacy color scheme by toggling the variable `_MENU_THEME` between `default` and `legacy`. You can completely disable the color theme by setting the `_MENU_THEME` variable to `none`, example: .PP .B export _MENU_THEME=legacy .PP +or +.B export _MENU_THEME=none +.PP You can set _GIT_BRANCH to set the branch of the stats, example: .PP .B export _GIT_BRANCH="master" diff --git a/tests/commands_test.sh b/tests/commands_test.sh index 9e2acf5..969f5d9 100755 --- a/tests/commands_test.sh +++ b/tests/commands_test.sh @@ -92,7 +92,8 @@ ADDITIONAL USAGE ex: export _GIT_MERGE_VIEW=enable You can also set _GIT_MERGE_VIEW to only show merge commits ex: export _GIT_MERGE_VIEW=exclusive - You can set _MENU_THEME to display the legacy color scheme + You can change to the legacy color scheme by toggling the variable \"_MENU_THEME\" between \"default\" and \"legacy\". + You can completely disable the color theme by setting the \"_MENU_THEME\" variable to \"none\". ex: export _MENU_THEME=legacy You can set _GIT_BRANCH to set the branch of the stats ex: export _GIT_BRANCH=master