libmsgmng.lib: allow users to write and select customized color schemes (~/.autospec.d/color-theme.<color_scheme>)
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
This commit is contained in:
parent
a2056ba9d5
commit
c8faaf8a70
@ -1,4 +1,5 @@
|
|||||||
Changes in version 1.14.2
|
Changes in version 1.14.2
|
||||||
|
--- Nov -- 2012 Davide Madrisan <davide.madrisan(a)gmail.com>
|
||||||
|
|
||||||
+ bugfix
|
+ bugfix
|
||||||
* plugins/* - Davide Madrisan:
|
* plugins/* - Davide Madrisan:
|
||||||
@ -45,6 +46,11 @@ Changes in version 1.14.2
|
|||||||
* autospec, autospec.conf, plugins/* - Davide Madrisan:
|
* autospec, autospec.conf, plugins/* - Davide Madrisan:
|
||||||
Replace the option '--colorize' by '--colors <color-theme>'.
|
Replace the option '--colorize' by '--colors <color-theme>'.
|
||||||
|
|
||||||
|
+ improvement
|
||||||
|
* libmsgmng.lib - Davide Madrisan:
|
||||||
|
Allow users to write and select customized color schemes:
|
||||||
|
~/.autospec.d/color-theme.<color_scheme>"
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
|
|
||||||
Changes in version 1.14.1 - _TO*Hacklab release
|
Changes in version 1.14.1 - _TO*Hacklab release
|
||||||
|
@ -50,9 +50,11 @@ function notify.note() {
|
|||||||
# args:
|
# args:
|
||||||
# none
|
# none
|
||||||
function notify.enable_colors() {
|
function notify.enable_colors() {
|
||||||
local color_scheme="$1"
|
local color_scheme="${1:-default}"
|
||||||
[ "$color_scheme" ] || color_scheme="default"
|
if [ -r ~/.@package@.d/color-theme.${color_scheme} ]; then
|
||||||
if [ -r /etc/@package@.d/color-theme.${color_scheme} ]; then
|
. ~/.@package@.d/color-theme.${color_scheme}
|
||||||
|
notify.debug "loading ~/.@package@.d/color-theme.${color_scheme}"
|
||||||
|
elif [ -r /etc/@package@.d/color-theme.${color_scheme} ]; then
|
||||||
. /etc/@package@.d/color-theme.${color_scheme}
|
. /etc/@package@.d/color-theme.${color_scheme}
|
||||||
notify.debug "loading /etc/@package@.d/color-theme.${color_scheme}"
|
notify.debug "loading /etc/@package@.d/color-theme.${color_scheme}"
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user